Background technology
The management of mobile phone personal information, calendar information and e-mail messages etc. becomes more and more important, and has become an important component part of cellphone information management.Data can backup on the webserver and the computer, when changing mobile phone or data in mobile phone and changing, can easily Backup Data be returned to mobile phone; Data can also be transmitted between mobile phone, and the SyncML agreement can realize the data sync between mobile phone terminal and the webserver, PC, the mobile phone.
In present SyncML agreement, the data traffic in order to reduce when synchronous has been stipulated the fast synchronous method of synchronization in agreement, like this, and the data of having changed after subsynchronous on synchronously the time, just only needing synchronously.Reach such purpose, this just needs terminal and server to note in the last subsynchronous modification information (changelog) of one's own side's data afterwards.Carry out synchronously with a plurality of servers if desired, simultaneously, after a server sync, if this has subsynchronously revised the data on the terminal, during the modification information that its modification information just need add each server simultaneously writes down.Attention: separate between the multiserver of mentioning here, can not exchange synchronizing information, be that terminal is carried out respectively alternately with different servers.
A kind of method is provided in the correlation technique, this method is to need synchronous server all to set up modification information corresponding with it (changelog) file to each on terminal, each changelog file is separate, after the data of terminal are modified, then modification information is joined in the amendment record of each server correspondence, certain server being carried out fast just only need from the changelog message file of this server correspondence, read modification information synchronously the time, be synchronized on the corresponding server then like this.
Fig. 1 revises the information schematic diagram according to the distributed management of correlation technique.
Mainly there are two shortcomings in the method for a plurality of changelog of management in the correlation technique: 1, because each server all has oneself independently changelog record, be in these many identical information under the situation of multiserver among these changelog, this makes terminal need more memory space to store these amendment records.2, because data of every modification all need to revise Servers-all changelog information on the terminal, this makes efficient reduce greatly, and synchronous speed has slowed down.
Often need a large amount of memory spaces to store the problem of amendment record at terminal in the correlation technique, do not propose effective solution at present as yet.
Summary of the invention
Often need a large amount of memory spaces to propose the present invention with the problem that stores amendment record at terminal, for this reason, main purpose of the present invention is to provide a kind of modification management of information method and terminal, one of to address the above problem at least.
To achieve these goals, according to an aspect of the present invention, provide a kind of modification management of information method.
Modification management of information method according to the present invention comprises: terminal is obtained modification information, and wherein, modification information is the modification information of corresponding a plurality of servers; Terminal is recorded in modification information in the same modification information log file.
Preferably, above-mentioned modification information is the local modification information that produces of terminal.
Preferably, before terminal is recorded in modification information in the same modification information log file, this method also comprises: the order that terminal receives and resolution server issues, wherein, order is used to indicate the data to terminal to make amendment, and terminal is recorded in modification information in the same modification information log file and comprises: the information that terminal is revised needs according to order is recorded in the same modification information log file.
Preferably, after the order that terminal receives and resolution server issues, this method also comprises: terminal is revised local data base according to order.
Preferably, terminal is revised local data base according to order and comprised: increase at needs under the situation of data item, terminal increases the data message of data item in revising the information log file; Revise at needs under the situation of data item, terminal is done corresponding modification to the data message of data item in revising the information log file; Needing under the situation of deleted data item the data message of terminal deleted data item in revising the information log file.
Preferably, terminal is revised local data base according to order and comprised: other server operations of terminal data item correspondence are set to increase operation, the changed information of while deleted data item.
Preferably, after terminal was recorded in modification information in the same modification information log file, this method also comprised: terminal is sent to server according to revising the information of journal file with the needs modification.
To achieve these goals, according to a further aspect in the invention, provide a kind of terminal.
Terminal according to the present invention comprises: acquisition module, be used to obtain modification information, and wherein, modification information is the modification information of corresponding a plurality of servers; Logging modle is used for modification information is recorded in same modification information log file.
Preferably, above-mentioned terminal also comprises: receiver module, be used for the order that issues according to reception server, and wherein, order is used to indicate the data to terminal to make amendment.
Preferably, above-mentioned terminal also comprises: sending module is used for being sent to server according to revising the information of journal file with the needs modification.
By the present invention, adopt terminal to obtain modification information, wherein, modification information is the modification information of corresponding a plurality of servers; Terminal is recorded in modification information in the same modification information log file, having solved terminal often needs a large amount of memory spaces to store the problem of amendment record, and then the memory space of the modification information that reduces a plurality of servers of terminal storage, the effect of reduction operation complexity have simultaneously been reached.
Embodiment
Hereinafter will describe the present invention with reference to the accompanying drawings and in conjunction with the embodiments in detail.Need to prove that under the situation of not conflicting, embodiment and the feature among the embodiment among the application can make up mutually.
By the present invention, can adapt to SyncML terminal needs and carry out fast synchronous needs with different server.
Method embodiment
According to embodiments of the invention, provide a kind of modification management of information method.
Fig. 2 is the flow chart according to the modification management of information method of the embodiment of the invention.
As shown in Figure 2, this method comprises that following step S202 is to step S204:
Step S202, terminal is obtained modification information, and wherein, modification information is the modification information of corresponding a plurality of servers;
Step S204, terminal is recorded in modification information in the same modification information log file.
Be described in detail below in conjunction with the implementation procedure of example the embodiment of the invention.
The present invention proposes a kind of method and data modification flow process of managing the amendment record of corresponding a plurality of servers on the terminal concentratedly, by adopting concentrated management method, reduced the memory space of storing a plurality of server modifications information greatly, reduce the complicated operation degree simultaneously, improved synchronization efficiency.
Alternatively, the present invention is directed in data sync may need to carry out when synchronous with a plurality of servers, after finishing with a server sync, terminal equipment can guarantee to switch to another server and can carry out soon synchronously, and need must not initiate slow synchronous behind switching server.
Fig. 3 is a schematic diagram of revising information according to the centralized management of the embodiment of the invention.
In the present invention, synchronously fast in order to carry out with a plurality of servers, can note the data change information corresponding in terminal, in the present invention with each server, these recorded informations are to adopt the mode of centralized management to carry out, and these data messages also can separate management simultaneously.When changing to some extent, local data then needs change and the corresponding data change record of Servers-all.And in practical operation, be divided into two kinds of situations:
1, the change of the terminal data that with certain server sync the time, produces;
2, the data modification that produces at the terminal local operation.
For first kind of situation, if server data to terminal in synchronizing process are made amendment, after terminal has successfully been revised local data, need to revise modification information (changelog) except that other server when preamble, for server, then need to remove the changelog information of these data when preamble.
Preferred modification management of information method according to the embodiment of the invention can may further comprise the steps:
Step S1, the order that terminal receives and resolution server issues, wherein, described order is used to indicate the data to described terminal to make amendment;
Step S2, terminal is revised local data base according to order.
Preferably, terminal can divide following situation to handle respectively according to the difference of server command:
Situation one: if server sends the order that increases data item, then in changelog information, increase this data message, and other server operation of this data correspondence is set to increase operation, deletion simultaneously and the synchronous server changed information about these data.
Situation two: if server sends the order of revising terminal data, then in changelog information, find the information of this data correspondence, and other server operation information of this data correspondence carried out corresponding modification, if originally Ji Lu changed information is for increasing or retouching operation, then record remains unchanged, if originally be recorded as deletion action, then change this changed information into retouching operation.Delete simultaneously and the changed information of synchronous server about these data.
Situation three: if server sends the order of deletion terminal data, then in changelog information, find the information of this data correspondence, and other server operation information of this data correspondence carried out corresponding modification, if originally Ji Lu changed information is for increasing operation, then delete this changed information, if being recorded as originally upgraded or deletion action, then change this changed information into deletion action.Delete simultaneously and the changed information of synchronous server about these data.
For second kind of situation, because retouching operation is in the local generation of terminal, therefore its operation is not communicated on the synchronous server of any needs, therefore needs amended changed information to add in the modification information of Servers-all, and its concrete operations are identical with first kind of situation.
Under the situation of distributed management changelog information, because the changelog file of each server correspondence is separate, therefore, when the changed information of the wherein a certain information of change, all need to search this changelog file, suppose that wanting synchronous server number is m, have n bar data on the terminal, then the time complexity of after data of local modification changelog information being made amendment is O (n*m), and when adopting the changelog information of a plurality of servers of centralized management, because the changelog information of each server is mutually related and is kept at together, therefore, revising the time complexity of after the data changelog information being made amendment in this locality is O (n+m).This shows, adopt the changelog information of managing multiserver concentratedly on operating efficiency, to be better than the method for distributed management greatly.
As can be seen from the above description, the present invention has realized following technique effect: by the changelog information of centralized management multiserver, reduce the memory space of these information of storage, and reduce the complicated operation degree, improve synchronous efficiency.
Device embodiment
According to embodiments of the invention, provide a kind of terminal.
Fig. 4 is the schematic diagram according to the terminal of the embodiment of the invention.
As shown in Figure 4, this terminal comprises: acquisition module 401 and logging modle 403.
Wherein, acquisition module 401 is used to obtain modification information, and wherein, modification information is the modification information of corresponding a plurality of servers; Logging modle 403 is used for modification information is recorded in same modification information log file.
Preferably, this terminal also comprises: receiver module 405, be used for the order that issues according to reception server, and wherein, order is used to indicate the data to terminal to make amendment.
Preferably, terminal also comprises: sending module 407 is used for being sent to server according to revising the information of journal file with the needs modification.
Need to prove, can in computer system, carry out in the step shown in the flow chart of accompanying drawing such as a set of computer-executable instructions, and, though there is shown logical order in flow process, but in some cases, can carry out step shown or that describe with the order that is different from herein.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with the general calculation device, they can concentrate on the single calculation element, perhaps be distributed on the network that a plurality of calculation element forms, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in the storage device and carry out by calculation element, perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.