WO2014173122A1 - Data synchronization method, apparatus, and system - Google Patents

Data synchronization method, apparatus, and system Download PDF

Info

Publication number
WO2014173122A1
WO2014173122A1 PCT/CN2013/087689 CN2013087689W WO2014173122A1 WO 2014173122 A1 WO2014173122 A1 WO 2014173122A1 CN 2013087689 W CN2013087689 W CN 2013087689W WO 2014173122 A1 WO2014173122 A1 WO 2014173122A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
information
server
synchronization
different
Prior art date
Application number
PCT/CN2013/087689
Other languages
French (fr)
Chinese (zh)
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 WO2014173122A1 publication Critical patent/WO2014173122A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0602Systems characterised by the synchronising information used
    • H04J3/0605Special codes used as synchronising signal

Definitions

  • the present application claims priority to Chinese Patent Application No. 201310147019.4, entitled “A Data Synchronization Method, Apparatus and System", filed on April 24, 2013, the entire contents of which is incorporated herein by reference.
  • the present invention relates to the field of communication information technologies, and in particular, to a data synchronization method, apparatus, and system. Background technique
  • each operation records the corresponding log management, which will cause a relatively large burden on the client's system.
  • the user's mobile phone runs slowly, the power consumption is large, the response is slow, and it is difficult for users to accept.
  • Each operation is eventually synchronized to the server (the server is the same), which undoubtedly increases the load on the server operation and processing, and therefore prolongs the entire synchronization process. This can lead to a higher risk of synchronization failure for a mobile Internet.
  • the mobile Internet network is complex and variable, and is also subject to traffic restrictions. If there is an increase in unnecessary operations, then there will be a lot of redundant data in the final data packet, which will inevitably lead to a larger data packet and consume the user's valuable mobile phone traffic.
  • the scheme of merging logs is well optimized, it cannot avoid a problem.
  • the client is required to capture data operations and complete log records. For example, if the user modifies an address book on the mobile phone, then it is required to generate a log matching the synchronization requirement on the mobile phone. And it is clear that the address book belongs to the mobile phone system, and does not belong to the client of the synchronization system.
  • an object of the present invention is to provide a data synchronization method, which solves the problem that the synchronization client can accurately find the data that needs to participate in synchronization without the data operation log, and has the shortcut, Real-time, efficient and adaptable.
  • a second object of the present invention is to provide a data synchronizing apparatus.
  • a third object of the present invention is to propose a data synchronization system.
  • an embodiment of the first aspect of the present invention provides a data synchronization method, including the steps of: acquiring first data to be synchronized, and acquiring second data, wherein the second data is based on a last time
  • the synchronization result of the synchronization process is obtained, wherein the data information in the first data includes at least a data number, a data content, and data feature information; and the data information in the second data includes at least a data number and data feature information; according to the data number and the data feature Determining whether there is different data information in the first data and the second data, if at least one of the data number and the data feature information included in the at least one data information exists in one of the first data and the second data, Different from the corresponding information included in any of the first data and the second data, determining that different data information exists in the first data and the second data; when determining the first data and the second data The different data information that will be judged when there is different data information Send to the server to synchronize the corresponding data stored
  • the data feature information is unique identification information determined based on at least one of data content, timestamp information, and data length information of the data message.
  • the that the server synchronously updates the corresponding data includes: when the data information in the second data does not include the data information in the first data When the data is numbered, the data information corresponding to the data number in the first data is added to the corresponding data stored by the server.
  • the server when the corresponding data is updated by the server, includes: when the first data and the second data have data with the same data number but different data feature information In the information, the data information corresponding to the data number in the first data is replaced with the data information having the same data number in the corresponding data stored by the server.
  • the server when the corresponding data is updated by the server, includes: when the data information in the first data does not include the data number of the data information in the second data And deleting the data information corresponding to the data number from the corresponding data stored by the server.
  • the server The stored corresponding data is synchronously updated to obtain the third data after the current synchronization process, and the method further includes: synchronously updating the first data by using the third data of the current synchronization process returned by the server.
  • the method further includes: generating the second data according to the data number and the data feature information of the data information in the third data returned by the server.
  • the present invention further provides a data synchronization apparatus, including:
  • An acquiring unit configured to acquire first data to be synchronized, and obtain second data; wherein, the data structure of the data information in the first data includes at least a data number, data content, and data feature information; Obtaining, according to the synchronization result of the last synchronization process, the data information in the second data includes at least the data number and the data feature information;
  • a determining unit configured to determine, according to the data number and the data feature information, whether different data information exists in the first data and the second data, if at least one data information exists in any one of the first data and the second data At least one of the included data number and the data characteristic information is different from the corresponding information included in any of the first data and the second data, and the first data and the second data are determined to exist.
  • Different data information configured to determine, according to the data number and the data feature information, whether different data information exists in the first data and the second data, if at least one data information exists in any one of the first data and the second data. At least one of the included data number and the data characteristic information is different from the corresponding information included in any of the first data and the second data, and the first data and the second data are determined to exist.
  • Different data information configured to determine, according to the data number and the data feature information, whether different data information exists in the first data and the second data, if at least one data information exists in any one of the first data and the second data, if at
  • a sending unit configured to: when determining that different data information exists in the first data and the second data, send the determined different data information to the server, to perform synchronization update on the corresponding data stored by the server.
  • the device further includes: a data feature information generating unit, configured to: according to the data content, the timestamp information, and the data length of the data information At least one of the degree information generates data feature information.
  • the device further includes: a synchronization unit, configured to synchronously update the first data by using the third data that has been processed by the current synchronization returned from the server The third data is obtained by the server synchronously updating the corresponding data according to the different data sent by the mobile terminal.
  • the device further includes: a generating unit, configured to generate, according to the data number and data feature information of the data information in the third data returned by the server Two data.
  • the present invention further provides a data synchronization system, including:
  • the mobile terminal includes any one of the data synchronization devices provided by the second aspect; and the server is configured to perform synchronous update on the corresponding data stored in the server by using the data information sent by the receiving terminal.
  • the data synchronization system of the embodiment of the present invention based on the data number and the data feature information, the data that needs to be synchronized is obtained, and the synchronization of the local and server data is completed.
  • the system solves the problem that the synchronization client can accurately find the data that needs to participate in synchronization without the data operation log, and has the advantages of quickness, real-time, high efficiency and applicability.
  • the present invention further provides a computer readable medium having program code executable by a processor, which is applied to a mobile terminal, the program code causing the processor to perform the following steps: acquiring first data to be synchronized, And acquiring the second data; the data information in the first data includes at least a data number, a data content, and data feature information; the second data is generated according to a synchronization result of the last synchronization process, where the data information in the second data includes at least data Number and data feature information; determining, according to the data number and the data feature information, whether different data information exists in the first data and the second data, if at least one data information is included in one of the first data and the second data At least one of the data number and the data characteristic information, and any one of the other of the first data and the second data According to different information included in the information, it is determined that different data information exists in the first data and the second data; when it is determined that different data information exists in the first data and the second data, the different The data information is sent
  • FIG. 2 is a schematic structural diagram of a data synchronization apparatus according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a data synchronization system according to an embodiment of the present invention
  • FIG. 4 is a specific flowchart of a data synchronization method according to an embodiment of the present invention. detailed description
  • the terms “installation”, “connected”, “connected”, “fixed” and the like should be understood broadly, and may be either a fixed connection or a detachable connection, unless otherwise explicitly stated and defined. , or connected integrally; can be mechanical or electrical; can be directly connected, or indirectly connected through an intermediate medium, can be the internal communication of the two components.
  • installation can be understood by those skilled in the art according to specific circumstances.
  • first and second are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, features defining “first”, “second” may explicitly or implicitly include one or more of the features. In the description of the present invention, “a plurality” means two or more, unless specifically defined otherwise.
  • Step S101 is to acquire first data to be synchronized
  • Step S102 is to determine whether the first data and the second data have different data information based on the data number and the data feature information; if there is at least one data information included in the data of the first data and the second data Determining that at least one of the data and the data characteristic information is different from the corresponding information included in the arbitrary data information of the other data of the first data and the second data, determining that different data information exists in the first data and the second data .
  • Step S103 when it is determined that different data information exists in the first data and the second data, the determined different data information is sent to the server.
  • Step S104 is to perform synchronous update on the corresponding data stored in the server, so as to obtain the third data after the current synchronization processing.
  • the data structure of the data information in the first data and the third data includes at least a data number, data content, and data feature information
  • the second data is obtained based on the last data synchronization process.
  • the data structure of the data information generated by the third data includes at least a data number and data feature information.
  • the data feature information is unique identification information determined based on at least one of data content, timestamp information, and data length information of the data message. Thereby, the uniqueness and accuracy of the data feature information is improved.
  • the synchronous updating of the corresponding data stored in the server to obtain the third data after the current synchronization processing includes: the different data information determined from the first data and having the data number When the second data does not exist, the data information is added to the corresponding data stored in the server.
  • performing synchronous update on the corresponding data stored in the server to obtain the third data after the current synchronization process includes: the different data information determined from the first data, and in the second data When there is data information having the same data number but different data characteristic information, the server data is replaced by the different data information.
  • the stored data has the same data number in the corresponding data.
  • the synchronous updating of the corresponding data stored in the server to obtain the third data after the current synchronization processing includes: the different data information determined from the second data and having the data number When the first data does not exist, the data information having the same data number is deleted from the corresponding data stored in the server.
  • the first data is synchronized using the third data after the current synchronization process returned from the server; and the second data is generated based on the returned third data.
  • the data information in the first data, the second data, and the third data may be a plurality of pieces or may be 0 pieces.
  • the data synchronization method of the embodiment of the present invention based on the data number and the data feature information, the data that needs to be synchronized is obtained, and the synchronization of the local and server data is completed. The method solves the problem that the synchronization client can accurately find the data that needs to participate in synchronization without the data operation log, and has the advantages of quickness, real time, high efficiency and applicability.
  • FIG. 2 is a block diagram showing the structure of a data synchronizing apparatus 20 according to an embodiment of the present invention.
  • the data synchronization device 20 of the embodiment of the present invention includes: an obtaining unit 201, configured to acquire first data to be synchronized; and a determining unit 202, configured to determine, according to the data number and the data feature information, whether the first data and the second data are There is different data information; if at least one of the included data number and the data feature information exists in one of the first data and the second data, and any data in the other data of the first data and the second data The corresponding information included in the information is different, and it is determined that different data information exists in the first data and the second data; and the sending unit 203 is configured to: when determining that different data information exists in the first data and the second data, The determined different data information is sent to the server to synchronously update the corresponding data stored in the server to obtain the third data after the current synchronization processing; and a generating unit 204 is configured to obtain the first data after the last data synchronization processing The third data generates the second data.
  • the data synchronization device 20 further includes a data feature information generating unit 205 for generating data feature information based on at least one of data content, time stamp information, and data length information of the data message.
  • the data synchronization device 20 further includes a synchronization unit 206 for synchronizing the first data with the third data after the current synchronization process returned from the server.
  • a data synchronization apparatus based on a data number and data feature information, Synchronize data and complete synchronization of local and server data. The device solves the problem that the synchronization client can accurately find the data that needs to participate in synchronization without the data operation log, and has the advantages of quickness, real-time, high efficiency and applicability.
  • FIG. 3 is a data synchronization system 30 in accordance with an embodiment of the present invention.
  • the data synchronization system 30 of the embodiment of the present invention includes: a mobile terminal 301, including a data synchronization device 20; and a server 302, configured to synchronously update corresponding data stored in the server by using the received different data information to obtain current synchronization processing. After the third data.
  • the server 302 after receiving the different data information sent by the sending unit 203 of the data synchronization device 20, the server 302 performs synchronous update on the corresponding data stored in the server 302 to obtain the third data after the current synchronization processing, and The third data after the current synchronization processing is returned to the data synchronization device 20, so that the synchronization unit 206 of the data synchronization device 20 synchronizes the first data to achieve the purpose that the first data is consistent with the third data.
  • the data synchronization system of the embodiment of the present invention based on the data number and the data feature information, the data that needs to be synchronized is obtained, and the synchronization of the local and server data is completed.
  • the system solves the problem that the synchronization client can accurately find out the data that needs to participate in synchronization without the data operation log, and has the advantages of quickness, real time, high efficiency and applicability.
  • FIG. 4 a specific flowchart for implementing the data synchronization method.
  • Step S401 is to initiate a data synchronization request. Initiating the data synchronization request may be triggered by the user's operation, or may be automatically initiated by the mobile terminal 301 or the server 302 periodically according to a predetermined time period.
  • Step S402 acquires the first data to be synchronized for the obtaining unit 201. The first data is obtained locally from the mobile terminal 301.
  • Step S403 is to determine whether there is different data information in the first data and the second data based on the data number and the data feature information; if the data number and the data feature information are included in one of the first data and the second data At least one of the first data and the other information in the other data of the first data and the second data are different, and it is determined that the first data and the second data have different data information.
  • the data structure of the data information in the first data and the third data includes at least a data number, data content, and data feature information
  • the second data is based on the last data synchronization process.
  • the data structure of the data information in the second data generated by the obtained third data includes at least a data number and data feature information.
  • the data feature information is unique identification information determined based on at least one of data content, timestamp information, and data length information of the data message.
  • the data feature information is calculated by calculating at least one of data content, time stamp information, and data length information of the data message according to a specific formula.
  • the data information in the first data, the second data, and the third data may be a plurality of pieces or may be 0 pieces. Specifically, it is determined whether there is data information in the first data that is different from at least one of the included data number and the data feature information and any data information in the second data, and whether the presence or absence of the second data includes At least one of the data number and the data characteristic information is different from the data information of any of the first data.
  • Step S404 When the determined different data information is from the first data and the data number has no data in the second data, the server adds the data information corresponding to the data number to the corresponding data stored by the server.
  • step S405 when the determined different data information is from the first data, and the data information having the same data number but different data feature information exists in the second data, the data corresponding to the data number in the first data is used. The information replaces the data information having the same data number in the corresponding data stored by the server.
  • Step S406 If the determined different data information is from the second data and the data number that is included does not exist in the first data, the data information corresponding to the data number is deleted from the corresponding data stored by the server.
  • Step S407 The server 302 returns the third data after the synchronization processing to the mobile terminal 301.
  • Step S408 The mobile terminal 301 synchronizes the first data according to the returned third data.
  • Step S409 is to generate second data according to the data number of the first data after synchronization and the data feature information. Specifically, the mobile terminal stores the data number and the data feature information of the first data after the synchronization is completed as the second data, so that when the first data is synchronized next time, the data needs to be synchronized according to the second data. Data information.
  • the synchronous data identification process is as follows:
  • Example 2 Example 2:
  • the synchronous data identification process is as follows:
  • the server adds the data information to the corresponding data stored in the server.
  • the server obtains the third data, and the server returns the third data to the mobile terminal, and the mobile terminal updates the first data according to the third data to implement data synchronization.
  • the first data is synchronized with the third data.
  • the mobile terminal stores the data number and data feature information of the first data after the synchronization is completed as the second data.
  • the data synchronization method of the embodiment of the present invention based on the data number and the data feature information, obtains the current requirement Synchronized data, complete synchronization of local and server data.
  • the method solves the problem that the synchronization client can accurately find the data that needs to participate in synchronization without the data operation log, and has the advantages of quickness, real-time, high efficiency and applicability.
  • Any process or method description in the flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a particular logical function or process.
  • a "computer-readable medium” can be any apparatus that can contain, store, communicate, propagate, or transport a program for use in an instruction execution system, apparatus, or apparatus, or in conjunction with such an instruction execution system, apparatus, or apparatus. More specific examples (non-exhaustive list) of computer readable media include the following: electrical connections (electronic devices) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM).
  • the computer readable medium may even be a paper or other suitable medium on which the program can be printed, as it may be optically scanned, for example by paper or other medium, followed by editing, interpretation or, if appropriate, other suitable The method proceeds to obtain the program electronically and then store it in computer memory.
  • portions of the invention may be implemented in hardware, software, firmware or a combination thereof.
  • multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
  • each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
  • the above-mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention provides a data synchronization method, comprising the following steps: acquiring to-be-synchronized first data; determining, based on a data serial number and data characteristic information, whether data information that comprises at least one of the data serial number and the data characteristic information and is different from any data information in the other one of the first data and second data exists in the first data and the second data; and when it is determined that different data information exists in the first data and the second data, sending the determined different data information to a server, so as to synchronously update corresponding data stored in the server, to obtain third data after current synchronization processing. This method solves a problem that a synchronization client can accurately find to-be-synchronized data in the case of having no data operation log, which has the advantages of convenience, instantaneity, high efficiency, and applicability. Further disclosed are a data synchronization apparatus and a data synchronization system.

