CN106101275A - A kind of method of data synchronization and masters - Google Patents
A kind of method of data synchronization and masters Download PDFInfo
- Publication number
- CN106101275A CN106101275A CN201610653524.XA CN201610653524A CN106101275A CN 106101275 A CN106101275 A CN 106101275A CN 201610653524 A CN201610653524 A CN 201610653524A CN 106101275 A CN106101275 A CN 106101275A
- Authority
- CN
- China
- Prior art keywords
- masters
- chronization
- passive side
- data
- data syn
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/563—Data redirection of data network streams
Abstract
The invention provides a kind of method of data synchronization and masters, wherein, the method includes: when needing the user data synchronizing storage in passive side, and active direction passive side sends passive side when including the last data syn-chronization and is sent to the data synchronization request of passive side's data syn-chronization time of masters;Make passive side that as passive side's synchrodata, the user data updated after passive side's data syn-chronization time is sent to masters;Masters receives and processes passive side's synchrodata that described passive side sends;Masters generates passive data syn-chronization successful information, and the passive data syn-chronization successful information generated is sent to described passive side.A kind of method of data synchronization provided by the embodiment of the present invention and masters, can improve the efficiency carrying out data syn-chronization operation between mobile terminal and computer.
Description
Technical field
The present invention relates to technical field of data processing, in particular to a kind of method of data synchronization and masters.
Background technology
At present, along with the extensively application of the mobile terminal such as mobile phone, panel computer and improving constantly of living standard, user
The cycle changing mobile terminal is shorter and shorter.In order to user data is transferred to change after mobile terminal in, user need by
The data being replaced on mobile terminal first backup to local computer or cloud server, then by local computer or cloud
On end server, the data syn-chronization that backed up is in the mobile terminal changed, after user just can be made preferably can to use replacing
Mobile terminal use.
In correlation technique, during carrying out data syn-chronization, mobile terminal and backup have user data computer it
Between need first to contrast self current system time, when mobile terminal and system for computer time consistency, mobile terminal and
Data syn-chronization operation just can be carried out between computer.
In realizing process of the present invention, inventor finds that in prior art, at least there are the following problems:
If mobile terminal and system for computer Time Inconsistency, then be to enter between mobile terminal and computer
Row data simultaneously operating, this leverages the efficiency carrying out data syn-chronization operation between mobile terminal and computer.
Summary of the invention
In view of this, the purpose of the embodiment of the present invention is to provide a kind of method of data synchronization and masters, to improve shifting
The dynamic efficiency carrying out data syn-chronization operation between terminal and computer.
First aspect, embodiments provides a kind of method of data synchronization, including:
When needing the user data synchronizing storage in passive side, passive side described in active direction sends and includes the last time
During data syn-chronization, described passive side is sent to the data synchronization request of passive side's data syn-chronization time of described masters so that institute
State passive side and the user data updated after described passive side's data syn-chronization time is sent to institute as passive side's synchrodata
State masters;
Described masters receives and processes passive side's synchrodata that described passive side sends;
Described masters generates passive data syn-chronization successful information, and the described passive data syn-chronization successful information that will generate
It is sent to described passive side.
In conjunction with first aspect, embodiments provide the first possible embodiment of first aspect, wherein: institute
State masters and receive and process passive side's synchrodata that described passive side sends, including:
Described masters receives passive side's synchrodata that described passive side sends, and according to the described passive side received
Synchrodata carries out data recovery operation or data syn-chronization operation respectively, and wherein, described passive side's synchrodata includes: this
Passive side's data syn-chronization time;
Described masters is according to this passive side's data syn-chronization time described, during to the described passive side's data syn-chronization recorded
Between be updated.
In conjunction with first aspect, embodiments provide the embodiment that the second of first aspect is possible, wherein: institute
State masters and generate passive data syn-chronization successful information, and the described passive data syn-chronization successful information generated is sent to described
Passive side, including:
Described masters is according to the identification information of this passive side's data syn-chronization time described with the described passive side prestored
Generate passive data syn-chronization successful information, and the described passive data syn-chronization successful information generated be sent to described passive side,
Masters described in described passive direction is made to return the passive data syn-chronization success of passive data syn-chronization successful information described in response
Feedback information, and by described this passive side's data syn-chronization time of record in described data syn-chronization successful information to prestoring
The masters data syn-chronization time is updated;
Described masters receives the passive data syn-chronization success feedback information that described passive side sends, and determines that this is passive
Side's data syn-chronization success.
In conjunction with first aspect, embodiments provide the third possible embodiment of first aspect, wherein: institute
Method of stating also includes:
When needs are by data syn-chronization to described passive side, passive side described in described active direction sends synchronization request, makes
Obtain described passive side and the masters data syn-chronization time updated during the last data syn-chronization is sent to described masters;
Described masters receives the described masters data syn-chronization time that described passive side sends, and judges the institute received
State the masters data syn-chronization time the most consistent with default initial synchronization time;
If it is, all customer data of storage is sent to described by described masters as described masters synchrodata
Passive side so that described passive side carries out data recovery according to the described masters synchrodata received;Wherein, described active
Side's synchrodata includes: this masters data syn-chronization time;
If it does not, described masters will storage data in lock in time equal to initial synchronization time user data and with
The step time is sent to described quilt more than the user data of described masters data syn-chronization time as described masters synchrodata
Dynamic side so that described passive side carries out data syn-chronization operation according to the described masters synchrodata received;Wherein, described master
Dynamic side synchrodata includes: this masters data syn-chronization time.
Second aspect, the embodiment of the present invention provides a kind of method of data synchronization, including:
Passive side receives the data synchronization request that masters sends, and described data synchronization request includes: the last data
During synchronization, described passive side is sent to passive side's data syn-chronization time of described masters;
Described passive side using after described passive side's data syn-chronization time update user data as the same step number of passive side
According to being sent to described masters;
Described passive side receives the passive data syn-chronization successful information that described masters sends, and described passive data syn-chronization becomes
In merit information, record has this passive side data syn-chronization time.
In conjunction with second aspect, embodiments provide the first possible embodiment of second aspect, wherein: institute
State passive side and the user data updated after described passive side's data syn-chronization time is sent to institute as passive side's synchrodata
State masters, including:
Described passive side judge described passive side's data syn-chronization time of receiving whether with default initial synchronization time
Unanimously;
If it is, all customer data of storage is sent to described by described passive side as described passive side's synchrodata
Masters so that described masters carries out data recovery operation according to the described passive side's synchrodata received;Wherein, described
Passive side's synchrodata includes: this passive side's data syn-chronization time;
If it does not, described passive side will storage data in lock in time equal to initial synchronization time user data and with
The step time is sent to described master more than the user data of described passive side's data syn-chronization time as described passive side's synchrodata
Dynamic side so that described masters carries out data syn-chronization operation according to the described masters synchrodata received;Wherein, described master
Dynamic side synchrodata includes: this masters data syn-chronization time.
In conjunction with second aspect, embodiments provide the embodiment that the second of second aspect is possible, wherein: institute
State passive side and receive the passive data syn-chronization successful information that described masters sends, including:
Described passive side receives the passive data syn-chronization successful information that described masters sends, and according to described passive data
The masters data syn-chronization time prestored is carried out by this passive side's data syn-chronization time described of record in successful information that synchronizes
Update;
Identification information according to default described passive side and this passive side's data syn-chronization time described in receiving, institute
State passive side and generate the passive data syn-chronization success feedback information of passive data syn-chronization successful information described in response, and by generation
Passive data syn-chronization success feedback information is sent to described masters so that described masters determines this passive side's data syn-chronization
Success.
In conjunction with second aspect, embodiments provide the third possible embodiment of second aspect, wherein: institute
Method of stating also includes:
When receiving the synchronization request that described masters sends, described passive side will update during the last time data syn-chronization
The described masters data syn-chronization time crossed is sent to described masters;
Described passive side receives the masters synchrodata that described masters sends, and according to the described masters received
Synchrodata carries out data recovery operation or data syn-chronization operation, and wherein, described masters synchrodata includes: this is actively
Number formulary is according to lock in time;
Described passive side is according to this masters data syn-chronization time described, during to the described masters data syn-chronization recorded
Between be updated.
The third aspect, the embodiment of the present invention also provides for a kind of masters, including:
Data synchronization request module, for when needing the user data synchronizing storage in passive side, to described passive side
Send described passive side when including the last data syn-chronization and be sent to the number of passive side's data syn-chronization time of described masters
According to synchronization request so that described passive side using after described passive side's data syn-chronization time update user data as passive side
Synchrodata is sent to described masters;
Data simultaneous module, for receiving and process passive side's synchrodata that described passive side sends;
Synchronized result sending module, is used for generating passive data syn-chronization successful information, and the described passive data that will generate
Synchronize successful information and be sent to described passive side.
In conjunction with the third aspect, embodiments provide the first possible embodiment of the third aspect, wherein: institute
State masters also to include:
Synchronization request module, for when needs are by data syn-chronization to described passive side, sends synchronization to described passive side
Request so that the masters data syn-chronization time updated during the last data syn-chronization is sent to described master by described passive side
Dynamic side;
Judge module, for receiving the described masters data syn-chronization time that described passive side sends, and judges to receive
The described masters data syn-chronization time the most consistent with default initial synchronization time;
First data transmission blocks, if the result obtained for described judge module be yes, then all users that will store
Data are sent to described passive side as described masters synchrodata so that described passive side is according to the described active received
Side's synchrodata carries out data recovery;Wherein, described masters synchrodata includes: this masters data syn-chronization time;
Second data transmission blocks, if the result obtained for described judge module is no, then will in the data of storage with
The step time is equal to the user data of initial synchronization time and is more than the number of users of described masters data syn-chronization time lock in time
It is sent to described passive side so that described passive side is according to the described masters received according to as described masters synchrodata
Synchrodata carries out data syn-chronization operation;Wherein, described masters synchrodata includes: this masters data syn-chronization time.
A kind of method of data synchronization of embodiment of the present invention offer and masters, when needs carry out data syn-chronization, actively
Direction passive side sends passive side when including the last data syn-chronization and is sent to passive side's data syn-chronization time of masters
Data synchronization request so that passive side using after passive side's data syn-chronization time update user data as the same step number of passive side
According to being sent to masters, masters is sent to the quilt of masters by passive side when passive side sends the last data syn-chronization
Dynamic number formulary is according to lock in time, it is possible to by the user data synchronization of passive side to masters, only have system in prior art
Time consistency just carries out the process of data syn-chronization and compares, it is not necessary to carry out masters and the operation of passive side's system time consistency desired result
Just can be with data syn-chronization, it is to avoid mobile terminal and the impact on data syn-chronization of the system for computer time, improve mobile eventually
The efficiency of data syn-chronization operation is carried out between end and computer.
For making the above-mentioned purpose of the present invention, feature and advantage to become apparent, preferred embodiment cited below particularly, and coordinate
Appended accompanying drawing, is described in detail below.
Accompanying drawing explanation
In order to be illustrated more clearly that the technical scheme of the embodiment of the present invention, below by embodiment required use attached
Figure is briefly described, it will be appreciated that the following drawings illustrate only certain embodiments of the present invention, and it is right to be therefore not construed as
The restriction of scope, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to according to this
A little accompanying drawings obtain other relevant accompanying drawings.
Fig. 1 shows a kind of data syn-chronization side using masters as executive agent provided in the embodiment of the present invention 1
The flow chart of method;
Fig. 2 shows a kind of data syn-chronization side using passive side as executive agent provided in the embodiment of the present invention 2
The flow chart of method;
Fig. 3 shows the structural representation of the masters that the embodiment of the present invention 3 provided.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with the embodiment of the present invention
Middle accompanying drawing, is clearly and completely described the technical scheme in the embodiment of the present invention, it is clear that described embodiment is only
It is a part of embodiment of the present invention rather than whole embodiments.Generally real with the present invention illustrated described in accompanying drawing herein
The assembly executing example can be arranged with various different configurations and design.Therefore, below to the present invention's provided in the accompanying drawings
The detailed description of embodiment is not intended to limit the scope of claimed invention, but is merely representative of the selected reality of the present invention
Execute example.Based on embodiments of the invention, the institute that those skilled in the art are obtained on the premise of not making creative work
There are other embodiments, broadly fall into the scope of protection of the invention.
In correlation technique, during carrying out data syn-chronization, if mobile terminal and system for computer time differ
Cause, then cannot be carried out data syn-chronization operation between mobile terminal and computer, this leverages mobile terminal and meter
The efficiency of data syn-chronization operation is carried out between calculation machine.Based on this, the application provides a kind of method of data synchronization and device.
Embodiment 1:
For ease of the present embodiment is understood, first a kind of method of data synchronization disclosed in the embodiment of the present invention is entered
Row is discussed in detail.
A kind of method of data synchronization disclosed in the present embodiment, executive agent is masters, and this masters is by passively
When side sends the last data syn-chronization, passive side is sent to passive side's data syn-chronization time of masters, it is possible to by passive side
User data synchronization in masters.
Masters can be either party in data syn-chronization, and when masters is mobile terminal, passive side calculates exactly
Machine or server.When the mobile terminal as masters determines the user data needing to synchronize storage in passive side, will
Ask synchrodata to the computer as passive side, carry out data syn-chronization operation;When the mobile terminal as masters determines
Need when passive side synchronizes the user data of storage, synchrodata will be asked to the computer as passive side, count
According to simultaneously operating.
When masters is computer or server, the data syn-chronization flow process of execution and above-mentioned mobile terminal are as actively
The data synchronization process of side is similar to, and repeats the most one by one.
Server or computer, it is possible to use existing any model or the calculating equipment of type, with mobile terminal
Carry out data syn-chronization operation, repeat the most one by one.
Seeing Fig. 1, the present embodiment provides a kind of method of data synchronization, comprises the following steps:
Step 100, when needing the user data synchronizing storage in passive side, active direction passive side sends and includes recently
During data syn-chronization, passive side is sent to the data synchronization request of passive side's data syn-chronization time of masters so that passive side
The user data updated after passive side's data syn-chronization time is sent to masters as passive side's synchrodata.
In above-mentioned steps, passive side's data syn-chronization instruction that masters can send according to user, send to passive side
Data synchronization request, synchronizes the user data of storage in passive side.User can also preset passive side's data in masters
Synchronizing cycle so that the time of the user data that masters is in determining a closest subsynchronous passive side reach default quilt
When dynamic number formulary is according to synchronizing cycle, send data synchronization request to synchronize the user data of storage in passive side to passive side.
Above-mentioned passive side's data syn-chronization cycle, can be one week, two weeks, 20 days or one month and other any by
User setup time interval in masters, makes masters according in the passive side data syn-chronization cycle synchronisation passive side arranged
The user data of storage.
Above-mentioned user data, can be that user is when changing mobile terminal, it is desirable to use on the mobile terminal after replacing
File, as: according to the system of the mobile terminal set by the use habit of oneself, file is set;Can also be picture, video,
The multimedia files such as music;User is in the terminal with the uncorrected data of non-file mode storage, such as: data-base recording, configuration
Information;Can also is that user needs the application file installed on the mobile terminal after replacing.Certainly, user data can also is that
Other users need the file being synchronized on the mobile terminal after updating, and repeat the most one by one.
If masters is to send data synchronization request to passive side for the first time, then being impossible to storage in masters has
Any user data, when being also impossible to have the last data syn-chronization, passive side is sent to passive side's data of masters
Lock in time, then masters can generate data synchronization request according to the initial synchronization time preset, and carries to passive side's transmission
The data synchronization request of initial synchronization time so that all customer data is synchronized to masters, such masters by passive side
Data recovery operation can be carried out according to all customer data that passive side sends.
Step 102, masters receive and process passive side's synchrodata that passive side sends.
Specifically, above-mentioned steps 102 comprises the following steps (1) to step (2):
(1) masters receives passive side's synchrodata that passive side sends, and according to the passive side's synchrodata received
Carrying out data recovery operation or data syn-chronization operation respectively, wherein, passive side's synchrodata includes: these passive side's data are same
The step time;
(2) masters is according to this passive side's data syn-chronization time, the data syn-chronization time carries out the passive side of record more
Newly.
In above-mentioned steps 1, masters receives passive side's synchrodata that passive side sends, and passive according to receive
Side's synchrodata carries out data recovery operation or data syn-chronization operation respectively, comprises the following steps (11) to (14):
(11) masters receives passive side's synchrodata that passive side sends;
(12) whether the data that masters is carried in judging the passive side's synchrodata received update the time more than passive side
The data syn-chronization time, if it is, perform step 13, if it is not, then perform step 14;
(13) masters determines that all types of user data got is increment user data, and according to getting
All types of user data carries out data syn-chronization operation;
(14) masters determines that all types of user data got is all customer data, and get all types of
User data carry out data recovery operation.
Step 104, masters generate passive data syn-chronization successful information, and the passive data syn-chronization successful information that will generate
It is sent to passive side.
Above-mentioned steps 104 specifically includes following steps (1) to step (2):
(1) masters generates passive number according to this passive side's data syn-chronization time with the identification information of the passive side prestored
According to synchronizing successful information, and the passive data syn-chronization successful information generated is sent to passive side so that passive direction masters
Return the passive data syn-chronization success feedback information of response passive data syn-chronization successful information, and by data syn-chronization successful information
The masters data syn-chronization time prestored is updated by this passive side's data syn-chronization time of middle record;
(2) masters receives the passive data syn-chronization success feedback information that passive side sends, and determines this passive number formulary
According to synchronizing successfully.
In above-mentioned steps 1, passive side, after obtaining the passive data syn-chronization successful information that masters sends, can determine whether this
The success of secondary passive side's data syn-chronization, and the passive data syn-chronization success of response passive data syn-chronization successful information is returned to masters
Feedback information so that masters determines passive side it has been learned that this passive side's data syn-chronization is successful.
In sum, a kind of method of data synchronization that the present embodiment provides, when needs carry out data syn-chronization, active direction
Passive side sends passive side when including the last data syn-chronization and is sent to the data of passive side's data syn-chronization time of masters
Synchronization request so that the user data updated after passive side's data syn-chronization time is sent out by passive side as passive side's synchrodata
Delivering to masters, masters is sent to the passive side of masters by passive side when passive side sends the last data syn-chronization
The data syn-chronization time, it is possible to by the user data synchronization of passive side to masters, only have system time in prior art
The consistent process just carrying out data syn-chronization is compared, it is not necessary to carry out masters and the operation of passive side's system time consistency desired result just may be used
With data syn-chronization, it is to avoid mobile terminal and the impact on data syn-chronization of the system for computer time, improve mobile terminal and
The efficiency of data syn-chronization operation is carried out between computer.
In order to preferably work in coordination with the user data of masters and passive side, masters is sometimes for the user data by storage
Being synchronized in passive side, therefore, the method for data synchronization proposed in the present embodiment, further comprising the steps of (1) is to step
(4):
(1) when needs are by data syn-chronization to passive side, active direction passive side sends synchronization request so that passive side will
The masters data syn-chronization time updated during the last data syn-chronization is sent to masters;
(2) masters receives the masters data syn-chronization time that passive side sends, and judges the masters data received
Lock in time is the most consistent with default initial synchronization time, if it is, perform step 3, if it is not, then perform step 4;
(3) all data of storage are sent to passive side as masters synchrodata by masters so that passive root
Data recovery is carried out according to the masters synchrodata received;Wherein, masters synchrodata includes: these masters data are same
The step time;
(4) masters is by big equal to the user data of initial synchronization time and lock in time for lock in time in the data of storage
User data in the masters data syn-chronization time is sent to passive side as masters synchrodata so that passive side is according to connecing
The masters synchrodata received carries out data syn-chronization operation;Wherein, masters synchrodata includes: these masters data are same
The step time.
In above-mentioned steps (2), however, it is determined that the masters data syn-chronization time is consistent with the initial synchronization time preset, then lead
Dynamic side determines and did not carry out data syn-chronization with passive side, does not now have any user data in passive side, then will be
All customer data is sent to passive side so that passive side carries out data recovery operation according to all customer data got.
In above-mentioned steps (4), although some user data carried out synchronizing, but before this data syn-chronization
It is edited by or revised, then during this data syn-chronization, it is also desirable to the user data edited or revise is carried out again
Synchronize.In order to record the user data being edited by before this data syn-chronization or revising, masters can will be compiled by user
The lock in time of the user data collected or revise is revised as the initial synchronization time preset, then carry out data syn-chronization in next time
Time, masters can by lock in time equal to the user data synchronization of initial synchronization time to passive side, to ensure masters and quilt
The concordance of the user data of dynamic side.
Above-mentioned lock in time is more than the user data of masters data syn-chronization time, it is simply that used before this data syn-chronization
The new user data that family stores in masters.
In sum, masters is by obtaining the masters data syn-chronization time that passive side sends, and is determining masters
When the data syn-chronization time is equal to the initial synchronization time preset, all customer data is sent to passive side so that passive side enters
Row data recovery operation;When determining that the masters data syn-chronization time is inconsistent with the initial synchronization time preset, then will be with
The step time is more than the user data of masters data syn-chronization time and is modified edited user data and is sent to passive side,
Make passive side carry out data syn-chronization operation, thus preferably worked in coordination with the user data of masters and passive side, it is ensured that be main
The concordance of user data in dynamic side and passive side.
Embodiment 2:
Corresponding with embodiment 1, the step that passive side is performed in data syn-chronization by the present embodiment is described.
Seeing Fig. 2, this present embodiment provides a kind of method of data synchronization, comprises the following steps:
Step 200, passive side receive the data synchronization request that masters sends.
Above-mentioned data synchronization request includes: during the last data syn-chronization, passive side is sent to passive side's data of masters
Lock in time.
Step 202, passive side using after passive side's data syn-chronization time update user data as the same step number of passive side
According to being sent to masters.
Above-mentioned steps 202 specifically includes following steps (1) to step (3):
(1) passive side judges that the passive side's data syn-chronization time received is the most consistent with default initial synchronization time,
If it is, perform step 2, if it is not, then perform step 3;
(2) all customer data of storage is sent to masters as passive side's synchrodata by passive side so that actively
Root carries out data recovery operation according to the passive side's synchrodata received;Wherein, passive side's synchrodata includes: this is passive
Number formulary is according to lock in time;
(3) passive side is by big equal to the user data of initial synchronization time and lock in time for lock in time in the data of storage
User data in passive side's data syn-chronization time is sent to masters as passive side's synchrodata so that masters is according to connecing
The masters synchrodata received carries out data syn-chronization operation;Wherein, masters synchrodata includes: these masters data are same
The step time.
In above-mentioned steps (1), however, it is determined that passive side's data syn-chronization time with preset initial synchronization time consistent, then by
Dynamic side determines and did not carry out data syn-chronization with masters, does not now have any user data in masters, then will be
All customer data is sent to masters so that masters carries out data recovery operation according to all customer data got.
In above-mentioned steps (3), although some user data carried out synchronizing, but before this data syn-chronization
It is edited by or revised, then during this data syn-chronization, it is also desirable to the user data edited or revise is carried out again
Synchronize.In order to record the user data being edited by before this data syn-chronization or revising, passive side can will be compiled by user
The lock in time of the user data collected or revise is revised as the initial synchronization time preset, then carry out data syn-chronization in next time
Time, passive side can just lock in time equal to the user data synchronization of initial synchronization time to masters, with ensure masters with
The concordance of the user data of passive side.
Step 204, passive side receive the passive data syn-chronization successful information that masters sends.
In above-mentioned passive data syn-chronization successful information, record has this passive side data syn-chronization time.
Wherein, above-mentioned steps 204 specifically includes following steps (1) to step (2):
(1) passive side receives the passive data syn-chronization successful information that masters sends, and according to the success of passive data syn-chronization
In information, the masters data syn-chronization time prestored is updated by this passive side's data syn-chronization time of record;
(2) according to identification information and this passive side's data syn-chronization time received, the passive side of the passive side preset
Generate the passive data syn-chronization success feedback information of response passive data syn-chronization successful information, and the passive data syn-chronization that will generate
Success feedback information is sent to masters so that masters determines this passive side's data syn-chronization success.
In above-mentioned steps (2), passive direction masters returns the passive data of response passive data syn-chronization successful information
Synchronize successfully feedback information so that masters determines passive side it has been learned that this passive side's data syn-chronization is successful.
In order to preferably work in coordination with the user data of masters and passive side, masters is sometimes for the user data by storage
Being synchronized in passive side, therefore, the method for data synchronization proposed in the present embodiment, further comprising the steps of (1) is to step
(3):
(1) when receiving the synchronization request that masters sends, passive side is by updated during the last data syn-chronization
The masters data syn-chronization time is sent to masters;
(2) passive side receives the masters synchrodata that masters sends, and according to the masters synchrodata received
Carrying out data recovery operation or data syn-chronization operation, wherein, masters synchrodata includes: during this masters data syn-chronization
Between;
(3) passive side is according to this masters data syn-chronization time, carries out the masters data syn-chronization time of record more
Newly.
Above-mentioned steps (2) concrete perform process and embodiment 1 propose " masters receives the passive of passive side's transmission
Side's synchrodata, and carry out data recovery operation or data syn-chronization operation respectively according to the passive side's synchrodata received "
The idiographic flow comprised is similar, so repeating no more in the present embodiment.
In sum, a kind of method of data synchronization that the present embodiment provides, when needs carry out data syn-chronization, active direction
Passive side sends passive side when including the last data syn-chronization and is sent to the data of passive side's data syn-chronization time of masters
Synchronization request so that the user data updated after passive side's data syn-chronization time is sent out by passive side as passive side's synchrodata
Delivering to masters, masters is sent to the passive side of masters by passive side when passive side sends the last data syn-chronization
The data syn-chronization time, it is possible to by the user data synchronization of passive side to masters, only have system time in prior art
The consistent process just carrying out data syn-chronization is compared, it is not necessary to carry out masters and the operation of passive side's system time consistency desired result just may be used
With data syn-chronization, it is to avoid mobile terminal and the impact on data syn-chronization of the system for computer time, improve mobile terminal and
The efficiency of data syn-chronization operation is carried out between computer.
Embodiment 3:
Seeing Fig. 3, the present embodiment proposes a kind of masters, for performing the method described in the above embodiments 1, including:
Data synchronization request module 300, for when needing the user data synchronizing storage in passive side, sending out to passive side
Passive side when including the last data syn-chronization is sent to be sent to the data synchronization request of passive side's data syn-chronization time of masters,
The user data updated after passive side's data syn-chronization time is sent to actively by passive side as passive side's synchrodata
Side;
Data simultaneous module 302, for receiving and process passive side's synchrodata that passive side sends;
Synchronized result sending module 304, is used for generating passive data syn-chronization successful information, and by same for the passive data of generation
Step successful information is sent to passive side.
In sum, a kind of masters that the present embodiment provides, when needs carry out data syn-chronization, active direction passive side
Send the data syn-chronization of passive side's data syn-chronization time that passive side is sent to masters when including the last time data syn-chronization to ask
Ask so that the user data updated after passive side's data syn-chronization time is sent to main by passive side as passive side's synchrodata
Dynamic side, passive side's data that masters is sent to masters by passive side when passive side sends the last data syn-chronization are same
The step time, it is possible to by the user data synchronization of passive side to masters, consistent just with only system time in prior art
The process carrying out data syn-chronization is compared, it is not necessary to carry out masters and the operation of passive side's system time consistency desired result just can be with data
Synchronize, it is to avoid mobile terminal and the impact on data syn-chronization of the system for computer time, improve mobile terminal and computer
Between carry out the efficiency of data syn-chronization operation.
In order to preferably work in coordination with the user data of masters and passive side, masters is sometimes for the user data by storage
It is synchronized in passive side, therefore, the masters proposed in the present embodiment, also include:
Synchronization request module, for when needs are by data syn-chronization to passive side, sends synchronization request to passive side so that
The masters data syn-chronization time updated during the last data syn-chronization is sent to masters by passive side;
Judge module, for receiving the masters data syn-chronization time that passive side sends, and judges the masters received
The data syn-chronization time is the most consistent with default initial synchronization time;
First data transmission blocks, if the result obtained for judge module be yes, then all customer data that will store
It is sent to passive side so that it is extensive that passive side carries out data according to the masters synchrodata received as masters synchrodata
Multiple;Wherein, masters synchrodata includes: this masters data syn-chronization time;
Second data transmission blocks, if the result obtained for judge module is no, then when will synchronize in the data of storage
Between equal to the user data of initial synchronization time and lock in time more than the user data of masters data syn-chronization time as master
Dynamic side synchrodata is sent to passive side so that passive side carries out data syn-chronization behaviour according to the masters synchrodata received
Make;Wherein, masters synchrodata includes: this masters data syn-chronization time.
In sum, masters is by obtaining the masters data syn-chronization time that passive side sends, and is determining masters
When the data syn-chronization time is equal to the initial synchronization time preset, all customer data is sent to passive side so that passive side enters
Row data recovery operation;When determining that the masters data syn-chronization time is inconsistent with the initial synchronization time preset, then will be with
The step time is more than the user data of masters data syn-chronization time and is modified edited user data and is sent to passive side,
Make passive side carry out data syn-chronization operation, thus preferably worked in coordination with the user data of masters and passive side, it is ensured that be main
The concordance of user data in dynamic side and passive side.
The computer program carrying out method of data synchronization that the embodiment of the present invention is provided, including storing program generation
The computer-readable recording medium of code, the instruction that described program code includes can be used for performing described in previous methods embodiment
Method, implements and can be found in embodiment of the method, does not repeats them here.
Those skilled in the art is it can be understood that arrive, for convenience and simplicity of description, the system of foregoing description,
The specific works process of device and unit, is referred to the corresponding process in preceding method embodiment, does not repeats them here.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method, permissible
Realize by another way.Device embodiment described above is only schematically, such as, and the division of described unit,
Being only a kind of logic function to divide, actual can have other dividing mode when realizing, and the most such as, multiple unit or assembly can
To combine or to be desirably integrated into another system, or some features can be ignored, or does not performs.Another point, shown or beg for
The coupling each other of opinion or direct-coupling or communication connection can be indirect by some communication interfaces, device or unit
Coupling or communication connection, can be electrical, machinery or other form.
The described unit illustrated as separating component can be or may not be physically separate, shows as unit
The parts shown can be or may not be physical location, i.e. may be located at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be selected according to the actual needs to realize the mesh of the present embodiment scheme
's.
It addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it is also possible to
It is that unit is individually physically present, it is also possible to two or more unit are integrated in a unit.
If described function is using the form realization of SFU software functional unit and as independent production marketing or use, permissible
It is stored in a computer read/write memory medium.Based on such understanding, technical scheme is the most in other words
The part contributing prior art or the part of this technical scheme can embody with the form of software product, this meter
Calculation machine software product is stored in a storage medium, including some instructions with so that a computer equipment (can be individual
People's computer, server, or the network equipment etc.) perform all or part of step of method described in each embodiment of the present invention.
And aforesaid storage medium includes: USB flash disk, portable hard drive, read only memory (ROM, Read-Only Memory), random access memory are deposited
The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic disc or CD.
The above, the only detailed description of the invention of the present invention, but protection scope of the present invention is not limited thereto, and any
Those familiar with the art, in the technical scope that the invention discloses, can readily occur in change or replace, should contain
Cover within protection scope of the present invention.Therefore, protection scope of the present invention should described be as the criterion with scope of the claims.
Claims (10)
1. a method of data synchronization, it is characterised in that including:
When needing the user data synchronizing storage in passive side, passive side described in active direction sends and includes the last data
During synchronization, described passive side is sent to the data synchronization request of passive side's data syn-chronization time of described masters so that described quilt
The user data updated after described passive side's data syn-chronization time is sent to described master as passive side's synchrodata by dynamic side
Dynamic side;
Described masters receives and processes passive side's synchrodata that described passive side sends;
Described masters generates passive data syn-chronization successful information, and the described passive data syn-chronization successful information generated is sent
To described passive side.
Method the most according to claim 1, it is characterised in that described masters receives and process what described passive side sent
Passive side's synchrodata, including:
Described masters receives passive side's synchrodata that described passive side sends, and synchronizes according to the described passive side received
Data carry out data recovery operation or data syn-chronization operation respectively, and wherein, described passive side's synchrodata includes: this is passive
Number formulary is according to lock in time;
The described passive side of record, according to this passive side's data syn-chronization time described, is entered the data syn-chronization time by described masters
Row updates.
Method the most according to claim 2, it is characterised in that described masters generates passive data syn-chronization successful information,
And the described passive data syn-chronization successful information generated is sent to described passive side, including:
Described masters generates according to the identification information of this passive side's data syn-chronization time described with the described passive side prestored
Passive data syn-chronization successful information, and the described passive data syn-chronization successful information generated is sent to described passive side so that
Masters described in described passive direction returns the passive data syn-chronization of passive data syn-chronization successful information described in response and successfully feeds back
Information, and by this passive side's data syn-chronization time active to prestoring described of record in described data syn-chronization successful information
Number formulary was updated according to lock in time;
Described masters receives the passive data syn-chronization success feedback information that described passive side sends, and determines this passive number formulary
According to synchronizing successfully.
Method the most according to claim 1, it is characterised in that described method also includes:
When needs are by data syn-chronization to described passive side, passive side described in described active direction sends synchronization request so that institute
State passive side and the masters data syn-chronization time updated during the last data syn-chronization is sent to described masters;
Described masters receives the described masters data syn-chronization time that described passive side sends, and judges the described master received
Dynamic number formulary is the most consistent with default initial synchronization time according to lock in time;
If it is, described masters using all customer data of storage as described masters synchrodata be sent to described passively
Side so that described passive side carries out data recovery according to the described masters synchrodata received;Wherein, described masters is same
Step data includes: this masters data syn-chronization time;
If it does not, described masters is by when being equal to the user data of initial synchronization time lock in time and synchronize in the data of storage
Between be sent to described passive side more than the user data of described masters data syn-chronization time as described masters synchrodata,
Described passive side is made to carry out data syn-chronization operation according to the described masters synchrodata received;Wherein, described masters
Synchrodata includes: this masters data syn-chronization time.
5. a method of data synchronization, it is characterised in that including:
Passive side receives the data synchronization request that masters sends, and described data synchronization request includes: the last data syn-chronization
Shi Suoshu passive side is sent to passive side's data syn-chronization time of described masters;
The user data updated after described passive side's data syn-chronization time is sent out by described passive side as passive side's synchrodata
Deliver to described masters;
Described passive side receives the passive data syn-chronization successful information that described masters sends, and described passive data syn-chronization is successfully believed
In breath, record has this passive side data syn-chronization time.
Method the most according to claim 5, it is characterised in that described passive side by described passive side's data syn-chronization time it
The user data of rear renewal is sent to described masters as passive side's synchrodata, including:
Described passive side judges that the described passive side's data syn-chronization time received is the most consistent with default initial synchronization time;
If it is, all customer data of storage is sent to described active as described passive side's synchrodata by described passive side
Side so that described masters carries out data recovery operation according to the described passive side's synchrodata received;Wherein, described passively
Side's synchrodata includes: this passive side's data syn-chronization time;
If it does not, described passive side is by when being equal to the user data of initial synchronization time lock in time and synchronize in the data of storage
Between be sent to described masters more than the user data of described passive side's data syn-chronization time as described passive side's synchrodata,
Described masters is made to carry out data syn-chronization operation according to the described masters synchrodata received;Wherein, described masters
Synchrodata includes: this masters data syn-chronization time.
Method the most according to claim 5, it is characterised in that described passive side receives the passive number that described masters sends
According to synchronizing successful information, including:
Described passive side receives the passive data syn-chronization successful information that described masters sends, and according to described passive data syn-chronization
In successful information, the masters data syn-chronization time prestored is updated by this passive side's data syn-chronization time described of record;
Identification information according to default described passive side and this passive side's data syn-chronization time described in receiving, described quilt
Dynamic side generates the passive data syn-chronization success feedback information of passive data syn-chronization successful information described in response, and passive by generate
Data syn-chronization success feedback information is sent to described masters so that described masters determines that this passive side's data syn-chronization becomes
Merit.
Method the most according to claim 5, it is characterised in that described method also includes:
When receiving the synchronization request that described masters sends, described passive side is by updated during the last data syn-chronization
The described masters data syn-chronization time is sent to described masters;
Described passive side receives the masters synchrodata that described masters sends, and synchronizes according to the described masters received
Data carry out data recovery operation or data syn-chronization operation, and wherein, described masters synchrodata includes: this active number formulary
According to lock in time;
The described masters data syn-chronization time of record, according to this masters data syn-chronization time described, is entered by described passive side
Row updates.
9. a masters, it is characterised in that including:
Data synchronization request module, for when needing the user data synchronizing storage in passive side, sending to described passive side
The data of passive side's data syn-chronization time of described masters it are sent to together including described passive side during the last data syn-chronization
Step request so that the user data updated after described passive side's data syn-chronization time is synchronized by described passive side as passive side
Data are sent to described masters;
Data simultaneous module, for receiving and process passive side's synchrodata that described passive side sends;
Synchronized result sending module, is used for generating passive data syn-chronization successful information, and the described passive data syn-chronization that will generate
Successful information is sent to described passive side.
Masters the most according to claim 9, it is characterised in that described masters also includes:
Synchronization request module, for when needs are by data syn-chronization to described passive side, sends synchronization request to described passive side,
Make described passive side that the masters data syn-chronization time updated during the last data syn-chronization is sent to described masters;
Judge module, for receiving the described masters data syn-chronization time that described passive side sends, and judges the institute received
State the masters data syn-chronization time the most consistent with default initial synchronization time;
First data transmission blocks, if the result obtained for described judge module be yes, then all customer data that will store
It is sent to described passive side so that described passive side is same according to the described masters received as described masters synchrodata
Step data carries out data recovery;Wherein, described masters synchrodata includes: this masters data syn-chronization time;
Second data transmission blocks, if the result obtained for described judge module is no, then when will synchronize in the data of storage
Between make more than the user data of described masters data syn-chronization time equal to the user data of initial synchronization time and lock in time
It is sent to described passive side so that described passive side synchronizes according to the described masters received for described masters synchrodata
Data carry out data syn-chronization operation;Wherein, described masters synchrodata includes: this masters data syn-chronization time.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610653524.XA CN106101275A (en) | 2016-08-10 | 2016-08-10 | A kind of method of data synchronization and masters |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610653524.XA CN106101275A (en) | 2016-08-10 | 2016-08-10 | A kind of method of data synchronization and masters |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106101275A true CN106101275A (en) | 2016-11-09 |
Family
ID=57456476
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610653524.XA Pending CN106101275A (en) | 2016-08-10 | 2016-08-10 | A kind of method of data synchronization and masters |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106101275A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106453651A (en) * | 2016-11-30 | 2017-02-22 | 中国互联网络信息中心 | RPKI (resource public key infrastructure) database and data synchronization method |
CN107360232A (en) * | 2017-07-14 | 2017-11-17 | 掌阅科技股份有限公司 | Data change asynchronous execution method, electronic equipment, computer-readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040120481A1 (en) * | 2002-12-20 | 2004-06-24 | International Business Machines Corporation | Pre-connection telephony data synchronization |
CN102510357A (en) * | 2011-09-26 | 2012-06-20 | 深圳中兴网信科技有限公司 | Synchronous method of enterprise organization structure address book and system thereof |
CN102710665A (en) * | 2012-06-27 | 2012-10-03 | 深圳中兴网信科技有限公司 | Mobile terminal, and data synchronization method of server and mobile terminal |
CN103327037A (en) * | 2012-03-20 | 2013-09-25 | 中兴通讯股份有限公司 | Data synchronizing method and device |
CN104488248A (en) * | 2014-04-15 | 2015-04-01 | 华为技术有限公司 | File synchronization method, server and terminal |
-
2016
- 2016-08-10 CN CN201610653524.XA patent/CN106101275A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040120481A1 (en) * | 2002-12-20 | 2004-06-24 | International Business Machines Corporation | Pre-connection telephony data synchronization |
CN102510357A (en) * | 2011-09-26 | 2012-06-20 | 深圳中兴网信科技有限公司 | Synchronous method of enterprise organization structure address book and system thereof |
CN103327037A (en) * | 2012-03-20 | 2013-09-25 | 中兴通讯股份有限公司 | Data synchronizing method and device |
CN102710665A (en) * | 2012-06-27 | 2012-10-03 | 深圳中兴网信科技有限公司 | Mobile terminal, and data synchronization method of server and mobile terminal |
CN104488248A (en) * | 2014-04-15 | 2015-04-01 | 华为技术有限公司 | File synchronization method, server and terminal |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106453651A (en) * | 2016-11-30 | 2017-02-22 | 中国互联网络信息中心 | RPKI (resource public key infrastructure) database and data synchronization method |
CN107360232A (en) * | 2017-07-14 | 2017-11-17 | 掌阅科技股份有限公司 | Data change asynchronous execution method, electronic equipment, computer-readable storage medium |
CN107360232B (en) * | 2017-07-14 | 2019-01-22 | 掌阅科技股份有限公司 | Data change asynchronous execution method, electronic equipment, computer storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106610876A (en) | Method and device for recovering data snapshot | |
CN110209726A (en) | Distributed experiment & measurement system system, method of data synchronization and storage medium | |
CN105701159B (en) | A kind of data synchronization unit and method | |
CN108536752A (en) | A kind of method of data synchronization, device and equipment | |
CN105262831A (en) | Method, device, and synchronizing system for synchronizing data among memory systems | |
CN103294675A (en) | Method and device for updating data in distributed storage system | |
CA2896973A1 (en) | Methods, devices and systems for dynamically managing memberships in replicated state machines within a distributed computing environment | |
CN104468137B (en) | Web conference control method and device | |
CN104750738B (en) | A kind of method for updating the data information, back end, management node and system | |
CN106202123B (en) | The method and apparatus of gray scale publication | |
CN106095911A (en) | Search system and method for data synchronization | |
CN106201624A (en) | A kind of recommendation method of application program and terminal | |
CN107231400A (en) | The synchronous method and device of a kind of data | |
CN106802892A (en) | For the method and apparatus of master/slave data consistency verification | |
CN107203327A (en) | A kind of method and apparatus for storage system | |
CN109492049A (en) | Data processing, block generation and synchronous method for block chain network | |
CN111930716A (en) | Database capacity expansion method, device and system | |
CN106101275A (en) | A kind of method of data synchronization and masters | |
CN107040576A (en) | Information-pushing method and device, communication system | |
CN109002462A (en) | A kind of method and system for realizing distributed things | |
CN106709066A (en) | Data synchronization method and device | |
CN108256034A (en) | Data migration method and equipment | |
CN106682198B (en) | Method and device for realizing automatic database deployment | |
KR20180012436A (en) | The database management system and method for preventing performance degradation of transaction when table reconfiguring | |
CN109634736A (en) | Data training method and device in deep learning system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20161109 |