WO2012151881A1 - 一种数据同步的方法及装置 - Google Patents

一种数据同步的方法及装置 Download PDF

Info

Publication number
WO2012151881A1
WO2012151881A1 PCT/CN2011/081734 CN2011081734W WO2012151881A1 WO 2012151881 A1 WO2012151881 A1 WO 2012151881A1 CN 2011081734 W CN2011081734 W CN 2011081734W WO 2012151881 A1 WO2012151881 A1 WO 2012151881A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
link table
linked list
luid
synchronized
Prior art date
Application number
PCT/CN2011/081734
Other languages
English (en)
French (fr)
Inventor
何杰
袁磊
蒲竞春
魏上凯
付丽琴
何建桥
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2012151881A1 publication Critical patent/WO2012151881A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/18Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data
    • H04W8/20Transfer of user or subscriber data

Definitions

  • the present invention relates to wireless communication personal information management technology, and more particularly to a method and apparatus for data synchronization. Background technique
  • the management of mobile terminal personal information, schedule information and mail information has become increasingly important and has become an important part of mobile terminal information management.
  • When changing the data of the mobile terminal or the mobile terminal how to safely and effectively back up the data to the network server, so as to restore the backup data to the mobile terminal in the future, and realize the data synchronization of the mobile terminal and the network server, and more and more s concern.
  • basic data synchronization services have two-way fast synchronization and two-way slow synchronization.
  • the two-way slow synchronization synchronizes all data records on the mobile terminal and the network server, such as a business card holder and a calendar; the two-way fast synchronization synchronizes all changes that have occurred since the last synchronization between the mobile terminal and the network server. .
  • Users who register the synchronization service can choose one of the methods to synchronize the data between the mobile terminal and the network server, and finally make the data on the mobile terminal and the network server consistent.
  • Changelog is used to record the data change information of the mobile terminal or network server since the last synchronization.
  • the change information appears in the form of a data entry, consisting of two parts: the object and the operations performed on the object.
  • the operations on the object include three types: Add ( ADD ), Delete ( DELETE ) and Update ( UPDATE ). That is, the changelog needs to record which changes have been made to which record.
  • FIG. 1 is a data structure diagram of a changelog in a mobile terminal such as a mobile phone in the prior art.
  • the changelog structure contains two data items: the operation object and the operations performed on the operation object.
  • the operation object refers to a unique ID recorded in the database for each piece of data stored in the mobile terminal.
  • the unique ID of the database record is called Locally Unique Identifier (LUID), which is generated and unique in the mobile terminal; in the mobile terminal, even if added
  • LID Locally Unique Identifier
  • the data content of the record item is exactly the same as the record that has been deleted, and its LUID is also different from the original deleted LUID.
  • FIG. 2 is a specific example of the changelog shown in FIG. 1. As shown in FIG. 2, the operations performed separately are: adding a record with a LUID of 1, and deleting a record having a LUID of 5, for the LUID The update operation was performed for the records of 6 and 7.
  • the traditional changelog recording method is to write all data modification operations to the changelog file to meet the requirements for recording the modified log information.
  • it has the following problems:
  • each sync account needs to maintain a changelog file.
  • the modified data needs to be written to multiple changelog files at the same time. The more accounts, the worse the performance.
  • the main object of the present invention is to provide a method and apparatus for data synchronization, which can improve the performance of data synchronization.
  • a method of data synchronization comprising:
  • the method further includes: after the data synchronization is completed, the mobile terminal updates the synchronized data link table according to the current data synchronization situation;
  • the synchronized data link table includes a LUID of the data and a check value generated according to the content of the data.
  • the method further includes:
  • the data corresponding to the LUID existing in the current data linked list and not present in the synchronized data linked list is added to the added linked list.
  • the method further includes:
  • the data corresponding to the LUID existing in the synchronized data linked list and not present in the current data linked list is added to the deleted linked list.
  • the method further includes:
  • a device for synchronizing data comprising: a linked list generating unit, a comparing unit, and a synchronizing unit;
  • the linked list generating unit is configured to generate a current data linked list of LUIDs including all data of the current mobile terminal;
  • the comparing unit is configured to compare the current data linked list with the synchronized data linked list for recording data that has been synchronized with the server last time;
  • the synchronization unit is configured to perform data synchronization according to the comparison result.
  • the linked list generating unit is further configured to: after the synchronization unit completes the data synchronization, update the synchronized data link table according to the current data synchronization situation; wherein the synchronized data link table includes the LUID of the data and according to the The checksum generated by the content of the data.
  • the comparing unit is specifically configured to compare the LUID in the synchronized data link table with the LUID in the current data link table, and add the data corresponding to the LUID existing in the current data link table and not in the synchronized data link table. To add a linked list.
  • the comparing unit is specifically configured to compare the LUID in the synchronized data link table with the LUID in the current data link table, and add the data corresponding to the LUID that exists in the synchronized data link table and does not exist in the current data link table. To delete the linked list.
  • the comparing unit is specifically configured to compare the LUID in the synchronized data link table with the LUID in the current data link table, and calculate the current data content corresponding to the LUID of the synchronized data link table and the current data link table. And verifying the check value, and comparing the check value with the check value corresponding to the LUID in the synchronized data link table, if not, adding the data corresponding to the LUID to the update linked list.
  • the synchronization unit is specifically configured to perform data synchronization according to one or more of an added linked list, a deleted linked list, and an updated linked list obtained by comparison.
  • the invention realizes the synchronization of data by comparing the current data link table with the synchronized data link table, Need to rely on the changelog file for synchronization, improve the performance of data synchronization, and do not need to call the changelog interface when modifying data, portability is strong.
  • Figure 1 is a schematic diagram of the data structure of the existing changelog
  • FIG. 2 is a schematic diagram of a specific example of the changelog data structure shown in FIG. 1;
  • FIG. 3 is a schematic diagram of an implementation process of a method for data synchronization according to the present invention.
  • FIG. 4 is a schematic diagram of a specific example of a synchronized data link table in a data synchronization method according to the present invention
  • FIG. 5 is a schematic diagram of a specific example of a current data link table in a data synchronization method according to the present invention
  • FIG. 6 is a synchronized diagram shown in FIG. 4 and FIG. A schematic diagram of the comparison between the data link table and the current data link table;
  • FIG. 7 is a schematic structural diagram of an apparatus for data synchronization according to the present invention. detailed description
  • the basic idea of the present invention is: generating a current data link table containing LUIDs of all data of the current mobile terminal; comparing the current data link table with the synchronized data link table for recording data synchronized with the server last time; according to the comparison result, Perform data synchronization.
  • FIG. 3 shows an implementation flow of a method for data synchronization according to the present invention. As shown in FIG. 3, the method includes the following steps:
  • Step 301 Generate a current data link table that includes all the LUIDs of the current mobile terminal. Specifically, when the mobile terminal is ready to perform data synchronization, obtain all current data of the mobile terminal.
  • Step 302 The current data linked list is used to record the data that was last synchronized with the server. Synchronize the data link table for comparison;
  • the synchronized data link table includes the addition and update data sent to the server, and the addition and update data received from the server.
  • the receiving server sends and adds data to the mobile terminal
  • the mobile terminal generates a new check value according to its content
  • the LUID and checksum values are saved to the synchronized data link table.
  • Comparing the LUID in the synchronized data link table with the LUID in the current data link table further including adding the data corresponding to the LUID existing in the current data link table and not present in the synchronized data link table to the added linked list;
  • the data corresponding to the LUID of the synchronous data link table and not existing in the current data link table is added to the delete linked list;
  • the check value is calculated for the current data content corresponding to the LUID of the synchronized data link table and the current data link table, and the school is compared. If the check value corresponding to the LUID in the synchronized data link table is inconsistent, the data corresponding to the LUID of the current data link table is added to the update linked list.
  • the data synchronized by the mobile terminal with the server includes data with LUIDs of 1, 2, 4, and 9, and their respective checksums.
  • the value refers to the check value shown in Figure 4;
  • FIG. 5 shows the current data link table of the mobile terminal, that is, the LUID of all current data of the mobile terminal when it is synchronized with the server again, as shown in FIG. 5, including data with LUIDs of 1, 2, 9, and 10;
  • the synchronized data link table is compared with the current data link table, wherein the LUID 10 record exists in the current data link table, but does not exist in the synchronized data link table, so the data corresponding to LUID 10 is new data, The data is added to the add-on list;
  • the LUID 4 record exists in the synchronized data link table, but does not exist in the current data link table, so the data corresponding to the LUID 4 is deleted data, and the data is added to the delete linked list; Find the LUID that exists in both the current data link table and the synchronized data link table, and generate a new check value according to the data content currently recorded by each LUID to form a linked list, such as the intermediate data link table shown in FIG.
  • the check value of LUID 9 in the synchronized data link table is 5DB7AB8A, but the check value in the intermediate data link table is DD2E9124, and since the two check values are not equal, LUID 9 is update data; LUID 1 and LUID 2, the check value in the intermediate data link table is equal to the check value in the synchronized data link table, so these two data are unmodified data.
  • Step 303 Perform data synchronization according to the comparison result.
  • the data is operated to complete the synchronization of the data
  • the method further includes: after the data synchronization is completed, the mobile terminal updates the synchronized data link table according to the current data synchronization situation; wherein the synchronized data link table includes a LUID of the data and is generated according to the content of the data.
  • the check value where the check value can be generated by a check algorithm such as a Cyclic Redundancy Check (CRC).
  • CRC Cyclic Redundancy Check
  • the present invention also provides an apparatus for implementing the above method of data synchronization, and FIG. 7 shows the structure of the apparatus.
  • the apparatus includes: a linked list generating unit 71, a comparing unit 72, and a synchronizing unit 73; among them,
  • the linked list generating unit 71 is configured to generate a current data linked list of LUIDs including all data of the current mobile terminal;
  • the comparing unit 72 is configured to compare the current data linked list with the synchronized data linked list for recording data that was last synchronized with the server;
  • the synchronization unit 73 is configured to perform data synchronization according to the comparison result.
  • the linked list generating unit 71 is further configured to: after the synchronization unit 73 completes data synchronization, Updating the synchronized data link table according to the current data synchronization; wherein the synchronized data link table includes a LUID of the data and a check value generated according to the content of the data; where the check value may pass the CRC The check algorithm is generated.
  • the comparing unit 72 is specifically configured to compare the LUID in the synchronized data link table with the LUID in the current data link table, and then the data corresponding to the LUID that exists in the current data link table and does not exist in the synchronized data link table.
  • the synchronized data link table contains the add and update data sent to the server, as well as the add and update data received from the server.
  • the mobile terminal When the receiving server sends and updates data to the mobile terminal, the mobile terminal generates a new check value based on its content, and saves the LUID and the check value to the synchronized data link table.
  • the comparing unit 72 is specifically configured to compare the LUID in the synchronized data link table with the LUID in the current data link table, and the data corresponding to the LUID that exists in the synchronized data link table and does not exist in the current data link table is added. To delete the linked list.
  • the comparing unit 72 is specifically configured to compare the LUID in the synchronized data link table with the LUID in the current data link table, and calculate the current data content corresponding to the LUID of the synchronized data link table and the current data link table. Checking the value, and comparing the check value with the check value corresponding to the LUID in the synchronized data link table. If not, adding the data corresponding to the LUID in the current data link table to the update linked list.
  • the synchronization unit 73 is specifically configured to perform data synchronization according to one or more of an added linked list, a deleted linked list, and an updated linked list obtained by comparison.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Telephonic Communication Services (AREA)
  • Information Transfer Between Computers (AREA)