Description

一种数据同步方法、 装置及系统  Data synchronization method, device and system
本申请要求于 2013年 4月 24日提交中国专利局、 申请号为 201310147019.4、发 明名称为 "一种数据同步方法、 装置及系统"的中国专利申请的优先权, 其全部内容 通过引用结合在本申请中。 技术领域 本发明涉及通讯信息技术领域, 特别涉及一种数据同步方法、 装置及系统。 背景技术 The present application claims priority to Chinese Patent Application No. 201310147019.4, entitled "A Data Synchronization Method, Apparatus and System", filed on April 24, 2013, the entire contents of which is incorporated herein by reference. In the application. The present invention relates to the field of communication information technologies, and in particular, to a data synchronization method, apparatus, and system. Background technique
目前, 识别出哪些数据需要参与同步, 采用的都是日志管理, 且对相同数据的 操作不具有合并的功能, 会导致很多无谓的操作, 造成系统数据的低效。  At present, the identification of which data needs to participate in synchronization, the use of log management, and the operation of the same data does not have a merge function, which will lead to many unnecessary operations, resulting in inefficient system data.
具体地, 对于需要同步的客户端来说, 大多数为手机, 而手机的处理能力, 无 论是手机内存, 手机 10等都比较一般, 如果按照未对相同数据的操作合并的功能的 此种日志管理模式, 每条操作都记录对应的日志管理, 由此将给客户端的系统造成比 较大的负担, 用户手机运行缓慢, 电量消耗大, 反应缓慢, 让用户很难接受, 同时, 由于客户端记录的每条操作最终都要同步到服务器 (服务器同理), 那么无疑增加了 服务器运算和处理的负荷, 因此也会拖长整个同步的过程。这对于移动互联网多变的 网络而言, 会导致同步失败的风险变高。  Specifically, for the client that needs to be synchronized, most of them are mobile phones, and the processing power of the mobile phone, whether it is mobile phone memory or mobile phone 10, is relatively general, if such a log is combined according to the function of not combining the operations of the same data. Management mode, each operation records the corresponding log management, which will cause a relatively large burden on the client's system. The user's mobile phone runs slowly, the power consumption is large, the response is slow, and it is difficult for users to accept. At the same time, due to the client record Each operation is eventually synchronized to the server (the server is the same), which undoubtedly increases the load on the server operation and processing, and therefore prolongs the entire synchronization process. This can lead to a higher risk of synchronization failure for a mobile Internet.
进一步地, 移动互联网网络复杂多变, 也受流量的制约。 而如果无谓操作的增 多, 那么最终数据包里面也必然存在许多冗余的数据, 这势必会导致数据包较大, 消 耗用户宝贵的手机流量。从另一个角度来说, 如果即便合并日志的方案有了很好的优 化, 但是也不能回避一个问题, 本质上都要求客户端能捕获数据的操作, 并完成日志 的记录。 比如, 用户在手机上修改了一条通讯录, 那么这时候就要求在手机上产生一 条符合同步要求的日志。而且很显然通讯录是属于手机系统的, 而并不属于同步系统 的客户端。因此用户在手机上修改一条通讯录时,手机并不会产生一条符合同步要求 的日志。 没有日志, 日志管理和日志合并就无从谈起。 因为, 如果同步客户端要同步 不属于同步客户端本身的数据, 同步客户端将无法进行日志管理和日志合并,缺乏灵 活性与可操作性。 发明内容 Further, the mobile Internet network is complex and variable, and is also subject to traffic restrictions. If there is an increase in unnecessary operations, then there will be a lot of redundant data in the final data packet, which will inevitably lead to a larger data packet and consume the user's valuable mobile phone traffic. On the other hand, if the scheme of merging logs is well optimized, it cannot avoid a problem. Essentially, the client is required to capture data operations and complete log records. For example, if the user modifies an address book on the mobile phone, then it is required to generate a log matching the synchronization requirement on the mobile phone. And it is clear that the address book belongs to the mobile phone system, and does not belong to the client of the synchronization system. Therefore, when the user modifies an address book on the mobile phone, the mobile phone does not generate a log that meets the synchronization requirements. Without logs, log management and log consolidation are impossible to talk about. Because, if the sync client wants to synchronize data that is not part of the sync client itself, the sync client will not be able to log management and log merge, lacking flexibility and operability. Summary of the invention
本发明的目的旨在至少解决所述技术缺陷之一。  It is an object of the invention to at least address one of the technical drawbacks.
为此, 本发明的一个目的在于提出一种数据同步方法, 该方法解决了同步客户 端在没有数据操作日志的情况下, 也能准确找出需要参与同步的数据的问题, 且具有 快捷性、实时性、高效性与适用性。本发明的第二个目的在于提出一种数据同步装置。 本发明的第三个目的在于提出一种数据同步系统。  Therefore, an object of the present invention is to provide a data synchronization method, which solves the problem that the synchronization client can accurately find the data that needs to participate in synchronization without the data operation log, and has the shortcut, Real-time, efficient and adaptable. A second object of the present invention is to provide a data synchronizing apparatus. A third object of the present invention is to propose a data synchronization system.
为了实现上述目的, 本发明第一方面的实施例提供了一种数据同步方法, 包括 以下步骤: 获取要被同步的第一数据, 以及获取第二数据, 其中, 所述第二数据依据 上次同步处理的同步结果得到,所述第一数据中数据信息至少包括数据编号、数据内 容和数据特征信息; 所述第二数据中数据信息至少包括数据编号和数据特征信息; 根据数据编号和数据特征信息, 判断第一数据和第二数据中是否存在不同的数 据信息,如果在第一数据和第二数据的一个数据中存在至少一个数据信息所包含的数 据编号和数据特征信息中至少一项,与第一数据和第二数据的另一个数据中的任意数 据信息所包含的对应信息不相同, 确定第一数据和第二数据中存在不同的数据信息; 当判断出第一数据和第二数据存在不同的数据信息时, 将判断出的所述不同的 数据信息发送到服务器, 以对服务器所存储的对应数据进行同步更新。  In order to achieve the above object, an embodiment of the first aspect of the present invention provides a data synchronization method, including the steps of: acquiring first data to be synchronized, and acquiring second data, wherein the second data is based on a last time The synchronization result of the synchronization process is obtained, wherein the data information in the first data includes at least a data number, a data content, and data feature information; and the data information in the second data includes at least a data number and data feature information; according to the data number and the data feature Determining whether there is different data information in the first data and the second data, if at least one of the data number and the data feature information included in the at least one data information exists in one of the first data and the second data, Different from the corresponding information included in any of the first data and the second data, determining that different data information exists in the first data and the second data; when determining the first data and the second data The different data information that will be judged when there is different data information Send to the server to synchronize the corresponding data stored by the server.
结合第一方面, 在第一方面的第一种可能的实施方式中, 所述数据特征信息是 基于该数据消息的数据内容、时间戳信息和数据长度信息中至少之一确定的唯一标识 信息。  In conjunction with the first aspect, in a first possible implementation of the first aspect, the data feature information is unique identification information determined based on at least one of data content, timestamp information, and data length information of the data message.
结合第一方面, 在第一方面的第二种可能的实施方式中, 所述服务器同步更新 相应的数据, 包括: 当第二数据中的数据信息不包含第一数据中的数据信息所具有的数据编号时, 将第一数据中的所述数据编号对应的数据信息增加到所述服务器存储的对应数据中。  With reference to the first aspect, in a second possible implementation manner of the first aspect, the that the server synchronously updates the corresponding data includes: when the data information in the second data does not include the data information in the first data When the data is numbered, the data information corresponding to the data number in the first data is added to the corresponding data stored by the server.
结合第一方面, 在第一方面的第三种可能的实施方式中, 所述服务器同步更新 相应的数据, 包括: 当第一数据和第二数据中存在数据编号相同但数据特征信息不同的数据信息 时,利用第一数据中的所述数据编号对应的数据信息替换所述服务器存储的对应数据 中具有相同数据编号的数据信息。 结合第一方面, 在第一方面的第四种可能的实施方式中, 所述服务器同步更新 相应的数据, 包括: 当第一数据中数据信息不包含第二数据中数据信息所具有的数据编号时, 从所 述服务器存储的对应数据中删除所述数据编号对应的数据信息。 With reference to the first aspect, in a third possible implementation manner of the first aspect, the server, when the corresponding data is updated by the server, includes: when the first data and the second data have data with the same data number but different data feature information In the information, the data information corresponding to the data number in the first data is replaced with the data information having the same data number in the corresponding data stored by the server. With reference to the first aspect, in a fourth possible implementation manner of the first aspect, the server, when the corresponding data is updated by the server, includes: when the data information in the first data does not include the data number of the data information in the second data And deleting the data information corresponding to the data number from the corresponding data stored by the server.
结合第一方面及第一方面的第一种可能的实施方式至第一方面的第四种可能的 实施方式中的任意一种,在第一方面的第五种可能的实施方式中,对服务器所存储的 对应数据进行同步更新, 得到当前同步处理后的第三数据, 所述方法还包括: 利用服 务器返回的当前同步处理的第三数据同步更新第一数据。 结合第一方面, 在第一方面的第六种可能的实施方式中, 所述方法还包括: 根 据服务器返回的第三数据中数据信息的数据编号及数据特征信息, 生成第二数据。 根据本发明实施例的数据同步方法, 基于数据编号和数据特征信息, 得出本次 需要同步的数据, 完成本地和服务器数据的同步化。该方法解决了同步客户端在没有 数据操作日志的情况下, 也能准确找出需要参与同步的数据的问题, 具有快捷性、 实 时性、 高效性与适用性。 第二方面, 本发明还提供一种数据同步装置, 包括:  In combination with the first aspect and the first possible implementation of the first aspect to any one of the fourth possible implementations of the first aspect, in a fifth possible implementation of the first aspect, the server The stored corresponding data is synchronously updated to obtain the third data after the current synchronization process, and the method further includes: synchronously updating the first data by using the third data of the current synchronization process returned by the server. With reference to the first aspect, in a sixth possible implementation manner of the first aspect, the method further includes: generating the second data according to the data number and the data feature information of the data information in the third data returned by the server. According to the data synchronization method of the embodiment of the present invention, based on the data number and the data feature information, the data that needs to be synchronized is obtained, and the synchronization of the local and server data is completed. The method solves the problem that the synchronization client can accurately find the data that needs to participate in synchronization without the data operation log, and has the advantages of quickness, real time, high efficiency and applicability. In a second aspect, the present invention further provides a data synchronization apparatus, including:
获取单元, 用于获取要被同步的第一数据, 以及获取第二数据; 其中, 所述第 一数据中数据信息的数据结构至少包括数据编号、数据内容和数据特征信息; 所述第 二数据依据上次同步处理的同步结果得到,第二数据中数据信息至少包括数据编号和 数据特征信息;  An acquiring unit, configured to acquire first data to be synchronized, and obtain second data; wherein, the data structure of the data information in the first data includes at least a data number, data content, and data feature information; Obtaining, according to the synchronization result of the last synchronization process, the data information in the second data includes at least the data number and the data feature information;
判断单元, 用于根据数据编号和数据特征信息, 判断所述第一数据和第二数据 中是否存在不同的数据信息,如果在第一数据和第二数据的任一个数据中存在至少一 个数据信息所包含的数据编号和数据特征信息中至少一项,与第一数据和第二数据中 的另一个数据中的任意数据信息所包含的对应信息不相同,确定第一数据和第二数据 中存在不同的数据信息;  a determining unit, configured to determine, according to the data number and the data feature information, whether different data information exists in the first data and the second data, if at least one data information exists in any one of the first data and the second data At least one of the included data number and the data characteristic information is different from the corresponding information included in any of the first data and the second data, and the first data and the second data are determined to exist. Different data information;
发送单元, 用于在判断出第一数据和第二数据中存在不同的数据信息时, 将所 判断出的不同的数据信息发送到服务器, 以对服务器所存储的对应数据进行同步更 新。  And a sending unit, configured to: when determining that different data information exists in the first data and the second data, send the determined different data information to the server, to perform synchronization update on the corresponding data stored by the server.
结合第二方面, 在第二方面的第一种可能的实施方式中, 所述装置还包括: 数据特征信息生成单元, 用于根据数据信息的数据内容、 时间戳信息和数据长 度信息中至少之一生成数据特征信息。 With reference to the second aspect, in a first possible implementation manner of the second aspect, the device further includes: a data feature information generating unit, configured to: according to the data content, the timestamp information, and the data length of the data information At least one of the degree information generates data feature information.
结合第二方面, 在第二方面的第二种可能的实施方式中, 所述装置还包括: 同步单元, 用于利用从服务器返回的经过当前同步处理后的第三数据, 同步更 新第一数据;所述第三数据由服务器根据移动终端发送的所述不同的数据同步更新相 应数据得到。 结合第二方面, 在第二方面的第三种可能的实施方式中, 所述装置还包括: 生成单元, 用于根据服务器返回的第三数据中数据信息的数据编号及数据特征 信息, 生成第二数据。 根据本发明实施例的数据同步装置, 基于数据编号和数据特征信息, 得出本次 需要同步的数据, 完成本地和服务器数据的同步化。该装置解决了同步客户端在没有 数据操作日志的情况下, 也能准确找出需要参与同步的数据的问题, 具有快捷性、 实 时性、 高效性与适用性。 第三方面, 本发明还提供一种数据同步系统, 包括:  With reference to the second aspect, in a second possible implementation of the second aspect, the device further includes: a synchronization unit, configured to synchronously update the first data by using the third data that has been processed by the current synchronization returned from the server The third data is obtained by the server synchronously updating the corresponding data according to the different data sent by the mobile terminal. With reference to the second aspect, in a third possible implementation of the second aspect, the device further includes: a generating unit, configured to generate, according to the data number and data feature information of the data information in the third data returned by the server Two data. According to the data synchronization apparatus of the embodiment of the present invention, based on the data number and the data feature information, the data that needs to be synchronized is obtained, and the synchronization of the local and server data is completed. The device solves the problem that the synchronization client can accurately find the data that needs to participate in synchronization without the data operation log, and has the advantages of quickness, real time, high efficiency and applicability. In a third aspect, the present invention further provides a data synchronization system, including:
移动终端, 包括第二方面所提供的任何一个所述的数据同步装置; 以及, 服务器, 用于利用接收终端发送的数据信息, 对所述服务器中存储的对应数据 进行同步更新。 根据本发明实施例的数据同步系统, 基于数据编号和数据特征信息, 得出本次 需要同步的数据, 完成本地和服务器数据的同步化。该系统解决了同步客户端在没有 数据操作日志的情况下, 也能准确找出需要参与同步的数据的问题, 具有快捷性、 实 时性、 高效性与适用性。 第四方面,本发明还提供一种具有处理器可执行的程序代码的计算机可读介质, 应用于移动终端, 所述程序代码使处理器执行下述步骤: 获取要被同步的第一数据, 以及获取第二数据; 所述第一数据中数据信息至少 包括数据编号、数据内容和数据特征信息; 第二数据依据上次同步处理的同步结果生 成, 所述第二数据中数据信息至少包括数据编号和数据特征信息; 根据数据编号和数据特征信息, 判断第一数据和第二数据中是否存在不同的数 据信息,如果第一数据和第二数据的一个数据中存在至少一个数据信息所包含的数据 编号和数据特征信息中至少一项,与第一数据和第二数据中的另一个数据中的任意数 据信息所包含的对应信息不相同, 确定第一数据和第二数据中存在不同的数据信息; 当判断出第一数据和第二数据存在不同的数据信息时, 将判断出的所述不同的 数据信息发送到服务器, 以对服务器所存储的对应数据进行同步更新。 The mobile terminal includes any one of the data synchronization devices provided by the second aspect; and the server is configured to perform synchronous update on the corresponding data stored in the server by using the data information sent by the receiving terminal. According to the data synchronization system of the embodiment of the present invention, based on the data number and the data feature information, the data that needs to be synchronized is obtained, and the synchronization of the local and server data is completed. The system solves the problem that the synchronization client can accurately find the data that needs to participate in synchronization without the data operation log, and has the advantages of quickness, real-time, high efficiency and applicability. In a fourth aspect, the present invention further provides a computer readable medium having program code executable by a processor, which is applied to a mobile terminal, the program code causing the processor to perform the following steps: acquiring first data to be synchronized, And acquiring the second data; the data information in the first data includes at least a data number, a data content, and data feature information; the second data is generated according to a synchronization result of the last synchronization process, where the data information in the second data includes at least data Number and data feature information; determining, according to the data number and the data feature information, whether different data information exists in the first data and the second data, if at least one data information is included in one of the first data and the second data At least one of the data number and the data characteristic information, and any one of the other of the first data and the second data According to different information included in the information, it is determined that different data information exists in the first data and the second data; when it is determined that different data information exists in the first data and the second data, the different The data information is sent to the server to synchronously update the corresponding data stored by the server.
本发明附加的方面和优点将在下面的描述中部分给出, 部分将从下面的描述中 变得明显, 或通过本发明的实践了解到。 附图说明  The additional aspects and advantages of the invention will be set forth in part in the description which follows. DRAWINGS
本发明的上述和 /或附加的方面和优点从结合下面附图对实施例的描述中将变得 明显和容易理解, 其中: 图 1为根据本发明实施例的数据同步方法的流程图;  The above and/or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments of the accompanying claims
图 2为发明实施例的数据同步装置的结构示意图; 图 3为根据本发明实施例的数据同步系统的结构示意图;  2 is a schematic structural diagram of a data synchronization apparatus according to an embodiment of the present invention; and FIG. 3 is a schematic structural diagram of a data synchronization system according to an embodiment of the present invention;
图 4为根据本发明实施例的数据同步方法的具体流程图。 具体实施方式  FIG. 4 is a specific flowchart of a data synchronization method according to an embodiment of the present invention. detailed description
下面详细描述本发明的实施例, 所述实施例的示例在附图中示出, 其中自始至 终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过 参考附图描述的实施例是示例性的, 旨在用于解释本发明, 而不能理解为对本发明的 限制。  The embodiments of the present invention are described in detail below, and the examples of the embodiments are illustrated in the drawings, wherein the same or similar reference numerals are used to refer to the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the drawings are intended to be illustrative of the invention and are not to be construed as limiting.
在本发明中, 除非另有明确的规定和限定, 术语"安装"、 "相连"、 "连接"、 "固 定"等术语应做广义理解, 例如, 可以是固定连接, 也可以是可拆卸连接, 或一体地 连接; 可以是机械连接, 也可以是电连接; 可以是直接相连, 也可以通过中间媒介间 接相连, 可以是两个元件内部的连通。对于本领域的普通技术人员而言, 可以根据具 体情况理解上述术语在本发明中的具体含义。  In the present invention, the terms "installation", "connected", "connected", "fixed" and the like should be understood broadly, and may be either a fixed connection or a detachable connection, unless otherwise explicitly stated and defined. , or connected integrally; can be mechanical or electrical; can be directly connected, or indirectly connected through an intermediate medium, can be the internal communication of the two components. The specific meaning of the above terms in the present invention can be understood by those skilled in the art according to specific circumstances.
此外, 术语 "第一"、 "第二"仅用于描述目的, 而不能理解为指示或暗示相对 重要性或者隐含指明所指示的技术特征的数量。 由此, 限定有 "第一"、 "第二"的特 征可以明示或者隐含地包括一个或者更多个该特征。 在本发明的描述中, "多个" 的 含义是两个或两个以上, 除非另有明确具体的限定。  Moreover, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, features defining "first", "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, "a plurality" means two or more, unless specifically defined otherwise.
如图 1所示, 本发明实施例的数据同步方法的流程图, 包括如下步骤: 步骤 S101为获取要被同步的第一数据; As shown in FIG. 1, a flowchart of a data synchronization method according to an embodiment of the present invention includes the following steps: Step S101 is to acquire first data to be synchronized;
步骤 S102为基于数据编号和数据特征信息,判断第一数据和第二数据是否存在 不同的数据信息;如果在第一数据和第二数据的任一个数据中存在至少一个数据信息 所包含的数据编号和数据特征信息中至少之一,与第一数据和第二数据中的另一个数 据的任意数据信息所包含的对应信息均不相同,则确定第一数据和第二数据中存在不 同的数据信息。也即, 如果第一数据中存在所包含的数据编号和数据特征信息中至少 之一, 与第二数据中的任意数据信息所包含的对应信息均不相同,确定第一数据中存 在与第二数据不同的数据信息;如果第二数据中存在所包含的数据编号和数据特征信 息中至少之一, 与第一数据中的任意数据信息所包含的对应信息均不相同,确定第二 数据中存在与第一数据不同的数据信息。 步骤 S103为在判断出第一数据和第二数据中存在不同的数据信息时,将判断出 的所述不同的数据信息发送到服务器。  Step S102 is to determine whether the first data and the second data have different data information based on the data number and the data feature information; if there is at least one data information included in the data of the first data and the second data Determining that at least one of the data and the data characteristic information is different from the corresponding information included in the arbitrary data information of the other data of the first data and the second data, determining that different data information exists in the first data and the second data . That is, if at least one of the included data number and the data feature information exists in the first data, and the corresponding information included in any data information in the second data is different, determining the presence and the second in the first data Different data information of the data; if at least one of the included data number and the data feature information exists in the second data, and the corresponding information included in any data information in the first data is different, determining that the second data exists Data information different from the first data. Step S103 is: when it is determined that different data information exists in the first data and the second data, the determined different data information is sent to the server.
步骤 S104为对服务器中存储的对应数据进行同步更新,从而获得当前同步处理 后的第三数据。  Step S104 is to perform synchronous update on the corresponding data stored in the server, so as to obtain the third data after the current synchronization processing.
在本发明的一个实施例中, 第一数据和第三数据中的数据信息的数据结构至少 包括数据编号、数据内容与数据特征信息, 以及第二数据是基于上次数据同步处理后 获得的第三数据生成的,第二数据中的数据信息的数据结构至少包括数据编号和数据 特征信息。 在本发明的一个实施例中, 数据特征信息是基于该数据消息的数据内容、 时间 戳信息和数据长度信息中至少之一确定的唯一标识信息。 由此,提高了数据特征信息 的唯一性与准确性。 在本发明的一个实施例中, 对服务器中存储的对应数据进行同步更新来获得当 前同步处理后的第三数据包括: 在所判断出的不同数据信息来自第一数据且所具有的数据编号在第二数据中不 存在时, 将该数据信息增加到服务器中存储的对应数据中。 在本发明的一个实施例中, 对服务器中存储的对应数据进行同步更新来获得当 前同步处理后的第三数据包括: 在所判断出的不同数据信息来自第一数据, 并且在第二数据中存在所具有的数 据编号相同但数据特征信息不同的数据信息时,利用该不同的数据信息替换服务器中 存储的对应数据中具有相同数据编号的数据信息。 In an embodiment of the present invention, the data structure of the data information in the first data and the third data includes at least a data number, data content, and data feature information, and the second data is obtained based on the last data synchronization process. The data structure of the data information generated by the third data includes at least a data number and data feature information. In an embodiment of the invention, the data feature information is unique identification information determined based on at least one of data content, timestamp information, and data length information of the data message. Thereby, the uniqueness and accuracy of the data feature information is improved. In an embodiment of the present invention, the synchronous updating of the corresponding data stored in the server to obtain the third data after the current synchronization processing includes: the different data information determined from the first data and having the data number When the second data does not exist, the data information is added to the corresponding data stored in the server. In an embodiment of the present invention, performing synchronous update on the corresponding data stored in the server to obtain the third data after the current synchronization process includes: the different data information determined from the first data, and in the second data When there is data information having the same data number but different data characteristic information, the server data is replaced by the different data information. The stored data has the same data number in the corresponding data.
在本发明的一个实施例中, 对服务器中存储的对应数据进行同步更新来获得当 前同步处理后的第三数据包括: 在所判断出的不同数据信息来自第二数据且所具有的数据编号在第一数据中不 存在时, 从服务器中存储的对应数据中删除具有相同数据编号的数据信息。 在本发明的一个实施例中, 利用从服务器返回的经过当前同步处理后的第三数 据同步第一数据; 以及基于所返回的第三数据生成第二数据。  In an embodiment of the present invention, the synchronous updating of the corresponding data stored in the server to obtain the third data after the current synchronization processing includes: the different data information determined from the second data and having the data number When the first data does not exist, the data information having the same data number is deleted from the corresponding data stored in the server. In one embodiment of the present invention, the first data is synchronized using the third data after the current synchronization process returned from the server; and the second data is generated based on the returned third data.
在本发明的一个实施例中, 第一数据、 第二数据和第三数据中的数据信息可能 是多条也可能是 0条。 根据本发明实施例的数据同步方法, 基于数据编号和数据特征信息, 得出本次 需要同步的数据, 完成本地和服务器数据的同步化。该方法解决了同步客户端在没有 数据操作日志的情况下, 也能准确找出需要参与同步的数据的问题, 具有快捷性、 实 时性、 高效性与适用性。  In an embodiment of the present invention, the data information in the first data, the second data, and the third data may be a plurality of pieces or may be 0 pieces. According to the data synchronization method of the embodiment of the present invention, based on the data number and the data feature information, the data that needs to be synchronized is obtained, and the synchronization of the local and server data is completed. The method solves the problem that the synchronization client can accurately find the data that needs to participate in synchronization without the data operation log, and has the advantages of quickness, real time, high efficiency and applicability.
图 2为根据本发明实施例的数据同步装置 20的结构示意图。  2 is a block diagram showing the structure of a data synchronizing apparatus 20 according to an embodiment of the present invention.
本发明实施例的数据同步装置 20包括: 获取单元 201, 用于获取要被同步的第 一数据; 判断单元 202, 用于基于数据编号和数据特征信息, 判断在第一数据和第二 数据是否存在不同的数据信息;如果第一数据和第二数据的一个数据中是否存在所包 含的数据编号和数据特征信息中至少之一,与第一数据和第二数据的另一个数据中的 任何数据信息所包含的对应信息均不相同,确定第一数据和第二数据中存在不同的数 据信息;发送单元 203,用于在判断出第一数据和第二数据中存在不同的数据信息时, 将所判断出的不同数据信息发送到服务器,以对服务器中存储的对应数据进行同步更 新, 获得当前同步处理后的第三数据; 以及生成单元 204, 用于基于上次数据同步处 理后获得的第三数据生成第二数据。  The data synchronization device 20 of the embodiment of the present invention includes: an obtaining unit 201, configured to acquire first data to be synchronized; and a determining unit 202, configured to determine, according to the data number and the data feature information, whether the first data and the second data are There is different data information; if at least one of the included data number and the data feature information exists in one of the first data and the second data, and any data in the other data of the first data and the second data The corresponding information included in the information is different, and it is determined that different data information exists in the first data and the second data; and the sending unit 203 is configured to: when determining that different data information exists in the first data and the second data, The determined different data information is sent to the server to synchronously update the corresponding data stored in the server to obtain the third data after the current synchronization processing; and a generating unit 204 is configured to obtain the first data after the last data synchronization processing The third data generates the second data.
在本发明的一个实施例中,数据同步装置 20还包括数据特征信息生成单元 205, 用于基于该数据消息的数据内容、时间戳信息和数据长度信息中至少之一生成数据特 征信息。  In an embodiment of the present invention, the data synchronization device 20 further includes a data feature information generating unit 205 for generating data feature information based on at least one of data content, time stamp information, and data length information of the data message.
在本发明的一个实施例中, 数据同步装置 20还包括同步单元 206, 用于利用从 服务器返回的经过当前同步处理后的第三数据同步第一数据。 根据本发明实施例的数据同步装置, 基于数据编号和数据特征信息, 得出本次 需要同步的数据, 完成本地和服务器数据的同步化。该装置解决了同步客户端在没有 数据操作日志的情况下, 也能准确找出需要参与同步的数据的问题, 具有快捷性、 实 时性、 高效性与适用性。 In an embodiment of the present invention, the data synchronization device 20 further includes a synchronization unit 206 for synchronizing the first data with the third data after the current synchronization process returned from the server. A data synchronization apparatus according to an embodiment of the present invention, based on a data number and data feature information, Synchronize data and complete synchronization of local and server data. The device solves the problem that the synchronization client can accurately find the data that needs to participate in synchronization without the data operation log, and has the advantages of quickness, real-time, high efficiency and applicability.
图 3为根据本发明实施例的数据同步系统 30。  FIG. 3 is a data synchronization system 30 in accordance with an embodiment of the present invention.
本发明实施例的数据同步系统 30包括: 移动终端 301, 包括数据同步装置 20; 以及服务器 302, 用于利用所接收的不同数据信息, 对服务器中存储的对应数据进行 同步更新来获得当前同步处理后的第三数据。  The data synchronization system 30 of the embodiment of the present invention includes: a mobile terminal 301, including a data synchronization device 20; and a server 302, configured to synchronously update corresponding data stored in the server by using the received different data information to obtain current synchronization processing. After the third data.
在本发明的一个实施例中,服务器 302接收数据同步装置 20的发送单元 203发 送的不同数据信息后,对服务器 302中存储的对应数据进行同步更新来获得当前同步 处理后的第三数据, 并将经过当前同步处理后的第三数据返回给数据同步装置 20, 以便于数据同步装置 20的同步单元 206对第一数据进行同步, 达到第一数据与第三 数据一致的目的。 根据本发明实施例的数据同步系统, 基于数据编号和数据特征信息, 得出本次 需要同步的数据, 完成本地和服务器数据的同步化。该系统解决了同步客户端在没有 数据操作日志的情况下, 也能准确找出需要参与同步的数据的问题, 具有快捷性、 实 时性、 高效性与适用性。  In an embodiment of the present invention, after receiving the different data information sent by the sending unit 203 of the data synchronization device 20, the server 302 performs synchronous update on the corresponding data stored in the server 302 to obtain the third data after the current synchronization processing, and The third data after the current synchronization processing is returned to the data synchronization device 20, so that the synchronization unit 206 of the data synchronization device 20 synchronizes the first data to achieve the purpose that the first data is consistent with the third data. According to the data synchronization system of the embodiment of the present invention, based on the data number and the data feature information, the data that needs to be synchronized is obtained, and the synchronization of the local and server data is completed. The system solves the problem that the synchronization client can accurately find out the data that needs to participate in synchronization without the data operation log, and has the advantages of quickness, real time, high efficiency and applicability.
如图 4所示, 为实现数据同步方法的具体流程图。  As shown in FIG. 4, a specific flowchart for implementing the data synchronization method.
步骤 S401为发起数据同步请求。 发起数据同步请求可以是由用户的操作来触发的, 也可以是由移动终端 301或 服务器 302按照预定的时间周期定期自动发起的。 步骤 S402为获取单元 201获取要被同步的第一数据。 第一数据是从移动终端 301本地获取。  Step S401 is to initiate a data synchronization request. Initiating the data synchronization request may be triggered by the user's operation, or may be automatically initiated by the mobile terminal 301 or the server 302 periodically according to a predetermined time period. Step S402 acquires the first data to be synchronized for the obtaining unit 201. The first data is obtained locally from the mobile terminal 301.
步骤 S403为基于数据编号和数据特征信息,判断在第一数据和第二数据中是否 存在不同的数据信息;如果第一数据和第二数据的一个数据中存在所包含的数据编号 和数据特征信息中至少之一,与第一数据和第二数据的另一个数据中的任何数据信息 所包含的对应信息均不相同, 确定第一数据和第二数据存在不同的数据信息。  Step S403 is to determine whether there is different data information in the first data and the second data based on the data number and the data feature information; if the data number and the data feature information are included in one of the first data and the second data At least one of the first data and the other information in the other data of the first data and the second data are different, and it is determined that the first data and the second data have different data information.
在本发明的一个实施例中, 第一数据和第三数据中的数据信息的数据结构至少 包括数据编号、数据内容与数据特征信息, 以及第二数据是基于上次数据同步处理后 获得的第三数据生成的,第二数据中的数据信息的数据结构至少包括数据编号和数据 特征信息。 在本发明的一个实施例中, 数据特征信息是基于该数据消息的数据内容、 时间 戳信息和数据长度信息中至少之一确定的唯一标识信息。数据特征信息将该数据消息 的数据内容、 时间戳信息和数据长度信息中至少之一根据特定公式来进行计算得到 的。 在本发明的一个实施例中, 第一数据、 第二数据、 和第三数据中的数据信息可 能是多条也可能是 0条。 具体地, 是判断在第一数据中是否存在所包含的数据编号和数据特征信息中至 少之一与第二数据中的任何数据信息不同的数据信息,以及判断在第二数据中是否存 在所包含的数据编号和数据特征信息中至少之一与第一数据中的任何数据信息不同 的数据信息。 In an embodiment of the present invention, the data structure of the data information in the first data and the third data includes at least a data number, data content, and data feature information, and the second data is based on the last data synchronization process. The data structure of the data information in the second data generated by the obtained third data includes at least a data number and data feature information. In an embodiment of the invention, the data feature information is unique identification information determined based on at least one of data content, timestamp information, and data length information of the data message. The data feature information is calculated by calculating at least one of data content, time stamp information, and data length information of the data message according to a specific formula. In an embodiment of the present invention, the data information in the first data, the second data, and the third data may be a plurality of pieces or may be 0 pieces. Specifically, it is determined whether there is data information in the first data that is different from at least one of the included data number and the data feature information and any data information in the second data, and whether the presence or absence of the second data includes At least one of the data number and the data characteristic information is different from the data information of any of the first data.
步骤 S404 为判断出的不同数据信息来自第一数据且所具有的数据编号在第二 数据中不存在时,服务器将该数据编号对应的数据信息增加到服务器存储的对应数据 中。 步骤 S405为判断出的不同数据信息来自第一数据,并且在第二数据中存在所具 有的数据编号相同但数据特征信息不同的数据信息时,利用第一数据中的所述数据编 号对应的数据信息替换服务器存储的对应数据中具有相同数据编号的数据信息。  Step S404: When the determined different data information is from the first data and the data number has no data in the second data, the server adds the data information corresponding to the data number to the corresponding data stored by the server. In step S405, when the determined different data information is from the first data, and the data information having the same data number but different data feature information exists in the second data, the data corresponding to the data number in the first data is used. The information replaces the data information having the same data number in the corresponding data stored by the server.
步骤 S406 为判断出的不同数据信息来自第二数据且所具有的数据编号在第一 数据中不存在时, 从服务器存储的对应数据中删除所述数据编号对应的数据信息。  Step S406: If the determined different data information is from the second data and the data number that is included does not exist in the first data, the data information corresponding to the data number is deleted from the corresponding data stored by the server.
步骤 S407为服务器 302将同步处理后的第三数据返回给移动终端 301。  Step S407: The server 302 returns the third data after the synchronization processing to the mobile terminal 301.
步骤 S408为移动终端 301根据返回的第三数据同步第一数据。 步骤 S409为根据同步后的第一数据的数据编号和数据特征信息生成第二数据。 具体地, 移动终端将本次同步完成后的第一数据的数据编号和数据特征信息存 储下来作为第二数据,以便第一数据下次进行同步时根据第二数据来识别出需要进行 数据同步的数据信息。  Step S408: The mobile terminal 301 synchronizes the first data according to the returned third data. Step S409 is to generate second data according to the data number of the first data after synchronization and the data feature information. Specifically, the mobile terminal stores the data number and the data feature information of the first data after the synchronization is completed as the second data, so that when the first data is synchronized next time, the data needs to be synchronized according to the second data. Data information.
进一步地, 以同步 android系统手机通讯录为例进行说明识别需要同步的数据的 过程。 手机通讯录中的数据为第一数据,每条通讯录数据在 android系统手机通讯录中 都有唯一的数据编号 DATAID, 以及数据内容 DATE和数据特征信息 FP。 实例一: Further, a process of identifying data that needs to be synchronized is described by taking a synchronous android system mobile phone address book as an example. The data in the mobile phone address book is the first data, and each address book data has a unique data number DATAID in the android system mobile phone address book, and the data content DATE and the data feature information FP. Example 1:
假设以前从未进行过数据同步, 此时第二数据为空。 此 第一数据的数据结构:  Assume that data synchronization has never been done before, and the second data is empty. The data structure of this first data:
Figure imgf000012_0001
Figure imgf000012_0001
第二数据的数据结构:
Figure imgf000012_0002
The data structure of the second data:
Figure imgf000012_0002
同步数据识别过程如下:  The synchronous data identification process is as follows:
这时候对数据编号 DATAID和数据特征信息 FP在第一数据和第二数据中一一查 找并核对, 发现在第二数据中都找不到 dataid=l或 dataid=2或 dataid=3的数据, 即可 得出结论: 手机通讯录中 dataid=l、 dataid=2和 dataid=3的 3条数据都要参与同步, 手机的数据同步装置将这 3条数据信息发给服务器,服务器在服务器中存储的对应数 据中增加这 3条数据信息, 得到第三数据。 服务器将第三数据返回给移动终端, 移动终端根据第三数据更新第一数据以实 现数据同步。第一数据同步后与第三数据一致。移动终端将本次同步完成后的第一数 据的数据编号和数据特征信息存储下来作为第二数据。 实例二:  At this time, the data number DATAID and the data feature information FP are searched and checked one by one in the first data and the second data, and it is found that data of dataid=l or dataid=2 or dataid=3 cannot be found in the second data. It can be concluded that the three data of dataid=l, dataid=2 and dataid=3 in the mobile phone address book must participate in synchronization, and the data synchronization device of the mobile phone sends the three pieces of data information to the server, and the server stores in the server. The three pieces of data information are added to the corresponding data to obtain the third data. The server returns the third data to the mobile terminal, and the mobile terminal updates the first data according to the third data to effect data synchronization. The first data is synchronized with the third data. The mobile terminal stores the data number and data feature information of the first data after the synchronization is completed as the second data. Example 2:
假设移动终端以前进行过数据同步, 此时, 第一数据的数据结构:  Assume that the mobile terminal has previously performed data synchronization. At this time, the data structure of the first data:
DATAID DATA FP  DATAID DATA FP
1 139139 2zvgSnlk6PBY37zTH94yy0EX 1 139139 2zvgSnlk6PBY37zTH94yy0EX
2 138139 3Bd5ii3ALxz0sPHQw3De58I 4 133131 3r20wR4sxrpgl iXk4Q2z5eEI2 138139 3Bd5ii3ALxz0sPHQw3De58I 4 133131 3r20wR4sxrpgl iXk4Q2z5eEI
5 0201234567 v9kB64o04GmhuFWvl4JqCL 第二数据的数据结构: 5 0201234567 v9kB64o04GmhuFWvl4JqCL The data structure of the second data:
Figure imgf000013_0001
Figure imgf000013_0001
同步数据识别过程如下:  The synchronous data identification process is as follows:
第一数据中的数据编号为 dataid=l 的数据信息可以在第二数据中找到, 且第一 数据中 dataid=l 的数据与第二数据中 dataid=l 的数据的数据特征信息一样, 都是 FP=2zvgSnlk6PBY37zTH94yy0EX, 故这条数据信息不用参与数据同步。 在第一数据和第二数据中都能找到数据编号 dataid=2的数据信息, 但是二者的 数据特征信息不一致, 第一数据 中 dataid=2 的数据信息对应的 fp=3Bd5ii3ALxzOsPHQw3De58I 第二数据中 dataid=2 的数据信息对应的 fp=lcAYTS3rtsPy3 AnXGlA26Zl , 所以这条数据要参与同步, 服务器利用第一数据中 dataid=2 的数据信息替换所述服务器中存储的对应数据中具有相同数据编号的数据 信息。  The data information with the data number of dataid=l in the first data can be found in the second data, and the data of dataid=l in the first data is the same as the data characteristic information of the data of dataid=l in the second data, FP=2zvgSnlk6PBY37zTH94yy0EX, so this data information does not need to participate in data synchronization. The data information of the data number dataid=2 can be found in both the first data and the second data, but the data feature information of the two data is inconsistent, and the data information corresponding to the data information of dataid=2 in the first data corresponds to the dataid of the second data in the second data. The data information of =2 corresponds to fp=lcAYTS3rtsPy3 AnXGlA26Zl, so this data is to participate in synchronization, and the server replaces the data information having the same data number in the corresponding data stored in the server by using the data information of dataid=2 in the first data.
第二数据中的数据编号为 dataid=3 的数据信息由于在第一数据中找不到与其数 据编号一致的 dataid=3的数据信息,所以这条数据要参与同步,服务器在服务器中存 储的对应数据中删除这条数据信息。  The data information in the second data whose data number is dataid=3 is not found in the first data, and the data information of dataid=3, which is consistent with the data number thereof, is to be synchronized, and the server stores the corresponding information in the server. This data information is deleted from the data.
第一数据中数据编号为 dataid=4的数据信息在第二数据中找不到, 故这条数据 信息要参与同步, 服务器在服务器中存储的对应数据中增加这条数据信息。  The data information whose data number is dataid=4 in the first data cannot be found in the second data, so the data information is to participate in synchronization, and the server adds the data information to the corresponding data stored in the server.
同样的, 第一数据中数据编号为 dataid=5 的数据信息在第二数据中找不到, 故 这条数据信息要参与同步, 服务器在服务器中存储的对应数据中增加这条数据信息。  Similarly, the data information whose data number is dataid=5 in the first data cannot be found in the second data, so the data information is to participate in synchronization, and the server adds the data information to the corresponding data stored in the server.
此时, 服务器得到第三数据, 服务器将第三数据返回给移动终端, 移动终端根 据第三数据更新第一数据以实现数据同步。第一数据同步后与第三数据一致。移动终 端将本次同步完成后的第一数据的数据编号和数据特征信息存储下来作为第二数据。  At this time, the server obtains the third data, and the server returns the third data to the mobile terminal, and the mobile terminal updates the first data according to the third data to implement data synchronization. The first data is synchronized with the third data. The mobile terminal stores the data number and data feature information of the first data after the synchronization is completed as the second data.
本发明实施例的数据同步方法, 基于数据编号和数据特征信息, 得出本次需要 同步的数据, 完成本地和服务器数据的同步化。该方法解决了同步客户端在没有数据 操作日志的情况下,也能准确找出需要参与同步的数据的问题,具有快捷性、实时性、 高效性与适用性。 流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为, 表示包 括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片 段或部分, 并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出 或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功 能, 这应被本发明的实施例所属技术领域的技术人员所理解。 在流程图中表示或在此以其他方式描述的逻辑和 /或步骤, 例如, 可以被认为是 用于实现逻辑功能的可执行指令的定序列表, 可以具体实现在任何计算机可读介质 中, 以供指令执行系统、 装置或设备(如基于计算机的系统、 包括处理器的系统或其 他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用, 或结合这些指 令执行系统、 装置或设备而使用。 就本说明书而言, "计算机可读介质"可以是任何可 以包含、 存储、 通信、 传播或传输程序以供指令执行系统、 装置或设备或结合这些指 令执行系统、装置或设备而使用的装置。 计算机可读介质的更具体的示例(非穷尽性 列表) 包括以下: 具有一个或多个布线的电连接部 (电子装置), 便携式计算机盘盒 (磁装置), 随机存取存储器(RAM), 只读存储器(ROM), 可擦除可编辑只读存储 器 (EPROM或闪速存储器), 光纤装置, 以及便携式光盘只读存储器 (CDROM)。 另外, 计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质, 因 为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他 合适方式进行处理来以电子方式获得所述程序, 然后将其存储在计算机存储器中。 The data synchronization method of the embodiment of the present invention, based on the data number and the data feature information, obtains the current requirement Synchronized data, complete synchronization of local and server data. The method solves the problem that the synchronization client can accurately find the data that needs to participate in synchronization without the data operation log, and has the advantages of quickness, real-time, high efficiency and applicability. Any process or method description in the flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a particular logical function or process. And the scope of the preferred embodiments of the present invention includes additional implementations, in which the functions may be performed in a substantially simultaneous manner or in the reverse order, depending on the order in which they are illustrated, or in the reverse order. It will be understood by those skilled in the art to which the embodiments of the present invention pertain. The logic and/or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer readable medium, Used in conjunction with, or in conjunction with, an instruction execution system, apparatus, or device (eg, a computer-based system, a system including a processor, or other system that can fetch instructions and execute instructions from an instruction execution system, apparatus, or device) Or use with equipment. For the purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport a program for use in an instruction execution system, apparatus, or apparatus, or in conjunction with such an instruction execution system, apparatus, or apparatus. More specific examples (non-exhaustive list) of computer readable media include the following: electrical connections (electronic devices) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM). In addition, the computer readable medium may even be a paper or other suitable medium on which the program can be printed, as it may be optically scanned, for example by paper or other medium, followed by editing, interpretation or, if appropriate, other suitable The method proceeds to obtain the program electronically and then store it in computer memory.
应当理解, 本发明的各部分可以用硬件、 软件、 固件或它们的组合来实现。 在 上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执 行的软件或固件来实现。 例如, 如果用硬件来实现, 和在另一实施方式中一样, 可用 本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻 辑功能的逻辑门电路的离散逻辑电路, 具有合适的组合逻辑门电路的专用集成电路, 可编程门阵列 (PGA), 现场可编程门阵列 (FPGA) 等。 本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步 骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存 储介质中, 该程序在执行时, 包括方法实施例的步骤之一或其组合。 此外, 在本发明各个实施例中的各功能单元可以集成在一个处理模块中, 也可 以是各个单元单独物理存在, 也可以两个或两个以上单元集成在一个模块中。上述集 成的模块既可以采用硬件的形式实现, 也可以采用软件功能模块的形式实现。所述集 成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存 储在一个计算机可读取存储介质中。 上述提到的存储介质可以是只读存储器, 磁盘或光盘等。 It should be understood that portions of the invention may be implemented in hardware, software, firmware or a combination thereof. In the above-described embodiments, multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc. One of ordinary skill in the art can understand that all or part of the steps carried by the method of implementing the above embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, one or a combination of the steps of the method embodiments is included. In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. The integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium. The above-mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
在本说明书的描述中, 参考术语 "一个实施例"、 "一些实施例"、 "示例"、 "具 体示例"、 或"一些示例"等的描述意指结合该实施例或示例描述的具体特征、 结构、 材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语 的示意性表述不一定指的是相同的实施例或示例。 而且, 描述的具体特征、 结构、 材 料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。  In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" and the like means a specific feature described in connection with the embodiment or example. A structure, material or feature is included in at least one embodiment or example of the invention. In the present specification, the schematic representation of the above terms does not necessarily mean the same embodiment or example. Moreover, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
尽管上面已经示出和描述了本发明的实施例, 可以理解的是, 上述实施例是示 例性的, 不能理解为对本发明的限制,本领域的普通技术人员在不脱离本发明的原理 和宗旨的情况下在本发明的范围内可以对上述实施例进行变化、 修改、 替换和变型。 本发明的范围由所附权利要求极其等同限定。  Although the embodiments of the present invention have been shown and described, it is understood that the foregoing embodiments are illustrative and not restrictive Variations, modifications, alterations and variations of the above-described embodiments are possible within the scope of the invention. The scope of the invention is to be defined by the claims

