TWI258089B - System, method and machine-readable storage medium for data synchronization - Google Patents

System, method and machine-readable storage medium for data synchronization Download PDF

Info

Publication number
TWI258089B
TWI258089B TW93140237A TW93140237A TWI258089B TW I258089 B TWI258089 B TW I258089B TW 93140237 A TW93140237 A TW 93140237A TW 93140237 A TW93140237 A TW 93140237A TW I258089 B TWI258089 B TW I258089B
Authority
TW
Taiwan
Prior art keywords
transaction
data
record
synchronization
transaction record
Prior art date
Application number
TW93140237A
Other languages
Chinese (zh)
Other versions
TW200622733A (en
Inventor
Jung-Kuang Hsu
Kun-Wei Chou
Shih-Ming Lin
Original Assignee
Inst Information Industry
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inst Information Industry filed Critical Inst Information Industry
Priority to TW93140237A priority Critical patent/TWI258089B/en
Publication of TW200622733A publication Critical patent/TW200622733A/en
Application granted granted Critical
Publication of TWI258089B publication Critical patent/TWI258089B/en

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

A data synchronization system includes a synchronization server and a client end. The synchronization server is stored with the server end data records and a first transaction record. The synchronization server receives a data transaction request and updates the server end data record according to the data transaction request. Furthermore, when the data transaction request corresponds to the first transaction record, a second transaction record is generated and the first transaction record is over-written. The client end is stored with the client end data record. The client end receives the second transaction record and updates the client end data record accordingly.

Description

1258089 五、發明說明(1) 【發明所屬之技術領域】 '~ 此發明是一種資料同步 、=技〜:】及電腦可讀取儲存:體1是—種資料同步系 在間的賴料記錄 ::另:除記錄後,進行同步化:聿,:資料記錄增加、 了除另外一個儲存體中相應的 ς用以增加、修改、 已括快照式同步以及交易 I 。%。習知的同步技術 技術會將-個儲存體中所有目二:。其+,快照式同步 -個儲存體十,以維護兩個儲:】:::資料記錄覆寫到另 而,其缺點為,當資料量太大士 _ a 、資料一致性。然 的時間。交易式同步技術則=,此同步技術將耗費大量 改:刪除資料記錄之行為時备:個儲存體發生增加、修 之增=、修改、刪除資料記錄之L =個儲存體執行相應 間的資料一致性。然而,其缺I ”、、、’,以維護兩個鍺存體 時,此同步技術亦會耗費大‘ ^二,當交易次數太頻繁 料同步系統與方法,用以節=二因此,需要一種資 【發明内容】 目貝料同步的時間。1258089 V. INSTRUCTIONS (1) [Technical field to which the invention belongs] '~ This invention is a data synchronization, = technology ~:] and computer readable storage: body 1 is a kind of data synchronization system ::In addition: Synchronization after recording: 聿,: The data record is increased, and the corresponding ς in another storage is used to add, modify, Snapshot Snapshot, and Transaction I. %. The conventional synchronization technology will be all in the second storage: Its +, snapshot synchronization - a storage body ten to maintain two stores:]::: data records overwritten to another, the disadvantage is that when the amount of data is too large _ a, data consistency. The time. Transactional synchronization technology =, this synchronization technology will cost a lot of changes: the behavior of deleting data records: one storage increase, repair increase =, modify, delete data records L = one storage body to execute the corresponding data consistent Sex. However, when it lacks I ”, 、, ', in order to maintain two caches, this synchronization technology will also cost a large ' ^ two, when the number of transactions is too frequent, the synchronization system and method, for the section = two, therefore, need A kind of [invention content] The time of synchronization of the material.

、有鑑於此,本發明之目的一 方法,用以節省資料同步的時間。/、種資料同步系統與 依據上述目的,本發明银A 統,包含同步祠服H與客戶=&例揭露-種資料同步系 端資料記錄與第一異動紀錄。而=步伺服器中儲存伺服器 同步伺服器接收資料異動請 1258089 發明說明(2) 求,依據貧料異動請求更新飼 上述資料異動請求相應於第一異動1資料記錄,並且,當 紀錄並覆寫第一異動紀錄。其中,仞鲦時,產生第二異動 原始貧料,第一異動紀錄以及第二:服器端資料記錄代表 記錄之指示。客戶端中儲存客戶端二動紀錄代表操作資料 第二異動紀錄,依據第二異動紀錄;2記錄。$戶端接收 其中’客戶端資料記錄代表原始資料二客戶端資料記錄。 本孓月κ施例另揭露—種資料 括:同步飼服器接收資料異動請求.二方法’此方法包 異動請求更新伺服器端資料圮 ·’=步伺服器依據資料 料異動請求相應於第—異動紀錄:=伺服器判斷當資 覆寫第一異動、纪錄;欠第二^第二異動紀錄並 端依據第二異動紀錄更新客戶端資紀錄;以及客戶 端資料記錄代表原始資料,第一里。其中,伺服器 錄代表操作資料記纟f _ ^ 、、、己錄以及第二異動紀 料。 錄之.曰不’客戶端資料記錄代表原始資 儲存施=揭露—種電腦可讀取儲存媒體,用以 储存電細耘式。此電腦程式用以載入至 戶端之電腦系統中並且 ^ p服时與一客 【實施方式】 呎侍冤細系、,死執仃育料同步方法。 第1圖係表示依據本發明實施例之 m圖。於較佳之情況下,此網路架構包糸括充同之二 服盗21、個人電腦22與23(亦可稱為客戶端22與23)。其 中,個人電腦22與23可以實體連線(wired_c〇nnect i〇n)、In view of this, a method of the present invention is to save time for data synchronization. /, data synchronization system and according to the above purpose, the invention of the silver A system, including the synchronous service H and the customer = & ... example disclosure - the data synchronization system data record and the first transaction record. And = step server to store the server synchronization server to receive data changes please 1258089 invention description (2) seeking, according to the poor material change request to update the above data transaction request corresponding to the first transaction 1 data record, and when the record is repeated Write the first transaction record. Among them, when the time is ,, the second transaction original poor material is generated, the first transaction record and the second: the server end data record represents the indication of the record. The client's second-moving record in the client represents the operational data. The second transaction record is based on the second transaction record; 2 records. $Account Receiver where the 'client data record represents the original data 2 client data record. This month's κ application is also disclosed - the data includes: the synchronous feeding device receives the data transaction request. The second method 'this method package transaction request update server data 圮·'= step server according to - Transaction record: = server judges the capital overwrite the first transaction, record; owes the second ^ second transaction record and updates the client account record according to the second transaction record; and the client data record represents the original data, first in. Among them, the server records the operating data records f _ ^ , , , and recorded and the second transaction data. Recorded. 曰 No' client data records represent the original assets storage = disclosure - a kind of computer readable storage media for storage of fine memory. This computer program is used to load into the computer system of the terminal and to serve with the customer. [Embodiment] The 呎 冤 冤 、 , , , , , , , 。 。 。 。 。 。 。 。 。 。 。 。 。 。 Figure 1 is a diagram showing the m in accordance with an embodiment of the present invention. In the preferred case, the network architecture package includes the same pirate 21, personal computers 22 and 23 (also referred to as clients 22 and 23). Among them, the personal computers 22 and 23 can be physically connected (wired_c〇nnect i〇n),