Description

一种数据同步的方法及装置 技术领域
本发明涉及无线通讯个人信息管理技术, 尤其涉及一种数据同步的方 法及装置。 背景技术
移动终端个人信息、 日程信息和邮件信息等的管理日益重要, 已经成 为移动终端信息管理的一个重要组成部分。 在更换移动终端或者移动终端 数据发生变化时, 如何安全有效地将数据备份到网络服务器中, 以便日后 将备份数据恢复到移动终端, 实现移动终端和网络服务器的数据同步, 得 到了越来越多的关注。
目前基本的数据同步业务有双向快同步和双向慢同步。 其中, 双向慢 同步将移动终端和网络服务器上的所有数据记录项, 如名片夹和日程表等 进行同步; 双向快同步是将移动终端和网络服务器上自从上一次同步之后 发生的所有变化进行同步。 注册同步业务的用户可以选择其中一种方式, 将移动终端和网络服务器之间的数据进行数据同步, 最终使移动终端和网 络服务器上的数据保持一致。
其中,对于交换变化信息为目的的双向快同步而言,存在 changelog (修 改日志)的设计和实现问题。 Changelog用于记录移动终端或者网络服务器 自从上一次同步之后的数据变化信息。 该变化信息以数据记录项的形式出 现, 包括两部分内容: 对象和针对该对象进行的操作。 其中, 针对对象进 行的操作包括三种类型: 添加( ADD )、删除( DELETE)和更新 ( UPDATE )。 即, changelog需要记录针对哪一条记录做了何种修改。
图 1是现有技术中,在诸如手机等移动终端中 changelog的数据结构图。 如图 1所示, 该 changelog结构中包含两个数据项: 操作对象和针对该操作 对象所进行的操作。 在这里, 操作对象引用的是存储于移动终端的每一条 数据在数据库中记录的唯一 ID。
在信息同步标准 ( Synchronization Markup Language, SyncML )协议中 , 数据库记录的唯一 ID称为局部唯一标识( Locally Unique Identifier, LUID ), 该 LUID在移动终端中生成且是唯一的;在移动终端, 即使添加的记录项的 数据内容与某一项已经删除的记录完全相同, 其 LUID也与原来被删除的 LUID不同。
图 2是图 1所示的 changelog的具体实例图, 如图 2所示, 分别进行的 操作为: 对 LUID为 1的记录进行了添加操作,对 LUID为 5的记录进行了 删除操作, 对 LUID为 6和 7的记录进行了更新操作。
传统 changelog记录方法是将所有数据修改操作写入 changelog文件, 达到记录修改日志信息的要求。 然而其存在如下问题:
( 1 ) 当 changelog中记录较多, 数据库数据进行批量操作时, 如进行 DELETE操作时, 因为每个修改数据都需要写入 changelog, 导致批量操作 性能降低。
( 2 ) 当可以使用多个同步账号时, 每个同步账号都需要维护一个 changelog 文件。 当数据发生修改时, 需要将修改数据同时供写入多个 changelog文将, 账号越多, 性能越差。
( 3 ) 多个同步账号 changelog并不独立, 同步一个账号时, 需要将修 改信息写入其他同步账号的 changelog, 会导致同步性能降低。 发明内容
有鉴于此, 本发明的主要目的在于提供一种数据同步的方法及装置, 能够提高数据同步的性能。
为达到上述目的, 本发明的技术方案是这样实现的: 一种数据同步的方法, 所述方法包括:
生成包含有当前移动终端所有数据的局部唯一标识(LUID ) 的当前数 据链表;
将当前数据链表与用于记录上次与服务器同步过的数据的已同步数据 链表进行对比;
根据对比结果, 进行数据同步。
进一步地, 所述方法还包括: 数据同步完成后, 移动终端根据当前数 据同步的情况, 更新所述已同步数据链表;
其中, 所述已同步数据链表包含数据的 LUID及根据所述数据的内容 生成的校验值。
其中, 所述将已同步数据链表与当前数据链表进行对比后, 所述方法 还包括:
将存在于当前数据链表且不存在于已同步数据链表中的 LUID对应的 数据加入到添加链表。
其中, 所述将已同步数据链表与当前数据链表进行对比后, 所述方法 还包括:
将存在于已同步数据链表且不存在于当前数据链表中的 LUID对应的 数据加入到删除链表。
其中, 所述将已同步数据链表与当前数据链表进行对比后, 所述方法 还包括:
对同时存在于已同步数据链表和当前数据链表的 LUID对应的当前数 据内容计算校验值,并比较所述校验值与已同步数据链表中所述 LUID对应 的校险值, 若不一致, 则将所述 LUID对应的数据加入到更新链表。
其中, 所述根据对比结果, 进行数据同步为:
根据对比得到的添加链表、 删除链表、 更新链表中的一种或多种, 进 行数据的同步。
一种数据同步的装置, 所述装置包括: 链表生成单元、 比较单元、 同 步单元; 其中,
所述链表生成单元, 用于生成包含有当前移动终端所有数据的 LUID 的当前数据链表;
所述比较单元, 用于将当前数据链表与用于记录上次与服务器同步过 的数据的已同步数据链表进行对比;
所述同步单元, 用于根据对比结果, 进行数据同步。
其中, 所述链表生成单元, 还用于在同步单元完成数据同步后, 根据 当前数据同步的情况, 更新所述已同步数据链表; 其中, 所述已同步数据 链表包含数据的 LUID及根据所述数据的内容生成的校验值。
其中, 所述比较单元, 具体用于将已同步数据链表中的 LUID 与当前 数据链表中的 LUID进行对比后,将存在于当前数据链表且不存在于已同步 数据链表中的 LUID对应的数据加入到添加链表。
其中, 所述比较单元, 具体用于将已同步数据链表中的 LUID 与当前 数据链表中的 LUID进行对比后,将存在于已同步数据链表且不存在于当前 数据链表中的 LUID对应的数据加入到删除链表。
其中, 所述比较单元, 具体用于将已同步数据链表中的 LUID 与当前 数据链表中的 LUID进行对比后,对同时存在于已同步数据链表和当前数据 链表的 LUID对应的当前数据内容计算校验值,并比较所述校验值与已同步 数据链表中所述 LUID对应的校验值, 若不一致, 则将所述 LUID对应的数 据加入到更新链表。
其中, 所述同步单元, 具体用于根据对比得到的添加链表、 删除链表、 更新链表中的一种或多种, 进行数据的同步。
本发明通过对比当前数据链表与已同步数据链表实现数据的同步, 不 需要再依托于 changelog文件进行同步, 提高了数据同步的性能, 而且在修 改数据时不需要调用 changelog接口, 可移植性较强。 附图说明
图 1为现有的 changelog的数据结构示意图;
图 2为图 1所示的 changelog数据结构的具体实例示意图;
图 3为本发明数据同步的方法的实现流程示意图;
图 4为本发明数据同步的方法中已同步数据链表的具体实例示意图; 图 5为本发明数据同步的方法中当前数据链表的具体实例示意图; 图 6为图 4和图 5所示的已同步数据链表与当前数据链表的对比示意 图;
图 7为本发明数据同步的装置的结构示意图。 具体实施方式
本发明的基本思想为: 生成包含有当前移动终端所有数据的 LUID 的 当前数据链表; 将当前数据链表与用于记录上次与服务器同步过的数据的 已同步数据链表进行对比; 根据对比结果, 进行数据同步。
为使本发明的目的、 技术方案和优点更加清楚明白, 以下举实施例并 参照附图, 对本发明进一步详细说明。
图 3示出了本发明数据同步的方法的实现流程, 如图 3所示, 所述方 法包括下述步驟:
步驟 301,生成包含有当前移动终端所有数据的 LUID的当前数据链表; 具体地, 在移动终端准备进行数据同步时, 获取当前自身所有数据的
LUID , 生成当前数据链表, 所述当前数据链表包含有所述所有数据的
LUID0
步驟 302,将当前数据链表与用于记录上次与服务器同步过的数据的已 同步数据链表进行对比;
具体地, 本步驟中, 已同步数据链表中包含了发送给服务器的添加和 更新数据, 以及从服务器接收的添加和更新数据。 接收服务器发送给移动 终端的添加和更新数据时, 移动终端会根据其内容生成新的校验值, 并将
LUID和校验值保存到已同步数据链表中。
将已同步数据链表中的 LUID与当前数据链表中的 LUID进行对比后, 还包括将存在于当前数据链表且不存在于已同步数据链表中的 LUID对应 的数据加入到添加链表; 将存在于已同步数据链表且不存在于当前数据链 表中的 LUID对应的数据加入到删除链表;对同时存在于已同步数据链表和 当前数据链表的 LUID对应的当前数据内容计算校验值,并比较所述校验值 与已同步数据链表中所述 LUID对应的校验值,若不一致,则将当前数据链 表的所述 LUID对应的数据加入到更新链表。
具体地, 结合图 4示出的已同步数据链表、 图 5示出的当前数据链表 以及图 6的已同步数据链表与当前数据链表的对比示意图, 进行详细说明。
图 4示出了移动终端上次与服务器同步过的已同步数据链表, 由图 4 可知, 移动终端与服务器同步过的数据包括 LUID为 1、 2、 4、 9的数据, 其各自的校验值参考图 4所示的校验值;
图 5 示出了移动终端的当前数据链表, 即移动终端再次与服务器进行 同步时, 当前自身所有数据的 LUID, 如图 5所示, 包括 LUID为 1、 2、 9、 10的数据;
结合图 6,将已同步数据链表与当前数据链表进行对比,其中, LUID 10 记录存在于当前数据链表中,但不存在于已同步数据链表中,所以 LUID 10 对应的数据是新增数据, 将该数据加入到添加链表中;
其中, LUID 4 记录存在于已同步数据链表中, 但不存在于当前数据链 表中,所以 LUID 4对应的数据为是删除数据,将该数据加入到删除链表中; 找到既存在于当前数据链表中, 又存在于已同步数据链表中的 LUID, 并根据每个 LUID当前记录的数据内容产生新的校验值, 形成链表, 如图 6 所示的中间数据链表。 遍历所述中间数据链表中的 LUID, 将中间数据链表 和已同步数据链表相同 LUID的校验值进行比较,如果不相等,则认为是修 改数据, 将该数据添加到更新链表; 如果相等, 则认为是未修改数据。
如图 6所示, LUID 9在已同步数据链表中的校验值为 5DB7AB8A, 但 在中间数据链表中其校验值为 DD2E9124, 由于两个校验值不相等, 所以 LUID 9为更新数据; LUID 1和 LUID 2, 在中间数据链表中的校验值与已 同步数据链表中校验值相等, 所以这两个数据为未修改数据。
步驟 303 , 根据对比结果, 进行数据同步。
根据步驟 302对比得到的添加链表、 删除链表、 更新链表中的一种或 多种, 对数据进行操作, 完成数据的同步;
另外, 该方法还包括: 数据同步完成后, 移动终端根据当前数据同步 的情况, 更新所述已同步数据链表; 其中, 所述已同步数据链表包含数据 的 LUID及根据所述数据的内容生成的校验值,这里,所述校验值可以通过 循环冗余校验 ( Cyclic Redundancy Check, CRC )等校验算法进行生成。
本发明还提供了一种实现上述数据同步的方法的装置, 图 7示出了该 装置的结构, 如图 7所示, 所述装置包括: 链表生成单元 71、 比较单元 72、 同步单元 73; 其中,
所述链表生成单元 71 ,用于生成包含有当前移动终端所有数据的 LUID 的当前数据链表;
所述比较单元 72, 用于将当前数据链表与用于记录上次与服务器同步 过的数据的已同步数据链表进行对比;
所述同步单元 73 , 用于根据对比结果, 进行数据同步。
其中, 所述链表生成单元 71 , 还用于在同步单元 73完成数据同步后, 根据当前数据同步的情况, 更新所述已同步数据链表; 其中, 所述已同步 数据链表包含数据的 LUID及根据所述数据的内容生成的校验值;这里,所 述校验值可以通过 CRC等校验算法进行生成。
其中, 所述比较单元 72, 具体用于将已同步数据链表中的 LUID与当 前数据链表中的 LUID进行对比后,将存在于当前数据链表且不存在于已同 步数据链表中的 LUID对应的数据加入到添加链表;这里, 已同步数据链表 中包含了发送给服务器的添加和更新数据, 以及从服务器接收的添加和更 新数据。 接收服务器发送给移动终端的添加和更新数据时, 移动终端会根 据其内容生成新的校验值, 并将 LUID和校验值保存到已同步数据链表中。
其中, 所述比较单元 72, 具体用于将已同步数据链表中的 LUID与当 前数据链表中的 LUID进行对比后,存在于已同步数据链表且不存在于当前 数据链表中的 LUID对应的数据加入到删除链表。
其中, 所述比较单元 72, 具体用于将已同步数据链表中的 LUID与当 前数据链表中的 LUID进行对比后,对同时存在于已同步数据链表和当前数 据链表的 LUID对应的当前数据内容计算校验值,并比较所述校验值与已同 步数据链表中所述 LUID对应的校验值,若不一致,则将当前数据链表中的 所述 LUID对应的数据加入到更新链表。
其中, 所述同步单元 73 , 具体用于根据对比得到的添加链表、 删除链 表、 更新链表中的一种或多种, 进行数据的同步。
以上所述, 仅为本发明的较佳实施例而已, 并非用于限定本发明的保 护范围。

