Title of Invention

DATA SYNCHRONIZATION METHOD AND APPARATUS

Abstract Abstract An embodiment of the present invention provides a data synchronization method, which includes: a data synchronization center acquires data updaie records recorded in various services, in which each of the data update records records an identifier of a data item having been updated successfully in a corresponding service; the data synchronization center compares the data update records with each other and finds a data item which is recorded only in the data update records of some of the services and is not recorded in the data update records of other services, in which the other services are destination services; the data synchronization center sends a notification to the destination services for updating data contents of the data item in the destination service, and the destination services update the stored data contents of the data item afler receiving the notification. Another embodiment of the preseni invention provides a data synchronization apparatus,
Full Text

DATA SYNCHRONIZATION METHOD AND
APPARATUS
Field of the Technology
The present invention relates to data synchronization technologies, and more particularly, to a data synchvom2ation method and apparatus.
Background of the Invention
Some identical data are usually maintained in different services, and if data in a certain service are changed, the data maintained in the other services need to be changed correspondingly so as to keep the data in the different services identical, i.e., keep the synchronism of the relevant data maintained in the different services.
The synchronism of data necessary to be synchronized which are maintained in different services, that is, the synchronism of global data, is controlled by establishing a real time synchronization center, in accordance with the prior art. The detailed method includes: a service will initiate a data update request, i.e., notify the real time synchronization center that the data need to be changed, and impart the updated data to the real time synchronization center, when data in a certain service are changed; then, the real time synchronization center notifies other relevant services to update the data so as to keep the synchronism of the global data, and notifies the service having initiated the data update request of the success in data synchronization if the other relevant services complete the data update. For short, a service initiating a data update request is called a source service while other relevant services are called destination services.
Tn the case that a destination service fails to update data, an existing real time synchronization center allows the destination service to attempt the update multiple times based on an error tolerance mechanism. The real time synchronization center usually adopts one of the following measures to end the data synchronization of this time if the destination service still fails to update the data. Measure I: the real time synchronization center identifies the data synchronization as faUure. Measure 11: the real time synchronization center notifies the source service and those of the destination services having succeeded in updating the data to perform a data rolling