0213-A40411TWF(N2) ;B9341 ;SN〇mLL.ptd 第6頁 1258089 五、發明說明(3) -------- 無線或混合實體連線與無線的方式連接至同步伺服器21。 而热習此技藝者皆了解個人電腦22、23與同步伺服器以間 之連結也許須透過多個中介節點,例如,無線接取點 (access point)、基地台(base stati〇n)、集線器 (hub)、橋接器(bridge)、路由器(r〇uter)或其他用以 理網路通訊之中介節點。 、第2圖係表示依據本發明實施例之應用於同步伺服器 或個人電腦之硬體架構圖。同步伺服器2丨、個人電腦2 2與 2 3中之一者,包括處理單元丨i、記憶體丨2、儲存裝置丨3、 輸出裝置1 4、輸入裝置丨5、通訊裝置丨6,並使用匯流排i 7 將其連結在一起。除此之外,熟習此技藝人士也可將同步 伺,器21、個人電腦22與23中之一者實施於其他電腦系統 樣恶(configuration)上,例如,手持式設備(hand — held devices)、多處理器系統、以微處理器為基礎或可程式化 之消費性電子產品(micr〇pr〇cess〇r—baseci programmable consumer electronics)、網路電腦、迷你 電腦、大型主機以及類似之設備。處理單元丨1可包含一單 一中央處理單元(central- processing unit; CPU)或者是 關連於平行運算環境(p arallel processing environment)之多個平行處理單元。記憶體12包含唯讀記 憶體(read only memory; ROM)、快閃記憶體(flash ROM) 以及/或動邊存取記憶體(rand〇m access memory; RAM), 用以儲存可供處理單元1 1執行之程式模組以及資料。一般 而言’程式模组包含常序(routines)、程式(program)、0213-A40411TWF(N2) ; B9341 ;SN〇mLL.ptd Page 6 1258089 V. Description of the invention (3) -------- Wireless or hybrid physical connection and wireless connection to the synchronization server 21. Those skilled in the art know that the connection between the personal computer 22, 23 and the synchronization server may need to pass through multiple intermediary nodes, for example, a wireless access point, a base station (base stati〇n), a hub. (hub), bridge, router, or other intermediary node for network communication. Figure 2 is a diagram showing a hardware architecture applied to a synchronization server or a personal computer in accordance with an embodiment of the present invention. One of the synchronization server 2, the personal computers 2 2 and 2 3, including the processing unit 丨i, the memory 丨 2, the storage device 丨3, the output device 144, the input device 丨5, and the communication device 丨6, and Use busbar i 7 to tie them together. In addition, those skilled in the art can also implement one of the synchronization server 21, the personal computers 22 and 23 on other computer system configurations, for example, hand-held devices. , multiprocessor systems, microprocessor-based or programmable consumer electronics (micr〇pr〇cess〇r-baseci programmable consumer electronics), network computers, minicomputers, mainframes and similar devices. The processing unit 丨1 may comprise a single central processing unit (CPU) or a plurality of parallel processing units associated with a parallel computing environment. The memory 12 includes a read only memory (ROM), a flash memory (flash ROM), and/or a ran〇m access memory (RAM) for storing available processing units. 1 1 Execution of the program module and data. In general, a program module contains routines, programs,

