TWI457763B - Data syncing system and method thereof - Google Patents
Data syncing system and method thereof Download PDFInfo
- Publication number
- TWI457763B TWI457763B TW101138391A TW101138391A TWI457763B TW I457763 B TWI457763 B TW I457763B TW 101138391 A TW101138391 A TW 101138391A TW 101138391 A TW101138391 A TW 101138391A TW I457763 B TWI457763 B TW I457763B
- Authority
- TW
- Taiwan
- Prior art keywords
- synchronization
- data
- client
- server
- user
- Prior art date
Links
Landscapes
- Information Transfer Between Computers (AREA)
Description
本發明為有關於一種數據同步系統及其方法,特別是指一種應用在多用戶端之數據同步系統及其方法。The present invention relates to a data synchronization system and method thereof, and more particularly to a data synchronization system and method thereof applied to a multi-user terminal.
近年來,隨著網際網路的普及與各種行動裝置的蓬勃發展,數據同步的需求也隨之大幅增長。In recent years, with the popularity of the Internet and the vigorous development of various mobile devices, the demand for data synchronization has also increased significantly.
一般而言,傳統數據同步方式是兩個裝置(以下稱為用戶端)彼此間相互同步數據,如:檔案或參數......等數據。然而,由於一次僅能兩個用戶端進行同步,所以當用戶端數量增加時,必須要操作多次才能使所有用戶端完成同步處理,故具有同步不便的問題。In general, the conventional data synchronization method is that two devices (hereinafter referred to as user terminals) mutually synchronize data with each other, such as files or parameters. However, since only two clients can synchronize at a time, when the number of clients increases, it is necessary to operate multiple times to enable all clients to complete synchronization processing, which has the problem of synchronization inconvenience.
有鑑於此,便有廠商提出利用雲端技術,設置一個同步伺服端用以統籌所有用戶端的同步處理,例如:當用戶端連線至同步伺服端時即自動進行同步處理。如此一來,即可提高用戶端的同步處理效率。不過,以此方式必須確保所有用戶端都能夠與同步伺服端連線,否則仍然無法完成所有用戶端的同步處理,而實際上要確保所有用戶端都能夠與同步伺服端連線有其困難,故上述方式仍然無法有效解決多用戶端同步不便之問題。In view of this, some manufacturers have proposed to use cloud technology to set up a synchronous server to coordinate the synchronization processing of all users. For example, when the client connects to the synchronous server, it automatically performs synchronization. In this way, the synchronization processing efficiency of the client can be improved. However, in this way, it must be ensured that all the clients can connect with the synchronization server, otherwise it is still impossible to complete the synchronization processing of all the users, but in fact, it is difficult to ensure that all the clients can connect with the synchronization server. The above method still cannot effectively solve the problem of multi-user synchronization inconvenience.
綜上所述,可知先前技術中長期以來一直存在多用戶端同步不便之問題,因此實有必要提出改進的技術手段,來解決此一問題。In summary, it can be seen that there has been a problem of multi-user synchronization inconvenience in the prior art for a long time, so it is necessary to propose an improved technical means to solve this problem.
有鑒於先前技術存在的問題,本發明遂揭露一種數據同步系 統及其方法。In view of the problems of the prior art, the present invention discloses a data synchronization system. System and its methods.
本發明所揭露之數據同步系統,其包含:同步伺服端及用戶端。其中,同步伺服端儲存第一同步數據;用戶端則分別儲存第二同步數據。所述用戶端包含:偵測模組、傳輸模組、選擇模組及同步模組。其中,偵測模組用以偵測與同步伺服端的連線狀態,當用戶端與同步伺服端的連線狀態為已連線則將此用戶端作為連線用戶端;傳輸模組用以在用戶端為連線用戶端時,廣播預設的權重訊息,並且接收其他連線用戶端廣播的權重訊息作為比對訊息;選擇模組用以比對權重順序表中選擇最高權重的連線用戶端作為同步處理端;同步模組用以在用戶端不為同步處理端時,根據第二同步數據使所述用戶端與同步處理端進行同步處理,以及在所述用戶端為同步處理端且確認已與其他用戶端完成同步處理後,連線至同步伺服端以根據第一同步數據使同步處理端與同步伺服端進行同步處理,當同步處理端與同步伺服端完成同步處理後,同步處理端再與所有用戶端進行同步處理。The data synchronization system disclosed in the present invention comprises: a synchronization server and a client. The synchronous server stores the first synchronization data, and the UE stores the second synchronization data. The user terminal includes: a detection module, a transmission module, a selection module, and a synchronization module. The detection module is configured to detect the connection state with the synchronization server. When the connection state between the client and the synchronization server is connected, the user terminal is used as the connection user terminal; the transmission module is used for the user. When the terminal is the connected client, the preset weight information is broadcasted, and the weight information broadcasted by other connected users is received as the comparison message; the selection module is used to compare the connection terminal with the highest weight in the weight order table. The synchronization module is configured to: when the user end is not the synchronization processing end, synchronize the processing between the user end and the synchronization processing end according to the second synchronization data, and confirm the synchronization processing end on the user end and confirm After the synchronization process is completed with other clients, the synchronization server is connected to the synchronization server to synchronize the synchronization processing end with the synchronization server according to the first synchronization data. After the synchronization processing end and the synchronization server complete the synchronization processing, the synchronization processing end Then synchronize with all users.
至於本發明之數據同步方法,應用於具有同步伺服端及用戶端的網路環境中,其步驟包括:同步伺服端儲存第一同步數據,每一用戶端分別儲存第二同步數據;所述用戶端偵測與同步伺服端的連線狀態,當所述用戶端與同步伺服端的連線狀態為已連線則用戶端將作為連線用戶端;在用戶端為連線用戶端時,廣播預設的權重訊息,並且接收其他連線用戶端廣播的權重訊息作為比對訊息;所述用戶端比對權重訊息及比對訊息以產生權重順序表,並自權重順序表中選擇最高權重的連線用戶端作為同步處理端;在用戶端不為同步處理端時,根據所述第二同步數據使所述 用戶端與同步處理端進行同步處理,以及在用戶端為同步處理端且確認已與其他用戶端完成同步處理後,連線至同步伺服端以根據第一同步數據使同步處理端與同步伺服端進行同步處理,當同步處理端與同步伺服端完成同步處理後,同步處理端再與所有用戶端進行同步處理。The data synchronization method of the present invention is applied to a network environment having a synchronous server and a client, and the steps include: synchronizing the server to store the first synchronization data, and each client separately storing the second synchronization data; Detecting the connection state of the synchronization server, when the connection state of the client and the synchronization server is connected, the user terminal will serve as the connection user terminal; when the user terminal is the connection user terminal, the preset is broadcasted. Weighting the message, and receiving the weight information broadcast by the other connected client as the comparison message; the client compares the weight message and the comparison message to generate a weight order table, and selects the highest weight connected user from the weight order table The end is used as a synchronization processing end; when the user end is not the synchronization processing end, the The user end synchronizes with the synchronization processing end, and after the user side is the synchronization processing end and confirms that the synchronization process has been completed with other users, the connection to the synchronization server is performed to synchronize the processing end and the synchronization server according to the first synchronization data. Synchronization processing is performed, and after the synchronization processing end and the synchronization server end complete the synchronization processing, the synchronization processing end performs synchronization processing with all the user terminals.
本發明所揭露之系統與方法如上,與先前技術之間的差異在於本發明是透過在能夠與同步伺服端連線的用戶端中,選擇其中一個用戶端作為同步處理端,並且以同步處理端對所有用戶端進行同步後,再由同步處理端對同步伺服端進行同步。The system and method disclosed in the present invention are as above, and the difference from the prior art is that the present invention selects one of the user terminals as a synchronization processing terminal and the synchronization processing terminal through a user terminal that can be connected to the synchronization server. After all the clients are synchronized, the synchronization processor synchronizes the synchronization server.
透過上述的技術手段,本發明可以達成提高多用戶端的同步便利性之技術功效。Through the above technical means, the present invention can achieve the technical effect of improving the synchronization convenience of the multi-user terminal.
以下將配合圖式及實施例來詳細說明本發明之實施方式,藉此對本發明如何應用技術手段來解決技術問題並達成技術功效的實現過程能充分理解並據以實施。The embodiments of the present invention will be described in detail below with reference to the drawings and embodiments, so that the application of the technical means to solve the technical problems and achieve the technical effects can be fully understood and implemented.
在說明本發明所揭露之數據同步系統及其方法之前,先對本發明所自行定義的名詞作說明,本發明所述的同步伺服端是指與網際網路相互連接的伺服主機,用以提供儲存空間以便用於同步處理;用戶端是指由使用者操作的計算機,如:電腦主機、個人數位助理、智慧型手機......等裝置。特別要說明的是,能夠通過網際網路與同步伺服端相互連接的用戶端將視為連線用戶端,並且從連線用戶端中選擇執行效能最高的計算機作為同步處理端,用以作為其他用戶端與同步伺服端進行同步處理的中介主機,稍後將配合圖式對同步伺服端與用戶端的架構作詳細說明。Before describing the data synchronization system and method thereof disclosed in the present invention, the terminology defined by the present invention is first described. The synchronous server terminal of the present invention refers to a server host connected to the Internet to provide storage. The space is used for synchronization processing; the user terminal refers to a computer operated by a user, such as a computer host, a personal digital assistant, a smart phone, and the like. In particular, the client that can connect to the synchronous server through the Internet will be regarded as the connection client, and the computer with the highest performance will be selected as the synchronization processor from the connection client as the other. The mediation host that synchronizes the client and the synchronous server will describe the architecture of the synchronous server and the client in detail later.
以下配合圖式對本發明數據同步系統及其方法作進一步說明,請參閱「第1圖」,「第1圖」為本發明數據同步系統之系統方塊圖,此系統包含:同步伺服端110及用戶端120。其中,同步伺服端110儲存第一同步數據,所述第一同步數據至少包含修改時間、修改數量及修改數據等用以進行同步處理的判斷數據。舉例來說,假設同步伺服端110中儲存的多個檔案經過修改,則同步伺服端110會記錄最後的修改時間、修改的檔案數量及修改的檔案名稱等,以便生成第一同步數據並將此第一同步數據作為同步處理的依據。在實際實施上,同步伺服端110與網際網路130相互連接,而用戶端120則至少需其中之一與網際網路130相互連接,且不同的用戶端120也需要相互連接,如:透過區域網路、傳輸線......等。The data synchronization system and the method thereof are further described below with reference to the drawings. Please refer to FIG. 1 and FIG. 1 is a system block diagram of a data synchronization system according to the present invention. The system includes: a synchronous server 110 and a user. End 120. The synchronization server 110 stores the first synchronization data, and the first synchronization data includes at least the modification time, the modified quantity, the modification data, and the like, and the determination data for performing the synchronization processing. For example, if a plurality of files stored in the synchronization server 110 are modified, the synchronization server 110 records the last modification time, the modified file number, the modified file name, and the like, so as to generate the first synchronization data and The first sync data is used as a basis for the synchronization process. In actual implementation, the synchronization server 110 and the Internet 130 are connected to each other, and at least one of the clients 120 needs to be connected to the Internet 130, and different clients 120 need to be connected to each other, such as: a transmission area. Network, transmission line, etc.
至於在用戶端120的部份,每一用戶端120分別儲存有第二同步數據,且各用戶端120包含:偵測模組121、傳輸模組122、選擇模組123及同步模組124。其中,偵測模組121用以偵測與同步伺服端110的連線狀態,當用戶端120與同步伺服端110的連線狀態為已連線則作為連線用戶端。特別要說明的是,第二同步數據與第一同步數據同樣至少包含修改時間、修改數量及修改數據等用以進行同步處理的判斷數據。For each part of the client 120, each client 120 stores second synchronization data, and each client 120 includes a detection module 121, a transmission module 122, a selection module 123, and a synchronization module 124. The detection module 121 is configured to detect the connection state with the synchronization server 110. When the connection state between the client 120 and the synchronization server 110 is connected, it is used as a connection client. It should be noted that the second synchronization data and the first synchronization data include at least modification data, such as modification time, modification quantity, and modification data, for performing synchronization processing.
傳輸模組122用以在用戶端120為連線用戶端時,廣播(Broadcast)預設的權重訊息,如:以“A;5”代表權重訊息(其中“A”代表用戶端標識;“5”代表權重值),並且接收其他連線用戶端廣播的權重訊息作為比對訊息。舉例來說,假設多個用戶端120皆能夠透過網際網路130與同步伺服端110相互連接,此 時,傳輸模組122將透過廣播的方式將自己本身的權重訊息傳送至其他用戶端120,並且接收其他用戶端120所廣播的權重訊息,如:數值“B;4”用以作為比對訊息。如此一來,用戶端120除了具有本身預設的權重訊息之外,也具有其他用戶端120的權重訊息(即比對訊息)。The transmission module 122 is configured to broadcast a preset weight information when the client 120 is a connected client, for example, “A; 5” represents a weight message (where “A” represents a client identifier; “5” "Represents the weight value" and receives the weight information broadcast by other connected clients as the comparison message. For example, assume that multiple client terminals 120 can be connected to the synchronization server 110 via the Internet 130. The transmission module 122 will transmit its own weight information to other clients 120 through broadcast, and receive weight information broadcast by other clients 120, such as: the value "B; 4" is used as the comparison message. . In this way, the client 120 has the weight information (ie, the comparison message) of the other client 120 in addition to the weight information preset by itself.
選擇模組123用以比對權重訊息及比對訊息以產生權重順序表,並且自權重順序表中選擇最高權重的連線用戶端作為同步處理端。以上例而言,用戶端120本身的權重訊息為數值“A;5”,且比對訊息記錄其他用戶端120的權重訊息為數值“B;4”,因此在比對後可根據數值的大小由大至小依序排列用戶端標識以產生權重順序表,如:“A,B”(由於權重值“5”大於權重值“4”,所以用戶端標識“A”排列在用戶端標識“B”的前面,而排列在最前面也代表最高權重),接著,選擇用戶端標識為“A”的連線用戶端作為同步處理端。在實際實施上,權重值更可使用連線參數,如:網路速率或頻寬,或是以處理器參數,如:處理器時脈,來進行取代,例如:連線參數可記錄為“20Mbps”、處理器參數可記錄為“1.7GHz”,並且同樣根據數值的大小排列順序。特別要說明的是,本發明雖然以上述舉例進行說明,然而並未以此作限定,任何能夠根據權重訊息選擇連線用戶端作為同步處理端的方式皆不脫離本發明的應用範疇。The selection module 123 is configured to compare the weight information and the comparison message to generate a weight order table, and select the highest weight connection user terminal from the weight order table as the synchronization processing end. In the above example, the weight information of the client 120 itself is the value "A; 5", and the weight information of the other client 120 is compared with the value of the message "B; 4", so the size can be based on the comparison. The client identifiers are arranged in order from the largest to the smallest to generate a weight order table, such as: "A, B" (since the weight value "5" is greater than the weight value "4", the client identifier "A" is arranged in the client identifier" The front of B", which is ranked first in the front also represents the highest weight), and then, the connected client whose client side is identified as "A" is selected as the synchronization processing end. In practical implementation, the weight value can be replaced by a connection parameter, such as network rate or bandwidth, or by processor parameters such as processor clock. For example, the connection parameter can be recorded as " 20 Mbps", the processor parameters can be recorded as "1.7 GHz", and the order is also sorted according to the size of the values. It should be noted that although the present invention is described by way of example above, it is not limited thereto, and any manner in which a connection client can be selected as a synchronization processing terminal according to a weight message does not deviate from the application scope of the present invention.
同步模組124用以在用戶端120不為同步處理端時,根據第二同步數據使所述用戶端120與同步處理端進行同步處理,以及在用戶端120為同步處理端且確認已經與其他用戶端120完成同步處理後,連線至同步伺服端110以根據第一同步數據使同步處 理端與同步伺服端110進行同步處理,當同步處理端與同步伺服端110完成同步處理後,同步處理端再與其他所有用戶端120進行同步處理。換句話說,不是同步處理端的用戶端120會先與同步處理端進行同步後,再由同步處理端與同步伺服端110進行同步,接著當同步處理端與同步伺服端110完成同步處理後,同步處理端會再次與其他所有的用戶端120進行同步處理,由於根據同步數據進行同步處理為習知技術,故在此不再多作說明。The synchronization module 124 is configured to synchronize the processing of the client 120 with the synchronization processing end according to the second synchronization data when the user terminal 120 is not the synchronization processing end, and the synchronization processing end of the user terminal 120 and confirm that it has been combined with other After the client 120 completes the synchronization process, it connects to the synchronization server 110 to make the synchronization according to the first synchronization data. The synchronization end synchronizes with the synchronization server 110. After the synchronization processing end and the synchronization server 110 complete the synchronization process, the synchronization processing end performs synchronization processing with all other client terminals 120. In other words, the client 120 that is not the synchronization processor first synchronizes with the synchronization processor, and then the synchronization processor synchronizes with the synchronization server 110. Then, after the synchronization processor and the synchronization server 110 complete the synchronization process, the synchronization is performed. The processing end will perform synchronization processing with all other client terminals 120 again. Since the synchronization processing according to the synchronization data is a conventional technique, it will not be described here.
另外,所述用戶端120更可包含分散模組125用以在用戶端120為連線用戶端時,通過網際網路130連線至同步伺服端110並根據第一同步數據及第二同步數據從修改數據中選擇至少一個欲修改的數據(如:檔案或參數)進行同步。換句話說,此同步方式為協作同步(即將需要同步的全部檔案分為多份部分檔案,分配給每一個連線用戶端僅同步一份部分檔案,並在所有的部分檔案同步完畢後,將其整合為完整的全部檔案,之後由所有的使用者端各自與該全部檔案進行同步)。在實際實施上,用戶端120也可包含分配模組126用以在用戶端120為同步處理端且與同步伺服端110進行同步處理前,先計算需要同步的檔案數量,並且搭配連線用戶端的數量及其權重訊息來分配同步處理端及各連線用戶端需要同步的檔案,以便使同步處理端及各連線用戶端能夠各自透過網際網路130與同步伺服端110針對需要同步的數據進行同步。接著,當同步處理端及各連線用戶端皆完成下載各自需要同步的數據後,分配模組126再將同步處理端與各連線用戶端各自從同步伺服端110同步的數據再次進行同步和整合處理。In addition, the client 120 may further include a decentralized module 125 for connecting to the synchronization server 110 through the Internet 130 when the client 120 is a connected client, and according to the first synchronization data and the second synchronization data. Select at least one data to be modified (eg, file or parameter) from the modified data for synchronization. In other words, this synchronization method is collaborative synchronization (all the files that need to be synchronized are divided into multiple partial files, and each connected client only synchronizes one partial file, and after all the partial files are synchronized, It is integrated into a complete archive, and then all users are synchronized with the entire file). In practical implementation, the client 120 may also include a distribution module 126 for calculating the number of files to be synchronized before the client 120 is synchronized and synchronized with the synchronization server 110, and matching the number of files to be connected to the client. The quantity and the weight information thereof are used to allocate the files that need to be synchronized between the synchronization processing end and the connection user terminals, so that the synchronization processing end and the connected connection terminals can respectively perform the data to be synchronized through the Internet 130 and the synchronization server 110. Synchronize. Then, after the synchronization processing end and each connection user end complete downloading the data that needs to be synchronized, the distribution module 126 synchronizes the data synchronized by the synchronization processing end and each connection user end from the synchronization server end 110 again. Integrated processing.
接著,請參閱「第2A圖」及「第2B圖」,「第2A圖」及「第 2B圖」為本發明數據同步方法之方法流程圖,其步驟包括:在具有同步伺服端110及用戶端120的網路環境中,同步伺服端110儲存第一同步數據,每一用戶端120分別儲存第二同步數據(步驟210);所述用戶端120偵測與同步伺服端110的連線狀態,當所述用戶端120與同步伺服端110的連線狀態為已連線則作為連線用戶端(步驟220);在所述用戶端120為連線用戶端時,廣播預設的權重訊息,並且接收其他連線用戶端廣播的權重訊息作為比對訊息(步驟230);所述用戶端120比對權重訊息及比對訊息以產生權重順序表,並自權重順序表中選擇最高權重的連線用戶端作為同步處理端(步驟240);在所述用戶端120不為同步處理端時,根據所述第二同步數據使所述用戶端120與同步處理端進行同步處理,以及在所述用戶端120為同步處理端且確認已與其他所述用戶端120完成同步處理後,連線至同步伺服端110以根據第一同步數據使同步處理端與同步伺服端110進行同步處理,當同步處理端與同步伺服端110完成同步處理後,此同步處理端再與所有用戶端120進行同步處理(步驟250)。透過上述步驟,即可在能夠與同步伺服端連線的用戶端中,選擇其中一個用戶端作為同步處理端,並且以同步處理端對所有用戶端進行同步後,再由同步處理端對同步伺服端進行同步。Please refer to "Figure 2A" and "Figure 2B", "Figure 2A" and "No. 2B is a flowchart of a method for the data synchronization method of the present invention. The steps include: in a network environment having a synchronization server 110 and a client 120, the synchronization server 110 stores the first synchronization data, and each client 120 separately The second synchronization data is stored (step 210); the client 120 detects the connection state with the synchronization server 110, and when the connection state of the client 120 and the synchronization server 110 is connected, it is used as a connection. a client (step 220); when the client 120 is a connected client, broadcasting a preset weight message, and receiving a weight message broadcast by another connected client as a comparison message (step 230); the user The terminal 120 compares the weight information and the comparison message to generate a weight order table, and selects the highest weighted connection client from the weight order table as the synchronization processing end (step 240); the user terminal 120 is not the synchronization processing end. And the user terminal 120 performs synchronization processing with the synchronization processing end according to the second synchronization data, and after the user terminal 120 is the synchronization processing end and confirms that synchronization processing has been completed with the other user terminals 120, The line-to-synchronization server 110 synchronizes the synchronization processing end with the synchronization server 110 according to the first synchronization data. After the synchronization processing end and the synchronization server 110 complete the synchronization processing, the synchronization processing end performs the same with all the user terminals 120. Synchronization processing (step 250). Through the above steps, one of the user terminals that can be connected to the synchronous server can be selected as the synchronization processing end, and all the user terminals are synchronized by the synchronization processing end, and then the synchronous processing terminal synchronizes the servo. The end is synchronized.
在實際實施上,步驟250之中,更可在用戶端120為連線用戶端時,連線至同步伺服端110並根據第一同步數據及第二同步數據自修改數據中選擇至少其一進行同步(步驟260);或在用戶端120為同步處理端且與同步伺服端110進行同步處理前,預先計算欲同步的數據數量並根據連線用戶端的數量設定同步處理端 及各連線用戶端需要同步的數據後,使同步處理端及各連線用戶端各自透過網際網路130與同步伺服端110進行同步,以及使同步處理端與各連線用戶端再次進行同步處理(步驟270)。在實際實施上,步驟260使同步處理端及各連線用戶端各自透過網際網路130與同步伺服端110進行同步的方式是部份同步(如:僅同步部份的數據),而步驟270使同步處理端與各連線用戶端再次進行同步處理則是完全同步(如:同步所有數據)。由於部份同步及完全同步的同步處理方式皆為習知技術,故在此不再多作贅述。In actual implementation, in step 250, when the client 120 is a connected client, it may be connected to the synchronization server 110 and select at least one of the first synchronization data and the second synchronization data from the modification data. Synchronization (step 260); or before the user terminal 120 is the synchronization processing end and the synchronization processing with the synchronization server 110, the number of data to be synchronized is calculated in advance and the synchronization processing end is set according to the number of connected users. After the data is synchronized, the synchronization processing terminal and each of the connection user terminals are synchronized with the synchronization server 110 through the Internet 130, and the synchronization processing terminal and the connection client are synchronized again. Processing (step 270). In actual implementation, step 260 synchronizes the synchronization processing terminal and each of the connection user terminals with the synchronization server 110 through the Internet 130 (eg, only partially synchronizes data), and step 270 Synchronizing the synchronization processor with each wired client is completely synchronized (eg, synchronizing all data). Since some synchronous and fully synchronized synchronization processing methods are well-known techniques, no further details are provided herein.
以下配合「第3圖」及「第4圖」以實施例的方式進行如下說明,請先參閱「第3圖」,「第3圖」為應用本發明進行數據同步處理的第一實施例之示意圖。首先,用戶端(120a、120b及120c)會偵測與同步伺服端110的連線狀態,在此例中,用戶端(120a及120b)能夠通過網際網路130與同步伺服端110連線,而用戶端120c無法與同步伺服端110連線,但能夠通過區域網路131與其他用戶端(120a及120b)連線。因此,用戶端(120a及120b)的偵測模組121會將自身視為連線用戶端。接著,由於用戶端(120a及120b)為連線用戶端,所以其傳輸模組122會廣播預先設定的權重訊息,並且接收其他連線用戶端廣播的權重訊息作為比對訊息,換句話說,用戶端120a會將自身預設的權重訊息廣播至用戶端120b供用戶端120b作為比對訊息,反之亦同。之後,用戶端(120a及120b)的選擇模組123比對權重訊息及比對訊息以產生權重順序表,假設用戶端120a預設的權重訊息為“A;10Mbps”、用戶端120b預設的權重訊息為“B;8Mbps”,其中“A”與“B”代表用戶端標識;“10Mbps”與“8Mbps”代表網路參數(頻 寬),則選擇模組123產生的權重順序表可依據網路參數所記錄的頻寬由大至小依序排列,如記錄為“A,B”(排列最前者代表權重最大),並從權重順序表中選擇與用戶端標識“A”相應的用戶端120a作為同步處理端。The following description will be made by way of example with reference to "Fig. 3" and "Fig. 4". Please refer to "Fig. 3" and "Fig. 3" for the first embodiment of data synchronization processing to which the present invention is applied. schematic diagram. First, the UEs (120a, 120b, and 120c) detect the connection state with the synchronization server 110. In this example, the UEs (120a and 120b) can be connected to the synchronization server 110 via the Internet 130. The client 120c cannot be connected to the synchronization server 110, but can be connected to other clients (120a and 120b) through the area network 131. Therefore, the detection module 121 of the client (120a and 120b) regards itself as a connection client. Then, since the UEs (120a and 120b) are connected clients, the transmission module 122 broadcasts a preset weight message and receives the weight information broadcast by other connected clients as a comparison message, in other words, The client 120a broadcasts its own preset weight information to the client 120b for the client 120b to use as the comparison message, and vice versa. Then, the selection module 123 of the client (120a and 120b) compares the weight information and the comparison message to generate a weight order table, and assumes that the weight information preset by the client 120a is “A; 10 Mbps” and preset by the client 120b. The weight message is “B; 8Mbps”, where “A” and “B” represent the client identifier; “10Mbps” and “8Mbps” represent the network parameters (frequency) Width), the weight sequence table generated by the selection module 123 can be arranged in order according to the bandwidth recorded by the network parameters, such as the record as "A, B" (the top one represents the largest weight), and from The client 120a corresponding to the client identifier "A" is selected as the synchronization processing terminal in the weight order table.
接下來,由於用戶端(120b及120c)不為同步處理端,因此根據其儲存的第二同步數據使用戶端(120b及120c)與同步處理端(即用戶端120a)進行同步處理,以及在用戶端120a確認已與其他用戶端(120b及120c)完成同步處理後,通過網際網路130連線至同步伺服端110以根據第一同步數據使同步處理端(即用戶端120a)與同步伺服端110進行同步處理。Next, since the UEs (120b and 120c) are not synchronized, the UEs (120b and 120c) are synchronized with the synchronization processor (ie, the client 120a) according to the second synchronization data stored therein, and After confirming that the synchronization process has been completed with the other clients (120b and 120c), the client 120a connects to the synchronization server 110 via the Internet 130 to synchronize the processing terminal (ie, the client 120a) with the synchronization servo according to the first synchronization data. The terminal 110 performs synchronization processing.
此外,在同步處理端(即用戶端120a)確認已與其他用戶端(120b及120c)完成同步處理後,同步處理端(即用戶端120a)可以計算其與同步伺服端110之間需要同步的資料量(例如:需要自同步伺服端110下載180MB的資料),並根據連線用戶端(即用戶端120a與用戶端120b;在此例中用戶端120a同時是同步處理端及連線用戶端)及其各自的權重訊息(假設以連線參數為權重訊息,用戶端120a與用戶端120b的權重訊息可分別為“10Mbps”與“8Mbps”),用以為連線用戶端(即用戶端120a)分配100MB的資料下載任務,以及為連線用戶端(即用戶端120b)分配80MB的資料下載任務。在用戶端120a與用戶端120b各自的下載任務完成後,用戶端120a與用戶端120b進行資料同步,將用戶端120b下載的80MB資料傳輸到用戶端120a中,使所述用戶端120a具有所需的完整180MB資料。之後其它的各用戶端可以分別與用戶端120a進行同步,以獲取此一完整的180M資料。至此,即完成 用戶端(120a、120b及120c)與同步伺服端110的數據同步處理。In addition, after the synchronization processing end (ie, the client 120a) confirms that the synchronization process has been completed with the other clients (120b and 120c), the synchronization processing end (ie, the client 120a) can calculate the synchronization between the synchronization server and the synchronization server 110. The amount of data (for example, 180 MB of data needs to be downloaded from the synchronization server 110), and according to the connection client (ie, the client 120a and the client 120b; in this example, the client 120a is the synchronization processor and the connection client at the same time. And their respective weight messages (assuming that the connection parameters are weighted messages, the weight information of the client 120a and the client 120b may be "10 Mbps" and "8 Mbps" respectively) for the connection client (ie, the client 120a) A 100 MB data download task is assigned, and an 80 MB data download task is assigned to the connected client (ie, the client 120b). After the respective download tasks of the client 120a and the client 120b are completed, the client 120a and the client 120b perform data synchronization, and transmit the 80 MB data downloaded by the client 120b to the client 120a, so that the client 120a has the required The complete 180MB of information. Then, the other UEs can be synchronized with the client 120a to obtain the complete 180M data. This is the completion The client terminals (120a, 120b, and 120c) are synchronized with the data of the sync server 110.
請參閱「第4圖」,「第4圖」為應用本發明進行數據同步處理的第二實施例之示意圖。在實際實施上,用戶端120可能如「第4圖」所示意只有一個(即用戶端120a)能夠通過網際網路130連線至同步伺服端110,因此,用戶端(120a及120c)的偵測模組121在偵測與同步伺服端110的連線狀態後,用戶端120a即作為連線用戶端。此時,由於用戶端120a為連線用戶端,所以傳輸模組122會廣播權重訊息,但因為用戶端120c不是連線用戶端,所以用戶端120a不會收到用戶端120c廣播的權重訊息以作為比對訊息,此時,傳輸模組122可在超過預設的等候時間後,將一個空值(Null)作為比對訊息,而選擇模組123在比對過程中,偵測到空值時所產生的權重順序表將僅記錄用戶端120a本身的用戶端標識,以及用戶端120a本身的連線參數或處理器參數,之後的同步處理流程與上述第一實施例雷同,故在此不再多作贅述。Please refer to FIG. 4, and FIG. 4 is a schematic diagram of a second embodiment for performing data synchronization processing by applying the present invention. In actual implementation, the client 120 may indicate that only one (ie, the client 120a) can be connected to the synchronization server 110 through the Internet 130 as shown in FIG. 4, and therefore, the UEs (120a and 120c) are detected. After detecting the connection state with the synchronization server 110, the user module 120a functions as a connection client. At this time, since the client 120a is the connection client, the transmission module 122 broadcasts the weight message, but since the client 120c is not the connection client, the client 120a does not receive the weight message broadcast by the client 120c. As the comparison message, at this time, the transmission module 122 may use a null value (Null) as the comparison message after the preset waiting time is exceeded, and the selection module 123 detects the null value during the comparison process. The weight sequence table generated by the time will only record the user end identifier of the client 120a itself, and the connection parameters or processor parameters of the client 120a itself. The subsequent synchronization processing flow is the same as that of the first embodiment described above, so it is not here. Repeat more.
綜上所述,可知本發明與先前技術之間的差異在於透過在能夠與同步伺服端連線的用戶端中,選擇其中一個用戶端作為同步處理端,並且以同步處理端對所有用戶端進行同步後,再由同步處理端對同步伺服端進行同步,藉由此一技術手段可以解決先前技術所存在的問題,進而達成提高多用戶端的同步便利性之技術功效。In summary, it can be seen that the difference between the present invention and the prior art is that one of the UEs that can be connected to the synchronization server is selected as the synchronization processing terminal, and all the user terminals are performed by the synchronization processing terminal. After the synchronization, the synchronization processor synchronizes the synchronization server, and the technical problem can be solved by the prior art, thereby achieving the technical effect of improving the synchronization convenience of the multi-user.
雖然本發明以前述之實施例揭露如上,然其並非用以限定本發明,任何熟習相像技藝者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之專利保護範圍須視本說明書所附之申請專利範圍所界定者為準。While the present invention has been described above in the foregoing embodiments, it is not intended to limit the invention, and the invention may be modified and modified without departing from the spirit and scope of the invention. The scope of patent protection shall be subject to the definition of the scope of the patent application attached to this specification.
110‧‧‧同步伺服端110‧‧‧Synchronous servo
120‧‧‧用戶端120‧‧‧User side
120a‧‧‧用戶端120a‧‧‧Client
120b‧‧‧用戶端120b‧‧‧Client
120c‧‧‧用戶端120c‧‧‧Client
121‧‧‧偵測模組121‧‧‧Detection module
122‧‧‧傳輸模組122‧‧‧Transmission module
123‧‧‧選擇模組123‧‧‧Selection module
124‧‧‧同步模組124‧‧‧Synchronization Module
125‧‧‧分散模組125‧‧‧Distributed module
126‧‧‧分配模組126‧‧‧Distribution module
130‧‧‧網際網路130‧‧‧Internet
131‧‧‧區域網路131‧‧‧Regional Network
步驟210‧‧‧在具有一同步伺服端及至少二用戶端的網路環境中,該同步伺服端儲存一第一同步數據,每一用戶端分別儲存一第二同步數據Step 210‧‧‧ In a network environment having a synchronous server and at least two clients, the synchronous server stores a first synchronization data, and each client stores a second synchronization data
步驟220‧‧‧所述用戶端偵測與該同步伺服端的連線狀態,當所述用戶端與該同步伺服端的連線狀態為已連線則作為連線用戶端Step 220‧‧‧ The client detects the connection state with the synchronization server, and when the connection state of the client and the synchronization server is connected, it is used as the connection client.
步驟230‧‧‧在所述用戶端為連線用戶端時,廣播預設的一權重訊息,並且接收其他連線用戶端廣播的權重訊息作為一比對訊息Step 230‧‧‧ When the client is the connected client, broadcast a preset weight message, and receive the weight information broadcast by other connected users as a comparison message
步驟240‧‧‧所述用戶端比對該權重訊息及所述比對訊息以產生一權重順序表,並自該權重順序表中選擇最高權重的連線用戶端作為同步處理端Step 240 ‧ ‧ the client compares the weight information and the comparison message to generate a weight order table, and selects the highest weight connection user terminal from the weight order table as the synchronization processing end
步驟250‧‧‧在所述用戶端不為同步處理端時,根據所述第二同步數據使所述用戶端與該同步處理端進行同步處理,以及在所述用戶端為同步處理端且確認已與其他所述用戶端完成同步處理後,連線至該同步伺服端以根據該第一同步數據使該同步處理端與該同步伺服端進行同步處理,當該同步處理端與該同步伺服端完成同步處理後,該同步處理端再與所有用戶端進行同步處理Step 250‧‧‧ When the user end is not the synchronization processing end, the user terminal is synchronized with the synchronization processing end according to the second synchronization data, and the user terminal is synchronized processing end and confirmed After the synchronization process is completed with the other user terminals, the synchronization server is connected to the synchronization server to synchronize the synchronization processing end with the synchronization server according to the first synchronization data, when the synchronization processing end and the synchronization server end After the synchronization process is completed, the synchronization processor synchronizes with all the users.
步驟260‧‧‧在所述用戶端為連線用戶端時,連線至該同步伺服端並根據該第一同步數據及該第二同步數據自所述修改數據中選擇至少其一進行同步Step 260‧‧‧ When the client is a connected client, connecting to the synchronization server and selecting at least one of the modified data to synchronize according to the first synchronization data and the second synchronization data
步驟270‧‧‧在該用戶端為同步處理端且與該同步伺服端進行同步處理前,預先計算需要同步的數據數量並根據所述連線用戶端的數量設定該同步處理端及各連線用戶端需要同步的數據後,使該同步處理端及各連 線用戶端各自與該同步伺服端進行同步,以及使該同步處理端與各連線用戶端再次進行同步處理Step 270‧‧‧ Before the user terminal is the synchronization processing end and performs synchronization processing with the synchronization server, the number of data to be synchronized is calculated in advance, and the synchronization processing terminal and each connected user are set according to the number of the connected user terminals. After the data needs to be synchronized, the synchronization processor and each connection are connected. Each of the line clients synchronizes with the synchronization server, and synchronizes the synchronization processing terminal with each connection client.
第1圖為本發明數據同步系統之系統方塊圖。1 is a system block diagram of a data synchronization system of the present invention.
第2A圖及第2B圖為本發明數據同步方法之方法流程圖。2A and 2B are flowcharts of a method of the data synchronization method of the present invention.
第3圖為應用本發明進行數據同步處理的第一實施例之示意圖。Fig. 3 is a view showing a first embodiment of data synchronization processing to which the present invention is applied.
第4圖為應用本發明進行數據同步處理的第二實施例之示意圖。Fig. 4 is a view showing a second embodiment of data synchronization processing to which the present invention is applied.
110‧‧‧同步伺服端110‧‧‧Synchronous servo
120‧‧‧用戶端120‧‧‧User side
121‧‧‧偵測模組121‧‧‧Detection module
122‧‧‧傳輸模組122‧‧‧Transmission module
123‧‧‧選擇模組123‧‧‧Selection module
124‧‧‧同步模組124‧‧‧Synchronization Module
125‧‧‧分散模組125‧‧‧Distributed module
126‧‧‧分配模組126‧‧‧Distribution module
130‧‧‧網際網路130‧‧‧Internet
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW101138391A TWI457763B (en) | 2012-10-18 | 2012-10-18 | Data syncing system and method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW101138391A TWI457763B (en) | 2012-10-18 | 2012-10-18 | Data syncing system and method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
TW201416872A TW201416872A (en) | 2014-05-01 |
TWI457763B true TWI457763B (en) | 2014-10-21 |
Family
ID=51293812
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW101138391A TWI457763B (en) | 2012-10-18 | 2012-10-18 | Data syncing system and method thereof |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI457763B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6345308B1 (en) * | 1998-02-27 | 2002-02-05 | Kabushiki Kaisha Toshiba | Network computer system and method for executing data synchronization process thereof |
TW477934B (en) * | 2000-06-12 | 2002-03-01 | Inventec Corp | Method to synchronously process network data |
US6480902B1 (en) * | 1999-05-25 | 2002-11-12 | Institute For Information Industry | Intermedia synchronization system for communicating multimedia data in a computer network |
TWI344604B (en) * | 2004-10-26 | 2011-07-01 | Via Tech Inc | Network heterogeneous database synchronizing system and method |
TWI352909B (en) * | 2007-09-05 | 2011-11-21 | Htc Corp | Method and system for supporting network sharing a |
-
2012
- 2012-10-18 TW TW101138391A patent/TWI457763B/en not_active IP Right Cessation
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6345308B1 (en) * | 1998-02-27 | 2002-02-05 | Kabushiki Kaisha Toshiba | Network computer system and method for executing data synchronization process thereof |
US6480902B1 (en) * | 1999-05-25 | 2002-11-12 | Institute For Information Industry | Intermedia synchronization system for communicating multimedia data in a computer network |
TW477934B (en) * | 2000-06-12 | 2002-03-01 | Inventec Corp | Method to synchronously process network data |
TWI344604B (en) * | 2004-10-26 | 2011-07-01 | Via Tech Inc | Network heterogeneous database synchronizing system and method |
TWI352909B (en) * | 2007-09-05 | 2011-11-21 | Htc Corp | Method and system for supporting network sharing a |
Also Published As
Publication number | Publication date |
---|---|
TW201416872A (en) | 2014-05-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7214295B2 (en) | Distributed system data synchronization method, apparatus, computer program and electronic equipment | |
CN109218047B (en) | Network slice processing method and device, communication system and storage medium | |
CN107332876B (en) | Method and device for synchronizing state of blockchain | |
CN103873451B (en) | A kind of method, apparatus and system of data syn-chronization | |
CN102318230B (en) | Method for detecting distributed peer to transmit multimedia data in wireless peer-to-peer network | |
CN103873505B (en) | Method, system and the device uploaded offline to cloud storage service device | |
CN103428264B (en) | Method, device and system for data synchronization | |
US20190037015A1 (en) | Peer-to-peer network prioritizing propagation of objects through the network | |
US20170031948A1 (en) | File synchronization method, server, and terminal | |
CN110381160B (en) | Communication information interaction method and device, storage medium and computer equipment | |
CN105933393A (en) | Intra-local area network data synchronization method, device and user terminal | |
CN106791889A (en) | A kind of method for processing video frequency and system, distributed objects storage system | |
CN106611001A (en) | Method, device and system for checking consistency of data in database tables in virtual machines | |
CN104320328A (en) | Message synchronization method, terminal and server | |
CN103814591A (en) | Communication method, access network equipment and UE (user equipment) of different-format networks | |
CN105610958A (en) | A method, device and intelligent terminal for selecting a time synchronization server | |
US9286365B2 (en) | Data synchronizing system and method thereof | |
CN110248217B (en) | A kind of user data synchronization method and device | |
TWI457763B (en) | Data syncing system and method thereof | |
CN107609197A (en) | A kind of method of data synchronization, data synchronization unit and mobile terminal | |
CN110890934B (en) | Interference coordination method and device | |
CN106250427B (en) | Method and system for generating container mirror image recommendation information | |
CN108241693A (en) | Method and device for synchronizing data | |
CN106534113B (en) | SSH connection establishment method and device | |
FR3068852A1 (en) | METHOD FOR MANAGING THE RIGHT OF ACCESS TO DIGITAL CONTENT |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GD4A | Issue of patent certificate for granted invention patent | ||
MM4A | Annulment or lapse of patent due to non-payment of fees |