CN104503868B - Method of data synchronization, device and system - Google Patents

Method of data synchronization, device and system Download PDF

Info

Publication number
CN104503868B
CN104503868B CN201410836700.4A CN201410836700A CN104503868B CN 104503868 B CN104503868 B CN 104503868B CN 201410836700 A CN201410836700 A CN 201410836700A CN 104503868 B CN104503868 B CN 104503868B
Authority
CN
China
Prior art keywords
data
backup
target
backup data
host
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
CN201410836700.4A
Other languages
Chinese (zh)
Other versions
CN104503868A (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.)
CHENGDU ZHIYUN SCIENCE & TECHNOLOGY Co Ltd
Original Assignee
CHENGDU ZHIYUN SCIENCE & TECHNOLOGY 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 CHENGDU ZHIYUN SCIENCE & TECHNOLOGY Co Ltd filed Critical CHENGDU ZHIYUN SCIENCE & TECHNOLOGY Co Ltd
Priority to CN201410836700.4A priority Critical patent/CN104503868B/en
Publication of CN104503868A publication Critical patent/CN104503868A/en
Application granted granted Critical
Publication of CN104503868B publication Critical patent/CN104503868B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

A kind of method of data synchronization that the present invention is provided, device and system, it is related to field of data storage, the data synchronous system includes host data end and Backup Data end, the host data end stores the target data that can be changed, the Backup Data end storage Backup Data in need synchronized with the target data, method of data synchronization provided in an embodiment of the present invention, Backup Data end is after the target data for detecting host data end is modified to, it is not directly just to synchronize Backup Data with target data, but target data and Backup Data are contrasted again, to confirm modification of the host data end to target data, after being confirmed, Backup Data is synchronized with target data again.Using such method of data synchronization, the jitter of data synchronization process can be effectively reduced, the stabilization of data synchronous system is kept.

Description