0213-A40411TWF(N2);B9341;SNOWBALL.ptd 第7頁 1258089 五、發明說明(4) t件(〇bject)、元件(component)等,用以乱 功旎。本發明亦可以實施於分散式運皙乂執行資料同步 $二連結於通訊網路之遠端處理設備境,其運算卫作 兄中,同步伺服器21、個人電腦22盘23=了。纟分散式環 仃,也許由本地以及多部遠端電腦系=—者之功能執 置13包含硬碟裝置、軟碟裝置、光碟,完成。儲存裝 用以讀取硬碟、軟碟、光碟、隨身碟中〜儲^隨身碟裝置, 及/或資料。通訊裝置16可為網路^存之程式模組以 802. 11規格之無線網路卡/頁線、,罔路卡或符合GPRS、 第3圖係表示依據本發明實施例之 體架構圖。同步飼服器2丨擁 、〃 5 乂糸統之軟 …里模以及資料異動有模V;r9^= 早兀11載入並執行。同步伺服哭21^/、中之處理 筆資料記錄215以及異動吃锊2 4 之儲存哀置13儲存多 動模組m與資料同步模組=\7用個t電肋擁有資料異 載入並執行。個人電腦22中 =讓其中之處理單元11 錄225與異動紀錄2 27。個人儲存多筆資料記 233,用以讓其中之處理單元 =23入擁有勃資料同/模組 中之餘存裝置u儲存多筆ϋΛ。行。個人電腦23 料記錄m、m、235 /及///與異動紀錄2 37。資 一者,且其中之任何資:=或物件貨料庫中之任 -或多個相關連之資料ί貝;動紀t可實施於單 -或多個相關聯之資料物件早:相關連之槽案、單 彳千雖然本貫施例以行政機關資 第8頁 0213-A40411TWF(N2);B9341;SNOWBALL.ptd 1258089 五、發明說明(5) 料為範例’但並能以此限制本發明,熟習此技藝人士可將 本發明應用到各式各樣不同之資料内容。 第4圖係表示依據本發明實施例之資料異動之方法流 程圖。第4圖所顯示之方法被切分為兩個區域,左邊的區 域代表由資料異動模組2 2 1或2 1 9所執行的方法,右邊的區 域代表由資料異動管理模組2丨1所執行之方法。兩區域由 一條虚線隔開,以增加其可讀性。 於步驟S411 ’資料異動模組mi或219產生資料異動請 求訊息。資料異動請求訊息可包含至少一筆資料記錄之異 動請求’針對每一筆資料記錄,於較佳之情況下,包含異 動資料之識別碼、更新攔位名稱及其欄位值。此資料異動 請求訊息可為一般文字訊息、被封裝於一個結構化訊息, 如XML訊息’或被封裝於一個資料物件中。於步驟s 4丨3, 傳送資料異動請求至資料異動管理模組2丨i。 於步驟S421 ’資料異動管理模組21ι接收資料異動請 求说息。若此訊息被封裝於一個結構化訊息,或被封裝於 一個資料物件中,則可運用結構化訊息解譯器、取得資料 物件中包含資料異動請求訊息之屬性值或執行資料物件方 法,來取得資料異動請求訊息。於步驟3423,依據取得之 資料異動凊求訊息更新相應之資料記錄2 1 5。可執行標準 檢索 a吾 a (Standard Query Language, SQL)指令、檔案操 作指令或資料物件方法,來更新相應之資料記錄2丨5。於 步驟S4 2 5 ’判斷是否存在相應於異動請求訊息之舊異動紀 錄,若是則執行步驟S42 7,若否則執行步驟S42 9。於步驟0213-A40411TWF(N2); B9341; SNOWBALL.ptd Page 7 1258089 V. Description of invention (4) t (bject), component, etc., used for chaos. The invention can also be implemented in a decentralized operation and execution data synchronization. The second is connected to the remote processing device of the communication network, and the operation server brother, the synchronization server 21, and the personal computer 22 disk 23=.纟 Decentralized ring 仃 也许 也许 仃 仃 仃 仃 仃 仃 仃 仃 仃 仃 仃 也许 本地 本地 本地 本地 本地 本地 本地 本地 本地 本地 本地 本地 本地 本地 本地 本地 本地 本地 本地 本地The storage device is used to read hard disks, floppy disks, CDs, flash drives, storage devices, and/or data. The communication device 16 can be a networked program module with an 802.11 wireless network card/page line, a network card or GPRS compliant, and a third figure showing a body architecture diagram according to an embodiment of the present invention. Synchronous feeding machine 2 〃, 〃 5 乂糸 soft ... mod and data change modal V; r9 ^ = early 兀 11 loaded and executed. Synchronous servo crying 21^/, processing pen data record 215, and transaction storage 锊2 4 storage mourning 13 storage multi-action module m and data synchronization module =\7 with a t-electric rib ownership data loading and carried out. In the personal computer 22, let the processing unit 11 record 225 and the transaction record 2 27 . The individual stores a plurality of data records 233 for storing the processing unit = 23 into the remaining device in the module/module. Row. Personal computer 23 records m, m, 235 / and / / / and the transaction record 2 37. One of the funds, and any of them: = or any of the items in the item warehouse - or a number of related information ί 动; 动 t t can be implemented in a single- or multiple associated data objects early: related Although the case of the case, the single 彳 thousand, the administrative example of the administrative agency on the 8th page 0213-A40411TWF (N2); B9341; SNOWBALL.ptd 1258089 five, invention description (5) material as an example 'but can limit this Inventors, those skilled in the art can apply the present invention to a wide variety of different materials. Figure 4 is a flow chart showing the method of data transaction according to an embodiment of the present invention. The method shown in Fig. 4 is divided into two areas, the left area represents the method performed by the data transaction module 2 2 1 or 2 1 9 , and the right area represents the data transaction management module 2丨1 The method of execution. The two areas are separated by a dashed line to increase readability. In step S411, the data transaction module mi or 219 generates a data transaction request message. The data change request message may include at least one data record change request for each data record, preferably the identification code of the change data, the update block name and its field value. This data request message can be a general text message, encapsulated in a structured message, such as an XML message, or encapsulated in a data object. In step s 4丨3, the data transaction request is transmitted to the data transaction management module 2丨i. In step S421, the data transaction management module 21i receives the data transaction request message. If the message is encapsulated in a structured message or encapsulated in a data object, the structured message interpreter can be used to obtain the attribute value of the data request message or the method of executing the data object in the data object. Data change request message. In step 3423, the corresponding data record 2 1 5 is updated according to the obtained data transaction request message. Executable Standards Search for a (Standard Query Language, SQL) instruction, file operation instruction, or data object method to update the corresponding data record 2丨5. In step S4 2 5 ', it is judged whether there is an old transaction record corresponding to the transaction request message, and if so, step S42 is performed, otherwise step S42 9 is executed. In the steps