Claims

权 利 要 求 Rights request
1、 一种数据同步方法, 其特征在于, 包括: A data synchronization method, comprising:
获取要被同步的第一数据, 以及获取第二数据, 其中, 所述第二数据依据上 次同步处理的同步结果得到, 所述第一数据中数据信息至少包括数据编号、数据 内容和数据特征信息;所述第二数据中数据信息至少包括数据编号和数据特征信 息;  Acquiring the first data to be synchronized, and acquiring the second data, wherein the second data is obtained according to a synchronization result of the last synchronization process, where the data information in the first data includes at least a data number, a data content, and a data feature. Information; the data information in the second data includes at least a data number and data feature information;
根据数据编号和数据特征信息,判断第一数据和第二数据中是否存在不同的 数据信息,如果在第一数据和第二数据的一个数据中存在至少一个数据信息所包 含的数据编号和数据特征信息中至少一项,与第一数据和第二数据的另一个数据 中的任意数据信息所包含的对应信息不相同,确定第一数据和第二数据中存在不 同的数据信息;  Determining whether there is different data information in the first data and the second data according to the data number and the data feature information, if there is at least one data number and data feature included in the data of the first data and the second data At least one of the information is different from the corresponding information included in any of the first data and the second data of the second data, and determining that different data information exists in the first data and the second data;
当判断出第一数据和第二数据存在不同的数据信息时,将判断出的所述不同 的数据信息发送到服务器, 以对服务器所存储的对应数据进行同步更新。  When it is determined that the first data and the second data have different data information, the determined different data information is sent to the server to synchronously update the corresponding data stored by the server.
2、 如权利要求 1所述的数据同步方法, 其特征在于, 所述数据特征信息是 根据数据信息的数据内容、时间戳信息和数据长度信息中至少之一确定的唯一标 识信息。  The data synchronization method according to claim 1, wherein the data feature information is unique identification information determined based on at least one of data content, time stamp information, and data length information of the data information.
3、 如权利要求 1所述的数据同步方法, 其特征在于, 所述服务器同步更新 相应的数据, 包括:  The data synchronization method according to claim 1, wherein the server synchronously updates the corresponding data, including:
当第二数据中的数据信息不包含第一数据中的数据信息所具有的数据编号 时,将第一数据中的所述数据编号对应的数据信息增加到所述服务器存储的对应 数据中。  When the data information in the second data does not include the data number of the data information in the first data, the data information corresponding to the data number in the first data is added to the corresponding data stored by the server.
4、 如权利要求 1所述的数据同步方法, 其特征在于, 所述服务器同步更新 相应的数据, 包括:  The data synchronization method according to claim 1, wherein the server synchronously updates the corresponding data, including:
当第一数据和第二数据中存在数据编号相同但数据特征信息不同的数据信 息时,利用第一数据中的所述数据编号对应的数据信息替换所述服务器存储的对 应数据中具有相同数据编号的数据信息。  When there is data information with the same data number but different data feature information in the first data and the second data, the data corresponding to the data number in the first data is replaced with the same data number in the corresponding data stored by the server. Data information.
5、 如权利要求 1所述的数据同步方法, 其特征在于, 所述服务器同步更新 相应的数据, 包括:  The data synchronization method according to claim 1, wherein the server synchronously updates the corresponding data, including:
当第一数据中数据信息不包含第二数据中数据信息所具有的数据编号时,从 所述服务器存储的对应数据中删除所述数据编号对应的数据信息。  When the data information in the first data does not include the data number of the data information in the second data, the data information corresponding to the data number is deleted from the corresponding data stored by the server.
6、 如权利要求 1-5任一项所述的数据同步方法, 其特征在于, 对服务器所 存储的对应数据进行同步更新, 得到当前同步处理后的第三数据, 所述方法还包 括: 利用服务器返回的当前同步处理的第三数据同步更新第一数据。 The data synchronization method according to any one of claims 1 to 5, characterized in that, for the server The stored corresponding data is synchronously updated to obtain the third data after the current synchronization process, and the method further includes: synchronously updating the first data by using the third data of the current synchronization process returned by the server.
7、 如权利要求 1所述的数据同步方法, 其特征在于, 还包括:  7. The data synchronization method according to claim 1, further comprising:
根据服务器返回的第三数据中数据信息的数据编号及数据特征信息,生成第 二数据。  The second data is generated based on the data number and the data characteristic information of the data information in the third data returned by the server.
8、 一种数据同步装置, 其特征在于, 包括:  8. A data synchronization device, comprising:
获取单元, 用于获取要被同步的第一数据, 以及获取第二数据; 其中, 所述 第一数据中数据信息的数据结构至少包括数据编号、 数据内容和数据特征信息; 所述第二数据依据上次同步处理的同步结果得到,第二数据中数据信息至少包括 数据编号和数据特征信息;  An acquiring unit, configured to acquire first data to be synchronized, and obtain second data; wherein, the data structure of the data information in the first data includes at least a data number, data content, and data feature information; Obtaining, according to the synchronization result of the last synchronization process, the data information in the second data includes at least the data number and the data feature information;
判断单元, 用于根据数据编号和数据特征信息, 判断所述第一数据和第二数 据中是否存在不同的数据信息,如果在第一数据和第二数据的任一个数据中存在 至少一个数据信息所包含的数据编号和数据特征信息中至少一项,与第一数据和 第二数据中的另一个数据中的任意数据信息所包含的对应信息不相同,确定第一 数据和第二数据中存在不同的数据信息;  a determining unit, configured to determine, according to the data number and the data feature information, whether different data information exists in the first data and the second data, if at least one data information exists in any one of the first data and the second data At least one of the included data number and the data characteristic information is different from the corresponding information included in any of the first data and the second data, and the first data and the second data are determined to exist. Different data information;
发送单元, 用于在判断出第一数据和第二数据中存在不同的数据信息时, 将 所判断出的不同的数据信息发送到服务器,以对服务器所存储的对应数据进行同 步更新。  And a sending unit, configured to: when determining that different data information exists in the first data and the second data, send the determined different data information to the server to perform synchronous update on the corresponding data stored by the server.
9、 如权利要求 8所述的数据同步装置, 其特征在于, 还包括:  9. The data synchronization device of claim 8, further comprising:
数据特征信息生成单元, 用于根据数据信息的数据内容、 时间戳信息和数据 长度信息中至少之一生成数据特征信息。  The data feature information generating unit is configured to generate the data feature information according to at least one of the data content, the timestamp information, and the data length information of the data information.
10、 如权利要求 8所述的数据同步装置, 其特征在于, 还包括:  10. The data synchronization device of claim 8, further comprising:
同步单元, 用于利用从服务器返回的经过当前同步处理后的第三数据, 同步 更新第一数据;所述第三数据由服务器根据移动终端发送的所述不同的数据同步 更新相应数据得到。  And a synchronization unit, configured to synchronously update the first data by using the third data that is returned from the server after the current synchronization process; and the third data is obtained by the server synchronously updating the corresponding data according to the different data sent by the mobile terminal.
11、 如权利要求 10所示的数据同步装置, 其特征在于, 还包括: 生成单元,用于根据服务器返回的第三数据中数据信息的数据编号及数据特 征信息, 生成第二数据。  The data synchronizing apparatus according to claim 10, further comprising: generating means for generating the second data based on the data number and the data feature information of the data information in the third data returned by the server.
12、 一种数据同步系统, 其特征在于, 包括:  12. A data synchronization system, comprising:
移动终端, 包括权利要求 8-11中任何一个所述的数据同步装置; 以及, 服务器, 用于利用接收终端发送的数据信息, 对所述服务器中存储的对应数 据进行同步更新。 The mobile terminal, comprising the data synchronization device according to any one of claims 8-11; and a server, configured to synchronously update corresponding data stored in the server by using data information sent by the receiving terminal.
13、一种具有处理器可执行的程序代码的计算机可读介质,应用于移动终端, 其特征在于, 所述程序代码使处理器执行下述步骤: 13. A computer readable medium having processor-executable program code for use in a mobile terminal, wherein the program code causes the processor to perform the steps of:
获取要被同步的第一数据, 以及获取第二数据; 所述第一数据中数据信息至 少包括数据编号、数据内容和数据特征信息; 第二数据依据上次同步处理的同步 结果生成, 所述第二数据中数据信息至少包括数据编号和数据特征信息;  Obtaining first data to be synchronized, and acquiring second data; the data information in the first data includes at least a data number, a data content, and data feature information; the second data is generated according to a synchronization result of the last synchronization process, where The data information in the second data includes at least a data number and data feature information;
根据数据编号和数据特征信息,判断第一数据和第二数据中是否存在不同的 数据信息,如果第一数据和第二数据的一个数据中存在至少一个数据信息所包含 的数据编号和数据特征信息中至少一项,与第一数据和第二数据中的另一个数据 中的任意数据信息所包含的对应信息不相同,确定第一数据和第二数据中存在不 同的数据信息;  Determining whether there is different data information in the first data and the second data according to the data number and the data feature information, if there is at least one data number and data feature information included in the data of the first data and the second data At least one of the first data is different from the corresponding information included in any of the first data and the second data, and determining that different data information exists in the first data and the second data;
当判断出第一数据和第二数据存在不同的数据信息时,将判断出的所述不同 的数据信息发送到服务器, 以对服务器所存储的对应数据进行同步更新。  When it is determined that the first data and the second data have different data information, the determined different data information is sent to the server to synchronously update the corresponding data stored by the server.
PCT/CN2013/087689 2013-04-24 2013-11-22 Data synchronization method, apparatus, and system WO2014173122A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310147019.4A CN103237075B (en) 2013-04-24 2013-04-24 A kind of method of data synchronization, Apparatus and system
CN201310147019.4 2013-04-24