back operation, i.e.. the source service and those of the destination services having updated the data successfully change the updated data back lo the original data.
In fact, neither of ihe above twt) measures adopted for data synchronization failure in accordance with the prior art is a remedy for the data .synchronizalion failure. Specifically, as for measure I. the real time synchronization center only identifies the data (he synchronization of which fails, while die case thai the data maintained in the source service differ from the data maintained in a destination service exists, i.e., the data in the source service are not synchronized with the data in the destination service. The essential of measure II is that the data update operation is not accepted and the data in all the services fail to be updated. Thus, although the data in the source service may be synchronized with the data in the destination services, the user is puzzled due to the data update faihire if a data update request is put forward by a user.
Accordingly, data synchronization failure easily occurs in the data synchronization method in accordance with the prior art,
Summary of the Invention
An embodiment of the present invention provides a data synchronization method, which may furthest ensure synchronism of data contents of a data item necessary to be synchronized, and the data item is maintained in various services.
A data synchronization method, including:
acquiring, by a data synchronization center, data update records recorded in various services, wherein each of the data update records records an identifier of a data item having been updated successfully in a corresponding service;
comparing, by the data synchronization center, the data update records with each other and finding a data item which is recorded only in the data update records of some of the services and is not recorded in the data update records of other services, wherein the other services are destination services;
sending, by the data synchronization center, a notification to the destination services for updating data contents of the data item in the destination services.

wherein the notification carries updated data contents of the data item acquired by ihe (lata synchronization center; and
updating, by the destination services, the stored data contents of the data item after receiving the notification.
An embodiment of the preseni invention provides a data synchronization apparaius, which may fuiDiest ensure synchronism of data contents of a data item necessary to be synchronized, and the data item is maintained in various services.
A data synchronization apparatus, inckiding:
a record acquiring imil, adapted to acquire data update records recorded in various services, wherein each of the data update records records an identifier of a data item having been updated successfuUy in a corresponding service;
a comparing and processing unit, adapted lo compare the data update records with each other and find a dala item which is recorded only in the data update records of some of the services and is nol recorded in Ihe data update records of other services, wherein the other services are destination services;
a data contents acquiring unit, adapted to acquire updated data contents of the data item; and
a notification sending unit, adapted to send a notification for updating data contents of the data item to the destination services, wherein the notification carries the updated data contents of the data item acquired by the data synchronization center.
In the technical solutions of the dala update method and apparatus provided by the embodiments of the preseni invention, a data item which has been updated in some services and fails to be updated in other services is found by comparing data update records recorded in various services with each other, and the other services are notified 10 update the data contents of the data item, thereby furthest ensuring synchronism of the data contents of a data item necessary to be synchronized, and the data item is maintained in each service.

Brief Description of the Drawings
Figure 1 is a flow chan for a real time synchronization center synchronizing data in various services in accordance witli an embodimenl of ihe present invention.
Figure 2 is a flow charl of ihe data synchronization method in accordance with an embodimenl of the present invention.
Figure 3 is a strucmre diagram illustraling a dala synchronization apparatus in
accordance with an embodiment of the present invention-Figure 4 is a flow chart for a data synchronization center monitoring data
synchronization in services in accordance with an embodiment of the present
invention.
Embodiments of the Invention
The technical solutions in accordance with enibodiments of the present invention are hereinafter further described in detail with reference to the accompanying drawings.
In accordance with an embodiment of the present invention, a further data synchronization operation is performed for data that have not been synchronized .successfully by a real lime synchronization center so as to ensure the data synchronization in services being carried out successfully.
First, the synchronization of data in various .services by the real lime synchronization center in the embodiment of the present invention is described. As a matter of convenience, it is supposed that there are three global services denoted as service 0, service 1 and service 2, respectively, and the data item to be revised is a subscriber surname. Refer to Figure 1, which is a flow chart for the real time synchronization center synchronizing data in various services in the embodiment of the present invention. The flow may include the following blocks.
hi block 101, data contents of the data item of subscriber surname in service 0 are updated, and service 0 records the data contents having been updated successfully, i.e., a new value, into a data update record stored in service 0. The identifier of the updated data item, i.e., subscriber surname, is further recorded into the data update

record. Service 0 has a daia synchronization request carrying the new value of the subscriber surname and sends the dala synchronization request to the real time synchronization center.
In the embodiment of the present invention, a service in which data have been updated successfully records information related to the data having been updated successfully, such as the identifier of the dala item and the data contents. The information related to the data which is recorded by the service forms a data update recovd. It is supposed in the embodiment of the present invention that a data update record is recorded in a dala update log file. In practical applicafions, a data update record may also be recorded in a database or be stored in other forms.
In block 102, the real time synchronization center returns a dala synchronizalion request response to service 0 after receiving the request sent by service 0.
In the embodiment of the present invention, the real lime synchronization center may directly return a response indicating succeeding in synchronization to service 0 since a further data synchronization operation will be performed subsequently for data which have not been updated successfully. Nevertheless, the response may be set as demanded in practical applications.
In block 103, the real time synchronization center sends a data update inslruction carrying the identifier of subscriber surname and the new value of the subscriber surname to services 1 and 2.
In block 104, after receiving the data update instruction from the real time synchronization center, service I updates the data item of subscriber surname, i.e., replaces the value of the subscriber surname stored originally with the new value of the subscriber surname, and records the data contents having been updated successfully, i.e., the new value, into the dala update log file stored in service 1. The identifier of the updated data item, i.e., subscriber surname, is further recorded into the data update record. Ser\'ice 1 returns a response indicating succeeding in data update to the real time synchronization center.

In block 105, after receiving Ihc response returned by service I, the real time .synchronization center confirms the succeeding in the data update in service 1 and ends monitoring of the data update of this time in service 1.
hi block 106, service 2 updates the data. If the data update l^iils. service 2 does not record information rehued to the data update of this time but returns a response indicating a failure of update to the real lime synchronization center.
In block 107. after receiving the response returned by service 2, the real time synchronization center performs an error tolerance operation, i.e., stores Ihe identifier of the service, the identifier of the data item and the new data contents related to the failure of update into a data update failure queue, judges whether the times service 2 fails to update the data item of subscriber surname in the data update failure queue exceeds a predetermined maximum times for attempting update, and performs again Ihe operations in block 103 if the times does not exceed the predetermined maximum limes for attempting update, i.e., sends again a data update instruction to service 2. After receiving Ihe data update instriictioii, service 2 attempts the data update again. If the times exceeds the predetermined maximum times for attempting update, the real time synchronization center will not send again a data update instruction to service 2 but identifies the data update in service 2 as failure.
The capability of error tolerance of the real time synchronization center, i.e., the capability that the real time synchronization center gives the service a chance to update the data again if the service fails to update Ihe data, and the real time synchronization center confirms the failure of data update of the service if multiple chances for attempting update have been given and the service still cannot succeed in the update, is represented in block 107.
Supposing in the embodiment of the present invention that service 2 still does not succeed in the data update after the times service 2 has attempted updating the subscriber surname exceeds the predetermined maximum times for attempting update, the data update record of updating the subscriber surname this lime is not recorded into the data update log file of service 2.
In addition, each data update log file in the embodiment of the present invention may include the contents shown in Table I.

Field
data^identi^
Description
Identifier of data item
jmie^itamj>_
hash
Time stamp of tipdate
^,__^___^lBii!lHl\l?_i2fJ:y?i!H£l^^f'* contents Table 1
As shown in Table 1. :i log file includes an identifier of a da!a item, a lime stamp of update about updated data recorded in the log file, and a hash vahie of the updated data contents. The ha.sh value may be calculated using the MD5 algorithm from the new data contents and may be used by the sy.stem to validate whether the updated data contends of the data item in various services are identical. For data the data contents of which are complex or a data item the data contents of which have a high requirement for secrecy, a hash value of the corresponding data contents may be recorded in a log file. Far a data item the data contents of which are simple and do not have a high requirement for secrecy, in order to facilitate access of updated data contents, the detailed data contents may be directly recorded in a log file. In practical applications, the content.s of a data update log file may be configured as demanded, but at least the identifier of a data item having been updated successfully needs to be included in the data update log file. Information for describing data contents, such as the hash value of the data contents or the data contents themselves, may be called as data contents description information.
In the embodiment of the preseni invention, data synchronization in various services may be further monitored based on the data update records recorded in the services so as to ensure synchronism of the data contents of a data item necessary to be synchronized, and the data item is maintained in the services. Data synchronization in various services is monitored using a data .synchronization center in the embodiment of the present invention.
Refer to Figure 2, which is a flow chart of the data synchronization method in accordance with an embodiment of the present invention. The flow may include the following blocks.
In block 201, a data synchronization center acquires data update records recorded in various services, each of the data update records records an identifier of a data item having been updated successfully in a corresponding service.

In block 202, the data synchronization center compares the data update records with each other and finds a data item which is recorded only in (he data update records of some of the services and is not recorded in the data update records of other services. The other services are destination services.
In block 203, the data synchronizalion center sends a notification for updating the data contents of the data item to the destination services, in which (he notification carries the updated data contents of the data item acquired by the data synchronization center, and the destination services update the stored data contents of the data item after receiving the notification.
Refer to Figure 3, which is a structure diagram illustrating the data synchronization apparatus in accordance with an embodiment of the present invention. The data synchronization apparatus, i.e., the above data synchronization center, may include a record acquiring nuil, a comparing and processing unit, a data contents acquiring unit, and a notification sending unit.
And the record acquiring unit acquires data update records recorded in various services, each of the data update records records an identifier of a data item having been updated successfully in a corresponding service.
The comparing and processing unit compares the data update records acquired by the record acquiring unit with each other and finds a data item which is recorded only in the data update records of some of the services and is not recorded in the data update records of other services, the other services are destination services.
The data contents acquiring unit acquires the updated data contents of the data item.
The notification sending unit sends a notification to the destination services found by the comparing and processing unit for updating the data contents of the data item, in which the notification carries the updated data contents of the data item acquired by (he data contents acquiring unit.
In the embodiment of the present invention, if the updated data contents are recorded in data update records such as log files in some of the services, the data synchronizalion center may directly acquire the updated data contents of the data item

to be updated by the destination services froi-n the log files. If Ihe updated data contents are not recorded in the log files, the data synchronization center may acquire the updated data contents from the source service. As mentioned above, a so called source service is a service having initiated a data update request, such as service 0.
In the embodiment of the present invention, the data synchronization center may be set to siiiit lip periodically to monitor data synchronization in global services. Refer to Figure 4, which is a flow chart for a data synchronization center monitoring data synchronization in services in accordance with an embodiment of the present invention. In the flow, it is supposed that data update records stored by the services are log files. The flow may include the following blocks,
In block 401, the data synchronization center sends an instruction to acquire a data update log file to the services.
In block 402, services (1 to 2 send their respective stored data update log files to the data synchronization center after receiving the instruction sent by the data synchronization center.
It is supposed in the embodiment of the present invention that a data update record is stored in the log file once data are updated in each service.
In block 403, after receiving the log files returned by the services, the data synchronization center compares data update information recorded in the log files and finds a data update record which is recorded in the log files of some of the services and is not recorded in the log files of other services.
In the embodiment of Ihe present invention, a data update record in each of the services records information related to a data item having been updated successfully. Updale of the data item of subscriber surname is taken as an example, and then there is a data update record of the data item of subscriber surname in the log files of both services 0 and 1 but there is no data update record concerning the subscriber surname in the log file of service 2. Accordingly, the data synchronization center finds the data item of subscriber surname.
In block 404, the data synchronization center sends an instruction requesting to acquire Ihe new value of the subscriber surname to service 0.

In biock 405, service 0 returns Ihe new value of the subscriber surname to the data synchTonizalion center after receiving the instruction sent by the data synchronization center.
In block 406, after receiving the new value of the subscriber surname, the data synchronization center takes service 2 as the destination service, and sends a data update instruction which carries the new value of the subscriber surname to request update of the data contents of the subscriber surname to service 2.
In biock 407, after receiving the data update instruction sent by the data synchronization center, sei-vice 2 updates the subscriber surname, and returns a response indicating succeeding in data update to the data synchronization center after succeeding in the update.
In block 408. after receiving the response returned by service 2. the data synchronization center generates a global data state table using acquired data update states stored in services 0 to 2 and stores the generated global data state table.
The identifier of a data Item having been successfully updated in all of the services, the data contents description information of the data ilem, and the time stamp indicating when the data item is updated successfully in the global services may be recorded in the above global data state stable.
Thus, the flow shown in Figure 4 ends.
The function of a global data state table is hereinafter described.
If the subscriber surname in service 0 is updated again, service 0 records Ihe data update record indicating the update of the subscriber surname in its data update log file, and notifies again the data synchronization center to instruct services 1 and 2 to perform a data synchronization operation. If service 2 succeeds in apdatirtg the data contents of the subscriber surname this time, and the data synchronization center is started up again before service 2 writes the update record of the subscriber surname about this time into the data update log file, and then the data synchronization center acquires the data update log files of all the services, in which there is still no record indicating the subscriber surname having been updated again in the data update log file of service 2. So, the data synchronization center still instructs service 2 to update

again the data contents of the subscriber surname. Thus, the data contents of the subscrilier surname in service 2 have been updated twice and the data contenis updated at the two times are identical. And, service 2 will store the data update records of the Iwo times in its data update log file. Moreover, the data synchronisation center updates the data contents of the subscriber surname in the global data state table.
Still later, after being started up again and having acquired the data update records of services 0-2. the data synchronization center finds the data item of subscriber surname, since there are more records indicating the .subscriber surname having been updated which are recorded in the data tipdate log file of service 2 than the records indicating the subscriber surname having been updated which are re.spectively recorded in the data update log files of services 0 and 1. hi such a case, the data synchronization center does not directly send a data update instruction to services 0 and 1 but compares the data contents description information of the subscriber surname stored in the global data stale table with the data contents description information of the subscriber surname acquired from service 2. If the information is identical, the data synchronization center does not send a data update instruction requesting update of the subscriber surname to services 0 and 1 any longer, (hereby avoiding that synchronized data in each service are updated repeatedly and subsequently avoiding innuence on normal operation of the service. If the information is not identical, the data synchronization center determines that it is necessary to instruct services 0 and I to update the data contents of the subscriber surname, and sends a data update instruction requesting to update the data contents of the subscriber surname to services 0 and 1 so as to keep the synchronism of data in the services.
Correspondingly, refer to Figure 3, the apparatus shown in Figure 3 may further include a data stale storing unit and an update filtering unit.
The data state storing unit stores information related to a synchronized data item in various services, i.e., relevant information in the above global data state table. As mentioned above, the relevant information in the global data state table may include the identifier of a data item having been updated successfully in all the global services, the data contents description information of the data item, and the time stamp indicating when the data item is updated successfully in the global services.

The update fihering unii compares the data contenis description information of a data item stored in ihe data state storing unit with the daui contenis description information of the data item in a data updale record acquired by the record acquiring unit from the destination service, performs no operation if ihe information is identical, and triggers the notification sending unit if the infnnnafion is not identical.
To sum lip, in ihe technical solutions of the data update meihod and apparatus provided by the embodiments of the present invention, a data item which has been updated successfully in some services and fails to be updated in other services is found by comparing data update records of various services with each other, and the other services are instructed to \ipdate the data contents of the data item, thereby furthest ensuring synchronism of the data contents of a data item necessary to be synchtOYiized, and the data item is maintained in the sei-vices.
Furthermore, in accordance with an embodiment of the present invention, a real time synchronization center and a data synchronization center may be combined to synchronize the data contents of a data item necessary to be synchronized in various services so as to ensure reliability and timeliness of the data synchronization under the circumstances that synchronism of the data contents of various data items is ensured.


Claims i. A data synchronizalion method, comprising:
acquiring, liy a data synchronization center, data update records recorded in various services, wherein each of the data update records records an identifier of a data item having been updated successfully in a couesponding service;
comparing, by the data synchronization center, the data update records with each other and I'inding a data item which is recorded only in the data update records of some of the services and is not recorded in the data update records of other services, wherein the other services are destination services;
sending, by the data synchronization center, a notification to the destination services for updating data contents of the data item in the destination services, wherein the notification carries updated data contents of the data item acquired by the data synchronization center; and
updating, by the destination services, the stored data contents of the data item after receiving the notification.
2. The method of Claim 1, further comprising:
before sending by the data synchronization center the nolification to the destination services for updating the data contents of the data item in the destination services,
finding, by the data synchronization center, data contents description information of the data item from global data state information, comparing the data contents description information of the data item recorded in the global data state information with data contents description information of the data item recorded in the data update records of the some of the services, and determining that the data synchronization center needs to instruct the destination services to update the data contents of the data item.

3. The method of Claim 2. wherein the global data state information records information related (o (he data item having been updated successfidly in each of the services.
4. The method of Claim 2 or 3, wherein the data contents description information comprises: derailed data contents and/or a hash value of the data contents,
5. The method of Claim 1, further comprising:
after updating by the destination services the stored data contents of the data item, storing, by the data synchronization center, information related to the data item having been updated successfully in each of the services.
6. The method of Claim 3 or 5, wherein the information related to the data item comprises: the identifier of the data item, the data contents description information of Ihe data item, and a time stamp indicating when the data item is updated successfully in each of the services,
7. The method of Claim 1, further comprising:
before acquiring by the data synchronization center the data update records recorded in various services,
instructing, by a real time synchronization center, based on a data synchronization request initialed by one or more services, the other services except the one or more services to update data indicated in the data synchronization request;
wherein the data update record recorded by each of the services comprises: an identifier of a data item having been updated successfully in the one or more services, and an identifier of a data item having been updated successfully in the other services except the one or more services.
8. The method of Claim 7, further comprising:
before instaicting by the real time synchronization center the other services except the one or more services to update the data indicated in the data synchronization request.

reluming, by the real time synchronization center, a response of the data synchronization request to the one or more services.
9. The method of Claim i, wherein the data synchronization center is started up
periodically.
10. A data synchronization apparatus, comprising:
a record acquiring unit, adapted (o acquire data update records recorded in various services, wherein each of the data update records records an identifier of a data item having been updated successfully in a con-esponding service;
a comparing and processing unit, adapted to compare the data update records with each other and find a data item which is recorded only in the data update records of some of the services and is not recorded in the data update records of other services, wherein the other services are destination services;
a data contents acquiring unit, adapted to acquire updated data contents of the data item; and
a notification sending unit, adapted to send a notification for updating data contents of the data item to the destination services, wherein the notification carries the updated data contents of the data item acquired by the data synchronization center.
11.. The apparatus of Chum 10, further comprising:
a data state storing unit, adapted to store information related to a synchronized data item in various services;
an update filtering unit, adapted to compare data contents description information of the data item stored in the data state storing unit with data contents description information of the data item in a data update record of a destination service, perform no operation if the information is identical, and trigger the notification sending unit if Ihe information is not identical.


Documents:

3267-CHE-2008 CORRESPONDENCE OTHERS 23-01-2015.pdf

3267-CHE-2008 AMENDED CLAIMS 24-12-2014.pdf

3267-CHE-2008 AMENDED PAGES OF SPECIFICATION 24-12-2014.pdf

3267-CHE-2008 EXAMINATION REPORT REPLY RECEIVED 24-12-2014.pdf

3267-CHE-2008 FORM-1 24-12-2014.pdf

3267-CHE-2008 FORM-3 24-12-2014.pdf

3267-che-2008 abstract.pdf

3267-che-2008 claims.pdf

3267-CHE-2008 CORRESPONDENCE OTHERS 07-07-2014.pdf

3267-che-2008 correspondence-others.pdf

3267-che-2008 description (complete).pdf

3267-che-2008 drawings.pdf

3267-che-2008 form-1.pdf

3267-che-2008 form-18.pdf

3267-che-2008 form-26.pdf

3267-che-2008 form-3.pdf

3267-che-2008 form-5.pdf

3267CHE2008-Petition for POR.pdf


Patent Number 266153
Indian Patent Application Number 3267/CHE/2008
PG Journal Number 15/2015
Publication Date 10-Apr-2015
Grant Date 08-Apr-2015
Date of Filing 24-Dec-2008
Name of Patentee TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Applicant Address 4/F, EAST 2 BLOCK, SEG PARK, ZHENXING ROAD, FUTIAN DISTRICT, SHENZHEN, GUANGDONG 518044
Inventors:
# Inventor's Name Inventor's Address
1 CAI, LEI 4/F, EAST 2 BLOCK, SEG PARK, ZHENXING ROAD, FUTIAN DISTRICT, SHENZHEN, GUANGDONG 518044
PCT International Classification Number G06Q10/00; G06F17/30
PCT International Application Number N/A
PCT International Filing date
PCT Conventions:
# PCT Application Number Date of Convention Priority Country
1 200710306390.5 2007-12-28 China