0213-A40411TWF(N2) ;B9341 ;SN0WBALL.ptd 第9頁 1258089 五、發明說明(6) S42 7,依據資料異動請求訊息覆寫相應之雀s & 心 θ吳動紀錚 217。於步驟S42 9,依據資料異動請求訊自吝a ^ 217。 %、產生異動紀錄 以下舉出一個實例來說明資料異動方法 1運作愔# 第5 a、5 b、5 c與5 d圖係表示依據本發明實施例之、 :。 況下之範例資料記錄,第6a、6b、6c與6d Si总士於不同情 叫你表示佑播士 發明實施例之於不同情況下之範例異動記錄。队像本 開始,如第5 a及5 b圖所示,資料記錄2 1 5中辟—又 於一 辟存四筆眘%l 記錄51 1至51 7,而貢料記錄2 2 5或23 5中儲存四筆次 貝枓 521至5 27,用以代表機關資料。其中,資袓4 ;貝料記錄 貝料冗錄5 Π盥次 料記錄52 1有資料不一致之情形,亦即是此签次 ”貝 未同步。另外,於一開始,資料記錄2丨7中 ,^么返 記錄611與613,而貧料記錄2 27或23 7中儲存_筆显二動 6 2 1,用以代表歷史之異動指示。 /、動記錄 此實例中,首先,於步驟S411,資料異動模組22 生一個資料異動訊息,其中包含將機關代碼為” 1"之、, 名稱攔位值異動為"A3”。於步驟S413以及步驟S52i 異動管理模組21 1接收資料異動請求訊息。於步驟§423貝料 依據資料異動請求訊息更新相應之資料記錄5 u,更 之結果如第5 c圖所示。於步驟S4 2 5,判斷出相應之舊里ί 紀錄已存在,如第6a圖中之異動紀錄613所示。〜於步驟、 S427 ’覆寫舊有之異動紀錄613,更新後之結果如 所示。 固 第7圖係表示依據本發明實施例之同步管治0213-A40411TWF(N2) ;B9341 ;SN0WBALL.ptd Page 9 1258089 V. Description of invention (6) S42 7. According to the data request message, the corresponding bird s & heart θ Wu 铮 铮 217. In step S42, the request is sent according to the data transaction 吝a^217. %, generation of transaction record The following is an example to illustrate the data transaction method 1 operation 愔 # 5 a, 5 b, 5 c and 5 d diagrams represent: according to an embodiment of the present invention. In the case of the sample data records, the 6th, 6b, 6c, and 6d Si singers are different from each other and you are asked to indicate the sample transaction record of the invention in different cases. The team started with the picture, as shown in Figures 5a and 5b, the data record 2 1 5 is in the middle - and the other is in the fourth place. The record is 51 1 to 51 7 and the tribute record is 2 2 5 or 23. 5 stores four strokes of Bellow 521 to 5 27 to represent the organization's information. Among them, the capital 4; the material records of the shell material record 5 Π盥 料 记录 52 52 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 , ^ back to records 611 and 613, and the poor material record 2 27 or 23 7 stored _ pen display two moves 6 2 1, used to represent the historical transaction indication. /, dynamic record in this example, first, in step S411 The data transaction module 22 generates a data transaction message, which includes the device code being "1", and the name block value is changed to "A3". In step S413 and step S52i, the transaction management module 21 1 receives the data transaction. Request message. In step §423, the corresponding data record is updated according to the data change request message, and the result is as shown in Fig. 5c. In step S4 2, it is judged that the corresponding old ί record already exists. As shown in the change record 613 in Fig. 6a, the result of the update is as shown in step S427, and the updated result is as shown. The solid figure 7 shows the synchronous governance according to the embodiment of the present invention.

1258089 五、發明説明(7) 程圖。第7圖所顯示之方法被切分為兩個區域,左邊的區 域代表由資料同步模組2 2 3或23 3所執行的方法,右邊的區 域代表由同步管理模組2 1 3所執行之方法。兩區域由一條 虛線隔開,以增加其可讀性。 於步驟S711,資料同步模組2 23或2 3 3由異動紀錄227 或237中取得最近之同步時間。於步驟S713,傳送包含最 近同梦時間之同步請求訊息。 於步驟S 721,同步管理模組213接收包含最近同步時 間之同步請求訊息。於步驟S723,判斷快取空間(cache) 中之異動紀錄是否須更新,是則執行步驟S72 5之處理,否 則執行步驟s 7 2 7之處理。可判斷快取空間中之異動紀錄之 最近異動時間是否比異動紀錄2 1 7之最近異動時間來得 晚,是則須更新快取空間中之異動紀錄。於步驟S 7 2 5,依 據異動紀錄2 1 7更新快取空間中之異動紀錄。於步驟 S727,由快取空間中取得最近同步時間後之一定數量之異 動紀錄。於此須注意的是,在某些情況下,步驟S 7 2 7可取 得最近同步時間後之所有異動紀錄2 1 7。另在某些情況 下,亦可以直接由異動紀錄2 1 7中取得所需之異動紀錄, 而不透過快取空間。此異動紀錄可形成一般文字訊息字 串、被封裝於一個結構化訊息,如XML訊息,或被封裝於 一個資料物件中。於步驟S 7 2 9,傳送異動紀錄給資料同步 模組2 2 3或2 3 3。 於步驟S71 5,資料同步模組2 23或233接收異動紀錄。 若此異動被封裝於一個結構化訊息,或被封裝於一個資料1258089 V. Description of invention (7) Cheng Tu. The method shown in Fig. 7 is divided into two areas, the left area represents the method performed by the data synchronization module 2 2 3 or 23 3 , and the right area represents the execution by the synchronization management module 2 1 3 . method. The two areas are separated by a dashed line to increase readability. In step S711, the data synchronization module 2 23 or 2 3 3 obtains the latest synchronization time from the transaction record 227 or 237. In step S713, a synchronization request message containing the most recent dream time is transmitted. In step S721, the synchronization management module 213 receives the synchronization request message including the most recent synchronization time. In step S723, it is determined whether the transaction record in the cache (cache) needs to be updated. If yes, the process of step S72 5 is performed, otherwise the process of step s 7 27 is performed. It can be judged whether the recent transaction time of the transaction record in the cache space is later than the recent transaction time of the transaction record 2, and it is necessary to update the transaction record in the cache space. In step S 7 2 5, the transaction record in the cache space is updated according to the transaction record 2 1 7 . In step S727, a certain amount of the difference record after the most recent synchronization time is obtained from the cache space. It should be noted here that, in some cases, step S 7 2 7 can take all the transaction records 2 1 7 after the most recent synchronization time. In some cases, it is also possible to obtain the required transaction record directly from the transaction record 2 17 without the cache space. This transaction record can form a general text message string, encapsulated in a structured message, such as an XML message, or encapsulated in a data object. In step S 7 2 9, the transaction record is transmitted to the data synchronization module 2 2 3 or 2 3 3 . In step S71 5, the data synchronization module 2 23 or 233 receives the transaction record. If the transaction is encapsulated in a structured message, or encapsulated in a data

