TWI461944B - Electrical data synchronization method and electrical data synchronization system - Google Patents
Electrical data synchronization method and electrical data synchronization system Download PDFInfo
- Publication number
- TWI461944B TWI461944B TW101122659A TW101122659A TWI461944B TW I461944 B TWI461944 B TW I461944B TW 101122659 A TW101122659 A TW 101122659A TW 101122659 A TW101122659 A TW 101122659A TW I461944 B TWI461944 B TW I461944B
- Authority
- TW
- Taiwan
- Prior art keywords
- data
- data block
- characteristic value
- operation characteristic
- change
- Prior art date
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本發明係關於資料庫之電子資訊傳輸技術領域,特別是關於一種電子資料同步方法及電子資料同步處理系統。The invention relates to the field of electronic information transmission technology of a database, in particular to an electronic data synchronization method and an electronic data synchronization processing system.
目前商業應用軟體之發展隨著資訊網路建設如區域網(LAN)、廣域網(WAN)或網際網路(Internet)的演進及擴大,己從企業內部的電子資訊傳遞及分享,擴展到企業之間(B2B)或企業對客戶(B2C)之間電子商務資訊的傳遞及分享,使資訊網路各節點上的不同主機能分享相關的資料。以企業內部的各部門為例,為滿足企業營運及商業上的需求,不同的部門如生產控制(計畫、製造)、物流管理(分銷、採購、庫存管理)和財務管理(會計核算、財務管理)使用不同的主機系統,有獨立的作業系統及各自的應用系統,再通過內部或外部資訊網路分享資料,並一體運行組成一種分散式處理系統。傳統的分散式處理系統,是由用戶端先發出資訊向服務端查詢後,服務端再將查詢到的資料傳回給用戶端,使資料處理的效率不高。特別是,企業在不同時期或跨國建置的不同應用系統或程式,在利用分散式處理系統一體運行時,如果不同應用系統之間分享的資料有任何的變更,還需要同步保持一致。舉例而言,目前在一資料發出端(如具有或連接主資料庫的應用程式服務端)應對多資料接收端(如多個應用程式用戶端)架構中執行資料同步更新,可以透過下列幾種方式進行:At present, the development of commercial application software has expanded and expanded from the internal electronic information transmission and sharing of enterprises with the development and expansion of information network construction such as regional network (LAN), wide area network (WAN) or Internet (Internet). The transfer and sharing of e-commerce information between the business (B2B) or the business to the customer (B2C) enables different hosts on each node of the information network to share relevant information. Take various departments within the company as an example. In order to meet the operational and commercial needs of enterprises, different departments such as production control (planning, manufacturing), logistics management (distribution, procurement, inventory management) and financial management (accounting, finance) Management) Use different host systems, have separate operating systems and their own application systems, then share data through internal or external information networks, and operate together to form a decentralized processing system. The traditional decentralized processing system is that after the user first sends the information to the server, the server then sends the queried data back to the user, so that the data processing efficiency is not high. In particular, when different applications or programs built by enterprises in different periods or across countries are operated in a decentralized processing system, if there is any change in the information shared between different application systems, it needs to be synchronized. For example, at present, a data issuer (such as an application server with or connected to a master repository) should perform data synchronization updates in a multi-data receiver (such as multiple application client) architectures. Way to proceed:
(1)定期匯總法:在每一間隔時間後,發出端利用暫存器及計時器定期將資料彙集後同步送至接收端,但是接收端不會變更所接收資料的內 容。(1) Periodic summary method: After each interval, the issuing end periodically collects the data and sends it to the receiving end by using the register and the timer, but the receiving end does not change the received data. Rong.
(2)定時同步法:每一接收端在每一預設定間隔時間後,利用一週期輪詢計時器詢問或探訪發出端有無資料變更;當詢問到發出端的資料有部份變動時,發出端發出變更的資料給每一接收端,以接收到的資料更新內容。(2) Timing synchronization method: Each receiving end uses a one-cycle polling timer to query or visit the sending end for data change after each preset interval time; when it asks that the data of the sending end has some changes, the transmitting end The changed information is sent to each receiving end to update the content with the received data.
(3)即時同步法:當發出端的資料有部份變動時,馬上自主通知所有接收端,並僅將變更資料傳送給對應的接收端,以進行變更處理。(3) Instant synchronization method: When there is a partial change in the data of the originating end, all receiving ends are notified immediately, and only the changed data is transmitted to the corresponding receiving end for change processing.
上述定期匯總法會佔用該發出端及其接收端大量的系統資源及存儲空間,且無法確保該發出端及其接收端之間的資料即時同步。另,在上述定時同步法中,每一接收端在每一預設定間隔時間到期後,會依序探訪資料發出端有無資料變更,將使探訪次數頻繁以及發出端需逐一資料回應,導致發出端的資料處理效率差,且同樣無法確保該發出端及其接收端之間的資料即時同步。相較下,雖然上述即時同步法較能確保資料的即時同步更新,但是資料發出端需要負擔起直接管理所述多個資料接收端的資料接收狀態的權責、管理每個資料接收端同步失敗時的異常處理,以及依序分析或比對每條資料更新任務(包括新舊的資料變動),以致耗費資料接收端較多系統資源,如果資料即時同步的變更頻率過高時,將影響資料發出端的資料同步處理速度。The above-mentioned periodic summarization method occupies a large amount of system resources and storage space at the originating end and its receiving end, and cannot ensure the instantaneous synchronization of data between the originating end and its receiving end. In addition, in the above-mentioned timing synchronization method, after each pre-set interval expires, each receiving end sequentially visits the data sending end to have data changes, which will make the number of frequent visits and the sending end need to respond one by one, resulting in issuing The data processing at the end is inefficient, and it is also impossible to ensure that the data between the sender and its receiver is instantaneously synchronized. In contrast, although the above-mentioned instant synchronization method can ensure the instant synchronization update of the data, the data issuing end needs to bear the authority to directly manage the data receiving state of the plurality of data receiving ends, and manage the synchronization failure of each data receiving end. Exception handling, and sequential analysis or comparison of each data update task (including new and old data changes), so that the data receiving end of the system resources, if the data synchronization frequency is too high, it will affect the data The data processing speed of the end.
因此,對於分散式系統中應用系統之資料更新管理而言,需要一種可節省系統資源且確保資料一致更新的資料同步方法。Therefore, for data update management of application systems in distributed systems, a data synchronization method that saves system resources and ensures consistent data updates is needed.
為解決上述問題,本發明之主要目的在於提供一種電子資料同步方法 及電子資料同步處理系統,其除了能確保發出端及其多個接收端之間的資料變更一致外,利用本發明,發出端無需負擔多個接收端的資料接收狀態的管理、每個資料接收端同步失敗時的異常處理管理,以及依序分析或比對每條資料的更新任務,因此可以減少發出端的系統資源的耗用,還可以增加資料變更的同步速度。In order to solve the above problems, the main object of the present invention is to provide an electronic data synchronization method And the electronic data synchronization processing system, in addition to ensuring the data change between the transmitting end and the plurality of receiving ends thereof, the present invention does not need to bear the management of the data receiving state of the plurality of receiving ends, and each data receiving end Exception handling management when synchronization fails, and sequential analysis or comparison of each data update task, thus reducing the consumption of system resources at the originating end, and increasing the synchronization speed of data changes.
為了達到本發明目的,本發明提供了一種電子資料同步方法,應用於一發出端以及至少一接收端之間,所述電子資料同步方法包括以下步驟:(A)當發出端發生資料變更時,利用一變更產生模組產生至少一變更資料塊;(B)利用一資料同步單元,根據所述至少一接收端之對應識別碼,以及所述至少一變更資料塊內的主鍵值,建立或啟用對應的處理執行緒及記憶體空間;(C)利用所述資料同步單元,依序儲存所述至少一變更資料塊於該對應記憶體空間中;(D)利用所述對應的處理執行緒,分析所述對應記憶體空間中儲存的第一條資料塊內的資料操作特性值及最後一條資料塊內的資料操作特性值;以及(E)決定傳送變更資料塊予所述至少一接收端的步驟。In order to achieve the object of the present invention, the present invention provides an electronic data synchronization method, which is applied between an originating end and at least one receiving end. The electronic data synchronizing method comprises the following steps: (A) when a data change occurs at the issuing end, Generating at least one change data block by using a change generation module; (B) using a data synchronization unit to establish or according to the corresponding identification code of the at least one receiving end and the primary key value in the at least one change data block Enabling the corresponding processing thread and the memory space; (C) sequentially storing the at least one change data block in the corresponding memory space by using the data synchronization unit; (D) using the corresponding processing thread And analyzing the data operation characteristic value in the first data block stored in the corresponding memory space and the data operation characteristic value in the last data block; and (E) determining to transmit the change data block to the at least one receiving end step.
進一步,在所述步驟(B)中進一步包括:在一記憶模組中建立一對應佇列。Further, in the step (B), the method further includes: establishing a corresponding queue in a memory module.
進一步,所述至少一變更資料塊包括所述資料操作特性值(CRUD)、主鍵值以及所述資料變更的內容,該資料操作特性值包括插入(insert)、更新 (update)及刪除(delete)的其中之一值。Further, the at least one change data block includes the data operation characteristic value (CRUD), a primary key value, and a content of the data change, and the data operation characteristic value includes an insert and an update. One of the values of (update) and delete (delete).
進一步,所述主鍵值用於識別一目標電子檔。Further, the primary key value is used to identify a target electronic file.
進一步,所述電子資料同步方法還包括以下步驟: (F)當任一接收端的資料同步變更發生異常,利用所述處理執行緒分析由所述執行緒處理中的第一條資料塊的資料操作特性值及記憶體空間中最後一條資料塊的資料操作特性值,之後回到步驟(E)。Further, the electronic data synchronization method further includes the following steps: (F) when the data synchronization change of any receiving end is abnormal, the processing thread is used to analyze the data operation characteristic value of the first data block in the thread processing and the data of the last data block in the memory space. The characteristic value is operated, and then returns to step (E).
進一步,在所述步驟(E)中,還包括: (E1)根據所述第一條資料塊內的資料操作特性值及最後一條資料塊內的資料操作特性值,決定所述變更資料塊內的資料操作特性值以傳送已決定的變更資料塊予所述至少一接收端,或者決定不傳送變更資料塊予所述至少一接收端;以及 (E2)清除對應記憶體空間儲存的所有變更資料塊。Further, in the step (E), the method further includes: (E1) determining, according to the data operation characteristic value in the first data block and the data operation characteristic value in the last data block, the data operation characteristic value in the changed data block to transmit the determined change data block to The at least one receiving end, or decide not to transmit the change data block to the at least one receiving end; (E2) Clear all change data blocks stored in the corresponding memory space.
進一步,在所述步驟(E1)中,還包括以下步驟:當所述第一條資料塊內的資料操作特性值為插入以及最後一條資料塊內的資料操作特性值為插入或更新時,清除最後一條資料塊之前的所有資料塊,並決定所述最後一條資料塊內的資料操作特性值為插入,以及傳送所述最後一條資料塊予所述至少一接收端。Further, in the step (E1), the method further includes the following steps: when the data operation characteristic value in the first data block is inserted and the data operation characteristic value in the last data block is inserted or updated, All the data blocks before the last data block, and determining that the data operation characteristic value in the last data block is inserted, and transmitting the last data block to the at least one receiving end.
進一步,在所述步驟(E1)中,還包括以下步驟:當所述第一條資料塊內的資料操作特性值為插入以及最後一條資料塊內的資料操作特性值為刪除時,清除所有資料塊。Further, in the step (E1), the method further includes the steps of: clearing all data when the data operation characteristic value in the first data block is inserted and the data operation characteristic value in the last data block is deleted. Piece.
進一步,在所述步驟(E1)中,還包括以下步驟:當所述第一條資料塊內的資料操作特性值為更新以及最後一條資料塊內的資料操作特性值為插入 或更新時,清除最後一條資料塊之前的所有資料塊,並決定所述最後一條資料塊內的資料操作特性值為更新,以及傳送所述最後一條資料塊予所述至少一接收端。Further, in the step (E1), the method further includes the steps of: when the data operation characteristic value in the first data block is updated, and the data operation characteristic value in the last data block is inserted. Or updating, clearing all the data blocks before the last data block, and determining that the data operation characteristic value in the last data block is updated, and transmitting the last data block to the at least one receiving end.
進一步,在所述步驟(E1)中,還包括以下步驟:當所述第一條資料塊內的資料操作特性值為更新以及最後一條資料塊內的資料操作特性值為刪除時,清除最後一條資料塊之前的所有資料塊,並決定所述最後一條資料塊內的資料操作特性值為刪除,以及傳送所述最後一條資料塊予所述至少一接收端。Further, in the step (E1), the method further includes the step of: clearing the last line when the data operation characteristic value in the first data block is updated and the data operation characteristic value in the last data block is deleted. All the data blocks before the data block, and determining that the data operation characteristic value in the last data block is deleted, and transmitting the last data block to the at least one receiving end.
進一步,在所述步驟(E1)中,還包括以下步驟:當所述第一條資料塊內的資料操作特性值為刪除以及最後一條資料塊內的資料操作特性值為插入或更新時,清除最後一條資料塊之前的所有資料塊,並決定所述最後一條資料塊內的資料操作特性值為更新,以及傳送所述最後一條資料塊予所述至少一接收端。Further, in the step (E1), the method further includes the following steps: when the data operation characteristic value in the first data block is deleted and the data operation characteristic value in the last data block is inserted or updated, All the data blocks preceding the last data block, and determining that the data operation characteristic value in the last data block is updated, and transmitting the last data block to the at least one receiving end.
進一步,在所述步驟(E1)中,還包括以下步驟:當所述第一條資料塊內的資料操作特性值為刪除以及最後一條資料塊內的資料操作特性值為刪除時,清除最後一條資料塊之前的所有資料塊,並決定所述最後一條資料塊內的資料操作特性值為刪除,以及傳送所述最後一條資料塊予所述至少一接收端。Further, in the step (E1), the method further includes the step of: clearing the last line when the data operation characteristic value in the first data block is deleted and the data operation characteristic value in the last data block is deleted. All the data blocks before the data block, and determining that the data operation characteristic value in the last data block is deleted, and transmitting the last data block to the at least one receiving end.
為了解決上述問題,本發明還提供了一種電子資料同步處理系統,應用於一發出端以及至少一接收端之間,其包括:變更產生模組,根據所述發出端中的資料變更,產生至少一變更資料塊; 資料同步單元,具有一佇列管理模組、一記憶模組以及一執行緒產生模組,所述資料同步單元根據所述至少一接收端之對應識別碼及所述至少一變更資料塊內的主鍵值,藉由所述佇列管理模組,在記憶模組中建立或啟用對應的佇列以依序儲存所述至少一變更資料塊,以及利用所述執行緒產生模組,建立或啟用對應的處理執行緒以處理所述佇列儲存的至少一變更資料塊,其中所述對應處理執行緒具有一判斷邏輯,用於分析所述對應記憶體空間中儲存的第一條資料塊內的資料操作特性值及最後一條資料塊內的資料操作特性值,以決定傳予所述至少一接收端的變更資料塊;以及變更接收模組,根據所述至少一接收端接收到的變更資料塊,取得發出端的資料變更。In order to solve the above problems, the present invention further provides an electronic data synchronization processing system, which is applied between an emitting end and at least one receiving end, and includes: a change generating module, generating at least according to a data change in the sending end a change data block; a data synchronization unit having a queue management module, a memory module and a thread generation module, wherein the data synchronization unit is configured according to the corresponding identification code of the at least one receiving end and the at least one change data block a primary key value, by using the queue management module, establishing or enabling a corresponding queue in the memory module to sequentially store the at least one change data block, and using the thread generation module to establish or Enabling a corresponding processing thread to process the at least one change data block stored in the queue, wherein the corresponding processing thread has a determining logic for analyzing the first data block stored in the corresponding memory space a data operation characteristic value and a data operation characteristic value in the last data block to determine a change data block transmitted to the at least one receiving end; and a change receiving module, according to the change data block received by the at least one receiving end , get the data change at the sending end.
本發明之優點在於,利用發出端及多個接收端之間設置的一資料同步單元,,可以確保該發出端及多個接收端之間的資料變更一致,且該發出端無需負擔多個接收端的資料接收狀態的管理、每個資料接收端同步失敗時的異常處理管理,以及依序分析或比對每條資料的更新任務,因此可以減少發出端的系統資源的耗用,還可以增加資料變更的同步速度。The invention has the advantages that the data synchronization unit disposed between the transmitting end and the plurality of receiving ends can ensure that the data change between the sending end and the plurality of receiving ends is consistent, and the sending end does not need to bear multiple receiving. The management of the data receiving state of the end, the exception handling management when each data receiving end fails to synchronize, and the sequential analysis or comparison of the update tasks of each data, thereby reducing the consumption of system resources at the originating end, and also increasing the data change. Synchronization speed.
下面結合附圖對本發明之電子資料同步方法及電子資料同步處理系統之具體實施方式做詳細說明。The specific implementation manners of the electronic data synchronization method and the electronic data synchronization processing system of the present invention will be described in detail below with reference to the accompanying drawings.
請先參考第1圖,是一種依據本發明較佳實施例的電子資料同步處理系統的架構示意圖,所述電子資料同步處理系統是應用於一發出端T1以及多個接收端R1,R2,...Rm之間,其主要包括:變更產生模組102、資料同步單元20及多個變更接收模組302。在本實施例中,所述變更產生模組102 是設置於發出端T1,根據所述發出端運行時發生的資料變更,自主依序產生至少一變更資料塊。所述資料同步單元20,設置在一位於發出端T1以及多個接收端R1,R2,...Rm之間的中介端S1上,且具有一佇列管理模組202、一記憶模組204以及一執行緒產生模組206,用於有效管理及處理發出端T1傳至所述多個接收端R1,R2,...Rm之間的變更資料塊。所述多個變更接收模組302,分別設置於多個接收端R1,R2,...Rm,且根據所述多個接收端R1,R2,...Rm接收到的至少一變更資料塊,以取得發出端的資料變更內容。關於本發明之電子資料同步處理系統的更詳細應用,請容下述明。Please refer to FIG. 1 , which is a schematic structural diagram of an electronic data synchronization processing system according to a preferred embodiment of the present invention. The electronic data synchronization processing system is applied to an emitting end T1 and a plurality of receiving ends R1, R2, . Between Rm, the main components include a change generation module 102, a data synchronization unit 20, and a plurality of change reception modules 302. In this embodiment, the change generation module 102 It is set at the issuing end T1, and at least one change data block is generated in sequence according to the data change that occurs when the issuing end is operated. The data synchronization unit 20 is disposed on the intermediate end S1 between the transmitting end T1 and the plurality of receiving ends R1, R2, . . . Rm, and has a queue management module 202 and a memory module 204. And a thread generating module 206, configured to effectively manage and process the change data block sent by the sending end T1 to the plurality of receiving ends R1, R2, . . . Rm. The plurality of change receiving modules 302 are respectively disposed at the plurality of receiving ends R1, R2, . . . Rm, and according to the at least one change data block received by the plurality of receiving ends R1, R2, . . . Rm In order to obtain the data change content of the issuing side. For a more detailed application of the electronic data synchronization processing system of the present invention, please refer to the following.
請進一步參考第1圖及第2圖,第2圖說明第1圖之電子資料同步處理系統應用於一發出端T1及多個接收端R1,R2,...Rm之間,其中所述發出端T1可以是一種具有或連結一主資料庫的應用系統伺服器,所述多個接收端R1,R2,...Rm可以是一種具應用系統的用戶端主機,這兩端的應用系統可為相同或不同版本或不同系統,而一連接於發出端T1以及多個接收端R1,R2,...Rm之間的中介端S1可以為中介軟體(Middleware)、快取伺服器、網路伺服器、集線器(Hub)、廣域網交換器或路由器(Router)之其中一種。所述發出端T1、中介端S1及所述多個接收端R1,R2,...Rm三者之間或中介端S1及所述多個接收端R1,R2,...Rm兩者之間經由一資訊網路系統30近程或遠端傳送電子資訊,所述資訊網路系統可以是區域網(LAN)、廣域網(WAN)或網際網路(Internet)的其中一種或組合。Please refer to FIG. 1 and FIG. 2 further. FIG. 2 illustrates the electronic data synchronization processing system of FIG. 1 applied between an emitting terminal T1 and a plurality of receiving terminals R1, R2, . . . Rm, wherein the issuing The terminal T1 may be an application server having or connected to a master database, and the plurality of receiving ends R1, R2, . . . Rm may be a client host with an application system, and the application systems at both ends may be The same or different versions or different systems, and the intermediate S1 connected between the sending end T1 and the plurality of receiving ends R1, R2, ... Rm can be an intermediate software (Middleware), a cache server, a network servo One of a hub, a hub, a WAN switch, or a router. The sending end T1, the intermediate end S1, and the plurality of receiving ends R1, R2, ... Rm or between the intermediate S1 and the plurality of receiving ends R1, R2, ... Rm The electronic information is transmitted short-range or remotely via an information network system 30, which may be one or a combination of a regional network (LAN), a wide area network (WAN), or the Internet.
所述資料同步單元20,位元於上述中介端S1,主要用於接收發出端T1的變更產生模組102傳來的至少一變更資料塊D,所述至少一變更資料塊D承載了一主鍵值(Key)、資料操作特性值(CRUD)及所述資料變更內容(Data) (如第2圖所示)。所述資料操作特性值(CRUD)包括插入(insert)、更新(update)及刪除(delete)的其中之一值,用於通知所有接收端R1,R2,...Rm應執行的資料變更動作是插入資料、更新資料或刪除資料。所述主鍵值,用於識別一發生資料變更的目標電子檔如電子表單,以供發出端T1以及所述多個接收端R1,R2,...Rm統一識別需要同步變更的電子檔。所述資料變更內容,即指上述目標電子檔中應同步變更的資料如電子表單內的部分資料。在其他實施例中,所述資料同步單元20可直接改置於所述發出端T1中。The data synchronization unit 20 is configured to receive at least one change data block D transmitted by the change generation module 102 of the originating terminal T1, and the at least one change data block D carries a main Key value, data operation characteristic value (CRUD), and the data change content (Data) (As shown in Figure 2). The data operation characteristic value (CRUD) includes one of insert, update, and delete, and is used to notify all receiving ends R1, R2, . . . Rm that the data change action should be performed. Is inserting data, updating data, or deleting data. The primary key value is used to identify a target electronic file, such as an electronic form, in which a data change occurs, for the originating terminal T1 and the plurality of receiving ends R1, R2, . . . Rm to uniformly identify the electronic file that needs to be changed synchronously. The data change content refers to the information that should be changed synchronously in the target electronic file, such as some data in the electronic form. In other embodiments, the data synchronization unit 20 can be directly placed in the originating terminal T1.
在應用中,參考第1圖及第2圖,當所述資料同步單元20收到發出端T1傳來的至少一變更資料塊D時,所述資料同步單元20根據其內設的所有接收端R1,R2,...Rm之對應識別碼(ID)以及所述至少一變更資料塊D內的主鍵值(Key),判斷所述至少一變更資料塊D先前是否變更過或是新的變更資料,進而利用所述佇列管理模組202,在記憶模組204中宣告建立一新的對應動態佇列24或啟用現有對應動態佇列24作為一記憶體空間,以依序儲存所有變更資料塊如同U4,U3,U2,U1。當宣告建立一新的對應動態佇列24或啟用現有對應動態佇列24,並經由所述執行緒產生模組206,建立一新的對應處理執行緒26或啟用現有對應處理執行緒26,以處理所述佇列儲存之變更資料塊U4,U3,U2,U1。以第2圖為例,所述資料同步單元20根據其內設所有接收端R1,R2,...Rm的m個識別碼(ID),以及至少一變更資料塊D的主鍵值(Key)與處理中的變更資料塊U4,U3,U2,U1具有相同主鍵值(Key),就會啟用現有m個佇列24及m個處理執行緒26。接著,在所述至少一變更資料塊D存入m個佇列24前,所述佇列管理模組202會再將所有接收端R1,R2,...Rm的m個識別碼(ID)分別加入至少一變更資料塊D 中,形成如同m個佇列24中每一變更資料塊U4,U3,U2,U1的組成一樣。當每一處理執行緒26處理對應佇列24中儲存的變更資料塊U4,U3,U2,U1後,所述處理執行緒26根據每一變更資料塊U4,U3,U2,U1內接收端R1,R2,...Rm識別碼(ID),分別確保送達所述至少一變更資料塊予所述多個接收端R1,R2,...Rm。當處理執行緒26完成目前的資料塊的同步變更後,會重新檢視佇列24中資料塊,當有異動資料存在時,會重新執行上述流程。當佇列24中沒有新的資料塊時所述佇列管理模組202會消滅整個佇列,並且所述執行緒產生模組206終止執行緒26的執行。In the application, referring to FIG. 1 and FIG. 2, when the data synchronization unit 20 receives at least one change data block D transmitted from the originating terminal T1, the data synchronization unit 20 is based on all the receiving ends thereof. Corresponding identification code (ID) of R1, R2, ... Rm and a primary key value (Key) in the at least one change data block D, determining whether the at least one change data block D has been previously changed or new The data is changed, and the queue management module 202 is used to announce a new corresponding dynamic queue 24 or enable the existing corresponding dynamic queue 24 as a memory space in the memory module 204 to sequentially store all changes. The data block is like U4, U3, U2, U1. When a new corresponding dynamic queue 24 is announced or the existing corresponding dynamic queue 24 is enabled, and a new corresponding processing thread 26 is created or the existing corresponding processing thread 26 is enabled via the thread generation module 206, The change data block U4, U3, U2, U1 stored in the queue is processed. Taking FIG. 2 as an example, the data synchronization unit 20 sets m identification codes (IDs) of all receiving ends R1, R2, . . . Rm and at least one primary key value of the changed data block D (Key). When the changed data blocks U4, U3, U2, and U1 in process have the same primary key value (Key), the existing m queues 24 and m processing threads 26 are enabled. Then, before the at least one change data block D is stored in the m queues 24, the queue management module 202 will further add m identification codes (IDs) of all the receiving ends R1, R2, ..., Rm. Add at least one change data block D The composition is the same as the composition of each of the m blocks 24, U3, U2, and U1. After each processing thread 26 processes the change data block U4, U3, U2, U1 stored in the corresponding queue 24, the processing thread 26 receives the R1 in each change data block U4, U3, U2, U1. , R2, . . . Rm identification code (ID), respectively, ensuring that the at least one change data block is delivered to the plurality of receiving ends R1, R2, . . . Rm. After the processing thread 26 completes the synchronization change of the current data block, the data block in the queue 24 is re-examined, and when the transaction data exists, the above process is re-executed. When there are no new data blocks in the queue 24, the queue management module 202 will destroy the entire queue, and the thread generation module 206 terminates the execution of the thread 26.
請再參考第1圖及第2圖,所述多個接收端R1,R2,...Rm之變更接收模組302根據接收到的至少一變更資料塊如U4,U3,U2,U1中的主鍵值(Key)及操作特性值(Crud),以取得的資料變更內容(Data),對多個接收端R1,R2,...Rm中的對應資料作同步變更。Referring to FIG. 1 and FIG. 2 again, the change receiving module 302 of the plurality of receiving ends R1, R2, . . . Rm is based on the received at least one changed data block such as U4, U3, U2, U1. The primary key value (Key) and the operational characteristic value (Crud) are synchronously changed with respect to the corresponding data in the plurality of receiving ends R1, R2, ... Rm by the acquired data change content (Data).
依據本發明,為處理對應佇列24中儲存的變更資料塊U4,U3,U2,U1,所述對應處理執行緒26具有一判斷邏輯,用於分析所述對應佇列24儲存的第一條資料塊內的資料操作特性值(Crud)及最後一條資料塊內的資料操作特性值(Crud),以決定傳送予所述多個接收端R1,R2,...Rm的變更資料塊的組成。請進一步參考第3圖,係顯示處理執行緒26使用的判斷邏輯表,並詳細介紹此判斷邏輯表包括如下邏輯:According to the present invention, in order to process the change data blocks U4, U3, U2, U1 stored in the corresponding queue 24, the corresponding processing thread 26 has a determination logic for analyzing the first line stored in the corresponding array 24. The data operation characteristic value (Crud) in the data block and the data operation characteristic value (Crud) in the last data block to determine the composition of the change data block transmitted to the plurality of receiving ends R1, R2, ... Rm . Please refer to FIG. 3 for further reference to the decision logic table used by the processing thread 26, and to detail the decision logic table including the following logic:
(1)當所述第1條資料塊內的資料操作特性值(Crud)為插入以及第N條(最後一條)資料塊內的資料操作特性值(Crud)為插入或更新時,清除第N條資料塊之前的所有資料塊,並決定所述第N條資料塊內的資料操作特性值(Crud)為插入,以及傳送已決定的第N條資料塊予所述接收端。(1) When the data operation characteristic value (Crud) in the first data block is the insertion and the data operation characteristic value (Crud) in the Nth (last) data block is inserted or updated, the Nth is cleared. All the data blocks before the data block, and determine the data operation characteristic value (Crud) in the Nth data block as an insertion, and transmit the determined Nth data block to the receiving end.
(2)當所述第1條資料塊內的資料操作特性值(Crud)為插入以及第N條資料塊內的資料操作特性值(Crud)為刪除時,清除所有儲存中或處理中的資料塊,以及決定不傳送變更資料塊。(2) When the data operation characteristic value (Crud) in the first data block is the insertion and the data operation characteristic value (Crud) in the Nth data block is deleted, all the stored or processed data are cleared. Block, and decide not to transmit the change data block.
(3)當所述第1條資料塊內的資料操作特性值(Crud)為更新以及第N條資料塊內的資料操作特性值(Crud)為插入或更新時,清除第N條資料塊之前的所有資料塊,並決定所述第N條資料塊內的資料操作特性值(Crud)為更新,以及傳送已決定的第N條資料塊予所述接收端。(3) When the data operation characteristic value (Crud) in the first data block is updated and the data operation characteristic value (Crud) in the Nth data block is inserted or updated, before the Nth data block is cleared All the data blocks, and determine the data operation characteristic value (Crud) in the Nth data block as an update, and transmit the determined Nth data block to the receiving end.
(4)當所述第1條資料塊內的資料操作特性值(Crud)為更新以及第N條資料塊內的資料操作特性值(Crud)為刪除時,清除第N條資料塊之前的所有資料塊,並決定所述第N條資料塊內的資料操作特性值(Crud)為刪除,以及傳送已決定的第N條資料塊予所述接收端。(4) When the data operation characteristic value (Crud) in the first data block is updated and the data operation characteristic value (Crud) in the Nth data block is deleted, all before the Nth data block is cleared. And a data block, and determining that the data operation characteristic value (Crud) in the Nth data block is deleted, and transmitting the determined Nth data block to the receiving end.
(5)當所述第1條資料塊內的資料操作特性值為刪除以及第N條資料塊內的資料操作特性值為插入或更新時,清除第N條資料塊之前的所有資料塊,並決定所述第N條資料塊內的資料操作特性值(Crud)為更新,以及傳送已決定的第N條資料塊予所述接收端。(5) when the data operation characteristic value in the first data block is deleted and the data operation characteristic value in the Nth data block is inserted or updated, all the data blocks before the Nth data block are cleared, and Determining a data operation characteristic value (Crud) in the Nth data block as an update, and transmitting the determined Nth data block to the receiving end.
(6)當所述第N條資料塊內的資料操作特性值(Crud)為刪除以及第N條資料塊內的資料操作特性值(Crud)為刪除時,清除第N條資料塊之前的所有資料塊,並決定所述第N條資料塊內的資料操作特性值(Crud)仍為刪除,以及傳送已決定的第N條資料塊予所述接收端。(6) When the data operation characteristic value (Crud) in the Nth data block is deleted and the data operation characteristic value (Crud) in the Nth data block is deleted, all before the Nth data block is cleared. Data block, and determining that the data operation characteristic value (Crud) in the Nth data block is still deleted, and transmitting the determined Nth data block to the receiving end.
請進一步參考第4圖至第8圖,分別顯示根據第3圖之判斷邏輯表的各種實例運用,以說明各資料同步變更的處理狀態。第4圖中,佇列24中依序儲存了4個資料塊U4、U3、U2及I1,其中U代表資料操作特性值(Crud)為更新 (Update),I代表資料操作特性值(Crud)為插入(Insert),資料塊中的數字4,3,2,1代表儲存次序。對應的處理執行緒26根據第1條資料塊I1內的資料操作特性值(Crud)為插入以及第4條資料塊U4內的資料操作特性值(Crud)為更新,清除第4條資料塊U4之前的所有資料塊U3、U2及I1,並決定原本第4條資料塊U4內的資料操作特性值(Crud)改為插入,組成新的第4條資料塊I4,以及傳送已決定的第4條資料塊I4予所述接收端。Please refer to FIG. 4 to FIG. 8 for further description of various example operations of the determination logic table according to FIG. 3 to illustrate the processing state of each data synchronization change. In Fig. 4, four data blocks U4, U3, U2 and I1 are sequentially stored in the queue 24, where U represents the data operation characteristic value (Crud) as an update. (Update), I represents the data operation characteristic value (Crud) is Insert, and the number 4, 3, 2, 1 in the data block represents the storage order. The corresponding processing thread 26 clears the fourth data block U4 according to the data operation characteristic value (Crud) in the first data block I1 and the data operation characteristic value (Crud) in the fourth data block U4. All previous data blocks U3, U2 and I1, and determine that the data operation characteristic value (Crud) in the original data block U4 is changed to insert, form a new fourth data block I4, and transmit the decided fourth The data block I4 is given to the receiving end.
於第5圖中顯示,佇列24中依序儲存了4個資料塊D4、U3、U2及I1,其中D代表資料操作特性值(Crud)為為刪除。對應的處理執行緒26根據第1條資料塊I1內的資料操作特性值(Crud)為插入以及第4條資料塊D4內的資料操作特性值(Crud)為刪除,就清除所有資料塊D4、U3、U2及I1,並決定不傳送資料塊予所述接收端。As shown in FIG. 5, four data blocks D4, U3, U2, and I1 are sequentially stored in the queue 24, where D represents the data operation characteristic value (Crud) as deletion. The corresponding processing thread 26 clears all the data blocks D4 according to the data operation characteristic value (Crud) in the first data block I1 and the data operation characteristic value (Crud) in the fourth data block D4. U3, U2 and I1, and decide not to transmit the data block to the receiving end.
於第6圖中顯示,佇列24中依序儲存了4個資料塊U4、U3、U2及U1。對應的處理執行緒26根據第1條資料塊U1內的資料操作特性值(Crud)為更新以及第4條資料塊U4內的資料操作特性值(Crud)為更新,清除第4條資料塊U4之前的所有資料塊U3、U2及U1,並決定原本第4條資料塊U4內的資料操作特性值(Crud)仍為更新,以及傳送已決定的第4條資料塊U4予所述接收端。As shown in FIG. 6, four data blocks U4, U3, U2, and U1 are sequentially stored in the queue 24. The corresponding processing thread 26 clears the fourth data block U4 according to the data operation characteristic value (Crud) in the first data block U1 and the data operation characteristic value (Crud) in the fourth data block U4. All the previous data blocks U3, U2 and U1, and determine that the data operation characteristic value (Crud) in the original fourth data block U4 is still updated, and transmit the determined fourth data block U4 to the receiving end.
於第7圖中顯示,佇列24中依序儲存了4個資料塊U4、U3、I2及D1。對應的處理執行緒26根據第1條資料塊D1內的資料操作特性值(Crud)為刪除以及第4條資料塊U4內的資料操作特性值(Crud)為更新,清除第4條資料塊U4之前的所有資料塊U3、U2及U1,並決定原本第4條資料塊U4內的資料操作特性值(Crud)仍為更新,以及傳送已決定的第4條資料塊U4予所述接收端。As shown in FIG. 7, four data blocks U4, U3, I2, and D1 are sequentially stored in the queue 24. The corresponding processing thread 26 clears the fourth data block U4 according to the data operation characteristic value (Crud) in the first data block D1 and the data operation characteristic value (Crud) in the fourth data block U4. All the previous data blocks U3, U2 and U1, and determine that the data operation characteristic value (Crud) in the original fourth data block U4 is still updated, and transmit the determined fourth data block U4 to the receiving end.
於第8圖中顯示,佇列24中依序儲存了2個資料塊I2及D1。對應的處理 執行緒26根據第1條資料塊D1內的資料操作特性值(Crud)為刪除以及第2條資料塊I2內的資料操作特性值(Crud)為插入,清除第2條資料塊I2之前的所有資料塊D1,並決定原本第2條資料塊I2內的資料操作特性值(Crud)改為更新,以及傳送已決定的第2條資料塊U2予所述接收端。As shown in Fig. 8, two data blocks I2 and D1 are sequentially stored in the queue 24. Corresponding processing The thread 26 clears all the data before the second data block I2 according to the data operation characteristic value (Crud) in the first data block D1 and the data operation characteristic value (Crud) in the second data block I2. The data block D1 is determined, and the data operation characteristic value (Crud) in the original second data block I2 is changed to update, and the determined second data block U2 is transmitted to the receiving end.
於第9圖至第14圖中,根據第3圖之判斷邏輯表,說明當任一接收端的資料同步變更發生異常時,各資料同步變更的處理狀態。於第9圖中,當其中一接收端的資料同步變更發生異常時,若該處理執行緒26正在處理第1條資料塊I1,以及佇列24依序儲存了3個資料塊U4、U3及U2。此時,所述處理執行緒26會根據第1條資料塊I1內的資料操作特性值(Crud)為插入以及第4條資料塊U4內的資料操作特性值(Crud)為更新,清除第4條資料塊U4之前的所有資料塊U3、U2及I1,並決定原本第4條資料塊U4內的資料操作特性值(Crud)改為插入,以及傳送已決定的第4條資料塊I4予所述接收端。In the figure 9 to FIG. 14, the processing logic of the data synchronization change when the data synchronization change of any of the receiving ends is abnormal is described based on the judgment logic table of FIG. In FIG. 9, when the data synchronization change of one of the receiving ends is abnormal, if the processing thread 26 is processing the first data block I1, and the queue 24 stores the three data blocks U4, U3, and U2 in sequence. . At this time, the processing thread 26 clears the fourth according to the data operation characteristic value (Crud) in the first data block I1 and the data operation characteristic value (Crud) in the fourth data block U4. All the data blocks U3, U2 and I1 before the data block U4, and determine that the data operation characteristic value (Crud) in the original data block U4 is changed to insert, and the determined fourth data block I4 is transmitted. Said receiver.
於第10圖中,當接收端的資料同步變更發生異常時,若該處理執行緒26正在處理第1條資料塊I1,以及佇列24依序儲存了4個資料塊D5、U4、U3及U2。此時,所述處理執行緒26根據第1條資料塊I1內的資料操作特性值(Crud)為插入以及第5條資料塊U4內的資料操作特性值(Crud)為刪除,清除所有資料塊D5、U4、U3、U2及I1,並決定不傳送資料塊予所述接收端。In FIG. 10, when the data synchronization change of the receiving end is abnormal, if the processing thread 26 is processing the first data block I1, and the queue 24 stores the four data blocks D5, U4, U3, and U2 in sequence. . At this time, the processing thread 26 clears all the data blocks according to the data operation characteristic value (Crud) in the first data block I1 and the data operation characteristic value (Crud) in the fifth data block U4. D5, U4, U3, U2 and I1, and decide not to transmit the data block to the receiving end.
於第11圖中,當接收端的資料同步變更發生異常時,若該處理執行緒26正在處理第1條資料塊U1,以及佇列24依序儲存了3個資料塊U4、U3及U2。此時,所述處理執行緒26會根據第1條資料塊U1內的資料操作特性值(Crud)為更新以及第4條資料塊U4內的資料操作特性值(Crud)為更新,清除第4條資料塊U4之前的所有資料塊U3、U2及U1,並決定原本第4條資料塊 U4內的資料操作特性值(Crud)仍為更新,以及傳送已決定的第4條資料塊U4予所述接收端。In Fig. 11, when the data synchronization change at the receiving end is abnormal, if the processing thread 26 is processing the first data block U1, the queue 24 stores three data blocks U4, U3, and U2 in sequence. At this time, the processing thread 26 clears the fourth according to the data operation characteristic value (Crud) in the first data block U1 and the data operation characteristic value (Crud) in the fourth data block U4. All data blocks U3, U2 and U1 before the data block U4, and determine the original 4th data block The data operation characteristic value (Crud) in U4 is still updated, and the determined fourth data block U4 is transmitted to the receiving end.
於第12圖中,當接收端的資料同步變更發生異常時,若該處理執行緒26正在處理第1條資料塊U1及佇列24依序儲存了4個資料塊D5、U4、U3及U2。此時,所述處理執行緒26根據第1條資料塊U1內的資料操作特性值(Crud)為更新以及第5條資料塊D5內的資料操作特性值(Crud)為刪除,清除第5條資料塊D5之前的所有資料塊U4、U3、U2及U1,並決定原本第5條資料塊D5內的資料操作特性值(Crud)為刪除,以及傳送已決定的第5條資料塊D5予所述接收端。In Fig. 12, when the data synchronization change at the receiving end is abnormal, if the processing thread 26 is processing the first data block U1 and the queue 24, four data blocks D5, U4, U3, and U2 are sequentially stored. At this time, the processing thread 26 clears the fifth item according to the data operation characteristic value (Crud) in the first data block U1 and the data operation characteristic value (Crud) in the fifth data block D5. All the data blocks U4, U3, U2 and U1 before the data block D5, and determine the data operation characteristic value (Crud) in the original 5th data block D5 as the deletion, and transmit the determined 5th data block D5 to the Said receiver.
於第13圖中,當接收端的資料同步變更發生異常時,若該處理執行緒26正在處理第1條資料塊D1,以及佇列24依序儲存了3個資料塊U4、U3及I2。此時,所述處理執行緒26根據第1條資料塊D1內的資料操作特性值(Crud)為刪除以及第4條資料塊U4內的資料操作特性值(Crud)為更新,清除第4條資料塊U4之前的所有資料塊U3、U2及D1,並決定原本第4條資料塊U4內的資料操作特性值(Crud)為更新,以及傳送所述第4條資料塊U4予所述接收端。In Fig. 13, when the data synchronization change at the receiving end is abnormal, the processing thread 26 is processing the first data block D1, and the queue 24 sequentially stores three data blocks U4, U3, and I2. At this time, the processing thread 26 clears the fourth item based on the data operation characteristic value (Crud) in the first data block D1 and the data operation characteristic value (Crud) in the fourth data block U4. All data blocks U3, U2 and D1 before the data block U4, and determine the data operation characteristic value (Crud) in the original fourth data block U4 as update, and transmit the fourth data block U4 to the receiving end .
於第14圖中,當接收端的資料同步變更發生異常時,若該處理執行緒26正在處理第1條資料塊D1,以及佇列24儲存了1個資料塊I2。此時,所述處理執行緒26根據第1條資料塊D1內的資料操作特性值(Crud)為刪除以及第2條資料塊I2內的資料操作特性值(Crud)為插入,清除第2條資料塊I2之前的所有資料塊D1,並決定原本第2條資料塊I2內的資料操作特性值(Crud)改為更新,以及傳送所述第2條資料塊U2予所述接收端。In Fig. 14, when the data synchronization change at the receiving end is abnormal, if the processing thread 26 is processing the first data block D1, and the queue 24 is storing one data block I2. At this time, the processing thread 26 clears the second item based on the data operation characteristic value (Crud) in the first data block D1 and the data operation characteristic value (Crud) in the second data block I2. All the data blocks D1 before the data block I2, and determine that the data operation characteristic value (Crud) in the original second data block I2 is changed to update, and the second data block U2 is transmitted to the receiving end.
請參考第15圖,為一種依據本發明之較佳實施例之電子資料同步方法 的步驟流程圖,其應用於一發出端以及至少一接收端之間,並搭配第1圖及2之電子資料同步處理系統,所述電子資料同步方法包括以下步驟:S400,當發出端發生資料變更時,利用一變更產生模組產生至少一變更資料塊,所述至少一變更資料塊包括所述資料操作特性值(CRUD)、主鍵值(Key)以及所述資料變更的內容,該資料操作特性值包括插入(insert)、更新(update)及刪除(delete)的其中之一值,其中所述主鍵值,係供該發出端以及至少一接收端共同識別出一目標電子檔;S410,利用一資料同步單元,根據所述至少一接收端之一對應識別碼及所述至少一變更資料塊內的主鍵值,建立或啟用對應的處理執行緒以及所需之記憶體空間,該記憶體空間的建立或啟用係在一記憶模組中建立或啟用一對應佇列;S420,利用所述資料同步單元,依序儲存所述至少一變更資料塊於該對應記憶體空間中;S430,根據所述對應的處理執行緒之判斷邏輯(見第3圖),分析所述對應記憶體空間中儲存之第一條資料塊內的資料操作特性值及最後一條資料塊內的資料操作特性值,以處理資料塊的同步變更;S440,決定是否傳送變更資料塊予所述至少一接收端;在步驟S440中,還包括:根據所述第一條資料塊內的資料操作特性值及最後一條資料塊內的資料操作特性值,決定所述變更資料塊內的資料操作特性值以傳送已決定的變更資料塊予所述至少一接收端,接著實行下一步驟S450,或者決定不傳送變更資料塊予所述至少一接收端,接著實行下一步驟S422;S442,當決定不傳送變更資料塊予所述至少一接收端時,即清除對應 記憶體空間儲存的所有變更資料塊;之後回到步驟S400;S450,當決定傳送變更資料塊予所述至少一接收端時,即清除對應記憶體空間儲存的所有變更資料塊;S460,傳送已決定的變更資料塊予所述至少一接收端;S470,判斷是否有任一接收端的資料同步變更發生異常;如果是,實行下一步驟S480;如果沒有,回到步驟S400;以及S480,根據所述處理執行緒之判斷邏輯(見第3圖),分析由所述執行緒處理中的第一條資料塊的資料操作特性值及該記憶體空間中最後一條資料塊的資料操作特性值;之後回到步驟440。Please refer to FIG. 15 for an electronic data synchronization method according to a preferred embodiment of the present invention. The step flow chart is applied between an emitting end and at least one receiving end, and is matched with the electronic data synchronization processing system of FIGS. 1 and 2, wherein the electronic data synchronization method comprises the following steps: S400, when the sending end generates data At the time of the change, at least one change data block is generated by using a change generation module, and the at least one change data block includes the data operation characteristic value (CRUD), a primary key value (Key), and the content of the data change, the data The operating characteristic value includes one of an insert, an update, and a delete, wherein the primary key is used by the originating end and the at least one receiving end to jointly identify a target electronic file; S410 And establishing, by using a data synchronization unit, a corresponding processing thread and a required memory space according to the identifier corresponding to the at least one receiving end and the primary key value in the at least one changed data block, where Establishing or enabling the memory space to establish or enable a corresponding queue in a memory module; S420, sequentially storing the at least one change data block by using the data synchronization unit In the corresponding memory space; S430, analyzing the data operation characteristic value in the first data block stored in the corresponding memory space according to the judgment logic of the corresponding processing thread (see FIG. 3) and finally a data operation characteristic value in a data block to process a synchronization change of the data block; S440, determining whether to transmit the change data block to the at least one receiving end; and in step S440, further comprising: according to the first data block a data operation characteristic value and a data operation characteristic value in the last data block, determining a data operation characteristic value in the changed data block to transmit the determined change data block to the at least one receiving end, and then proceeding to the next Step S450, or decide not to transmit the change data block to the at least one receiving end, and then proceed to the next step S422; S442, when it is decided not to transmit the change data block to the at least one receiving end, the corresponding correspondence is cleared. All the changed data blocks stored in the memory space; then returning to step S400; S450, when it is decided to transmit the change data block to the at least one receiving end, all the changed data blocks stored in the corresponding memory space are cleared; S460, the transfer has been Determining the change data block to the at least one receiving end; S470, determining whether any data synchronization change of any receiving end is abnormal; if yes, proceeding to the next step S480; if not, returning to step S400; and S480, according to Determining logic of the processing thread (see FIG. 3), analyzing data operation characteristic values of the first data block in the thread processing and data operation characteristic values of the last data block in the memory space; Go back to step 440.
藉由本發明可提供下列優點:The following advantages can be provided by the present invention:
(1)本發明利用多動態佇列及多執行緒的處理及傳送,可以對多個接收端,進行每一個資料的同步更新,進而提升資料同步更新的效率。(1) The present invention utilizes multi-dynamic queues and multi-thread processing and transmission, so that each data can be synchronously updated for multiple receiving ends, thereby improving the efficiency of data synchronization update.
(2)本發明還利用資料操作特性值(CRUD),解決單一佇列儲存的資料如電子表單中單一條資料之連續變更動作的問題,進而增加資料同步的速度及效率。縱然資料同步變更發生異常的情況下,也能保有相同的邏輯特性。(2) The present invention also utilizes the data operation characteristic value (CRUD) to solve the problem of continuous change action of a single data stored in a single queue, such as a single piece of data in an electronic form, thereby increasing the speed and efficiency of data synchronization. Even if the data synchronization change is abnormal, the same logic characteristics can be maintained.
(3)本發明對不同資料的同步是利用不同的佇列及執行緒來處理,因此當任一接收端的任一資料同步變更發生異常時,可以個別處理,不會影響其他接收端或其他資料的同步變更,所以本發明的資料同步狀態可以作個別接收端或資料管理。(3) The synchronization of different data by the present invention is handled by using different queues and threads. Therefore, when any data synchronization change of any receiving end is abnormal, it can be processed individually without affecting other receiving ends or other materials. Synchronous changes, so the data synchronization status of the present invention can be managed as an individual receiver or data.
(4)本發明利用單一發出端及多個接收端之間設置的一資料同步單元,確保該發出端及多個接收端之間的資料變更的一致性,且該發出端無需負擔多個接收端的資料接收狀態的管理、每一個資料接收端同步失敗時 的異常處理管理,以及依序分析或比對每條資料的更新任務,因此可以減少該發出端的系統資源的耗用,還可以增加資料變更的同步速度。(4) The present invention utilizes a data synchronization unit disposed between a single originating end and a plurality of receiving ends to ensure consistency of data changes between the transmitting end and the plurality of receiving ends, and the transmitting end does not need to bear multiple receiving Management of the data receiving status of the end, when each data receiving end fails to synchronize The exception handling management, as well as the sequential analysis or comparison of each data update task, can reduce the consumption of system resources at the originating end, and can also increase the synchronization speed of data changes.
綜上所述,本發明符合發明專利要件,爰依法提出專利申請。惟以上所述者僅為本發明之較佳實施例,舉凡熟悉此項技藝之人士,在爰依本發明精神架構下所做之等效修飾或變化,皆應包含於以下之申請專利範圍內。In summary, the present invention complies with the requirements of the invention patent and submits a patent application according to law. The above is only the preferred embodiment of the present invention, and equivalent modifications or variations made by those skilled in the art should be included in the following claims. .
20‧‧‧資料同步單元20‧‧‧Data Synchronization Unit
24‧‧‧動態佇列24‧‧‧ dynamic queue
26‧‧‧處理執行緒26‧‧‧Processing thread
30‧‧‧資訊網路系統30‧‧‧Information Network System
102‧‧‧變更產生模組102‧‧‧Change generation module
202‧‧‧佇列管理模組202‧‧‧Array Management Module
204‧‧‧記憶模組204‧‧‧Memory Module
206‧‧‧執行緒產生模組206‧‧‧Thread Generation Module
302‧‧‧變更接收模組302‧‧‧Change receiving module
U1、U2、U3、U4、I1、I2、D1、D4、D5、I4‧‧‧資料塊U1, U2, U3, U4, I1, I2, D1, D4, D5, I4‧‧‧ data blocks
T1‧‧‧發出端T1‧‧‧ issuing end
R1,R2,...Rm‧‧‧接收端R1, R2, ... Rm‧‧‧ Receiver
S1‧‧‧中介端S1‧‧‧Intermediary
S400~480‧‧‧皆為步驟S400~480‧‧‧ are steps
第1圖,係顯示根據本發明之較佳實施例之一種電子資料同步處理系統之架構示意圖;第2圖,係顯示根據本發明之較佳實施例之電子資料同步處理系統應用於一發出端及多個接收端之間的架構示意圖;第3圖,係顯示根據本發明之較佳實施例之電子資料同步處理系統之資料同步單元產生一處理執行緒的判斷邏輯表;第4圖至第8圖,係根據第3圖的判斷邏輯表,顯示各資料同步變更的處理狀態;第9圖至第14圖,根據第3圖的判斷邏輯表,顯示任一接收端的資料同步變更發生異常時,各資料同步變更的處理狀態;以及第15圖,係顯示根據本發明之較佳實施例之一種電子資料同步方法之步驟流程圖。1 is a schematic diagram showing the architecture of an electronic data synchronization processing system according to a preferred embodiment of the present invention; and FIG. 2 is a diagram showing an electronic data synchronization processing system applied to an originating end according to a preferred embodiment of the present invention. And a schematic diagram of the architecture between the plurality of receiving ends; FIG. 3 is a diagram showing the logic of the processing of the processing thread generated by the data synchronization unit of the electronic data synchronization processing system according to the preferred embodiment of the present invention; FIG. 4 to In the figure 8, the processing state of each data synchronization change is displayed according to the judgment logic table of FIG. 3; and the figure 9 to FIG. 14 shows that the data synchronization change of any of the receiving ends is abnormal according to the judgment logic table of FIG. The processing state of each data synchronization change; and FIG. 15 is a flow chart showing the steps of an electronic data synchronization method according to a preferred embodiment of the present invention.
S400~480‧‧‧皆為步驟S400~480‧‧‧ are steps
Claims (13)
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110456946.5A CN103186614B (en) | 2011-12-30 | 2011-12-30 | Electronic data synchronous method and electronic data System of Synchronous Processing |
Publications (2)
Publication Number | Publication Date |
---|---|
TW201327234A TW201327234A (en) | 2013-07-01 |
TWI461944B true TWI461944B (en) | 2014-11-21 |
Family
ID=48677783
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW101122659A TWI461944B (en) | 2011-12-30 | 2012-06-25 | Electrical data synchronization method and electrical data synchronization system |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN103186614B (en) |
TW (1) | TWI461944B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108170798A (en) * | 2017-12-28 | 2018-06-15 | 武汉楚鼎信息技术有限公司 | A kind of data buffer storage delivery method and system and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200410523A (en) * | 2002-12-11 | 2004-06-16 | Inst Information Industry | Method for synchronizing client end's data |
TW200842627A (en) * | 2007-02-22 | 2008-11-01 | Microsoft Corp | Techniques to cross-synchronize data |
US20090171679A1 (en) * | 2007-12-27 | 2009-07-02 | Microsoft Corporation | Business data access client for online/offline client use |
US20090254589A1 (en) * | 2008-04-07 | 2009-10-08 | International Business Machines Corporation | Client side caching of synchronized data |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101136833B (en) * | 2007-09-26 | 2010-09-08 | 深圳市迅雷网络技术有限公司 | Method, system and device for across entity network to access data |
CN101399656A (en) * | 2007-09-27 | 2009-04-01 | 华为技术有限公司 | Data synchronization method and system in synchronization makeup language |
CN101551801B (en) * | 2008-03-31 | 2013-05-22 | 国际商业机器公司 | Data synchronization method and data synchronization system |
CN101561795B (en) * | 2009-05-20 | 2014-09-10 | 中兴通讯股份有限公司 | Method and device for synchronizing data in distribution-type system |
CN101697169A (en) * | 2009-10-23 | 2010-04-21 | 中兴通讯股份有限公司 | Method, device and system for data synchronization between source database and destination database |
US9286369B2 (en) * | 2009-12-30 | 2016-03-15 | Symantec Corporation | Data replication across enterprise boundaries |
-
2011
- 2011-12-30 CN CN201110456946.5A patent/CN103186614B/en active Active
-
2012
- 2012-06-25 TW TW101122659A patent/TWI461944B/en active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200410523A (en) * | 2002-12-11 | 2004-06-16 | Inst Information Industry | Method for synchronizing client end's data |
TW200842627A (en) * | 2007-02-22 | 2008-11-01 | Microsoft Corp | Techniques to cross-synchronize data |
US20090171679A1 (en) * | 2007-12-27 | 2009-07-02 | Microsoft Corporation | Business data access client for online/offline client use |
US20090254589A1 (en) * | 2008-04-07 | 2009-10-08 | International Business Machines Corporation | Client side caching of synchronized data |
Also Published As
Publication number | Publication date |
---|---|
TW201327234A (en) | 2013-07-01 |
CN103186614B (en) | 2016-04-13 |
CN103186614A (en) | 2013-07-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11373173B2 (en) | Distributed ledger system, distributed ledger subsystem, and distributed ledger node | |
US9367261B2 (en) | Computer system, data management method and data management program | |
CN111125260A (en) | Data synchronization method and system based on SQL Server | |
WO2010098034A1 (en) | Distributed database management system and distributed database management method | |
CN103425734A (en) | Database, apparatus, and method for storing encoded triples | |
CN103593266A (en) | ot standby method based on arbitration disk mechanism | |
CN105208090A (en) | Zookeeper-based Leader selection method | |
CN110597922A (en) | Data processing method, device, terminal and storage medium | |
US20130042023A1 (en) | Data synchroniztion method | |
US20180121532A1 (en) | Data table partitioning management method and apparatus | |
CN107436904B (en) | Data acquisition method, data acquisition device, and computer-readable storage medium | |
JP5024453B2 (en) | Business flow distributed processing system and method | |
TWI461944B (en) | Electrical data synchronization method and electrical data synchronization system | |
EP3958139B1 (en) | Method and system for creating files in a file system | |
JP4406310B2 (en) | MQ data synchronization system and MQ data synchronization program | |
CN109871394B (en) | Full-distributed high-concurrency calculation method and device | |
CN115587147A (en) | Data processing method and system | |
CN109254880A (en) | A kind of method and device handling database delay machine | |
CN115168366B (en) | Data processing method, data processing device, electronic equipment and storage medium | |
CN115210694A (en) | Data transmission method and device | |
CN113760923B (en) | Data heterogeneous method, device, system and storage medium | |
WO2018061070A1 (en) | Computer system and analysis source data management method | |
CN103886075B (en) | Distributed network perception information stores and inquiry system | |
CN111611245B (en) | Method and system for processing data table | |
Yu et al. | A distributed supply chain discovery service |