Claims

权利要求书
1、 一种数据同步的方法, 其特征在于, 所述方法包括:
生成包含有当前移动终端所有数据的局部唯一标识 LUID 的当前数据 链表;
将当前数据链表与用于记录上次与服务器同步过的数据的已同步数据 链表进行对比;
根据对比结果, 进行数据同步。
2、 根据权利要求 1所述的方法, 其特征在于, 所述方法还包括: 数据 同步完成后, 移动终端根据当前数据同步的情况, 更新所述已同步数据链 表;
其中, 所述已同步数据链表包含数据的 LUID及根据所述数据的内容 生成的校验值。
3、 根据权利要求 1所述的方法, 其特征在于, 所述将已同步数据链表 与当前数据链表进行对比后, 所述方法还包括:
将存在于当前数据链表且不存在于已同步数据链表中的 LUID对应的 数据加入到添加链表。
4、 根据权利要求 1所述的方法, 其特征在于, 所述将已同步数据链表 与当前数据链表进行对比后, 所述方法还包括:
将存在于已同步数据链表且不存在于当前数据链表中的 LUID对应的 数据加入到删除链表。
5、 根据权利要求 1所述的方法, 其特征在于, 所述将已同步数据链表 与当前数据链表进行对比后, 所述方法还包括:
对同时存在于已同步数据链表和当前数据链表的 LUID对应的当前数 据内容计算校验值,并比较所述校验值与已同步数据链表中所述 LUID对应 的校险值, 若不一致, 则将所述 LUID对应的数据加入到更新链表。
6、 根据权利要求 1至 5任一项所述的方法, 其特征在于, 所述根据对 比结果, 进行数据同步为:
根据对比得到的添加链表、 删除链表、 更新链表中的一种或多种, 进 行数据的同步。
7、一种数据同步的装置, 其特征在于, 所述装置包括: 链表生成单元、 比较单元、 同步单元; 其中,
所述链表生成单元, 用于生成包含有当前移动终端所有数据的局部唯 一标识 LUID的当前数据链表;
所述比较单元, 用于将当前数据链表与用于记录上次与服务器同步过 的数据的已同步数据链表进行对比;
所述同步单元, 用于根据对比结果, 进行数据同步。
8、 根据权利要求 7所述的装置, 其特征在于, 所述链表生成单元, 还 用于在同步单元完成数据同步后, 根据当前数据同步的情况, 更新所述已 同步数据链表;其中,所述已同步数据链表包含数据的 LUID及根据所述数 据的内容生成的校验值。
9、 根据权利要求 7所述的装置, 其特征在于, 所述比较单元, 具体用 于将已同步数据链表中的 LUID与当前数据链表中的 LUID进行对比后,将 存在于当前数据链表且不存在于已同步数据链表中的 LUID对应的数据加 入到添加链表。
10、 根据权利要求 7所述的装置, 其特征在于, 所述比较单元, 具体 用于将已同步数据链表中的 LUID与当前数据链表中的 LUID进行对比后, 将存在于已同步数据链表且不存在于当前数据链表中的 LUID对应的数据 加入到删除链表。
11、 根据权利要求 7所述的装置, 其特征在于, 所述比较单元, 具体 用于将已同步数据链表中的 LUID与当前数据链表中的 LUID进行对比后, 对同时存在于已同步数据链表和当前数据链表的 LUID对应的当前数据内 容计算校验值,并比较所述校验值与已同步数据链表中所述 LUID对应的校 验值, 若不一致, 则将所述 LUID对应的数据加入到更新链表。
12、 根据权利要求 7至 11任一项所述的装置, 其特征在于, 所述同步 单元, 具体用于根据对比得到的添加链表、 删除链表、 更新链表中的一种 或多种, 进行数据的同步。
PCT/CN2011/081734 2011-08-09 2011-11-03 一种数据同步的方法及装置 WO2012151881A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110227428.6 2011-08-09
CN201110227428.6A CN102291453B (zh) 2011-08-09 2011-08-09 一种数据同步的方法及装置