0213-A40411TWF(N2);B9341;SNOWBALL.ptd 1258089 五、發明說明(8) " ' -- 物件中則可運用結構化訊息解譯器、取得資料物件中包 ^ =料異動請求訊息之屬性值或執行資料物件方法,來取 知資料異動請求訊息。於步驟s 7 1 7,儲存取得之異動紀 錄。於步驟S719,依據取得之異動紀錄更新相應之資料記 錄225或235。可執行標準檢索語言(^andard Query Language,SQL)指令、檔案操作指令或資料物件方法,來 更新相應之資料記錄2 2 5或2 3 5。 =%以下舉出一個實例來說明同步管理方法之運作情形。 假設’於一開始,如第5c及5b圖所示,資料記錄215中儲 存四筆資料記錄519、513、515與517,而資料記錄225或 235中儲存四筆資料記錄521至52 7,用以代表機關資料。 其中’資料記錄5 1 9與資料記錄5 2 1有資料不一致之情形, 亦即是此筆資料記錄還未同步。另外,於一開始,資料記 錄2 17中儲存兩筆異動記錄6 11與615,而資料記錄227或 237中存一筆異動記錄621 ,用以代表歷史之異動指示。 此貝例中’首先’於步驟s7丨丨,資料同步模組22 3或 ,233由異動紀錄2 27或237中取得一個最近同步時間 π 8 : 00” ,此時間等於最近一筆異動紀錄之時間。於步驟 S 士713,以及步驟”21,同步管理模組213接收包含最近同步 %間8 . 〇 〇之同步清求訊息。假設快取空間所存在之里動 紀錄同於儲存裝置13所儲存之異動紀錄,於步驟”“與 =27 ’由」夬取空間中取得最近同步時間後之所有異動 驟S72W715,資料同步模組m或2 33接收異 動紀錄615。於步驟S717,儲存接收之異動紀錄,結果如0213-A40411TWF(N2); B9341;SNOWBALL.ptd 1258089 V. Invention Description (8) " ' -- In the object, you can use the structured message interpreter to obtain the attribute of the data request message in the data object. Value or execute the data object method to learn the data change request message. In step s 7 1 7, the obtained transaction record is stored. In step S719, the corresponding data record 225 or 235 is updated based on the acquired transaction record. The standard data search (^andard Query Language, SQL) command, file operation command or data object method can be executed to update the corresponding data record 2 2 5 or 2 3 5 . =% The following is an example to illustrate the operation of the synchronization management method. Assume that at the beginning, as shown in Figures 5c and 5b, four data records 519, 513, 515 and 517 are stored in the data record 215, and four data records 521 to 52 7 are stored in the data record 225 or 235. To represent the organization's information. Among them, the data record 5 1 9 and the data record 5 2 1 have inconsistent data, that is, the data record has not been synchronized. In addition, at the outset, two records 6 11 and 615 are stored in the data record 2 17 , and a transaction record 621 is stored in the data record 227 or 237 to represent the historical change indication. In this example, in the case of step s7, the data synchronization module 22 3 or 233 obtains a recent synchronization time π 8 : 00" from the transaction record 2 27 or 237, which is equal to the time of the latest transaction record. In step S 713, and step "21, the synchronization management module 213 receives the synchronization request message including the most recent synchronization %. It is assumed that the dynamic record in the cache space is the same as the transaction record stored in the storage device 13, and all the transaction steps S72W715 after the latest synchronization time are obtained in the step "" and =27 'by" capture space, the data synchronization module m or 2 33 receives the transaction record 615. In step S717, the received transaction record is stored, and the result is as follows.

1258089 五、發明說明(9) ' '一〜 ------------ 圖中之異動紀錄623所示。於步驟^^,依據接收之 /、=錄更新資料記錄,更新後之結果如第5d圖所示。 :者:J發明實施例更提出—種電腦可讀取儲存媒 勒 以错存—電腦程 <,上述電腦程式用以實現資料显 動方法以及同步管理方法,這些方法會執 〕、’、/、 =。f8圖係表示依據本發明實施例之資料同步方法^之步 腦可讀取儲存媒體示意圖。此儲存媒體8〇,用以儲一 + 腦程式82G,#電腦程式包含五個模組,分^子一思 邏輯21 9與221、資料里動營理浐4 91 ] 一 u”、貝料/、動 與同步管理模組213 拉組211、貧料同步模組223 發明雖m之實施例揭露如上,'然其並非用以限定本 ^. a何无、心此項技藝者,在不脫離本發明之精神和範 圍内,當可做些許p毹溆弓 顶竹不和 視後附之ψ & Iμ ί動/、飾,因此本發明之保護範圍當 視後附之申巧專利範圍所界定1258089 V. Description of invention (9) ' '1~ ------------ The change record 623 in the picture shows. In step ^^, according to the received /, = record update data record, the updated result is shown in Figure 5d. :: The invention of the invention is further proposed - a computer readable storage medium for error storage - computer program <, the above computer program for realizing data display method and synchronous management method, these methods will be executed], ', /, =. The f8 diagram shows a data synchronization method according to an embodiment of the present invention. This storage medium is 8〇, which is used to store a + brain program 82G. The #computer program contains five modules, which are divided into two sections: the logic of 21 9 and 221, and the movement of the data. 4 91 ] a u”, shell material /, motion and synchronization management module 213 pull group 211, lean material synchronization module 223 invention, although the embodiment of m disclosed above, 'it is not intended to limit this ^. a no, heart this artist, no Without departing from the spirit and scope of the present invention, it is possible to make some 毹溆 毹溆 顶 不 ψ ψ ψ ψ ψ ψ ψ ψ ψ ψ 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 、 Defined

