Abstract:
A method for processing data synchronization includes a client terminal performing corresponding updating process for the updating data item transmitted from a server; storing the global unique identity (GUID) corresponding to the updating data item sent from the server; if this synchronization process is interrupted, after next synchronization process is re-initiated, the client terminal reporting the stored GUID to server memory; according to the stored result, the server transmitting GUID and the corresponding updating data items which are not included in the stored result in itself updating database to the client terminal, then returning to procedure. Correspondingly, the present disclosure also provides a client terminal, server and data synchronization system. The present disclosure enables to complete data synchronization normally even if the case that the data synchronization process is interrupted.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application is a continuation of International Application No. PCT/CN2006/003092, filed Nov. 16, 2006. This application claims the benefit of Chinese Application No. 200510115392.7, filed Nov. 16, 2005. The disclosures of the above applications are incorporated herein by reference. 
     
    
     FIELD 
       [0002]    The present disclosure relates to technologies for processing Synchronization Markup Language (SYNCML) protocol synchronization, in particular, to a method for processing data synchronization, a client terminal, a server, and a data synchronization system. 
       BACKGROUND 
       [0003]    The statements in this section merely provide background information related to the present disclosure and may not constitute prior art. 
         [0004]    The modern society is an information society. A user needs to receive and send information and to execute various applications on a terminal anytime anywhere. Both results of the information communication and of the application execution may need to be stored in the terminal and to keep consistent with the corresponding data in other communication devices. For example, an address list is usually stored in a mobile phone or a Personal Digital Assistant (PDA), and a same address list may also be stored in a computer or a laptop in the office or at home. The user always desires to keep information in these communication devices consistent with each other, i.e., when data information in one of the communication devices is modified, the corresponding data information in other communication devices may also be modified correspondingly. This is a data synchronization process between different communication devices. 
         [0005]    Terminal devices to perform data synchronization can be any network devices, such as a palmtop, a PDA, a mobile phone and a desktop computer. In any network, the data to be operated into synchronization may be any network data. A user may access and operate a same set of data information via different communication devices. The technology of SYNCML is a new universal standard technology proposed to implement the above data synchronization process. 
         [0006]    Referring to  FIG. 1 , a schematic diagram shows the data synchronization process between a client and a server using the SYNCML protocol in the prior art. Six data packets PKG 1  to PKG 6  need to be exchanged between the client and the server in one SYNCML synchronization process. The major process is as follows: 
         [0007]    1. No matter by which party the SYNCML synchronization process is initiated, the client firstly sends a synchronization initialization data package PKG 1  to the server. PKG 1  mainly includes client authentication information and information of device capability, etc. 
         [0008]    2. Upon receiving PKG 1 , the server performs authentication on the client according to the client authentication information contained in PKG 1 , and verifies the account information of the client. The result of the verification and information about designated synchronization type are fed to the client by a synchronization initialization response data packet (PKG 2 ). 
         [0009]    3. The client analyzes the synchronization type designated in received PKG 2 , packages all data in a local database that has been modified since the completion of the last synchronization (including data that are added, deleted or modified) in a data packet PKG 3  and sends the packet PKG 3  to the server. 
         [0010]    Usually, in the operation log of the local database, the client identifies the position of the operation log when the last synchronization process was completed via a log ID. Usually, an “anchor” is employed to identify the location. Thus, when the synchronization process is to be performed next time, the data that needs to be synchronized with the server is information recorded in the log after the anchor identity. The format of log information for reference of the client is shown in the following Table 1 (wherein LUID represents local unique identity): 
         [0000]    
       
         
               
               
               
             
           
               
                 TABLE 1 
               
               
                   
               
               
                 Anchor 
                 LUID 
                 Operation Performed 
               
               
                   
               
             
             
               
                 1110 
                 555 
                 Add 
               
               
                 1111 
                 168 
                 Replace 
               
               
                 1112 
                 123 
                 Delete 
               
               
                 1113 
                 556 
                 Add 
               
               
                   
               
             
          
         
       
     
         [0011]    4. Upon receiving PKG 3 , the server executes the corresponding operational instructions in PKG 3  and updates the data in its database in turn corresponding to the data modified in the client. 
         [0012]    When returning state information of executing the above operational instructions to the client via a data packet PKG 4 , the server also packages all data in its own database that has been modified since last synchronization (including data that is added, deleted or altered) into the data packet PKG 4  and returns the packet PKG 4  to the client. 
         [0013]    5. Upon receiving PKG 4 , the client executes the corresponding operational instructions in PKG 4  and updates the data in its database in turn corresponding to the data modified in the server. 
         [0014]    When returning state information about executing the above operational instructions to the server via a data packet PKG 5 , if the received PKG 4  includes an add instruction for adding a new data item in the local database, the client generates corresponding ID mapping information and notifies the ID mapping information to the server via a data packet PKG 5  after successfully adding the new data item in the local database.  FIG. 2  is a schematic diagram showing the state of the client generating ID mapping information table and feeding the ID mapping information table to the server according to an add instruction for adding data sent from the server. In  FIG. 2 , GUID represents a global unique identity, and LUID represents a local unique identity. For the same newly added data item, server  820  generates a GUID value that is uniquely identified on the server side to identify the data item, while client  810  generates an LUID value that is uniquely identified on the client side to identify the data item. To make a data item to be operated by the server corresponding to a same data item to be operated by the client, an ID mapping information table needs to be maintained on server  820 . In  FIG. 2 , provided that “Car” is a newly added data item in server  820 , when server  820  sends the newly added data item and the corresponding GUID value “1010101” to client  810 , client  810  adds the newly added data item “Car” to the local database  811  and then allocates an LUID value “11” to the newly added data item. Then client  810  establishes a mapping relationship between the LUID value “11” allocated to the newly added data item and the GUID value “1010101” allocated to the newly added data item by the server, and sends the mapping relationship to server  820 . By similarly performing the above process for the subsequent newly added data items, server  820  obtains an ID mapping information table “Server Mapping Table”  821 , and maintains the ID mapping information table. 
         [0015]    6. Upon maintaining the ID mapping information contained in the received PKG 5  to its mapping information table, the server feeds back a state of executing the maintenance instruction to the client via a data packet PKG 6 . Upon receiving the data packet PKG 6 , if all the state codes in the PKG 6  are normal, the client marks the successful completion of the data synchronization process. 
         [0016]    With the above SYNCML synchronization process, when a user performs data synchronization of large data volume with a server on a wired network through a SYNCML synchronization software installed in a wireless communication terminal, the speed of data synchronization process is often slow and a lot of time is consumed due to poor wireless network signal or heavy load of the operating system of the communication terminal. In such a case, the user may interrupt the data synchronization process before the data synchronization process is completed, because the user cannot bear the long-time waiting. In addition, the data synchronization process may be interrupted before completed due to other reasons, for example, the communication terminal being powered off suddenly, the network signal fading away gradually or an incoming call. 
         [0017]    If the data synchronization process between the communication terminal and the server is interrupted before completed due to the above reasons, when the communication terminal initiates a new synchronization request subsequently, all the modified data needs to be resynchronized. In other words, data that had been synchronized before the interruption need to be resynchronized in the new synchronization process. During the resynchronization process, there may occur the above mentioned network conditions and current state of terminal changes again, and the restarted data synchronization process may be interrupted on initiative or passively due to the same reasons mentioned above. The repeated interruption may influence the realization data synchronization. 
       SUMMARY 
       [0018]    A method for processing data synchronization, a client, a server, and a data synchronization system are provided, so that data synchronization may be completed correctly even in the case that the process of data synchronization is interrupted. 
         [0019]    In one aspect of the disclosure, a method for processing data synchronization includes: 
         [0020]    performing, by a client, corresponding modification on a modified data item sent from a server; 
         [0021]    buffering, by the client, a GUID corresponding to the modified data item sent from the server; 
         [0022]    reporting, by the client, the buffered GUID to the server after restarting the synchronization process next time in the case that the current synchronization process is interrupted; and 
         [0023]    storing, by the server, the reported information, sending a GUID and a corresponding modified data item in its own modification database to the client, the GUID is not comprised in the stored result; and performing, by the client, corresponding modification process. 
         [0024]    In another aspect of the disclosure, a client comprises: 
         [0025]    a modification processing unit, adapted for performing corresponding modification on a modified data item sent from a server; 
         [0026]    an identity buffering unit, adapted for buffering a GUID corresponding to the modified data item sent from the server; and 
         [0027]    an identity reporting unit, adapted for reporting the GUID buffered by the identity buffering unit to the server after restarting the synchronization process next time in the case that the current synchronization process is interrupted. 
         [0028]    In a further aspect of the disclosure, a server comprises: 
         [0029]    a reported information storage unit, adapted for storing a GUID reported by a client, the GUID corresponds to a modified data item sent from the server that has been updated by the client; 
         [0030]    a searching unit, adapted for searching a GUID that is not comprised in the reported information storage unit and a corresponding modified data item in its own modification database; and 
         [0031]    a sending unit, adapted for sending a GUID and a corresponding modified data item found by the searching unit to the client. 
         [0032]    In a still further aspect of the disclosure, a data synchronization system comprises a client and a server; 
         [0033]    the client is adapted to perform corresponding modification on a modified data item sent from a server, buffer a GUID corresponding to the modified data item sent from the server, and report the buffered GUID to the server after restarting the synchronization process next time in the case that the current synchronization process is interrupted; and 
         [0034]    the server is adapted to store the reported information, send the GUID and the corresponding modified data item in its own modification database to the client, the GUID is not comprised in the stored result. 
         [0035]    In various embodiments of the disclosure, a client performs corresponding modification on a modified data item sent from a server and buffers a GUID corresponding to the modified data item sent from the server, thus if the current synchronization process is interrupted, the client may report the buffered GUID to the server after restarting the synchronization process next time, and the server stores the GUID and sends GUIDs that are not comprised in the stored result and corresponding modified data items in its modification database. As a result, the amount of the modification data sent to the client by the server after restarting the synchronization process may be reduced, the time for synchronization processing may be saved, so that data synchronization may be completed correctly even in the case that a data synchronization process is interrupted. 
         [0036]    Further areas of applicability will become apparent from the description provided herein. It should be understood that the description and specific examples are intended for purposes of illustration only and are not intended to limit the scope of the present disclosure. 
     
    
     
       DRAWINGS 
         [0037]    The drawings described herein are for illustration purposes only and are not intended to limit the scope of the present disclosure in any way. 
           [0038]      FIG. 1  is a schematic diagram showing a process of data synchronization processing between a client and a server using SYNCML protocol in the prior art; 
           [0039]      FIG. 2  is a schematic diagram showing the state of a client generating an ID mapping information table and feeding it back to the server according to an add instruction for adding data sent from the server in the prior art; 
           [0040]      FIG. 3  is a schematic diagram showing the process of performing exchange of modified data between a client and a server in the prior art; 
           [0041]      FIG. 4  is a flow chart showing the main principle of implementing a method for processing data synchronization according to an embodiment of the disclosure; 
           [0042]      FIG. 5  is a block diagram showing the main structure of a client according to an embodiment of the disclosure; 
           [0043]      FIG. 6  is a block diagram showing the main structure of a client with an identity deleting unit added according to an embodiment of the disclosure; 
           [0044]      FIG. 7  is a block diagram showing the main structure of an identity buffering unit in the client according to an embodiment of the disclosure; and 
           [0045]      FIG. 8  is a block diagram showing the main structure of a server according to an embodiment of the disclosure. 
       
    
    
     DETAILED DESCRIPTION 
       [0046]    The following description is merely exemplary in nature and is not intended to limit the present disclosure, application, or uses. 
         [0047]    Various embodiments of the disclosure may solve the problem that a data synchronization process for large amount of data cannot be completed because of on-initiative or passive interruption due to long time consumption. 
         [0048]    Various embodiments of the disclosure have been made on the basis of the following considerations: by analyzing the above SYNCML synchronization process in the prior art, it can be found that data packets PKG 3  and PKG 4  exchanged between the client and the server account for a big proportion of the whole synchronization process both in execution time and traffic. The specific reasons are as follows: 
         [0049]    The data packet PKG 3  is mainly adapted to carry data items modified in a client to a server, and the data packet PKG 4  is mainly adapted to carry data items modified in the server to the client. The two parties also feed back results of executing the data modification operational instructions sent from the opposite party each other. Thus, no matter in the client or in the server, once the number of modified data items comes to hundreds or even thousands (it is possible that only one modified data item may occupy a space of thousands of bytes or even megabytes), the two data packets PKG 3  and PKG 4  exchanged between the client and the server may cause great time consumption and traffic consumption to the whole data synchronization process. 
         [0050]    In the above synchronization process of large data volumes, both data in packet PKG 3  and data in packet PKG 4  may be respectively partitioned into a plurality of message parts to be exchanged in turn. Each message exchanging includes a process of sending request and waiting for response.  FIG. 3  is a schematic diagram specifically showing the process of performing exchange of changed data between a client and a server. 
         [0051]    In  FIG. 3 , data packet PKG 3  is partitioned into a first data message (S 31 ), a second data message (S 33 ) and a third data message (S 35 ) for sending; data packet PKG 4  is partitioned into a first data message (S 32 ) and a second data message (S 34 ) for sending. 
         [0052]    This approach is certainly time-consuming in cases that link bandwidth is insufficient or wireless network signals are weak, etc. Therefore, it needs to reduce the number of times of such exchanges of modified data as much as possible. 
         [0053]    In each modification data message exchanged between the client and the server, packaging a newly added data item occupies a large message space. Especially for a data object of large volume (for example, newly added data items of a multimedia file such as picture, video), to package a newly added data item, it sometimes needs to partition the data item into a plurality of messages for sending respectively. Moreover, compared with a client, a server usually needs to synchronize more data to the client in a synchronization process. Therefore, in one embodiment of the disclosure, it is considered to reduce the number of modified data items (especially newly added data items) sent from the server to the client. 
         [0054]      FIG. 4  is a flow chart showing the main principle of implementing a method for processing data synchronization according to an embodiment of the disclosure. The main process of is as follows: 
         [0055]    S 10 : A client performs corresponding modification according to a modified data item sent from a server; 
         [0056]    S 12 : The client buffers a GUID corresponding to the above modified data item sent from the server; 
         [0057]    S 14 : If the current synchronization process is interrupted, the client reports the above buffered GUID to the server for storing after restarting the synchronization process next time; 
         [0058]    S 16 : The server determines whether a GUID that is not comprised in the stored result and a corresponding modified data item can be indexed in its own modification database; if yes, the following S 18  is executed; otherwise, the following S 20  is executed; 
         [0059]    S 18 : The server sends GUIDs that are not comprised in the stored result and corresponding modified data items in its own modification database to the client according to the stored result, and then return to S 10  and continue; 
         [0060]    S 20 : The current data synchronization process is completed. 
         [0061]    In the above process, the server feeds back a successful storage response message to the client upon successfully storing the GUID reported by the client. The client may delete the buffered GUID upon receiving the successful storage response message fed back by the server. 
         [0062]    The process for the client to buffer the GUID corresponding to the modified data item sent from the server in S 12  may be implemented in the following way: 
         [0063]    the client allocates a corresponding local unique identity LUID to the modified data item sent from the server; 
         [0064]    a mapping relationship is established between the allocated LUID and the GUID of the modified data item sent from the server; and the established mapping relationship is buffered, so that the GUID sent from the server is buffered. 
         [0065]    Thus, in the above S 14 , if the current synchronization process is interrupted, the client may report the mapping relationship between the buffered GUID and the LUID to the server after restarting the synchronization process next time, so that the GUID buffered is reported to the server. 
         [0066]    The above method shows better technical effects when the modified data item is a newly added data item. 
         [0067]    The major technical principle of implementing the method for processing data synchronization according to the above embodiment of the disclosure is that: each time when performing a data synchronization process, the client maps the LUID allocated to a newly added data item by the client and the GUID sent from the server immediately after a local modification operation is performed on each modified data item (which will be illustrated by taking a newly added data item as an example below) and saves the mapping information in a file, no matter abnormal interruption occurs or not during the process of receiving data packet PKG 4 . Thus the mapping information may be sent to the server when restarting the synchronization process next time, so that the server needs not to repeatedly send a newly added data item in multiple synchronization processes. 
         [0068]    Thus, in the case that a large amount of newly added data items in the server need to be synchronized with the client and the synchronization process is interrupted for many times, the disclosure may have significant effects. The client may accomplish the data synchronization of large data volume in a plurality of times. 
         [0069]    The specific implementation of various embodiments of the disclosure is as follows. 
         [0070]    Firstly, an ID mapping information table of the same format as that stored in the server (such as the above Server Mapping Table in the prior art shown in  FIG. 2 ) is also created in the client, and the created ID mapping information table is set empty. 
         [0071]    Each time when performing a data synchronization process, the client generates mapping information of an LUID (the client will generate an LUID of a newly added data item when a local adding operation is completed) and a GUID (the data packet PKG 4  sent from the server contains the GUID of the newly added data item) in the memory and saves the mapping information in the local ID mapping information table when the local adding operation for each newly added data item is completed, no matter an abnormal interruption occurs or not in the process of receiving the data packet PKG 4  sent from the server. If the current synchronization process is success, the client encodes the ID mapping information generated above in data packet PKG 5  and sends PKG 5  to the server and reset the local ID mapping information table to empty after the successful sending. If the process of receiving the data packet PKG 4  sent from the server or the subsequent process is interrupted abnormally, the ID mapping information of the newly added data item that is successfully added to the local database is already saved in the local ID mapping information table of the client. 
         [0072]    When restarting a synchronization process subsequently, the client firstly sends all information (except for slow synchronization. Slow synchronization is a special kind of synchronization mainly initiated by the server when abnormity occurs in the server state. In such a case, the client sends all local modified data items to the server, and the server compares these data items with the data items currently existing in the server one by one and saves the data items that are not comprised in the server, and returns the data items existing in the server but not existing in the client to the client, so as to achieve consistence between the data items of the two parties) in the local ID mapping information table to the server by a data packet PKG 3 . Upon receiving data packet PKG 3  sent from the client, the server firstly completes its own ID mapping information table according to the ID mapping information in PKG 3 , so as to avoid sending newly added data items that had been synchronized with the client before the interruption to the client according to its ID mapping information table when packaging data packet PKG 4 . In this way, data volume transmitted in a data packet PKG 4  may be reduced, and the number of times of partitioning data packet PKG 4  into a plurality of messages to exchange with the client may be reduced accordingly, and finally, the time for data synchronization processing may be reduced. The server may carry an ID mapping information storage success response message to be fed back to the client in data packet PKG 4  sent to the client. Thus upon receiving the data packet PKG 4  sent from the server, the client may immediately cancel the corresponding information from the local ID mapping information table. If the current synchronization process is interrupted abnormally at this point, the current newly added data item in the client will cause to generate a new ID mapping information and to save the information to the local ID mapping information table of the client. Thus, the data transmission volume may be reduced further when restarting a new synchronization process subsequently. 
         [0073]    Now the specific implementation of the method for processing data synchronization according to various embodiments of the present disclosure will be described in details by a simplified example. 
         [0074]    Provided that three data items (as shown in the following Table 2) are newly added to the server, but no data item is modified in the client: 
         [0000]    
       
         
               
               
               
             
           
               
                 TABLE 2 
               
               
                   
               
               
                 GUID 
                 Name 
                 Phone Number 
               
               
                   
               
             
             
               
                 10093902 
                 Adam 
                 13600001001 
               
               
                 10093903 
                 Alice 
                 13600301101 
               
               
                 10093904 
                 Mark 
                 13400021001 
               
               
                   
               
             
          
         
       
     
         [0075]    Then if a data synchronization process is initiated, the server sends the three newly added data items to the client by data packet PKG 4 . If power supply for the client is interrupted suddenly in a process of correspondingly adding the newly added data items sent from the server when only the first newly added data item has been added to the local database of the client and allocated with an LUID of 32, a piece of ID mapping information [10093902, 32] will have been generated in the local ID mapping information table of the client, while the other two newly added data items have not been processed. When restarting the client subsequently, a new data synchronization process with the server will be initiated. In the newly initiated synchronization process, the client firstly reports the saved ID mapping information [10093902, 32] to the server by data packet PKG 3 . Upon receiving the ID mapping information, the server considers that the data item of No. 10093902 is already synchronized with the client. Accordingly, when sending data packet PKG 4 , only the latter two newly added data items that are not synchronized with the client will be packaged, so that the synchronization data traffic in the current data synchronization process is reduced. 
         [0076]    The disclosure further provides a client device.  FIG. 5  is a block diagram showing the main structure of a client device according to an embodiment of the disclosure. The client device mainly includes a modification processing unit  10 , an identity buffering unit  20  and an identity reporting unit  30 . The main functions of each component are as follows. 
         [0077]    The modification processing unit  10  is mainly adapted to perform corresponding modification process on a modified data item sent from the server. 
         [0078]    The identity buffering unit  20  is mainly adapted to buffer a GUID corresponding to a modified data item sent from the server. 
         [0079]    The identity reporting unit  30  is mainly adapted to report the GUID buffered by the above identity buffering unit  20  to the server for storing when restarting a synchronization process next time in a case that the current synchronization process is interrupted. 
         [0080]      FIG. 6  is a block diagram showing the main structure of a client with an identity deleting unit added according to an embodiment of the disclosure. The newly added identity deleting unit  40  is mainly adapted to delete a GUID buffered in the above identity buffering unit  20  upon receiving a success storage response message fed back by the server. 
         [0081]      FIG. 7  is a block diagram showing the main structure of an identity buffering unit in the client according to an embodiment of the disclosure. The identity buffering unit mainly includes an identity allocating subunit  210 , a mapping relationship establishing subunit  220  and a mapping identity buffering subunit  230 . The main functions of each component are as follows. 
         [0082]    The identity allocating subunit  210  is mainly adapted to allocate a corresponding LUID to a modified data item sent from the server. 
         [0083]    The mapping relationship establishing subunit  220  is mainly adapted to establish a mapping relationship between a LUID allocated by the identity allocating subunit  210  and a GUID corresponding to a modified data item sent from the server. 
         [0084]    The mapping identity buffering subunit  230  is mainly adapted to buffer a mapping relationship established by the mapping relationship establishing subunit  220 , so as to buffer a GUID sent from the server. 
         [0085]    Correspondingly, the identity reporting unit  30  reports the mapping relationship between the LUID and the GUID buffered in the mapping identity buffering subunit  230  to the server so as to report the buffered GUID to the server. 
         [0086]      FIG. 8  is a block diagram showing the main structure of a server according to an embodiment of the disclosure. 
         [0087]    The server according to one embodiment of the disclosure includes: a reported information storage unit  310  for storing a GUID reported by the client. The GUID corresponds to the modified data item sent from the server that is updated by the client. 
         [0088]    A searching unit  320  for searching, in its modification database, a GUID that is not included in the reported information storage unit  320  and a corresponding modified data item. 
         [0089]    A sending unit  330  for sending a GUID and a corresponding modified data item searched by the searching unit to the client. 
         [0090]    In addition, the server may also include a storage response unit  340  for feeding a successful storage response message to the client when the reported information storage unit  310  successfully stores a GUID. 
         [0091]    In a specific implementation of an embodiment of the disclosure, the reported information storage unit is a mapping information table update unit adapted to update the mapping information table of the server according to a mapping relationship between a GUID an LUID reported by the client. 
         [0092]    Based on the above mentioned client and server, an embodiment of the disclosure further provides a data synchronization system. In the data synchronization system, the client is adapted to perform corresponding modification on a modified data item sent from the server, buffer a GUID corresponding to the modified data item sent from the server, and report the buffered GUID to the server after restarting the interrupted synchronization process. The server is adapted to store the reported information and send the GUID not comprised in the storage result and the corresponding modified data item in its own modification database to the client. 
         [0093]    Additional advantages and modifications will readily occur to those skilled in the art without departing from the spirit and scope of the present disclosure. Therefore, various modifications and variations are intended to be comprised in the disclosure is the modifications and variations belong to the scope of the appended claims and their equivalents.