Summary of the invention
The object of the present invention is to provide a kind of data synchronization system, be intended to solve prior art and reach the problem that need take a large amount of network bandwidths in the data procedures that transmits slowly in the synchronous speed of deal with data.
Another object of the present invention is to provide a kind of method of data synchronization.
The present invention is achieved in that a kind of data synchronous system, comprises portable terminal and synchronization server, and described system also comprises:
The sync agent server is used for the synchronization request of mobile terminal receive, carries out the data sync operation between synchrodata of sending according to portable terminal and the synchronization server, provides the synchronized result data to portable terminal.
Described sync agent server one end is by wireless network and portable terminal wireless connections, and the other end links to each other with synchronization server by Internet.
Carry out data sync based on synchronization makeup language SyncML agreement between described sync agent server and synchronization server, described data sync be operating as slow synchronously, differential backup synchronously, backup synchronously fully, difference is recovered synchronously or recover synchronously fully.
Described sync agent server comprises network communication module and synchronous working module;
Described network communication module, be used for the synchronization request of mobile terminal receive and synchrodata and to portable terminal send with the operation of synchronization server data sync after the synchronized result data;
Described synchronous working module is used for the synchronization request that receives according to the network communication module and synchrodata and synchronization server and carries out the data sync operation.
A kind of method of utilizing data synchronous system to realize data sync said method comprising the steps of:
Portable terminal sends synchronization request and synchrodata to the sync agent server;
The sync agent server receives synchronization request and handles described synchrodata, and the sync agent server returns Synchronization Status Message;
Carry out the data sync operation between sync agent server and the synchronization server;
After data sync finished between sync agent server and the synchronization server, the sync agent server was back to portable terminal with the synchronized result data.
Carry out data sync based on the SyncML agreement between described sync agent server and synchronization server, described data sync be operating as slow synchronously, differential backup synchronously, backup synchronously fully, difference is recovered synchronously or recover synchronously fully.
Include simultaneous user's personal information management PIM user name, simultaneous user's PIM password, simultaneous user's portable terminal model, simultaneous user's mobile terminal device number, simultaneous user's wireless backup client version number, the method for synchronization that the simultaneous user initiates, synchronous applications type that the simultaneous user initiates or the renewal log information of data in the described synchronization request.
The Synchronization Status Message that described sync agent server returns comprises synchronous regime and synchronous time of needs, and described synchronous regime comprises and beginning synchronously or the two states of failing.
The synchronized result data that described sync agent server is back to portable terminal comprise the renewal log information of Synchronous Processing state, synchrodata and these data, and described Synchronous Processing state comprises success or failure two states.
The data that transmit between described portable terminal and the sync agent server are to handle through overcompression.
Among the present invention, increase by a synchronous acting server between portable terminal and synchronization server, it mainly is responsible for finishing all data synchronization logics, and portable terminal mainly is responsible for the transmission and the storage of synchrodata, and the data that transmit are all handled through overcompression.This makes the synchronous speed of deal with data improve and reduce and takies the network bandwidth.Promoted the versatility of wireless standby system simultaneously, made the more access of multi-model portable terminal become simple.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
Among the present invention, increase by a synchronous acting server between portable terminal and synchronization server, it mainly is responsible for finishing all data synchronization logics, and portable terminal mainly is responsible for the transmission and the storage of synchrodata, and the data that transmit are all handled through overcompression.This makes the synchronous speed of deal with data improve and reduce and takies the network bandwidth.Promoted the versatility of wireless standby system simultaneously, made the more access of multi-model portable terminal become simple.
Fig. 2 shows the structure of data synchronous system of the present invention, compare with the structure of existing data synchronous system, increased by a synchronous acting server between portable terminal and synchronization server, the sync agent server exists as the hinge that connects portable terminal and synchronization server.Sync agent server one end is by wireless network and portable terminal wireless connections, and the other end links to each other with synchronization server by Internet.The sync agent server is used for the synchronization request of mobile terminal receive, carries out the data sync operation between synchrodata of uploading according to portable terminal and the synchronization server, provides the synchronized result data to portable terminal.Therefore, portable terminal can be communicated by letter with synchronization server via wireless network, sync agent server and the Internet two-wayly, carries out the operation such as access, modification of synchrodata, thereby reaches the unanimity of both sides' data.
Described sync agent server mainly includes the unit module of several softwares, hardware cell module or software and hardware combining such as network communication module and synchronous working module.The network communication module is responsible for receiving and send data from network; The synchronous working module is the nucleus module of system, and responsible maintenance needs data in synchronization, synchronous regime, progress synchronously, and synchrodata is resolved, synchronously and work such as packing.
The synchronization request and the synchrodata of network communication module mobile terminal receive; Synchronization request that the synchronous working module receives according to the network communication module and synchrodata and synchronization server carry out the data sync operation; After data sync finished, the network communication module was back to portable terminal with the synchronized result data.
Fig. 3 shows the realization flow of method of data synchronization provided by the invention, and details are as follows:
A, portable terminal are initiated synchronization request to the sync agent server.
Portable terminal is initiated synchronization request, the synchrodata compressed package is sent to the sync agent server, wherein the synchrodata compressed package comprises following data message: simultaneous user's personal information management (PersonalInformation Management, PIM) user name, simultaneous user's PIM password, simultaneous user's portable terminal model, simultaneous user's mobile terminal device number, simultaneous user's wireless backup client version number, the method of synchronization that the simultaneous user initiates (as: backup, recover), synchronous applications type (as: the contact person that the simultaneous user initiates, schedule etc.), simultaneous user's the local synchrodata or the renewal log information of data etc.
B, sync agent server carry out decompress(ion) and parsing to the synchrodata compressed package after receiving the synchronization request and synchrodata compressed package of portable terminal.When storing user data in the sync agent server, empty the corresponding data of relative users in the sync agent server stores space, and the synchrodata that decompress(ion) is come out and the renewal log information of data are kept in the memory space of sync agent server.
After C, step B finished, the sync agent server returned Synchronization Status Message to portable terminal.This Synchronization Status Message comprises following data: synchronous regime (comprise two kinds: begin synchronously or handle failure), Synchronous Processing are estimated the time (is unit with the second) (this is just to comprise this data item when beginning synchronously when synchronous regime) of needs.If the synchronous regime that the sync agent server returns to portable terminal then continues step D for beginning synchronously; Handle failure, then same EOS if return.
D, if the synchronous regime that the sync agent server returns to portable terminal is for beginning synchronously, then the sync agent server begins to send SyncML synchronization request and synchronization server and carries out data sync and operate.
E, sync agent server and synchronization server with EOS after, the compressed portable terminal that returns to of Synchronous Processing result data.These data comprise: the renewal log information of Synchronous Processing state (two states: success or failure), synchrodata and data.
F, portable terminal decompress to it after receiving the Synchronous Processing result data that the sync agent server sends, and synchrodata is covered associated databases to portable terminal.
Below in conjunction with accompanying drawing the data sync logical operation based on the SyncML agreement between sync agent server and the synchronization server is described in further detail.
The wheel synchronization type of supporting has following five kinds at present:
A. slow Synchronous Processing logic (SLOW)
Fig. 4 shows the realization flow of slow simultaneous operation, details are as follows: synchronous initiation, synchronization server checking user validation and synchronous anchor inspection, if unsuccessful then end, if success, the sync agent server reads all data of client (sync agent server), (as: contact person does contrast according to name of contact person to the data of contrast synchronization server end and client, schedule is done contrast according to schedule title and schedule date), and the variance data that contrasts is updated to server end (increases, deletion, revise data), after renewal finishes, the sync agent server sends request of data to synchronization server, after the sync agent server receives the variance data of synchronization server transmission, the data of upgrading client according to synchronic command (increase, deletion, revise data), and to synchronization server transmission Data Update state and MAP information.
B. differential backup Synchronous Processing logic (ONE_WAY_FROM_CLIENT)
Fig. 5 shows the realization flow of differential backup simultaneous operation, details are as follows: synchronous initiation, synchronization server checking user validation and synchronous anchor inspection, if unsuccessful then end, if success, the sync agent server reads the data of client change, sends it in the synchronization server, upgrades synchronization server end data (increasing, delete, revise data).
C. back up Synchronous Processing logic (REFRESH_FROM_CLIENT) fully
Fig. 6 shows the realization flow that backs up simultaneous operation fully, details are as follows: synchronous initiation, synchronization server checking user validation and synchronous anchor inspection, and the backup Local Data is in the data backup table, the sync agent server reads all data of client, send it in the synchronization server, all data of synchronization server deletion local terminal, and all Data Update of client that the sync agent server is sent are to local terminal.
D. difference is recovered Synchronous Processing logic (ONE_WAY_FROM_SERVER)
Fig. 7 shows the realization flow that difference is recovered simultaneous operation, details are as follows: synchronous initiation, synchronization server checking user validation and synchronous anchor inspection, client (sync agent server) sends request of data to the synchronization server end, read the data that the synchronization server end upgraded, upgrade client data (increasing, delete, revise data) according to synchronic command, client produces MAP information and is back to the synchronization server end.
E. recover Synchronous Processing logic (REFRESH_FROM_SERVER) fully
Fig. 8 shows the realization flow that recovers simultaneous operation fully, details are as follows: synchronous initiation, synchronization server checking user validation and synchronous anchor inspection, and the backup client end data is in local compressed file, the sync agent server sends request of data to synchronization server, read all data of synchronization server end, all data of sync agent server deletion client, and according to synchronic command renewal client data (increase data), client produces MAP information and is back to the synchronization server end.
In sum, among the present invention, by the sync agent server generation for portable terminal finish and synchronization server between data sync logical operation.The disposal ability of sync agent server and stability are stronger than the disposal ability of portable terminal, and therefore synchronous speed has just improved naturally.
Among the present invention, portable terminal will need data in synchronization to send through the whole packing of overcompression, and communication process only need once send and receive, and need not verify that these work are by finishing between sync agent server and the synchronization server according to the communication that the SyncML agreement is carried out repeatedly.Therefore thereby having reduced communication process has also reduced the traffic on the wireless network.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.