1258089 圖式簡單說明 【圖示簡單說明】 第1圖係表示依據本發明實施例之資料同步系統之網 路架構示意圖; 第2圖係表示依據本發明實施例之應用於同步伺服器 或個人電腦之硬體架構圖; 第3圖係表示依據本發明實施例之資料同步系統之軟 體架構圖; 第4圖係表示依據本發明實施例之資料異動之方法流 程圖; 第5a、5b、5c與5d圖係表示依據本發明實施例之於不 同情況下之範例資料記錄; 第6 a、6 b、6 c與6 d圖係表示依據本發明實施例之於不 同情況下之範例異動記錄; 第7圖係表示依據本發明實施例之同步管理之方法流 程圖; 第8圖係表示依據本發明實施例之個人化表格動態產 生方法之電腦可讀取儲存媒體示意圖。 【主要元件符號說明】 2 1〜同步伺服器; 22、23〜客戶端; 1 1〜處理單元; 1 2〜記憶體; 1 3〜儲存裝置; 1 4〜輸出裝置;BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a schematic diagram showing the network architecture of a data synchronization system according to an embodiment of the present invention; FIG. 2 is a diagram showing application to a synchronization server or a personal computer according to an embodiment of the present invention. FIG. 3 is a software architecture diagram of a data synchronization system according to an embodiment of the present invention; FIG. 4 is a flowchart showing a method for data transaction according to an embodiment of the present invention; 5a, 5b, 5c and 5d diagram shows exemplary data records in different situations according to an embodiment of the present invention; 6a, 6b, 6c, and 6d diagrams show exemplary transaction records in different situations according to an embodiment of the present invention; 7 is a flow chart showing a method for synchronous management according to an embodiment of the present invention; and FIG. 8 is a schematic diagram showing a computer readable storage medium for dynamically generating a personalized form according to an embodiment of the present invention. [Main component symbol description] 2 1~sync server; 22, 23~ client; 1 1~ processing unit; 1 2~ memory; 1 3~ storage device; 1 4~ output device;

0213-A40411TWF(N2) ;B9341;SNOWBALL.ptd 第14頁 1258089 圖式簡單說明 1 5〜輸入裝置; 1 6〜通訊裝置; 1 7〜匯流排; 2 1 9、2 2 1〜資料異動模組; 2 1 1〜資料異動管理模組; 2 1 3〜同步管理模組; 2 1 5、2 2 5、2 3 5〜資料記錄; 2 1 7、2 2 7、2 3 7〜異動紀錄; 2 2 3、2 3 3〜資料同步模組; S411、S413.....S427、S4 29〜操作步驟; S711、S713.....S 727、S7 29〜操作步驟; 51 1 >513 >515 >517 >519 > 521 ^ 5 2 3 >525 〜527 ' 5 2 9〜資料記錄; 61 1 ^613 > 615 > 6 2 3 > 6 2 3 〜異動記錄; 8 0〜儲存媒體; 8 2 0〜資料同步電腦程式。0213-A40411TWF(N2) ;B9341;SNOWBALL.ptd Page 14 1258089 Schematic description of the simple 1 5 ~ input device; 1 6 ~ communication device; 1 7 ~ bus bar; 2 1 9, 2 2 1 ~ data transaction module 2 1 1~ data transaction management module; 2 1 3~ synchronization management module; 2 1 5, 2 2 5, 2 3 5~ data record; 2 1 7 , 2 2 7 , 2 3 7~ transaction record; 2 2 3, 2 3 3~ data synchronization module; S411, S413.....S427, S4 29~ operation steps; S711, S713.....S 727, S7 29~ operation steps; 51 1 > 513 > 515 > 517 > 519 > 521 ^ 5 2 3 > 525 ~ 527 ' 5 2 9 ~ data record; 61 1 ^ 613 > 615 > 6 2 3 > 6 2 3 ~ transaction record ; 8 0 ~ storage media; 8 2 0 ~ data synchronization computer program.

0213-M0411TWF(N2);B9341;SNOWBALL.ptd 第 15 頁0213-M0411TWF(N2); B9341;SNOWBALL.ptd Page 15

Claims (1)