Publications (1)

Publication Number Publication Date
WO2014173122A1 true WO2014173122A1 (en) 2014-10-30

Family

ID=48885091

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/087689 WO2014173122A1 (en) 2013-04-24 2013-11-22 Data synchronization method, apparatus, and system

Country Status (2)

Country Link
CN (1) CN103237075B (en)
WO (1) WO2014173122A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103237075B (en) * 2013-04-24 2016-07-06 广州市动景计算机科技有限公司 A kind of method of data synchronization, Apparatus and system
CN103701913B (en) * 2013-12-30 2017-02-22 广州爱九游信息技术有限公司 Data synchronization method and device
CN104794114B (en) * 2014-01-16 2018-04-03 阿里巴巴集团控股有限公司 A kind of data processing method and device
CN106610763B (en) * 2015-10-26 2020-11-20 阿里巴巴集团控股有限公司 Method and device for synchronizing user operation across screens
CN107016548B (en) * 2016-12-09 2022-01-28 创新先进技术有限公司 Client system, information processing method, reading and writing method and device
CN109165229B (en) * 2018-08-23 2020-06-05 京东数字科技控股有限公司 Method, device, equipment and storage medium for checking local block synchronization
CN110225119B (en) * 2019-06-13 2022-09-16 平安科技(深圳)有限公司 Data synchronization method and related equipment
CN110990481A (en) * 2019-10-22 2020-04-10 珠海许继芝电网自动化有限公司 Synchronization method and system for historical data of power distribution automation system
CN117520460B (en) * 2024-01-05 2024-04-02 成都安世赛斯特软件技术有限公司 Custom number generation management method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050091284A1 (en) * 2003-10-23 2005-04-28 Microsoft Corporation Composite view
CN101409614A (en) * 2007-10-12 2009-04-15 华为技术有限公司 Data synchronization method, system and equipment
CN102291453A (en) * 2011-08-09 2011-12-21 中兴通讯股份有限公司 Data synchronization method and device
CN103237075A (en) * 2013-04-24 2013-08-07 广州市动景计算机科技有限公司 Data synchronizing method, device and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852160A (en) * 2005-12-30 2006-10-25 华为技术有限公司 Method for realizing data slow synchronization and system thereof
CN101923571B (en) * 2010-07-29 2013-05-01 中兴通讯股份有限公司 Method and device for managing terminal data logging

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050091284A1 (en) * 2003-10-23 2005-04-28 Microsoft Corporation Composite view
CN101409614A (en) * 2007-10-12 2009-04-15 华为技术有限公司 Data synchronization method, system and equipment
CN102291453A (en) * 2011-08-09 2011-12-21 中兴通讯股份有限公司 Data synchronization method and device
CN103237075A (en) * 2013-04-24 2013-08-07 广州市动景计算机科技有限公司 Data synchronizing method, device and system