Method of data synchronization, device and system
Technical field
The present invention relates to field of data storage, in particular to method of data synchronization, device and system.
Background technology
The method of current common data synchronous method is, it is necessary to which the Backup Data end that data are synchronized can occur to data The host data end of change sends the request of data syn-chronization, while the data at host data end and Backup Data end are contrasted, if It was found that host data end is newly-increased or deletes data message, then Backup Data end carries out data syn-chronization immediately, keeps and target Data it is consistent.Adopt in such a way, if host data end occurs in that maloperation, such as increased newly after data and deleted at once Except the data, Backup Data end detect increased newly after data also can corresponding newly-increased data, but when detecting next time, find The data have been deleted, and need correspondence to delete the data again, jitter is larger when this results in data syn-chronization, data synchronous system It is unstable.
The content of the invention
It is synchronous to improve available data it is an object of the invention to provide a kind of method of data synchronization, device and system Method progress data syn-chronization jitter is larger, the problem of data synchronous system is unstable.
To achieve these goals, the technical scheme that the embodiment of the present invention is used is as follows:
In a first aspect, the embodiments of the invention provide a kind of method of data synchronization, applied to data synchronous system, the number Include host data end and Backup Data end according to synchronization system, the host data end stores the number of targets that can be changed According to the Backup Data end storage Backup Data in need synchronized with the target data, methods described includes:
The Backup Data end sends data synchronization request instruction to the host data end;
The target data and the Backup Data are contrasted, if it is not the same, the data that record is differed are synchronous vacations Data;
Continue to send data synchronization request instruction to the host data end in the Backup Data end;
The target data and the Backup Data are contrasted, if it is not the same, the data that record is differed contrast for modification Data;
The synchronous vacations data and the modification correction data are contrasted, if identical, the Backup Data are changed so that The Backup Data is consistent with the target data.
With reference in a first aspect, the embodiments of the invention provide the possible embodiment of the first of first aspect, wherein, institute Backup Data end is stated to continue to send data synchronization request instruction to the host data end, including:The Backup Data end is by pre- If interval time sends N datas synchronization request to the host data end and instructed, N is the integer more than 1;
The contrast target data and the Backup Data, if it is not the same, the data that record is differed are modification Correction data, including:
A data synchronization request instruction is often sent, the once target data and the Backup Data is just contrasted, If identical, stop performing subsequent step, if it is different, the data that record is differed change correction data for n-th, n is More than or equal to the 1, integer less than or equal to N;
The contrast synchronous vacations data and the modification correction data, if identical, change the Backup Data, So that the Backup Data is consistent with the target data, including:
The synchronous vacations data and n-th modification correction data (n arrives N values successively by 1) are contrasted, if each It is secondary all identical, change the Backup Data so that the Backup Data is consistent with the synchrodata.
With reference to the first possible embodiment of first aspect or first aspect, the embodiments of the invention provide first party Second of possible embodiment in face, wherein, the modification Backup Data, including:
If the target data and the difference of the Backup Data are, the target data increases the synchronization Data are changed, then the Backup Data end increases the synchronous vacations data on the basis of the Backup Data.
With reference to the first possible embodiment of first aspect or first aspect, the embodiments of the invention provide first party The third possible embodiment in face, wherein, the modification Backup Data, including:
If the target data and the difference of the Backup Data are, the target data deletes the synchronization Data are changed, then the synchronous vacations data are deleted at the Backup Data end in the Backup Data.
Second aspect, the embodiment of the present invention additionally provides a kind of data synchronization unit, applied to data synchronous system, described Data synchronous system includes host data end and Backup Data end, and the data synchronization unit is arranged at the Backup Data End, the host data end stores the target data that can be changed, and the Backup Data end stores the in need and mesh The Backup Data that mark data are synchronized, described device includes:
First data synchronization request instruction sending unit, refers to for sending data synchronization request to the host data end Order;
First data comparison unit, for contrasting the target data and the Backup Data, if it is not the same, record is not Identical data are synchronous vacations data;
Second data synchronization request instruction sending unit, for continuing to send data synchronization request to the host data end Instruction;
Second data comparison unit, for contrasting the target data and the Backup Data, if it is not the same, record is not Identical data are modification correction data;
Data synchronisation unit, for contrasting the synchronous vacations data and the modification correction data, if identical, modification The Backup Data so that the Backup Data is consistent with the synchrodata.
With reference to second aspect, the embodiments of the invention provide the possible embodiment of the first of second aspect, wherein, institute State the second data synchronization request instruction sending unit specifically for:
N datas synchronization request is sent by preset interval time to the host data end to instruct, N is the integer more than 1;
The second data comparison unit specifically for:
A data synchronization request instruction is often sent, the once target data and the Backup Data is just contrasted, If identical, stop performing subsequent step, if it is different, the data that record is differed change correction data for n-th, n is More than or equal to the 1, integer less than or equal to N;
The data synchronisation unit specifically for:
The synchronous vacations data and n-th modification correction data (n arrives N values successively by 1) are contrasted, if each It is secondary all identical, change the Backup Data so that the Backup Data is consistent with the synchrodata.
With reference to the first possible embodiment of second aspect or second aspect, the embodiments of the invention provide second party Second of possible embodiment in face, wherein, the data synchronisation unit specifically for:
If the target data and the difference of the Backup Data are, the target data increases the synchronization Data are changed, then increase the synchronous vacations data on the basis of the Backup Data.
With reference to the first possible embodiment of second aspect or second aspect, the embodiments of the invention provide second party The third possible embodiment in face, wherein, the data synchronisation unit specifically for:
If the target data and the difference of the Backup Data are, the target data deletes the synchronization Data are changed, then the synchronous vacations data are deleted in the Backup Data.
The third aspect, the embodiment of the present invention additionally provides a kind of data synchronous system, and the data synchronous system includes master Machine data terminal and Backup Data end, the host data end store the target data that can be changed, the Backup Data Claim 5-6 is provided with the end storage Backup Data in need synchronized with the target data, the backup end to appoint Data synchronization unit described in one.
With reference to the third aspect, the embodiments of the invention provide the possible embodiment of the first of the third aspect, wherein, institute State data synchronous system and belong to distributed storage system.
Method of data synchronization and device provided in an embodiment of the present invention, Backup Data end are detecting the mesh at host data end It is not directly just to synchronize Backup Data with target data, but contrast number of targets again after mark data are modified to According to Backup Data, to confirm modification of the host data end to target data, after being confirmed, then by Backup Data and target Data are synchronized.Using such method of data synchronization, the jitter of data synchronization process can be effectively reduced, data are kept The stabilization of synchronization system.
To enable the above objects, features and advantages of the present invention to become apparent, preferred embodiment cited below particularly, and coordinate Appended accompanying drawing, is described in detail below.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be attached to what is used required in embodiment Figure is briefly described, it will be appreciated that the following drawings illustrate only certain embodiments of the present invention, therefore is not construed as pair The restriction of scope, for those of ordinary skill in the art, on the premise of not paying creative work, can also be according to this A little accompanying drawings obtain other related accompanying drawings.By shown in accompanying drawing, above and other purpose of the invention, feature and advantage will more Clearly.Identical reference indicates identical part in whole accompanying drawings.Do not painted by actual size equal proportion scaling deliberately Accompanying drawing processed, it is preferred that emphasis is show the purport of the present invention.
Fig. 1 shows a kind of structured flowchart for data synchronous system that the embodiment of the present invention is provided;
Fig. 2 shows a kind of flow chart for method of data synchronization that the embodiment of the present invention is provided;
Fig. 3 shows the flow chart for another method of data synchronization that the embodiment of the present invention is provided;
Fig. 4 shows a kind of structured flowchart for data synchronization unit that the embodiment of the present invention is provided;
Fig. 5 shows the structured flowchart for another data synchronous system that the embodiment of the present invention is provided;
Fig. 6 shows the structured flowchart for another data synchronization unit that the embodiment of the present invention is provided.
Embodiment
Below in conjunction with accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Ground is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.Generally exist The component of the embodiment of the present invention described and illustrated in accompanying drawing can be arranged and designed with a variety of configurations herein.Cause This, the detailed description of the embodiments of the invention to providing in the accompanying drawings is not intended to limit claimed invention below Scope, but it is merely representative of the selected embodiment of the present invention.Based on embodiments of the invention, those skilled in the art are not doing The every other embodiment obtained on the premise of going out creative work, belongs to the scope of protection of the invention.
Cloud storage be in the conceptive extension of cloud computing and a new concept developed, refer to by cluster application, The function such as network technology or distributed file system, collaboration is gathered by a large amount of various types of storage devices in network Work, the common system that data storage and Operational Visit function are externally provided.When the core of cloud computing system computing and processing When the heart is the storage and management of mass data, it is accomplished by configuring substantial amounts of storage device in cloud computing system, then cloud computing system System is transformed into as a cloud storage system, so cloud storage is one with the cloud computing system of data storage and management for core System.In simple terms, cloud storage is exactly that storage resources are put into a kind of emerging scheme accessed on cloud for people.User can be with office When between, Anywhere, be connected to through any web-enabled device on cloud and easily access data.
Widely, the method for current common data synchronous method is to need for utilization of the data syn-chronization in cloud storage system The Backup Data end that data are synchronized is wanted to send the request of data syn-chronization to the host data end that data can change, simultaneously The data at host data end and Backup Data end are contrasted, if it find that host data end is newly-increased or deletes data message, then Backup Data end carries out data syn-chronization immediately, keeps consistent with target data.Inventor is by long-term observation and studies discovery, Adopt in such a way, if host data end occurs in that maloperation, such as increased newly after data and deleted the data at once, it is standby Part data terminal detect increased newly after data also can corresponding newly-increased data, but when detecting next time, found the data Delete, need correspondence to delete the data again, jitter is larger when this results in data syn-chronization, and data synchronous system is unstable.
Inventor makes existing situation obtain improving, and there is provided the embodiment of the present invention.Backup Data end can be sent out to data The host data end for changing sends the request of data syn-chronization, while contrasting target data and the Backup Data end at host data end Target data, if it find that host data end is newly-increased or deletes data message, record the data that are newly-increased or deleting Information.After certain interval of time, Backup Data end continues to send the request of data syn-chronization to host data end, and target is compared again Data and Backup Data, if it find that the data message that host data end increases newly or deleted is identical with recording before, then confirm Host side performs the operation of newly-increased or deletion the data message, now, and Backup Data end is carried out to its Backup Data again Modification, makes Backup Data be consistent with target data.
Refering to Fig. 1, the embodiments of the invention provide a kind of data synchronous system, the data synchronous system includes host number According to end 100 and Backup Data end 200, the host data end 100 stores the target data that can be changed, the backup Data terminal 200 stores the Backup Data in need synchronized with the target data.
Refering to Fig. 2, the embodiments of the invention provide a kind of method of data synchronization, applied to data synchronous system, the side Method includes:
Step 101:The Backup Data end sends data synchronization request instruction to the host data end.
Step 102:The Backup Data end contrasts the target data and the Backup Data, if it is not the same, then holding Row step 103.
Just it is clear that the data at host data end are done by contrasting the target data and the Backup Data Which modification gone out.
Step 103:The data that the Backup Data end record is differed are synchronous vacations data;
If it find that the target data and the Backup Data have difference, just explanation target data is changed, will Got off by the data record changed, but correspondence modification is not carried out to the Backup Data.
Step 104:Continue to send data synchronization request instruction to the host data end in the Backup Data end.
In order to can confirm that modification of the host data end to target data, Backup Data end continues to send one to host data end Secondary or multiple data synchronization request instruction, and corresponding carry out target data and Backup Data once or multiple pair Than.
Step 105:The Backup Data end contrasts the target data and the Backup Data, if it is not the same, then holding Row step 106.
If modification of the host data end to target data is not maloperation, contrast target data just has with Backup Data Different part, if host data end is before Backup Data end sends data synchronization request instruction to host data end again To the operation of target data before eliminating, now the target data recovers initial with Backup Data identical state again .
Step 106:The data that the Backup Data end record is differed are modification correction data.
Will second contrast after the data record that differs be modification correction data, for being carried out pair with synchronous vacations data Than to determine that modification of the host data end to target data is operated.
Step 107:The Backup Data end contrasts the synchronous vacations data and the modification correction data, if phase Together, then step 108 is performed.
If synchronous vacations data are identical with modification correction data, just explanation host data end is modified to target data Afterwards, other operations are not further continued for.
Step 108:Change the Backup Data in the Backup Data end so that the Backup Data and the target data Unanimously.
After the modification that target data is made is confirmed, Backup Data end corresponds to modification Backup Data again.
For example:The target data is ABC, and the primary data of the Backup Data is the backup of target data, i.e., be also ABC.Host data end is modified to target data, and amended target data is ABCD, and Backup Data end is to the master Machine data terminal sends data synchronization request instruction, and target data and Backup Data are contrasted, it is found that target data is added D, now, then it is synchronous vacations data to record D.Being spaced after preset time after the time, (preset time is by Backup Data End is pre-set at random according to the situation of data synchronous system, and 2s is set in the present embodiment), Backup Data end is to the main frame Data terminal continues to send data synchronization request instruction.Within this 2s, if the host data end is without again to target data Modify, Backup Data end contrasts target data and Backup Data again, and the modification correction data of record is also D, it is possible to It is the modification that main frame data terminal is made to target data to confirm D, and Backup Data correspondence is revised as ABCD, completes this subsynchronous mistake Journey;If within this 2s, the host data end increases D operation before eliminating, and target data becomes ABC again, standby Part data terminal contrasts target data and Backup Data again, it is found that both are identical, and then the step of stop performing below.
The method of data synchronization that the present embodiment is provided, Backup Data end is repaiied in the target data for detecting host data end It is not directly just to synchronize Backup Data with target data after changing, but contrast target data and backup number again According to, to confirm modification of the host data end to target data, after being confirmed, then Backup Data and target data progress is same Step.Using such method of data synchronization, the jitter of data synchronization process can be effectively reduced, data synchronous system is kept It is stable.
Refering to Fig. 3, another method of data synchronization that the embodiment of the present invention is provided, applied to data synchronous system, institute Stating data synchronous system includes host data end and Backup Data end, and the host data end stores the mesh that can be changed Data are marked, the Backup Data end storage Backup Data in need synchronized with the target data, methods described includes:
Step 301:The Backup Data end sends data synchronization request instruction to the host data end.
Step 302:The Backup Data end contrasts the target data and the Backup Data, if it is not the same, then holding Row step 303.
Just it is clear that the data at host data end are done by contrasting the target data and the Backup Data Which modification gone out.
Step 303:The data that the Backup Data end record is differed are synchronous vacations data.
If it find that the target data and the Backup Data have difference, just explanation target data is changed, will Got off by the data record changed, but correspondence modification is not carried out to the Backup Data.
Step 304:The Backup Data end continues to send the instruction of n-th data synchronization request to the host data end, Backup Data end sends N datas synchronization request to the host data end by preset interval time and instructed, and N is whole more than 1 Number, n is that n initial value is 1 more than or equal to the 1, integer less than or equal to N, often sends data synchronization request instruction, n value Increase by 1.For example:During N=3, n=1 continues to send the 1st data synchronization request instruction to the host data end;N increases by 1, Equal to 2, continue to send the 2nd data synchronization request instruction to the host data end;N is further added by 1, equal to 3, to the main frame Data terminal continues to send the 3rd data synchronization request instruction.
Step 305:The Backup Data end contrasts the target data and the Backup Data, if it is not the same, then holding Row step 306.
A data synchronization request instruction is often sent, the once target data and the Backup Data is just contrasted, If identical, the just modification of explanation target data is cancelled, then stops performing subsequent step, if it is different, performing step 306。
Step 306:The data that Backup Data end record is differed change correction data for n-th, n be more than or equal to 1st, the integer less than or equal to N;For example:During n=1, perform after step 305, the data differed of record are the 1st modification contrast Data.
Step 307:The Backup Data end contrasts the synchronous vacations data and n-th modification correction data, works as n <During N, if identical, step 304 is jumped to, continues to send data synchronization request instruction, if it is different, just explanation host number To the modification of target data before being eliminated according to section;As n=N, if identical, n times compared for regard to explanation, modification each time Correction data is all identical with synchronous vacations data, then host data section to the modification of target data it has been confirmed that host data end After being modified to target data, other operations are not further continued for, and then perform step 308.
Step 308:Change the Backup Data in the Backup Data end so that the Backup Data and the target data Unanimously.If modification of the host data section to target data is the increase synchronous vacations data on the basis of target data, right That answers increases the synchronous vacations data on the basis of Backup Data;If host data section be to the modification of target data from Synchronous vacations data are deleted in target data, then it is corresponding that the synchronous vacations data are deleted from Backup Data.
For example:The target data is ABCD, and the primary data of the Backup Data is the backup of target data, i.e., be also ABCD.Host data end is modified to target data, and amended target data is ABC, and Backup Data end is to the master Machine data terminal sends data synchronization request instruction, and target data and Backup Data are contrasted, it is found that target data is deleted D, now, then it is synchronous vacations data to record D.
If N=3, (preset time is by Backup Data end according to data syn-chronization being spaced after preset time after the time The situation of system is pre-set at random, and 2s is set in the present embodiment), Backup Data end continues to send to the host data end Data synchronization request is instructed.Now n=1, transmission for the 1st data synchronization request instruction, if the host data end exists Target data is not modified in this 2s, Backup Data end contrast target data and Backup Data record the 1st modification pair It is D than data;Backup Data end continues to send data synchronization request instruction after 2s has been waited to the host data end, this When n=2, transmission for the instruction of the 2nd data synchronization request, if the host data end in this 2s again without to target Data are modified, Backup Data end contrast target data and Backup Data, and it is D to record the 2nd modification correction data;Backup number According to end after 2s has been waited, continue to send data synchronization request instruction to the host data end, now n=3, transmission is again 3rd data synchronization request instruction, it is standby if the host data end is modified in this 2s again without to target data Part data terminal contrast target data and Backup Data, it is D to record the 3rd modification correction data;Due to n=N, Backup Data end is not Continue to send data synchronization request instruction to the host data end again, Backup Data end contrasts synchronous vacations data, repaiied for the 1st time Change correction data, the 2nd modification correction data, the 3rd modification correction data, they are D, it is possible to which it is host number to confirm D The modification made according to end to target data, Backup Data correspondence deletes D, is updated to ABC, completes this synchronizing process;If Host data end Backup Data end individual one by one in office waits the operation that the D that unerases is made that in 2s, and target data becomes again ABCD, when Backup Data end contrasts target data and Backup Data next time, it finds that target data and Backup Data phase Together, so stop perform below the step of.
The method of data synchronization that the present embodiment is provided, Backup Data end is repaiied in the target data for detecting host data end Be not directly just to synchronize Backup Data with target data after changing, but again by repeatedly contrast target data with Backup Data, to confirm modification of the host data end to target data, after being confirmed, then by Backup Data and target data Synchronize.Using such method of data synchronization, the jitter of data synchronization process can be effectively reduced, data syn-chronization is kept The stabilization of system.
Referring to Fig. 4, a kind of data synchronization unit that the embodiment of the present invention is provided is described applied to data synchronous system Data synchronous system includes host data end and Backup Data end, and the data synchronization unit is arranged at the Backup Data End, the host data end stores the target data that can be changed, and the Backup Data end stores the in need and mesh The Backup Data that mark data are synchronized, described device includes:
First data synchronization request instruction sending unit 201, for sending data synchronization request to the host data end Instruction.
First data comparison unit 202, for contrasting the target data and the Backup Data, if it is not the same, note It is synchronous vacations data to record the data differed.
Second data synchronization request instruction sending unit 203, for continuing to send data syn-chronization to the host data end Request instruction.
Second data comparison unit 204, for contrasting the target data and the Backup Data, if it is not the same, note It is modification correction data to record the data differed.
Data synchronisation unit 205, for contrasting the synchronous vacations data and the modification correction data, if identical, Change the Backup Data so that the Backup Data is consistent with the synchrodata.
Wherein, the second data synchronization request instruction sending unit 203 specifically for:
N datas synchronization request is sent by preset interval time to the host data end to instruct, N is the integer more than 1.
The second data comparison unit 204 specifically for:
A data synchronization request instruction is often sent, the once target data and the Backup Data is just contrasted, If identical, stop performing subsequent step, if it is different, the data that record is differed change correction data for n-th, n is More than or equal to the 1, integer less than or equal to N.
The data synchronisation unit 205 specifically for:
The synchronous vacations data and n-th modification correction data (n arrives N values successively by 1) are contrasted, if each It is secondary all identical, change the Backup Data so that the Backup Data is consistent with the synchrodata.
The data synchronisation unit 205 specifically for:
If the target data and the difference of the Backup Data are, the target data is in the backup number Increase the synchronous vacations data on the basis of, then increase the synchronous vacations data on the basis of the Backup Data;
If the target data and the difference of the Backup Data are, the target data is in the backup number The synchronous vacations data are deleted according to middle, then the synchronous vacations data are deleted in the Backup Data.
The technique effect and preceding method of the data synchronization unit that the embodiment of the present invention is provided, its realization principle and generation Embodiment is identical, to briefly describe, and device embodiment part does not refer to part, refers in corresponding in preceding method embodiment Hold.
Referring to Fig. 5, another data synchronous system that the embodiment of the present invention is provided, the data synchronous system includes master Machine data terminal 100 and Backup Data end 200, the host data end 100 store the target data that can be changed, described Backup Data end 200 is stored to be set in the Backup Data in need synchronized with the target data, the Backup Data end 200 It is equipped with any data synchronization unit 300 in above-described embodiment.The data synchronous system belongs to distributed storage system, such as Cloud storage system.
Referring to Fig. 6, the embodiment of the present invention also provides a kind of data synchronization unit 600, including:Processor 500, memory 501, bus 502 and communication interface 503, the processor 500, communication interface 503 and memory 501 are connected by bus 502; Processor 500 is used to perform the executable module stored in memory 501, such as computer program.
Wherein, memory 501 may include high-speed random access memory (RAM:Random Access Memory), Non-labile memory (non-volatile memory), for example, at least one magnetic disk storage may also be included.By extremely A few communication interface 503 (can be wired or wireless) is realized logical between the system network element and at least one other network element Letter connection, can use internet, wide area network, LAN, Metropolitan Area Network (MAN) etc..
Bus 502 can be isa bus, pci bus or eisa bus etc..The bus can be divided into address bus, number According to bus, controlling bus etc..For ease of representing, only represented in Fig. 5 with a four-headed arrow, it is not intended that only one bus Or a type of bus.
Wherein, memory 501 is used for storage program, and the processor 500 performs the journey after execute instruction is received Sequence, the method performed by the device for the flow definition that foregoing any embodiment of the embodiment of the present invention is disclosed can apply to processor In 500, or realized by processor 500.
Processor 500 is probably a kind of IC chip, the disposal ability with signal.It is above-mentioned in implementation process Each step of method can be completed by the integrated logic circuit of the hardware in processor 500 or the instruction of software form.On The processor 500 stated can be general processor, including central processing unit (Central Processing Unit, referred to as CPU), network processing unit (Network Processor, abbreviation NP) etc.;Can also be digital signal processor (DSP), it is special Integrated circuit (ASIC), ready-made programmable gate array (FPGA) or other PLDs, discrete gate or transistor Logical device, discrete hardware components.It can realize or perform disclosed each method, step and the logic in the embodiment of the present invention Block diagram.General processor can be microprocessor or the processor can also be any conventional processor etc..With reference to this hair The step of method disclosed in bright embodiment, can be embodied directly in hardware decoding processor and perform completion, or be handled with decoding Hardware and software module combination in device perform completion.Software module can be located at random access memory, flash memory, read-only storage, In the ripe storage medium in this area such as programmable read only memory or electrically erasable programmable memory, register.This is deposited Storage media is located at memory 501, and processor 500 reads the information in memory 501, and the step of the above method is completed with reference to its hardware Suddenly.
In addition, the flow chart and block diagram in accompanying drawing show system, method and the meter of multiple embodiments according to the present invention Architectural framework in the cards, function and the operation of calculation machine program product.At this point, each square frame in flow chart or block diagram Can represent a part for a module, program segment or code, the part of the module, program segment or code comprising one or Multiple executable instructions for being used to realize defined logic function.It should also be noted that in some realizations as replacement, square frame Middle marked function can also be with different from the order marked in accompanying drawing generation.For example, two continuous square frames are actually It can perform substantially in parallel, they can also be performed in the opposite order sometimes, this is depending on involved function.Also to note Meaning, the combination of each square frame in block diagram and/or flow chart and the square frame in block diagram and/or flow chart can be with holding The special hardware based system of function or action as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
A kind of computer program product of data synchronization unit of progress that the embodiment of the present invention is provided, including store journey The computer-readable recording medium of sequence code, the instruction that described program code includes can be used for performing institute in previous methods embodiment The method stated, implements and can be found in embodiment of the method, will not be repeated here.
It is apparent to those skilled in the art that, for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.
, can be with several embodiments provided herein, it should be understood that disclosed systems, devices and methods Realize by another way.Device embodiment described above is only schematical, for example, the division of the unit, It is only a kind of division of logic function, there can be other dividing mode when actually realizing, in another example, multiple units or component can To combine or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, it is shown or beg for The coupling each other of opinion or direct-coupling or communication connection can be by some communication interfaces, device or unit it is indirect Coupling is communicated to connect, and can be electrical, machinery or other forms.
The unit illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing unit, can also That unit is individually physically present, can also two or more units it is integrated in a unit.
If the function is realized using in the form of SFU software functional unit and is used as independent production marketing or in use, can be with It is stored in a computer read/write memory medium.Understood based on such, technical scheme is substantially in other words The part contributed to prior art or the part of the technical scheme can be embodied in the form of software product, the meter Calculation machine software product is stored in a storage medium, including some instructions are to cause a computer equipment (can be individual People's computer, server, or network equipment etc.) perform all or part of step of each of the invention embodiment methods described. And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), arbitrary access are deposited Reservoir (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality Body or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or deposited between operating In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to Nonexcludability is included, so that process, method, article or equipment including a series of key elements not only will including those Element, but also other key elements including being not expressly set out, or also include being this process, method, article or equipment Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that Also there is other identical element in process, method, article or equipment including the key element.
In the description of the invention, in addition it is also necessary to explanation, unless otherwise clearly defined and limited, term " setting ", " installation ", " connected ", " connection " should be interpreted broadly, for example, it may be fixedly connected or be detachably connected, or one Connect body;Can be mechanical connection or electrical connection;Can be joined directly together, can also be indirect by intermediary It is connected, can is the connection of two element internals.For the ordinary skill in the art, on being understood with concrete condition State the concrete meaning of term in the present invention.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies Change, equivalent substitution, improvement etc., should be included in the scope of the protection.

Claims (8)

1. a kind of method of data synchronization, it is characterised in that applied to data synchronous system, the data synchronous system includes main frame Data terminal and Backup Data end, the host data end store the target data that can be changed, the Backup Data end The storage Backup Data in need synchronized with the target data, methods described includes:
The Backup Data end sends data synchronization request instruction to the host data end;
The target data and the Backup Data are contrasted, if it is not the same, the data that record is differed are synchronous vacations data;
Continue to send data synchronization request instruction to the host data end in the Backup Data end;
The target data and the Backup Data are contrasted, if it is not the same, the data that record is differed are modification correction data;
The synchronous vacations data and the modification correction data are contrasted, if identical, the Backup Data are changed so that described Backup Data is consistent with the target data;
Wherein:
The Backup Data end continues to send data synchronization request instruction to the host data end, including:The Backup Data End is continued to send the instruction of N datas synchronization request by preset interval time to the host data end, and N is the integer more than 1;
The contrast target data and the Backup Data, if it is not the same, the data that record is differed contrast for modification Data, including:
A data synchronization request instruction is often sent, the once target data and the Backup Data is just contrasted, if It is identical, then stop the execution of subsequent step, if it is different, the data that record is differed change correction data for n-th, n is big In equal to the 1, integer less than or equal to N;
The contrast synchronous vacations data and the modification correction data, if identical, change the Backup Data so that The Backup Data is consistent with the target data, including:
Contrast the synchronous vacations data and change correction data with the n-th, wherein n arrives N values successively by 1, if each It is secondary all identical, change the Backup Data so that the Backup Data is consistent with the target data.
2. according to the method described in claim 1, it is characterised in that the modification Backup Data, including:
If the target data and the difference of the Backup Data are, the target data increases the synchronous vacations Data, then the Backup Data end increase the synchronous vacations data on the basis of the Backup Data.
3. according to the method described in claim 1, it is characterised in that the modification Backup Data, including:
If the target data and the difference of the Backup Data are, the target data deletes the synchronous vacations Data, then the Backup Data end synchronous vacations data are deleted in the Backup Data.
4. a kind of data synchronization unit, it is characterised in that applied to data synchronous system, the data synchronous system includes main frame Data terminal and Backup Data end, the data synchronization unit are arranged at the Backup Data end, the host data end storage There are the target data that can be changed, the Backup Data end storage backup number in need synchronized with the target data According to described device includes:
First data synchronization request instruction sending unit, for sending data synchronization request instruction to the host data end;
First data comparison unit, for contrasting the target data and the Backup Data, if it is not the same, record is differed Data be synchronous vacations data;
Second data synchronization request instruction sending unit, refers to for continuing transmission data synchronization request to the host data end Order;
Second data comparison unit, for contrasting the target data and the Backup Data, if it is not the same, record is differed Data for modification correction data;
Data synchronisation unit, for contrasting the synchronous vacations data and the modification correction data, if identical, modification is described Backup Data so that the Backup Data is consistent with the target data;
Wherein:The second data synchronization request instruction sending unit specifically for:
N datas synchronization request is sent by preset interval time to the host data end to instruct, N is the integer more than 1;
The second data comparison unit specifically for:
A data synchronization request instruction is often sent, the once target data and the Backup Data is just contrasted, if It is identical, then stop the execution of subsequent step, if it is different, the data that record is differed change correction data for n-th, n is big In equal to the 1, integer less than or equal to N;
The data synchronisation unit specifically for:
Contrast the synchronous vacations data and change correction data with the n-th, wherein, n arrives N values successively by 1, if each It is secondary all identical, change the Backup Data so that the Backup Data is consistent with the target data.
5. device according to claim 4, it is characterised in that the data synchronisation unit specifically for:
If the target data and the difference of the Backup Data are, the target data increases the synchronous vacations Data, then increase the synchronous vacations data on the basis of the Backup Data.
6. device according to claim 4, it is characterised in that the data synchronisation unit specifically for:
If the target data and the difference of the Backup Data are, the target data deletes the synchronous vacations Data, then delete the synchronous vacations data in the Backup Data.
7. a kind of data synchronous system, it is characterised in that the data synchronous system includes host data end and Backup Data End, the host data end stores the target data that can be changed, and the Backup Data end stores the in need and mesh Data synchronization unit described in claim 4 is provided with the Backup Data that mark data are synchronized, the Backup Data end.
8. data synchronous system according to claim 7, it is characterised in that the data synchronous system is applied to distribution Stocking system.
CN201410836700.4A 2014-12-29 2014-12-29 Method of data synchronization, device and system Expired - Fee Related CN104503868B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410836700.4A CN104503868B (en) 2014-12-29 2014-12-29 Method of data synchronization, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410836700.4A CN104503868B (en) 2014-12-29 2014-12-29 Method of data synchronization, device and system

Publications (2)

Publication Number Publication Date
CN104503868A CN104503868A (en) 2015-04-08
CN104503868B true CN104503868B (en) 2017-10-27

Family

ID=52945268

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410836700.4A Expired - Fee Related CN104503868B (en) 2014-12-29 2014-12-29 Method of data synchronization, device and system

Country Status (1)

Country Link
CN (1) CN104503868B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105511808B (en) * 2015-12-01 2019-12-17 腾讯科技(深圳)有限公司 Data operation method, system and related device
CN108572926B (en) * 2017-03-13 2022-02-22 阿里巴巴集团控股有限公司 Method and device for synchronizing caches of central processing units
CN110019494B (en) * 2017-07-26 2021-09-07 北京国双科技有限公司 Media data processing method and device, storage medium and processor
CN110535907A (en) * 2019-07-26 2019-12-03 济南浪潮数据技术有限公司 A kind of metadata synchronization method and system
CN114817342A (en) * 2022-07-04 2022-07-29 杭州安恒信息技术股份有限公司 Data synchronization method, device, equipment and medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040086699A (en) * 2003-04-03 2004-10-12 주식회사 케이티 Personal information synchronization method between data communication equipment for multiple synchronization tool use
CN101038591A (en) * 2007-04-11 2007-09-19 华为技术有限公司 Method and system for synchronizing data base
CN101511042A (en) * 2009-03-23 2009-08-19 中兴通讯股份有限公司 Data synchronization method and device
CN102202072A (en) * 2010-03-23 2011-09-28 盛霆信息技术(上海)有限公司 Unidirectional synchronization method of internet website data
CN102904887A (en) * 2012-09-26 2013-01-30 东软集团股份有限公司 Method and system for data synchronization of Web client and server
CN102946410A (en) * 2012-10-15 2013-02-27 北京奇虎科技有限公司 Method and device for network synchronization
CN103428264A (en) * 2013-06-27 2013-12-04 华为软件技术有限公司 Data synchronization method, device and system
CN103731452A (en) * 2012-10-15 2014-04-16 鸿富锦精密工业(深圳)有限公司 File synchronization system and method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040086699A (en) * 2003-04-03 2004-10-12 주식회사 케이티 Personal information synchronization method between data communication equipment for multiple synchronization tool use
CN101038591A (en) * 2007-04-11 2007-09-19 华为技术有限公司 Method and system for synchronizing data base
CN101511042A (en) * 2009-03-23 2009-08-19 中兴通讯股份有限公司 Data synchronization method and device
CN102202072A (en) * 2010-03-23 2011-09-28 盛霆信息技术(上海)有限公司 Unidirectional synchronization method of internet website data
CN102904887A (en) * 2012-09-26 2013-01-30 东软集团股份有限公司 Method and system for data synchronization of Web client and server
CN102946410A (en) * 2012-10-15 2013-02-27 北京奇虎科技有限公司 Method and device for network synchronization
CN103731452A (en) * 2012-10-15 2014-04-16 鸿富锦精密工业(深圳)有限公司 File synchronization system and method
CN103428264A (en) * 2013-06-27 2013-12-04 华为软件技术有限公司 Data synchronization method, device and system

Also Published As

Publication number Publication date
CN104503868A (en) 2015-04-08

Similar Documents

Publication Publication Date Title
CN104503868B (en) Method of data synchronization, device and system
CN105262831A (en) Method, device, and synchronizing system for synchronizing data among memory systems
CN107977396B (en) Method and device for updating data table of KeyValue database
US10157000B2 (en) Data operation method and device
CN102946410A (en) Method and device for network synchronization
CN102946411A (en) Network synchronization system
JP2019091257A (en) Information processing device, information processing method, and program
CN108140050A (en) A kind of method and device using Bloom filter filtering file
CN109492049A (en) Data processing, block generation and synchronous method for block chain network
CN104572917A (en) Method and device for locking data and distributed storage system
CN104506636B (en) A kind of method of data synchronization and device
US10896056B2 (en) Cluster expansion method and apparatus, electronic device and storage medium
CN107977310B (en) Traversal test command generation method and device
CN109558159A (en) The update method and device of user interface in game
CN106534227A (en) Method and device of expanding distributed consistency service
CN105634999B (en) A kind of aging method and device of Media Access Control address
CN103117883B (en) A kind of packet equipment running status synchronous method
CN105447114A (en) Display method and apparatus for form field
CN105740442A (en) Data storage method in HBase
CN104281503A (en) Data backup method and related system
CN112817526B (en) Data storage method, device and medium
EP4213034A1 (en) Data processing system, data processing method based on blockchain, and device
CN113961641A (en) Database synchronization method, device, equipment and storage medium
CN107135258A (en) Method and server that message is pushed
CN115878587A (en) Instance creating method and device, electronic equipment and readable storage medium

Legal Events

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

Granted publication date: 20171027

Termination date: 20191229