1258089 六、申請專利範圍 1. 一種資料同步系統,包括: 一同步伺服器,儲存一伺服器端資料記錄與一第一異 動紀錄,接收一資料異動請求,依據上述資料異動請求更 新上述伺服器端資料記錄,並且當上述資料異動請求相應 於上述第一異動紀錄時,產生一第二異動紀錄並覆寫上述 第一異動紀錄,其中上述伺服器端資料記錄代表原始資 料,上述第一異動紀錄以及上述第二異動紀錄代表操作資 料記錄之指示;以及 一客戶端,儲存一客戶端資料記錄,接收上述第二異 動紀錄,依據上述第二異動紀錄更新上述客戶端資料記 錄,其中上述客戶端資料記錄代表原始資料。 2. 如申請專利範圍第1項所述之資料同步系統,其中 上述第二異動紀錄儲存於一快取空間中,並且上述客戶端 從上述快取空間取得上述第二異動紀錄。 3. 如申請專利範圍第2項所述之資料同步系統,其中 上述同步伺服器更偵測上述快取空間中之異動紀錄是否與 儲存於一儲存裝置之異動紀錄同步,若否則由上述儲存裝 置中同步上述快取空間中之異動紀錄。 4. 如申請專利範圍第1項所述之資料同步系統,其中 上述客戶端更儲存一第三異動紀錄,並且上述第三異動紀 錄之異動時間早於上述第二異動紀錄之異動時間。 5. 如申請專利範圍第4項所述之資料同步系統,其中 上述客戶端取得上述第三異動紀錄之異動時間,傳送包含 上述第三異動紀錄之異動時間之一同步請求給上述同步伺1258089 VI. Application Patent Range 1. A data synchronization system, comprising: a synchronization server, storing a server end data record and a first transaction record, receiving a data transaction request, and updating the server end according to the data transaction request Recording data, and when the data transaction request corresponds to the first transaction record, generating a second transaction record and overwriting the first transaction record, wherein the server-side data record represents the original data, the first transaction record and The second transaction record represents an indication of the operation data record; and a client stores a client data record, receives the second transaction record, and updates the client data record according to the second transaction record, wherein the client data record Represents the original material. 2. The data synchronization system of claim 1, wherein the second transaction record is stored in a cache space, and the client obtains the second transaction record from the cache space. 3. The data synchronization system of claim 2, wherein the synchronization server further detects whether the transaction record in the cache space is synchronized with a transaction record stored in a storage device, if otherwise, by the storage device The synchronization record in the above cache space is synchronized. 4. The data synchronization system of claim 1, wherein the client further stores a third transaction record, and the transaction time of the third transaction record is earlier than the transaction time of the second transaction record. 5. The data synchronization system of claim 4, wherein the client obtains the transaction time of the third transaction record, and transmits a synchronization request including the transaction time of the third transaction record to the synchronization server. 0213-A40411TWF(N2);B9341;SNOWBALL.ptd 第16頁 1258089 六、申請專利範圍 月良器。 6. 如申請專利範圍第5項所述之資料同步系統,其中 上述同步伺服器接收上述同步請求後,取得上述第二異動 紀錄並且傳送上述第二異動紀錄給上述客戶端。 7. 如申請專利範圍第5項所述之資料同步系統,其中 上述同步伺服器接收包含上述第三異動紀錄之異動時間之 上述同步請求後,傳送上述第三異動紀錄之異動時間之後 之一定數量異動紀錄給上述客戶端。 8. —種資料同步方法,被應用於包含一同步伺服器與 一客戶端之網路環境中,其方法包括下列步驟: 上述同步伺服器接收一資料異動請求; 上述同步伺服器依據上述資料異動請求更新一伺服器 端貢料記錄,其中上述祠服器端貢料記錄代表原始貢料, 上述同步伺服器判斷當上述資料異動請求相應於一第 一異動紀錄時,產生一第二異動紀錄並覆寫上述第一異動 紀錄,其中上述第一異動紀錄以及上述第二異動紀錄代表 才呆作貧料記錄之指不, 上述客戶端接收上述第二異動紀錄;以及 上述客戶端依據上述第二異動紀錄更新一客戶端資料 記錄,其中上述客戶端資料記錄代表原始資料。 9. 如申請專利範圍第8項所述之資料同步方法,其中 上述第二異動紀錄儲存於一快取空間中,並且上述客戶端 從上述快取空間取得上述第二異動紀錄。 1 0 .如申請專利範圍第9項所述之資料同步方法,更包0213-A40411TWF(N2); B9341; SNOWBALL.ptd Page 16 1258089 VI. Patent Application Scope Good instrument. 6. The data synchronization system of claim 5, wherein the synchronization server receives the synchronization request, obtains the second transaction record, and transmits the second transaction record to the client. 7. The data synchronization system of claim 5, wherein the synchronization server receives the synchronization request including the transaction time of the third transaction record, and transmits a certain number of the transaction time of the third transaction record. The transaction record is given to the above client. 8. A data synchronization method, applied to a network environment including a synchronization server and a client, the method comprising the steps of: the synchronization server receiving a data transaction request; the synchronization server is based on the data transaction Requesting to update a server-side tributary record, wherein the server-side tribute record represents the original tribute, and the synchronization server determines that when the data transaction request corresponds to a first transaction record, a second transaction record is generated and Overwriting the first transaction record, wherein the first transaction record and the second transaction record representative are only for the poor material record, the client receives the second transaction record; and the client is based on the second transaction The record updates a client data record, wherein the client data record represents the original data. 9. The data synchronization method of claim 8, wherein the second transaction record is stored in a cache space, and the client obtains the second transaction record from the cache space. 1 0. If the data synchronization method described in item 9 of the patent application scope is applied, 0213-A40411TWF(N2);B9341;SNOWBALL.ptd 第17頁 1258089 六、申請專利範圍 括下列步驟: 上述同步伺服器更偵測上述快取空間中之異動紀錄是 否與儲存於一儲存裝置之異動紀錄同步,若否則由上述儲 存裝置中同步上述快取空間中之異動紀錄。 11 .如申請專利範圍第8項所述之資料同步方法,更包 括下列步驟: 上述客戶端取得一第三異動紀錄之異動時間,上述第 三異動紀錄之異動時間早於上述第二異動紀錄之異動時 間;以及 傳送包含上述第三異動紀錄之異動時間之一同步請求 給上述同步伺服器。 1 2 .如申請專利範圍第1 1項所述之資料同步方法,更 包括下列步驟: 上述同步伺服器接收上述同步請求後,取得上述第二 異動紀錄並且傳送上述第二異動紀錄給上述客戶端。 1 3.如申請專利範圍第1 1項所述之資料同步方法,更 包括下列步驟: 上述同步伺服器接收包含上述第三異動紀錄之異動時 間之上述同步請求後,傳送上述第三異動紀錄之異動時間 之後之一定數量異動紀錄給上述客戶端。 1 4. 一種電腦可讀取儲存媒體,用以儲存一電腦程 式,該電腦程式用以載入至一同步伺服器與一客戶端之電 腦系統中並且使得上述電腦系統執行一資料同步方法,其 方法包括:0213-A40411TWF(N2); B9341; SNOWBALL.ptd Page 17 1258089 6. The scope of application for patents includes the following steps: The above synchronous server detects whether the transaction record in the cache space is different from the record stored in a storage device. Synchronization, if otherwise, the transaction record in the cache space is synchronized by the storage device. 11. The method for synchronizing data according to item 8 of the patent application, further comprising the steps of: the client obtaining a transaction time of a third transaction record, the transaction time of the third transaction record being earlier than the second transaction record a transaction time; and transmitting a synchronization request including one of the transaction times of the third transaction record to the synchronization server. The data synchronization method as described in claim 11 further includes the following steps: after receiving the synchronization request, the synchronization server obtains the second transaction record and transmits the second transaction record to the client . The data synchronization method according to claim 11 further includes the following steps: after the synchronization server receives the synchronization request including the transaction time of the third transaction record, transmitting the third transaction record A certain amount of transaction record after the transaction time is given to the above client. 1 . A computer readable storage medium for storing a computer program for loading into a synchronization server and a client computer system and causing the computer system to perform a data synchronization method. Methods include: 0213-A40411TWF(N2);B9341;SN0WBALL.ptd 第18頁 1258089 ::t ’ ^ I# M- 1¾ ifj 上述同步伺服器接收一資料異動請求: 上述同步伺服器依據上述資料異動請求更新一伺服器 端資料記錄,其中上述伺服器端資料記錄代表原始資料, 上述同步飼服器判斷當上述資料異動請求相應於一第 —異動紀錄時;產生一第二異動紀錄並覆寫上述第一異動 紀錄5其中上述第一異動紀錄以及上述第二異動紀錄代表 操作資料記錄之指示; 上述客戶端接收上述第二異動紀錄;以及 上述客戶端依據上述第二異動紀錄更新一客戶端資料 記錄,其中上述客戶端資料記錄代表原始資料。0213-A40411TWF(N2);B9341;SN0WBALL.ptd Page 18 1258089 ::t ' ^ I# M- 13⁄4 ifj The above synchronization server receives a data transaction request: The above synchronization server updates a server according to the above data transaction request The data record, wherein the server data record represents the original data, and the synchronous feeding device determines that the data transaction request corresponds to a first-transaction record; generates a second transaction record and overwrites the first transaction record 5 The first transaction record and the second transaction record represent an indication of the operation data record; the client receives the second transaction record; and the client updates a client data record according to the second transaction record, wherein the client The data record represents the original data. 0213 - A40411 T\VF (N2); B9341; SNOWBALL. p t ci 第19頁0213 - A40411 T\VF (N2); B9341; SNOWBALL. p t ci第19页
TW93140237A 2004-12-23 2004-12-23 System, method and machine-readable storage medium for data synchronization TWI258089B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW93140237A TWI258089B (en) 2004-12-23 2004-12-23 System, method and machine-readable storage medium for data synchronization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW93140237A TWI258089B (en) 2004-12-23 2004-12-23 System, method and machine-readable storage medium for data synchronization