Also Published As

Publication number Publication date
CN103237075A (en) 2013-08-07
CN103237075B (en) 2016-07-06

Similar Documents

Publication Publication Date Title
WO2014173122A1 (en) Data synchronization method, apparatus, and system
CN106874389B (en) Data migration method and device
US11848903B2 (en) Method and system for synchronizing instant messages between multiple clients
JP6515172B2 (en) Prioritizing content item synchronization based on sharing
JP6186015B2 (en) Share content items
JP6381776B2 (en) Generating unregistered user accounts for sharing content items
KR101750429B1 (en) Document editing system and method for collaborative editing
TWI535327B (en) Apparatus, server and method of data synchronization between clients of communication account
EP3125501B1 (en) File synchronization method, server, and terminal
US20150227605A1 (en) Information processing terminal, synchronization control method, and computer-readable recording medium
WO2013177925A1 (en) Data synchronization method, system and device
WO2019019642A1 (en) Application information pushing method and apparatus, and computer device and storage medium
CN103634406A (en) File synchronization method and terminal thereof
WO2019019670A1 (en) Application accessing method and device, computer apparatus, and storage medium
WO2017113694A1 (en) File synchronizing method, device and system
US10021166B2 (en) Mechanism for building normalized service model to expose web APIs
CN105991744B (en) Method and apparatus for synchronizing user application data
CN111061745A (en) Data synchronization system and method
TW201423420A (en) Data synchronization system and method for synchronizing data
CN110489483B (en) Data synchronization method, device, computer equipment and storage medium
JP5552720B2 (en) Storage system, storage server, user data sharing method, and program
CN114816225A (en) Management method and device of storage cluster, electronic equipment and storage medium
CN107609197A (en) A kind of method of data synchronization, data synchronization unit and mobile terminal
CN102932513B (en) A kind of business card maintaining method, device and equipment
WO2016026291A1 (en) Wireless data card, communication system, data synchronization method and computer storage medium

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: 13883078

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: 13883078

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 02.05.2016)

122 Ep: pct application non-entry in european phase

Ref document number: 13883078

Country of ref document: EP

Kind code of ref document: A1