Publications (1)

Publication Number Publication Date
WO2012151881A1 true WO2012151881A1 (zh) 2012-11-15

Family

ID=45337554

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/081734 WO2012151881A1 (zh) 2011-08-09 2011-11-03 一种数据同步的方法及装置

Country Status (2)

Country Link
CN (1) CN102291453B (zh)
WO (1) WO2012151881A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103237075B (zh) * 2013-04-24 2016-07-06 广州市动景计算机科技有限公司 一种数据同步方法、装置及系统
CN104917819B (zh) * 2015-04-29 2019-01-01 努比亚技术有限公司 一种实现数据同步的方法及系统
CN104866242B (zh) * 2015-05-29 2018-12-04 上海京东到家元信信息技术有限公司 一种数据删除系统、方法及数据删除中心
CN106777272A (zh) * 2016-12-29 2017-05-31 成都康赛信息技术有限公司 一种数据比对及同步方法
CN108418746B (zh) 2018-02-13 2020-06-12 论客科技(广州)有限公司 一种邮件同步方法、装置与计算机可读存储介质
CN109753494B (zh) * 2019-01-04 2021-05-25 北京环境特性研究所 一种目标特性数据库系统和数据同步方法
CN113656490B (zh) * 2020-05-12 2024-01-30 华为技术有限公司 一种数据同步的方法、装置、终端以及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1472911A (zh) * 2002-07-31 2004-02-04 鸿富锦精密工业(深圳)有限公司 无线设备同步系统及方法
US20050203905A1 (en) * 2004-03-12 2005-09-15 Samsung Electronics Co., Ltd. Method of synchronizing data between server and user terminal using messenger service system and system using the same
CN101106780A (zh) * 2007-07-25 2008-01-16 中兴通讯股份有限公司 多模移动终端的数据同步方法
US20100077024A1 (en) * 2007-02-16 2010-03-25 Point-I Co., Ltd. Method for transmitting data transmitted incompletely between server and client
CN102098812A (zh) * 2011-02-16 2011-06-15 中兴通讯股份有限公司 数据的同步方法及移动终端

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1794724A (zh) * 2005-10-27 2006-06-28 华为技术有限公司 在SyncML层实现数据同步的方法
CN101009516B (zh) * 2006-01-26 2011-05-04 华为技术有限公司 一种进行数据同步的方法、系统及装置
CN101923571B (zh) * 2010-07-29 2013-05-01 中兴通讯股份有限公司 管理终端数据记录的方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1472911A (zh) * 2002-07-31 2004-02-04 鸿富锦精密工业(深圳)有限公司 无线设备同步系统及方法
US20050203905A1 (en) * 2004-03-12 2005-09-15 Samsung Electronics Co., Ltd. Method of synchronizing data between server and user terminal using messenger service system and system using the same
US20100077024A1 (en) * 2007-02-16 2010-03-25 Point-I Co., Ltd. Method for transmitting data transmitted incompletely between server and client
CN101106780A (zh) * 2007-07-25 2008-01-16 中兴通讯股份有限公司 多模移动终端的数据同步方法
CN102098812A (zh) * 2011-02-16 2011-06-15 中兴通讯股份有限公司 数据的同步方法及移动终端

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JIANG, XIAOYING: "The Design and Realization of Mobile Unified Address Book System Based on SyncML", COMPUTER KNOWLEDGE AND TECHNOLOGY, March 2007 (2007-03-01), pages 1572 - 1574 *
MA, JIANHUI ET AL.: "Application of SyncML in Bluetooth Handfree Car Kit", ELECTRONIC DESIGN & APPLICATION WORLD, vol. 12, 2008, pages 80 - 82 *
ZHANG; ZONGPING ET AL.: "Research and implementation of mobile data synchronization", JOURNAL OF CHENGDU UNIVERSITY OF INFORMATION TECHNOLOGY, vol. 21, no. 1, February 2006 (2006-02-01), pages 91 - 95 *