Publications (2)

Publication Number Publication Date
TW200622733A TW200622733A (en) 2006-07-01
TWI258089B true TWI258089B (en) 2006-07-11

Family

ID=37765162

Family Applications (1)

Application Number Title Priority Date Filing Date
TW93140237A TWI258089B (en) 2004-12-23 2004-12-23 System, method and machine-readable storage medium for data synchronization

Country Status (1)

Country Link
TW (1) TWI258089B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI461935B (en) * 2007-04-30 2014-11-21 Microsoft Corp Reducing update conflicts when maintaining views

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI475409B (en) * 2009-06-30 2015-03-01 Alibaba Group Holding Ltd Data synchronization method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI461935B (en) * 2007-04-30 2014-11-21 Microsoft Corp Reducing update conflicts when maintaining views

Also Published As

Publication number Publication date
TW200622733A (en) 2006-07-01

Similar Documents

Publication Publication Date Title
CN107577427B (en) data migration method, device and storage medium for blockchain system
CN110188096B (en) Index creating method, device and equipment for data record
CN103838813B (en) Kernel occupies the system and method that medical image is checked
JP2020038623A (en) Method, device, and system for storing data
WO2017059798A1 (en) Methods, apparatus, and system for serialization and deserialization, and electronic devices
JP6457406B2 (en) Manage operations on stored data units
CN104881466B (en) The processing of data fragmentation and the delet method of garbage files and device
JP6491605B2 (en) Manage operations on stored data units
TW202040387A (en) Method for constructing index of data record
WO2021082858A1 (en) Data acquisition method and apparatus
US20100067113A1 (en) Apparatus and Method for Displaying Hierarchical Data
CN109919691B (en) Data processing system, method and device
CN105373541A (en) Processing method and system for data operation request of database
CN112286939A (en) Method, device and equipment for generating Hash of global state in block chain type account book
CN106326499A (en) Data processing method and device
CN105227672A (en) The method and system that data store and access
CN111581219B (en) Method and device for acquiring monitoring data
JP4233564B2 (en) Data processing apparatus, data processing program and recording medium
US20090043864A1 (en) Method and System for Generating Globally Unique Identifiers
CN115470156A (en) RDMA-based memory use method, system, electronic device and storage medium
JP2016517065A (en) Manage operations on stored data units
TWI258089B (en) System, method and machine-readable storage medium for data synchronization
CN111046085B (en) Data tracing processing method and device, medium and equipment
CN112052234B (en) Service data processing method and device, storage medium and electronic device
CN111444194B (en) Method, device and equipment for clearing indexes in block chain type account book

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees