CN100429891C - Data synchronization method - Google Patents

Data synchronization method Download PDF

Info

Publication number
CN100429891C
CN100429891C CNB2005100869111A CN200510086911A CN100429891C CN 100429891 C CN100429891 C CN 100429891C CN B2005100869111 A CNB2005100869111 A CN B2005100869111A CN 200510086911 A CN200510086911 A CN 200510086911A CN 100429891 C CN100429891 C CN 100429891C
Authority
CN
China
Prior art keywords
data
synchronization
execution
client
server end
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB2005100869111A
Other languages
Chinese (zh)
Other versions
CN1968125A (en
Inventor
寇涛
金曙花
郭江鸿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
LG Electronics China Research and Development Center Co Ltd
Original Assignee
LG Electronics China Research and Development Center Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by LG Electronics China Research and Development Center Co Ltd filed Critical LG Electronics China Research and Development Center Co Ltd
Priority to CNB2005100869111A priority Critical patent/CN100429891C/en
Publication of CN1968125A publication Critical patent/CN1968125A/en
Application granted granted Critical
Publication of CN100429891C publication Critical patent/CN100429891C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a data synchronous method, which comprises that: when the synchronous process is not the first and the last synchronous process fails, judging if the last synchronous process is slow one or if there is data interaction before synchronous failure; when the last synchronous process is slow one or there is data interaction before synchronous, using slow synchronous method; when the last synchronous process is not slow one or if there is not data interaction before synchronous, using bidirectional synchronous method. The invention will start slow synchronous process in needed process, to save cost and resource.

Description

A kind of method of data synchronization
Technical field
The present invention relates to the method for data synchronization of a kind of client and server end, particularly relate to a kind of high efficiency method of data synchronization.
Background technology
Along with the development of mobile communication technology, the value-added service of more portable terminal is developed, and the SyncML simultaneous techniques is exactly one of them.SyncML (Synchronization Markup Language) is a kind of and information synchronization standard agreement platform independence.Existing most of synchronization solutions overwhelming majority depends on certain manufacturer, application, or certain operating system, and the purpose of SyncML will provide an open standard exactly.At present, this standard has obtained the support of the product of more companies.
OMA SyncML DS agreement has been stipulated wheel synchronization type, and that wherein the most basic is slow sync and twoway sync.
(1) Two-way sync: bi-directional synchronization is the wheel synchronization type a kind of commonly used of any relevant data message of revising of client and server end exchange.Client and server end to data increase, modification and deletion action, all can go on record.When using bi-directional synchronization pattern synchronization data, server end and client have successively been obtained the other side since last operation note since subsynchronous, and with the data of renewal self, the realization data sync.
(2) Slow sync: be a kind of special form of bi-directional synchronization synchronously slowly.Slowly exactly the data of client database and the database data of server end are compared one by one synchronously.If the synchronous anchor of client and server end does not match or the modification daily record of client or server end will ask when losing one synchronously slow.In fact, the slow client that just means synchronously sends all data to server end, and server end carries out analysis, the comparison of field one by one to all data of client, and the data of server end are sent to client.After analysis was finished synchronously, server end returned all modification information to client.Then, client is returned the map information of all data, and adds service end to.
Therefore, slow synchronous execution is compared with bi-directional synchronization, needs all data of transmission also to compare one by one, and workload is also big a lot, takies more resources.
Fig. 1 is existing synchronizing process.Start synchronously at first judge after (step 101) this subsynchronous whether be (step 102) synchronously for the first time, if then adopt slow synchronous mode (step 103) for the first time synchronously, before promptly synchronizing process having taken place, had judged then whether the last time synchronization failure (step 104) has taken place synchronously.If synchronization failure has taken place in the last time, then loss of data might take place, should carry out slow (step 103) synchronously this moment; If last time synchronization failure does not take place, transfer of data is normal, then should take bi-directional synchronization (step 105) this moment, economizes on resources, and raises the efficiency.Still to observe synchronizing process whether new synchronization failure (step 106) has taken place,, synchronization failure not take place, then this subsynchronous finish smoothly (step 107) if there is not the interference of other factors thereafter.If synchronization failure takes place, the judgement (step 108) of then whether restarting.Whether if restart synchronously, then rejudging this subsynchronous is for the first time synchronous (step 102), and the subsequent step circulation is the same; If do not prepare synchronously, then directly finish (step 109).
Can see to draw that the SyncML standard does not have the entry condition of strict regulations Slow Sync, as long as synchronization failure, subsynchronously will start Slow Sync blindly down.But be not have synchronization failure under the situation that data interaction takes place during bi-directional synchronization is carried out sometimes, need not carry out synchronously slowly in the time of this, and should adopt only exchange to go up the bi-directional synchronization of subsynchronous back modification data.
Also have multiple personal information management system (PIMS) data sync solution in the market.These products can be PC and mobile information terminal apparatus such as mobile phone, PDA etc. and the exchanges data of cross-platform, striding equipment, across a network are provided, reach backup functionality synchronously.Data type can be personal information such as phone business card, schedule, memo etc., also can be the customer resources information of enterprise.The method of synchronization is supported synchronously local and Network Synchronization, if the end product of compatible SyncML standard, and do not rely on specific platform and equipment manufacturers.
Summary of the invention
Technical problem to be solved by this invention is to prevent blindly to start slowly synchronously after the failure of data synchronization, reduces slow synchronous number of times, reduces expenses and resource, improves synchronous efficiency.
For achieving the above object, the invention provides a kind of method for synchronous, comprise the steps:
(1) startup is originally subsynchronous;
(2) judge whether to synchronously for the first time, if, execution in step (3), if not, execution in step (4);
(3) take the slow method of synchronization to carry out data sync, forward step (7) to;
(4) the subsynchronous synchronization failure that whether taken place in the judgement, if not, execution in step (5), if, execution in step (6);
(5) this subsynchronous two-way simultaneous mode of taking, execution in step (7);
(6) judge whether whether data interaction took place when synchronized is failed last time or gone up subsynchronous is synchronously slow, if, execution in step (3), if not, execution in step (5);
(7) this subsynchronous synchronization failure that whether taken place of monitoring if not, is finished synchronously, if, execution in step (8);
(8) judge whether to restart synchronously, if execution in step (2) if not, finishes.
Described synchronization failure comprises: thus invalid client setting, network unavailablely cause connecting with server, server end is unavailable, authentification failure, path are unavailable.
Described invalid client is provided with that finger one of is not provided with in ID, PASSWORD, the database address or its group.
The unavailable finger unstable networks of described network or connect overtime.
Unavailable finger server end equipment fault of described server end or excess load.
Described authentification failure refers to ID, PASSWORD mistake.
Described bi-directional synchronization and all comprise the client initialization slowly synchronously, netinit, synchronous initiation, and the process of data interaction.
Described client data is sent to server end, server end data and replying state and will be sent to client, client and sends map information and replying state and relate to data interaction to the process that server end and server end transmit status are returned to client.
The present invention only just starts synchronously slow under necessary really situation, has reduced slow synchronous number of times, reduces expenses and resource, improves synchronous efficiency.
Description of drawings
Fig. 1 is existing synchronizing process schematic diagram.
Fig. 2 is the synchronous general flow schematic diagram of client and server end.
Fig. 3 is a synchronizing process schematic diagram of the present invention.
Embodiment
Describe essence of the present invention in detail below in conjunction with accompanying drawing, but not as a limitation of the invention.
The present invention is to provide the method for data synchronization between a kind of client more efficiently and the server end.Its main feature is to restart when synchronous at last synchronization failure once, at first will be to the judging synchronously of last time, only last subsynchronous for synchronously slow or on just take synchronous mode slowly under the subsynchronous situation of carrying out data interaction.Can reduce unnecessary slow synchronous number of times thus, reduce expenses and resource, can improve the efficient of data sync again.
See also Fig. 2, it is client and the synchronous general flow of server end.Bi-directional synchronization reaches and all is applicable to this flow process slowly synchronously, and just the data of transmission are different.The user starts synchronous back (step 201), and client begins initialization (step 202), and netinit (step 203), synchronous initiation (step 204) carry out in succession subsequently.Subsequently, client data is sent to server end (step 205), and server receives and in addition reference, and its data is increased, revises, deletes.Thereafter server end data and replying state will be sent to client (step 206), client receives and increases, revises, deletes with reference to these data the data of self, send map information and replying state immediately to server end (step 207), server end receives the back transmit status and is returned to client (step 208), thereby has realized both sides' data synchronization process.
As shown in the figure, do not relate to data exchange process in the step more than the dotted line A, can not influence data in synchronization quality next time yet even therefore this moment synchronization failure takes place.Therefore and dotted line A following steps all relate to the transmission and the modification of two end datas, in case synchronization failure takes place, thereby must cause problems such as loss of data to influence the correctness of both sides' data sync next time.
In the prior art, as long as synchronization failure has taken place, data sync next time just adopts slow synchronous mode.Slowly client and all data of server end all need be sent to the other side synchronously, so the resource that consumed time takies is more, efficient is not high.If but synchronization failure occurs in when carrying out above certain step of dotted line A, promptly synchronizing process still is in initial phase, does not proceed to the part of data interaction as yet, does not then influence next data in synchronization quality.Take this moment two-way simultaneous mode to carry out client, network, synchronous initialization again synchronously, i.e. correctable error also can guarantee the correctness of follow-up transfer of data next time.As still taking slow synchronous mode, this has just caused the waste to transfer resource and transmission time.Therefore the present invention is directed to this problem further to dividing the concrete opportunity that synchronization failure took place, only needing slowly synchronously just to start when guaranteeing that data accurately synchronously slow really, reduce and use slow synchronous number of times, improve synchronous efficiency.
Idiographic flow of the present invention sees also Fig. 3.The user starts synchronously after (step 301), and whether at first carry out this subsynchronous is the first hyposynchronous judgement (step 302).If synchronously for the first time, in order to guarantee the correct and uniformity of the follow-up transfer of data of both sides, modification process, should take slow synchronous mode (step 303), client and server end exchange its data mutually, with reference to the other side's data additions and deletions its data, guarantee the unanimity of both sides' data.If not synchronously for the first time, should continue to judge the upward subsynchronous synchronization failure (step 304) that whether taken place.If synchronization failure did not take place last time, promptly the reciprocal process of data is normally and stably, and then these subsynchronous needs starts bi-directional synchronization (step 306).The both sides of bi-directional synchronization are only transmitted from the last data updated of having carried out since subsynchronous and are given the other side, transmitted data amount is few, the efficient height, same data are made amendment thereby the situation of data collision takes place but user side and server end might take place, certainly the SyncML agreement has the method that a cover avoids conflict in addition, not superfluous herein chatting.If go up the subsynchronous synchronization failure that taken place, so still to continue to judge whether data interaction (step 305) has taken place when synchronization failure takes place, corresponding to Fig. 2, be whether synchronizing process has proceeded to the following step of dotted line A, if data interaction has taken place, then this subsynchronously must take slow synchronous mode; Judge perhaps whether go up subsynchronous is synchronously slow, if went up the process that needs in subsynchronous both sides' data accurately to be consistent last time for slow representative synchronously, since synchronization failure has taken place, so obviously this subsynchronously still should take slow synchronous mode to guarantee the in order normal of subsequent synchronization process.Only the synchronizing process that synchronization failure took place in last time is a bi-directional synchronization and when not carrying out data interaction when synchronization failure takes place, and this is subsynchronous could carry out bi-directional synchronization (step 306).Thereby when effectively reducing synchronous slowly number of times, guarantee the safety of data, saved expense and resource.Synchronizing process is carried out according to selected type, still will monitor whether new synchronized failure (step 307) has taken place in subsequent process, if take place then finish (step 308) synchronously smoothly, this subsynchronous process finishes (step 310).If in the synchronizing process synchronization failure has taken place again then need judge whether to restart synchronously (step 309) once more, as restart then re-execute synchronously judge this subsynchronous whether be the first hyposynchronous step (step 302), the subsequent step circulation is carried out, until end.This subsynchronous process finishes (step 310) as not restarting synchronously then.
Among the present invention, the situation of synchronization failure mainly comprises: invalid client setting for example is not provided with ID, PASSWORD, database address etc.; Unavailable causing of network can't connect as unstable networks with server, connects overtime etc.; Server end is unavailable, as server end equipment fault, excess load etc.; Authentification failure is as ID, PASSWORD mistake etc.; The path is unavailable.
Major advantage of the present invention is, and is not general in the upper subsynchronous situation that synchronization failure takes place In this is subsynchronous, select the slow method of synchronization, but distinguish further whether was synchronously slow and last time last time Whether carried out data interaction during synchronization failure, when upper subsynchronous when being bi-directional synchronization and synchronization failure also not When data interaction took place, this subsynchronous mode that will take bi-directional synchronization so only had where necessary Take the slow method of synchronization, effectively reduce slow synchronous number of times, also can guarantee the accuracy that data are synchronous simultaneously, Also can reduce expenses and resource.
In order to limit the present invention, any those of ordinary skill in the art is not violating this for the above Modification or the change done in bright spirit and the scope all should belong to scope of patent protection of the present invention.

Claims (8)

1, a kind of method of data synchronization is characterized in that, comprises the steps:
(1) startup is originally subsynchronous;
(2) judge whether to synchronously for the first time, if, execution in step (3), if not, execution in step (4);
(3) take the slow method of synchronization to carry out data sync, forward step (7) to;
(4) the subsynchronous synchronization failure that whether taken place in the judgement, if not, execution in step (5), if, execution in step (6);
(5) this subsynchronous two-way simultaneous mode of taking, execution in step (7);
(6) judge whether whether data interaction took place during synchronization failure last time or gone up subsynchronous is synchronously slow, if, execution in step (3), if not, execution in step (5);
(7) this subsynchronous synchronization failure that whether taken place of monitoring if not, is finished synchronously, if, execution in step (8);
(8) judge whether to restart synchronously, if execution in step (2) if not, finishes.
2, method of data synchronization as claimed in claim 1 is characterized in that, described synchronization failure comprises: thus invalid client setting, network unavailablely cause connecting with server, server end is unavailable, authentification failure, path are unavailable.
3, method of data synchronization as claimed in claim 2 is characterized in that, described invalid client setting comprises and one of not being provided with in ID, PASSWORD, the database address or its combination.
4, method of data synchronization as claimed in claim 2 is characterized in that, described network is unavailable to be comprised unstable networks or connect overtime.
5, method of data synchronization as claimed in claim 2 is characterized in that, unavailable server end equipment fault or the excess load of comprising of described server end.
6, method of data synchronization as claimed in claim 2 is characterized in that, described authentification failure comprises ID, PASSWORD mistake.
7, method of data synchronization as claimed in claim 1 is characterized in that, the described two-way simultaneous mode and the slow method of synchronization all comprise client initialization, netinit, synchronous initiation and data exchange process.
8, as claim 1 or 7 described method of data synchronization, it is characterized in that described data interaction comprises that client data is sent to server end, server end data and replying state and will be sent to that client, client send map information and replying state is returned to client to server end and server end transmit status.
CNB2005100869111A 2005-11-17 2005-11-17 Data synchronization method Expired - Fee Related CN100429891C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100869111A CN100429891C (en) 2005-11-17 2005-11-17 Data synchronization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100869111A CN100429891C (en) 2005-11-17 2005-11-17 Data synchronization method

Publications (2)

Publication Number Publication Date
CN1968125A CN1968125A (en) 2007-05-23
CN100429891C true CN100429891C (en) 2008-10-29

Family

ID=38076692

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100869111A Expired - Fee Related CN100429891C (en) 2005-11-17 2005-11-17 Data synchronization method

Country Status (1)

Country Link
CN (1) CN100429891C (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020161769A1 (en) * 2001-04-25 2002-10-31 Ari Sutinen Synchronization of database data
WO2003088613A1 (en) * 2002-04-15 2003-10-23 Nokia Corporation Method and device for handling synchronization related information
KR20050055545A (en) * 2003-12-08 2005-06-13 충남대학교산학협력단 An integrated development system for a syncml server application development

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020161769A1 (en) * 2001-04-25 2002-10-31 Ari Sutinen Synchronization of database data
WO2003088613A1 (en) * 2002-04-15 2003-10-23 Nokia Corporation Method and device for handling synchronization related information
CN1625878A (en) * 2002-04-15 2005-06-08 诺基亚有限公司 Method and equipment for processing synchronous related information
KR20050055545A (en) * 2003-12-08 2005-06-13 충남대학교산학협력단 An integrated development system for a syncml server application development

Also Published As

Publication number Publication date
CN1968125A (en) 2007-05-23

Similar Documents

Publication Publication Date Title
WO2017024688A1 (en) Control method and system capable of system upgrade without interrupting services
RU2438263C2 (en) Methods and apparatus for dataset synchronisation in wireless environment
CN101483576B (en) Version management implementing method in distributed system
CN105677380B (en) Method and device for board-by-board upgrading of double master control isolations
CN102098590A (en) Automatic upgrading method and system of firmware version of optical network unit
CN107919977A (en) A kind of on-line rapid estimation of the distributed consensus system based on Paxos agreements, the method and apparatus of online capacity reducing
CN102508734A (en) Operating system recovery method and intelligent equipment
CN101778134A (en) Data synchronization method and mobile communication terminal
CN100512474C (en) Automatic synchronization method for master-slave board storage version of the communication system
CN109992219A (en) Distributed storage method, device, equipment and computer readable storage medium
CN104954482A (en) Configuration management system and method
CN110401729B (en) Cloud platform server network migration method, system, terminal and storage medium
CN101155015A (en) Synchronization method for data and condition between host computer and standby computer
CN113612814B (en) Session information screening method, device, terminal and storage medium
CN100525208C (en) Data synchronization method
CN101778367A (en) Method for restarting and restoring work of charging gateway
CN103684813A (en) ENUM-DNS disaster recovery method and system used in IMS network
CN100429891C (en) Data synchronization method
CN111200524B (en) Switch configuration method and server
CN109728886A (en) A kind of method of data synchronization, device, equipment and storage medium suitable for cross-version upgrading
CN101212340B (en) Method for restarting control nodes in automatic switching optical network
CN101155061B (en) Master/standby control method
CN114185590A (en) Application system operation and maintenance configuration management method and device
CN100548002C (en) The permanent virtual circuit state inquiry system
CN113377385A (en) Client automatic deployment method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20081029

Termination date: 20091217