Also Published As

Publication number Publication date
CN102291453B (zh) 2017-04-26
CN102291453A (zh) 2011-12-21

Similar Documents

Publication Publication Date Title
WO2012151881A1 (zh) 一种数据同步的方法及装置
CN106250270B (zh) 一种云计算平台下的数据备份方法
US8171171B2 (en) Data synchronization method and system between devices
CN110569309B (zh) 用于实现区块链的设备、方法、系统以及介质
US8107503B2 (en) Resuming a previously interrupted peer-to-peer synchronization operation
KR101922044B1 (ko) 데이터베이스 이중화 무중단 정합성 복구 기법
US20100017443A1 (en) Method, terminal, and system for soft-deleting, restoring, and synchronizing data
US20110167041A1 (en) Method and device for maintaining a changelog in data synchronization
US11159616B2 (en) Email synchronization method and apparatus, and computer readable storage medium
US8135769B2 (en) Synchronization improvements
JP2016503551A (ja) 同期方法、マスターデバイス及びスレーブデバイス
US8429123B2 (en) Synchronization improvements
TW201433930A (zh) 檔案追蹤方法及其所適用之網路通訊裝置
WO2021008400A1 (zh) 基于区块链的数据批量处理方法、装置、设备及存储介质
WO2013174060A1 (zh) 基于个人信息管理系统的信息同步方法、装置及通信终端
JP2016212656A (ja) 情報処理装置、端末、情報処理装置と端末を有するシステム、情報処理方法及びプログラム
CN110474972B (zh) 一种联系人信息的同步方法和装置
US8874795B2 (en) Data synchronization system
CN105723365B (zh) 用于优化索引、主数据库节点和订户数据库节点的方法
US8977591B1 (en) Transitive database replication
Zhuang et al. Design of a more scalable database system
US20090307280A1 (en) Synchronization improvements
US20220179879A1 (en) Systems and methods for intermittent synchronizing of customer relationship management local application clients
Kim et al. Data Synchronization and Conflict Resolution for Mobile Devices
CN115563219A (zh) 一种基于差异数据的商品信息同步方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11865035

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11865035

Country of ref document: EP

Kind code of ref document: A1