CN106254094A - A kind of method of data synchronization and system - Google Patents
A kind of method of data synchronization and system Download PDFInfo
- Publication number
- CN106254094A CN106254094A CN201610569538.3A CN201610569538A CN106254094A CN 106254094 A CN106254094 A CN 106254094A CN 201610569538 A CN201610569538 A CN 201610569538A CN 106254094 A CN106254094 A CN 106254094A
- Authority
- CN
- China
- Prior art keywords
- data
- log information
- source
- destination
- mark
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
- H04L41/0663—Performing the actions predefined by failover planning, e.g. switching to standby network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
- H04L43/106—Active monitoring, e.g. heartbeat, ping or trace-route using time related information in packets, e.g. by adding timestamps
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Debugging And Monitoring (AREA)
Abstract
The open a kind of method of data synchronization of the present invention and system, the method includes: destination sends data synchronization request to source, and described data synchronization request comprises the daily record group character of data to be synchronized;Described destination receives the N bar log information of the described daily record group character that described source sends, and every log information at least includes that the mark of data to be synchronized and data to be synchronized were stabbed in the very first time of source, and N is positive integer;The N bar log information of daily record group character described in the parallel processing as follows of described destination: for every log information, according to the mark of the data to be synchronized in described log information, determine the second timestamp of the destination data corresponding with described mark;If stamp of the described very first time is later than described second timestamp, then obtain from described source and identify corresponding source data to update described destination data with described, in order to solve master/backup system data synchronizing method in existing disaster recovery and backup systems structure it is impossible to ensure that the problem of real-time.
Description
Technical field
The present invention relates to the communications field, particularly relate to a kind of method of data synchronization and system.
Background technology
Banking is one of widest industry of application message science and technology.Along with the fast development of bank informationization, silver
Row information system have employed the big hubbed mode that data are left concentratedly, focused on mostly, this hubbed mode bring huge
There is also many risks while benefit, one aspect is exactly that diversifying risks of multiple spot has accumulated data center a bit
Centralized risk, once center-side is beset by technical hitches, and (such as hardware fault, human operational error and virus attack are caused
Destroy), its consequence will be catastrophic.Therefore, the highly reliable storage of data, the prevention that disaster occurs, take into full account that disaster is sent out
The quick recovery ways of raw consequence, becomes a ring particularly important in bank information trouble free service.
It is said that in general, standby for carrying out data calamity, the system being in core status can be used 1+1 backup or N+1 backup.One
When denier active system breaks down, back-up system can the work of adapter active system soon, make whole working environment just keep
Often.Wherein, active system and back-up system can be that function is identical under normal circumstances and two of separate operation are
System, also referred to as active-standby active-active system.In such active-standby active-active system, generally will relate to more dynamic data and join
Put the operation such as data, the switching between primary and back-up system will be made not affect the properly functioning of whole working environment, Qi Zhongyi
The problem of individual key is exactly the data syn-chronization being simultaneously between the primary of active state and back-up system.When active system occurs
Problem cannot competent time, back-up system can replace active system to be operated the most completely, to improve the reliable of system
Property.
In current disaster recovery and backup systems structure, active system or back-up system itself obtain often through the mode of poll and send out
Given birth to the source data updated, by poll, such as back-up system checks that the timestamp of the data in active system source data table is
No change.The shortcoming of this mode is that the renewal of back-up system data has hysteresis quality, all the time particularly in active system
In the case of having a large amount of dynamic data, because active system source data table often being carried out poll when all will take for a lot
Between, therefore cause between active system or back-up system it is impossible to ensure that the real-time that synchronizes.
Summary of the invention
The embodiment of the present invention provides a kind of method of data synchronization, in order to solve main preparation system in existing disaster recovery and backup systems structure
Method of data synchronization is it is impossible to ensure that the problem of real-time.
The inventive method includes a kind of method of data synchronization, and the method includes: destination sends data syn-chronization to source please
Asking, described data synchronization request comprises the daily record group character of data to be synchronized;
Described destination receives the N bar log information of the described daily record group character that described source sends, every daily record letter
Breath at least includes that the mark of data to be synchronized and data to be synchronized were stabbed in the very first time of source, and N is positive integer;
The N bar log information of daily record group character described in the parallel processing as follows of described destination:
For every log information, according to the mark of the data to be synchronized in described log information, determine and described mark
Second timestamp of corresponding destination data;If stamp of the described very first time is later than described second timestamp, then from described source
Obtain the source data corresponding with described mark to update described destination data.
Based on same inventive concept, the embodiment of the present invention provides a kind of data synchronous system, this system bag further
Including source and destination, described destination includes: transmitting element, and for sending data synchronization request to source, described data are same
Step request comprises the daily record group character of data to be synchronized;
Receive unit, for receiving the N bar log information of the described daily record group character that described source sends, every daily record
Information at least includes that the mark of data to be synchronized and data to be synchronized were stabbed in the very first time of source, and N is positive integer;
Processing unit, for the N bar log information of daily record group character described in parallel processing as follows: for often
Bar log information, according to the mark of the data to be synchronized in described log information, determines the purpose terminal number corresponding with described mark
According to the second timestamp;If stamp of the described very first time is later than described second timestamp, then obtain and described mark from described source
Corresponding source data are to update described destination data.
The method of data synchronization that the embodiment of the present invention provides, destination is every time equal in the data synchronization request that source sends
Carrying the daily record group character belonging to log information, the log information in this daily record group character can be sent to purpose by source
End, then destination can be with the log information in the different daily record group character of parallel processing, and specifically processing method is the most really
Determine the second timestamp of destination data corresponding to the mark of data to be synchronized in log information, then compare the second timestamp
Stab in the very first time of source with the mark of the data to be synchronized in log information, if stamp of the described very first time is later than institute if judging
State the second timestamp, then obtain the source data corresponding with described mark to update described destination data from source.Visible, logical
Cross this method of data synchronization and can avoid the timestamp of direct reference source data, but obtain the time of source data log information
Stamp, compares the timestamp in log information, it is clear that only just have log information, the most this ratio when source data changes
Relatively method can significantly reduce the reading frequency to source data, it addition, destination can be with parallel processing difference daily record group character
In log information, therefore further increase treatment effeciency.
Accompanying drawing explanation
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, in embodiment being described below required for make
Accompanying drawing briefly introduce, it should be apparent that, below describe in accompanying drawing be only some embodiments of the present invention, for this
From the point of view of the those of ordinary skill in field, on the premise of not paying creative work, it is also possible to obtain other according to these accompanying drawings
Accompanying drawing.
Fig. 1 provides a kind of method of data synchronization schematic flow sheet for the embodiment of the present invention;
Fig. 2 provides a kind of method of data synchronization embodiment one schematic flow sheet for the embodiment of the present invention;
Fig. 3 provides a kind of data synchronous system configuration diagram one for the embodiment of the present invention;
Fig. 4 provides a kind of data synchronous system configuration diagram two for the embodiment of the present invention;
Fig. 5 provides the destination configuration diagram of a kind of data synchronous system for the embodiment of the present invention.
Detailed description of the invention
In order to make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing the present invention made into
One step ground describes in detail, it is clear that described embodiment is only some embodiments of the present invention rather than whole enforcement
Example.Based on the embodiment in the present invention, those of ordinary skill in the art are obtained under not making creative work premise
All other embodiments, broadly fall into the scope of protection of the invention.
Shown in Figure 1, the embodiment of the present invention provides a kind of method of data synchronization schematic flow sheet, specifically implementation method
Including:
Step S101, destination sends data synchronization request to source, and described data synchronization request comprises data to be synchronized
Daily record group character.
Step S102, described destination receives the N bar log information of the described daily record group character that described source sends, often
Bar log information at least includes that the mark of data to be synchronized and data to be synchronized were stabbed in the very first time of source, and N is positive integer.
Step S103, the N bar log information of daily record group character described in the parallel processing as follows of described destination:
For every log information, according to the mark of the data to be synchronized in described log information, determine the mesh corresponding with described mark
The second timestamp of end data;If stamp of the described very first time is later than described second timestamp, then obtain and institute from described source
State source data corresponding to mark to update described destination data.
Destination refers to the back-up system of backup source end data in the above-mentioned methods, and source refers to produce data
Active system, usual source and destination be present in disaster recovery and backup systems structure, destination in order to keep the data syn-chronization with source,
Being accomplished by constantly sending data synchronization request to source, in order to improve the real-time of data syn-chronization, the embodiment of the present invention is being held
Before row step S101, the log information that this locality generates can be grouped by source, will log information inside daily record according to
Index is divided into multiple groups, and specifically group technology can use the scattered method of TAG, such as total TAG number is 8, and source is every
Generate a daily record will the corresponding index Index generating this daily record, by this Index divided by remainder, institute after maximum TAG number
Obtaining remainder is exactly packet count corresponding to this daily record.Visible, just can be by the daily record set in source by this group technology
Be divided into multiple groups, it should be noted that above-mentioned packet is real-time, i.e. source often generates a daily record, and this daily record will be by
It is divided to immediately in group.
After daily record set is divided into multiple groups by source, daily record group character can be stood for each establishment, and by these
Daily record group character shares to destination.Destination, when source sends data synchronization request, will be taken in data synchronization request
Carrying these daily record group character information, the daily record in these daily record group character information is sent to destination, destination by source
Daily record in different daily record group character can be received parallel, and compare timestamp in log information, then enter according to comparative result
Row synchronizes, it addition, the daily record in these daily record group character information was sent before destination in source, and can be further
Daily record in screening group, the method for screening is by corresponding for the mark of data to be synchronized with in daily record for the timestamp comparing daily record
The timestamp of the data of source compares, if finding, the data of this mark of source are new, the most directly than timestamp in daily record
This daily record can be filtered, the most no longer this daily record is sent to destination and makes comparisons, certainly, if finding the number of this mark of source
According to consistent with timestamp in daily record, just daily record in packet is sent accordingly to destination, it is seen then that by this screening daily record
Step can improve destination further and process the efficiency of data.
Further, it is contemplated that the journalizing type of source data can have newly-increased, revise, delete these three type,
For different action types, destination needs to carry out different synchronization process, and specifically, described destination is believed from described daily record
Breath being determined, described action type is amendment or the log information deleted;It is the log information of amendment for action type,
Described destination obtains the source data corresponding with the mark described log information from described source and replaces described purpose terminal number
According to;Being the log information deleted for action type, described destination deletes described mesh according to the mark in described log information
End data.
Further, described destination determines that from described log information described action type is newly-increased daily record letter
Breath;Being newly-increased log information for action type, described destination obtains the source corresponding with described mark from described source
Data add described destination to.
For the above-mentioned method of data synchronization that describes in a systematic way, the embodiment of the present invention further provides for the flow chart shown in Fig. 2
Elaborate.
Step 201, destination sends data synchronization request to source, comprises daily record group character in data synchronization request.
Step 202, the daily record in the daily record group character in data synchronization request is sent to destination by source.
Step 203, after destination receives the log information that source sends, it is judged that the action type of daily record is newly-increased type,
Or amendment or deletion type.
Step 204, if action type is amendment or deletes type, then obtains the data to be synchronized in log information in source
The very first time stamp of end, then the second timestamp of the destination data that the mark of data to be synchronized with in destination is corresponding is carried out
Relatively.
Step 205, if finding, very first time stamp is later than described second timestamp, then obtain and described mark from described source
Corresponding source data are to update described destination data, and this log information is labeled as processed.
Step 206, if finding, the very first time stabs early than described second timestamp, does not synchronizes, and by this day
Will is labeled as processed.
Step 207, if action type is newly-increased type, destination obtains the source corresponding with described mark from described source
Data add described destination to.
Step 208, can update the second timestamp of destination data after destination completes synchronization process.
As an example it is assumed that the Shanghai centre data of Shanghai active system is synchronized by Beijing back-up system, upper marine
Calculation evidence there are 4 sheet table data, have the part data in partial table to occur more in the middle of this day of 2016.07.01
Newly, it is assumed that a [1] [1] (source data of the first row first row) in this day AM10:00 this moment sheet1 is updated,
Now corresponding generate Article 1 daily record: 2016.07.01 10:00a [1] [1] data update, to should the index record of bar daily record
For index1;The like generate Article 2 daily record and Article 3 daily record;A in this day AM10:30 this moment sheet1
[1] [1] (source data of the first row first row) is updated, now corresponding generation Article 4 daily record: 2016.07.01 10:30a
[1] [1] data update, to should the index record of bar daily record be index4;The like generate Article 5 daily record;This day AM
B [5] [1] (source data of fifth line first row) in 11:00 this moment Sheet2 is deleted, now corresponding generation Article 6
Daily record: 2016.07.01 11:00 data deletion data, to should the index record of bar daily record be index6.According to above-mentioned TAG
Process for dispersing by index1, index3, index5 by three daily records be grouped into TAG1 (packet label 1), index2,
Index4, index6 are grouped into TAG2 (packet label 2).
It addition, Beijing Center data also have 4 sheet table data (being the backup of Shanghai centre data), these four tables
The time finally synchronized is 2016.06.30, moment 23:00, and therefore the second timestamp of these four tables falls at 2016.06.30,
Moment 23:00.Assuming in this day this moment of AM12:00 of 2016.07.01, the second client request in Pekinese's synchronizes Shanghai
The source data corresponding to daily record group character TAG2 at center, the server in Shanghai receives daily record in TAG2 after synchronization request
Sending to Pekinese's the second client, the second client synchronizes as follows: such as, for Article 4 daily record, than
The timestamp 2016.07.01 moment 10:30 of the daily record corresponding compared with index4 than Beijing Center data a [1] [1] source data
Rear renewal timestamp 2016.06.30 23:00 is late, so being updated a [1] [1] processing, updates Pekinese centre data a
[1] [1], and to update the second timestamp be 2016.07.01 10:30.To Article 6 daily record, compare daily record corresponding for index6
Timestamp 2016.07.01 11:00 is than the source data final updating timestamp 2016.06.30 of Beijing Center data b [5] [1]
23:00 is late, so being updated b [5] [1] processing, the timestamp updating b [5] [1] source data record is 2016.07.01
11:00, the daily record corresponding as index2, index4, index6 has all processed, then the synchronization for this synchronization request is tied
Bundle.
Assuming in this day this moment of AM12:05 of 2016.07.01, the second client request in Pekinese's synchronizes upper marine
The source data corresponding to daily record group character TAG1 of the heart, after the server in Shanghai receives synchronization request, by daily record in TAG2
Sending to Pekinese's the second client, the second client synchronizes as follows: such as, for Article 1 daily record, than
The timestamp 2016.07.01 10:00 of relatively index1 is than the source data final updating timestamp of Beijing Center data a [1] [1]
2016.07.01 10:30 is early, so not processing a [1] [1], and it is the most processed to identify this index index1, the like
Reprocessing other log informations of TAG1.
Further, the active system in described source and described destination active-standby active-active system each other and back-up system;
Described source includes first server and multiple first client, is sent to described second server by described first client
Information;
Described destination includes second server and multiple second client, by described second client to described first
Server sends information.
As it is shown on figure 3, the active system in Shanghai mainly includes first server and the first client, Pekinese's back-up system
Mainly include second server and the second client, when the data of side, synchronization Shanghai, side, Beijing, the second of Beijing back-up system
Client sends data synchronization request to first server, and first server obtains log information from the centre data of Shanghai, so
Send the second client to Beijing back-up system by first server afterwards, and then the second client is according to above-mentioned data syn-chronization
Method synchronizes;It addition, when the data of side, synchronization Beijing, side, Shanghai, the first client of Shanghai back-up system is to the second clothes
Business device sends data synchronization request, and second server obtains log information from Beijing Center data, then passes through second service
Device sends the first client to Shanghai active system, and then the first client synchronizes according to above-mentioned method of data synchronization.
Visible this method of data synchronization can as required because of server and client side, distributed deployment.Multiple servers it
Between can be the most active and standby.Client can also each two be one group, processes the log information that same daily record group character is corresponding,
So having transversal stretching, the feature of multimachine High Availabitity.
Further, second client is elected to send to described first server from the plurality of second client
Data synchronization request;The plurality of second client competition receives the same daily record group character of described first server transmission
Each log information;Every the log information received for each second client, each second client is as follows
Every log information that parallel processing receives.
As shown in Figure 4, the back-up system of side, Beijing has multiple second client, when the data of side, synchronization Shanghai, side, Beijing
Time, side, Beijing elects a client from multiple second clients and comprises daily record packet to the first server transmission in Shanghai
The data synchronization request of mark TAG1, then the first server of side, Shanghai sends every in TAG1 to each second client
Log information, each second client at this moment compete reception every log information, then parallel processing receive log information, can
See the efficiency that so can improve each data syn-chronization.
Further, if described second client continuous N time obtains the mark correspondence of described log information from described source
Source data all failed, the most described second client stops obtaining described source data, and the shape of log information described in labelling
State is for process unsuccessfully, and M is positive integer.
It should be noted that client synchronization asks fault-tolerant number of times M to be adjustable, even if final synchronization failure, still may be used
Review, and have only to process the problem log of synchronization failure, solve to join according to time parameter full dose during recording synchronism failure
The problem that machine synchronizes;Client has the chance attempting synchronous recording 5 times at present, if 5 is subsynchronous all failed, then and this source record shape
State is set to prove an abortion, and is no longer obtained by client.This number of times is adjustable.Even if proving an abortion, it is also possible to easily
Found the record of failure by concordance list, after orientation problem, resynchronize the record of these failures.Then state is lost for processing
The log information that loses is follow-up is carried out artificial treatment by manager.
If it should be noted that described second client successfully obtains the source number of the mark correspondence of described log information
According to, the most described second client, according to the mark of the data to be synchronized in described log information, updates by the source data obtained
Described destination data, and described second update of time stamp of described destination data is source data by described destination
The described very first time stabs.So when synchronizing next time, the data that client the synchronized update timestamp of back-up system is newer,
Ensure that targeted data states is up-to-date effectively.
Based on identical technology design, the embodiment of the present invention also provides for a kind of data synchronous system, and this system includes source
And destination, described destination can perform said method embodiment.The destination that the embodiment of the present invention provides is as it is shown in figure 5, wrap
Include: transmitting element 401, reception unit 402, processing unit 403, wherein:
Transmitting element 401, for sending data synchronization request to source, described data synchronization request comprises data to be synchronized
Daily record group character;
Receive unit 402, for receiving the N bar log information of the described daily record group character that described source sends, every
Log information at least includes that the mark of data to be synchronized and data to be synchronized were stabbed in the very first time of source, and N is positive integer;
Processing unit 403, for the N bar log information of daily record group character described in parallel processing as follows: pin
To every log information, according to the mark of the data to be synchronized in described log information, determine the purpose corresponding with described mark
Second timestamp of end data;If stamp of the described very first time is later than described second timestamp, then obtain with described from described source
The source data of mark correspondence are to update described destination data.
Further, every log information also includes action type;Described destination also includes: selects unit 404, is used for
From described log information, determine that described action type is amendment or the log information deleted;
Described processing unit 403 specifically for: for action type be amendment log information, from described source obtain with
The source data of the mark correspondence in described log information replace described destination data;It it is the daily record deleted for action type
Information, deletes described destination data according to the mark in described log information.
Further, described selection unit 404 is additionally operable to: determine that from described log information described action type is new
The log information increased;
Described processing unit 403 is additionally operable to: be newly-increased log information for action type, obtains and institute from described source
The source data stating mark corresponding add described destination to.
Further, also include: active system in described source and described destination active-standby active-active system each other and standby
Use system;Described source includes first server and multiple first client, by described first client to described second clothes
Business device sends information;
Described destination includes second server and multiple second client, by described second client to described first
Server sends information.
Further, described transmitting element 401 specifically for: from the plurality of second client elect one second visitor
Family end sends data synchronization request to described first server;
Described reception unit 402 specifically for: competition receive described first server send same daily record group character
Each log information;
Described processing unit 403 specifically for: for each second client receive every log information, according to as follows
Every log information that mode parallel processing receives.
Further, described processing unit 403 is additionally operable to: if described second client continuous N time obtains from described source
The source data that the mark of described log information is corresponding are all failed, and the most described second client stops obtaining described source data,
And the state of log information described in labelling is for process unsuccessfully, M is positive integer.
Further, described processing unit 403 is additionally operable to: by described second update of time stamp of described destination data be
The stamp of the described very first time of source data.
In sum, the method for data synchronization that the embodiment of the present invention provides, the data that destination sends to source every time are same
All carrying the daily record group character belonging to log information in step request, the log information in this daily record group character can be sent out by source
Giving destination, then destination can be with the log information in the different daily record group character of parallel processing, the specifically side of process
Method is first to determine the second timestamp of destination data corresponding to the mark of data to be synchronized in log information, then compares the
The mark of the data to be synchronized in two timestamps and log information was stabbed in the very first time of source, if if judging the described very first time
Stamp is later than described second timestamp, then obtain the source data corresponding with described mark to update described purpose terminal number from source
According to.Visible, the timestamp of direct reference source data can be avoided by this method of data synchronization, but obtain source data daily record
The timestamp of information, compares the timestamp in log information, it is clear that only just have log information when source data changes,
The most this comparative approach can significantly reduce the reading frequency to source data, it addition, destination can with parallel processing the most on the same day
Log information in will group character, therefore further increase treatment effeciency.
The present invention is with reference to method, equipment (system) and the flow process of computer program according to embodiments of the present invention
Figure and/or block diagram describe.It should be understood that can the most first-class by computer program instructions flowchart and/or block diagram
Flow process in journey and/or square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided
Instruction arrives the processor of general purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce
A raw machine so that the instruction performed by the processor of computer or other programmable data processing device is produced for real
The device of the function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame now.
These computer program instructions may be alternatively stored in and computer or other programmable data processing device can be guided with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in this computer-readable memory produces and includes referring to
Make the manufacture of device, this command device realize at one flow process of flow chart or multiple flow process and/or one square frame of block diagram or
The function specified in multiple square frames.
These computer program instructions also can be loaded in computer or other programmable data processing device so that at meter
Perform sequence of operations step on calculation machine or other programmable devices to produce computer implemented process, thus at computer or
The instruction performed on other programmable devices provides for realizing at one flow process of flow chart or multiple flow process and/or block diagram one
The step of the function specified in individual square frame or multiple square frame.
Although preferred embodiments of the present invention have been described, but those skilled in the art once know basic creation
Property concept, then can make other change and amendment to these embodiments.So, claims are intended to be construed to include excellent
Select embodiment and fall into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and the modification essence without deviating from the present invention to the present invention
God and scope.So, if these amendments of the present invention and modification belong to the scope of the claims in the present invention and equivalent technologies thereof
Within, then the present invention is also intended to comprise these change and modification.
Claims (14)
1. a method of data synchronization, it is characterised in that the method includes:
Destination sends data synchronization request to source, and described data synchronization request comprises the daily record packet mark of data to be synchronized
Know;
Described destination receives the N bar log information of the described daily record group character that described source sends, and every log information is extremely
Including that mark and the data to be synchronized of data to be synchronized were stabbed in the very first time of source less, N is positive integer;
The N bar log information of daily record group character described in the parallel processing as follows of described destination:
For every log information, according to the mark of the data to be synchronized in described log information, determine corresponding with described mark
The second timestamp of destination data;If stamp of the described very first time is later than described second timestamp, then obtain from described source
The source data corresponding with described mark are to update described destination data.
2. the method for claim 1, it is characterised in that every log information also includes action type;
The described mark according to the data to be synchronized in described log information, determines the destination data corresponding with described mark
Before second timestamp, also include:
Described destination determines that from described log information described action type is amendment or the log information deleted;
Described acquisition from described source identifies corresponding source data to update described destination data with described, including:
Being the log information of amendment for action type, described destination obtains and the mark described log information from described source
Know corresponding source data and replace described destination data;
Being the log information deleted for action type, described destination deletes described mesh according to the mark in described log information
End data.
3. method as claimed in claim 2, it is characterised in that also include:
Described destination determines that from described log information described action type is newly-increased log information;
Being newly-increased log information for action type, described destination obtains the source corresponding with described mark from described source
Data add described destination to.
4. the method for claim 1, it is characterised in that also include:
Active system in described source and described destination active-standby active-active system each other and back-up system;
Described source includes first server and multiple first client, by described first client to described second server
Transmission information;
Described destination includes second server and multiple second client, by described second client to described first service
Device sends information.
5. method as claimed in claim 4, it is characterised in that described destination sends data synchronization request to source, including:
Second client is elected to send data synchronization request to described first server from the plurality of second client;
Described destination receives the N bar log information of the described daily record group character that source sends, including:
The plurality of second client competition receives each daily record of the same daily record group character that described first server sends
Information;
The N bar log information of daily record group character described in the parallel processing as follows of described destination, including:
Every the log information received for each second client, each the second client parallel processing as follows connects
Every the log information received.
6. method as claimed in claim 5, it is characterised in that described acquisition from described source identifies corresponding source with described
Data to update described destination data, including:
If described second client continuous N time is all lost from the source data of the mark correspondence that described source obtains described log information
Losing, the most described second client stops obtaining described source data, and the state of log information described in labelling is for process unsuccessfully, M
For positive integer.
7. the method as described in any one of claim 1 to 6, it is characterised in that described from the acquisition of described source and described mark
Corresponding source data, to update described destination data, afterwards, also include:
The described very first time that described second update of time stamp is source data of described destination data is stabbed by described destination.
8. a data synchronous system, it is characterised in that this system includes that source and destination, described destination include:
Transmitting element, for sending data synchronization request to source, described data synchronization request comprises the daily record of data to be synchronized
Group character;
Receive unit, for receiving the N bar log information of the described daily record group character that described source sends, every log information
At least including that mark and the data to be synchronized of data to be synchronized were stabbed in the very first time of source, N is positive integer;
Processing unit, for the N bar log information of daily record group character described in parallel processing as follows: for every day
Will information, according to the mark of the data to be synchronized in described log information, determines the destination data corresponding with described mark
Second timestamp;If stamp of the described very first time is later than described second timestamp, then obtain corresponding with described mark from described source
Source data to update described destination data.
9. system as claimed in claim 8, it is characterised in that every log information also includes action type;
Described destination also includes:
Select unit, for determining that from described log information described action type is amendment or the log information deleted;
Described processing unit specifically for: for action type be amendment log information, from described source obtain with described day
The source data of the mark correspondence in will information replace described destination data;It is the log information deleted for action type,
Described destination data are deleted according to the mark in described log information.
10. system as claimed in claim 8, it is characterised in that described selection unit is additionally operable to: from described log information really
Making described action type is newly-increased log information;
Described processing unit is additionally operable to: be newly-increased log information for action type, obtains and described mark from described source
Corresponding source data add described destination to.
11. systems as claimed in claim 8, it is characterised in that also include:
Active system in described source and described destination active-standby active-active system each other and back-up system;
Described source includes first server and multiple first client, by described first client to described second server
Transmission information;
Described destination includes second server and multiple second client, by described second client to described first service
Device sends information.
12. systems as claimed in claim 11, it is characterised in that described transmitting element specifically for:
Second client is elected to send data synchronization request to described first server from the plurality of second client;
Described reception unit specifically for: competition receives each day of same daily record group character that described first server sends
Will information;
Described processing unit specifically for: for each second client receive every log information, the most also
Row processes every the log information received.
13. systems as claimed in claim 12, it is characterised in that described processing unit is additionally operable to:
If described second client continuous N time is all lost from the source data of the mark correspondence that described source obtains described log information
Losing, the most described second client stops obtaining described source data, and the state of log information described in labelling is for process unsuccessfully, M
For positive integer.
14. systems as described in any one of claim 8 to 13, it is characterised in that: described processing unit is additionally operable to: by described mesh
End data the described very first time that described second update of time stamp is source data stamp.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610569538.3A CN106254094B (en) | 2016-07-19 | 2016-07-19 | A kind of method of data synchronization and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610569538.3A CN106254094B (en) | 2016-07-19 | 2016-07-19 | A kind of method of data synchronization and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106254094A true CN106254094A (en) | 2016-12-21 |
CN106254094B CN106254094B (en) | 2019-08-13 |
Family
ID=57613476
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610569538.3A Active CN106254094B (en) | 2016-07-19 | 2016-07-19 | A kind of method of data synchronization and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106254094B (en) |
Cited By (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106921746A (en) * | 2017-03-22 | 2017-07-04 | 重庆允升科技有限公司 | A kind of data synchronous system and method for data synchronization |
CN108243208A (en) * | 2016-12-23 | 2018-07-03 | 深圳市优朋普乐传媒发展有限公司 | A kind of method of data synchronization and device |
CN108270814A (en) * | 2016-12-30 | 2018-07-10 | 北京优朋普乐科技有限公司 | A kind of method of data synchronization and device |
CN108322533A (en) * | 2018-01-31 | 2018-07-24 | 广州鼎甲计算机科技有限公司 | Configuration and synchronization method between distributed type assemblies node based on operation log |
CN108449206A (en) * | 2018-03-12 | 2018-08-24 | 新华三技术有限公司 | A kind of method for synchronizing time, device, equipment and storage medium |
CN108551484A (en) * | 2018-04-23 | 2018-09-18 | 平安科技(深圳)有限公司 | User information synchronous method, device, computer installation and storage medium |
CN108898759A (en) * | 2018-06-27 | 2018-11-27 | 中国建设银行股份有限公司 | A kind of electronic diary synchronous method and device |
CN109462661A (en) * | 2018-12-19 | 2019-03-12 | 深圳市随手科技有限公司 | Method of data synchronization, device, computer equipment and storage medium |
CN109558458A (en) * | 2018-12-30 | 2019-04-02 | 贝壳技术有限公司 | Method of data synchronization, configuration platform, transaction platform and data synchronous system |
WO2019144761A1 (en) * | 2018-01-24 | 2019-08-01 | 中国银联股份有限公司 | Data synchronization method, distributed system and device |
CN110297866A (en) * | 2019-05-20 | 2019-10-01 | 平安普惠企业管理有限公司 | Method of data synchronization and data synchronization unit based on log analysis |
CN110489434A (en) * | 2019-07-23 | 2019-11-22 | 中国平安财产保险股份有限公司 | A kind of information processing method and relevant device |
CN110851526A (en) * | 2018-08-02 | 2020-02-28 | 阿里巴巴集团控股有限公司 | Data synchronization method, device and system |
CN111143295A (en) * | 2019-11-14 | 2020-05-12 | 泰康保险集团股份有限公司 | Policy information processing method, apparatus, device and storage medium |
CN112052074A (en) * | 2020-09-29 | 2020-12-08 | 上海兆芯集成电路有限公司 | Processor modeling system and processor modeling method |
CN112487007A (en) * | 2020-12-01 | 2021-03-12 | 银清科技有限公司 | Multi-inter-network flow synchronous management method, device and system |
CN113067841A (en) * | 2019-12-13 | 2021-07-02 | 航天信息股份有限公司 | Cross-system invoice authentication data synchronization method and device |
CN113157716A (en) * | 2021-05-13 | 2021-07-23 | 杭州网易云音乐科技有限公司 | Data processing method, device, equipment and medium |
CN113190536A (en) * | 2021-03-02 | 2021-07-30 | 上海英方软件股份有限公司 | Rapid repair method and device for double-active database management replication system |
CN114157677A (en) * | 2021-12-14 | 2022-03-08 | 南京欧珀软件科技有限公司 | Data synchronization method and related product |
CN115858252A (en) * | 2023-02-21 | 2023-03-28 | 浙江智臾科技有限公司 | Data recovery method, device and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102801543A (en) * | 2011-05-24 | 2012-11-28 | 中国银联股份有限公司 | Method for dynamic data synchronization between active-active systems |
CN103841167A (en) * | 2012-11-27 | 2014-06-04 | 中国移动通信集团公司 | User data synchronizing method and device |
CN103905397A (en) * | 2012-12-28 | 2014-07-02 | 腾讯科技(深圳)有限公司 | Data synchronization method and system |
CN105159795A (en) * | 2015-08-21 | 2015-12-16 | 小米科技有限责任公司 | Data synchronization method, apparatus and system |
CN105610953A (en) * | 2015-12-31 | 2016-05-25 | 深圳市优户科技有限公司 | Distributed data synchronizing system and method |
-
2016
- 2016-07-19 CN CN201610569538.3A patent/CN106254094B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102801543A (en) * | 2011-05-24 | 2012-11-28 | 中国银联股份有限公司 | Method for dynamic data synchronization between active-active systems |
CN103841167A (en) * | 2012-11-27 | 2014-06-04 | 中国移动通信集团公司 | User data synchronizing method and device |
CN103905397A (en) * | 2012-12-28 | 2014-07-02 | 腾讯科技(深圳)有限公司 | Data synchronization method and system |
CN105159795A (en) * | 2015-08-21 | 2015-12-16 | 小米科技有限责任公司 | Data synchronization method, apparatus and system |
CN105610953A (en) * | 2015-12-31 | 2016-05-25 | 深圳市优户科技有限公司 | Distributed data synchronizing system and method |
Cited By (35)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108243208A (en) * | 2016-12-23 | 2018-07-03 | 深圳市优朋普乐传媒发展有限公司 | A kind of method of data synchronization and device |
CN108270814A (en) * | 2016-12-30 | 2018-07-10 | 北京优朋普乐科技有限公司 | A kind of method of data synchronization and device |
CN106921746A (en) * | 2017-03-22 | 2017-07-04 | 重庆允升科技有限公司 | A kind of data synchronous system and method for data synchronization |
WO2019144761A1 (en) * | 2018-01-24 | 2019-08-01 | 中国银联股份有限公司 | Data synchronization method, distributed system and device |
CN108322533A (en) * | 2018-01-31 | 2018-07-24 | 广州鼎甲计算机科技有限公司 | Configuration and synchronization method between distributed type assemblies node based on operation log |
CN108322533B (en) * | 2018-01-31 | 2019-02-19 | 广州鼎甲计算机科技有限公司 | Configuration and synchronization method between distributed type assemblies node based on operation log |
CN108449206A (en) * | 2018-03-12 | 2018-08-24 | 新华三技术有限公司 | A kind of method for synchronizing time, device, equipment and storage medium |
CN108449206B (en) * | 2018-03-12 | 2020-11-27 | 新华三技术有限公司 | Time synchronization method, device, equipment and storage medium |
CN108551484A (en) * | 2018-04-23 | 2018-09-18 | 平安科技(深圳)有限公司 | User information synchronous method, device, computer installation and storage medium |
CN108551484B (en) * | 2018-04-23 | 2021-04-20 | 平安科技(深圳)有限公司 | User information synchronization method, device, computer device and storage medium |
CN108898759A (en) * | 2018-06-27 | 2018-11-27 | 中国建设银行股份有限公司 | A kind of electronic diary synchronous method and device |
CN110851526A (en) * | 2018-08-02 | 2020-02-28 | 阿里巴巴集团控股有限公司 | Data synchronization method, device and system |
CN110851526B (en) * | 2018-08-02 | 2023-04-11 | 阿里巴巴集团控股有限公司 | Data synchronization method, device and system |
CN109462661A (en) * | 2018-12-19 | 2019-03-12 | 深圳市随手科技有限公司 | Method of data synchronization, device, computer equipment and storage medium |
CN109462661B (en) * | 2018-12-19 | 2021-08-10 | 深圳市卡牛科技有限公司 | Data synchronization method and device, computer equipment and storage medium |
CN109558458A (en) * | 2018-12-30 | 2019-04-02 | 贝壳技术有限公司 | Method of data synchronization, configuration platform, transaction platform and data synchronous system |
CN109558458B (en) * | 2018-12-30 | 2021-08-03 | 贝壳找房(北京)科技有限公司 | Data synchronization method, configuration platform, transaction platform and data synchronization system |
CN110297866A (en) * | 2019-05-20 | 2019-10-01 | 平安普惠企业管理有限公司 | Method of data synchronization and data synchronization unit based on log analysis |
CN110489434B (en) * | 2019-07-23 | 2023-08-22 | 中国平安财产保险股份有限公司 | Information processing method and related equipment |
CN110489434A (en) * | 2019-07-23 | 2019-11-22 | 中国平安财产保险股份有限公司 | A kind of information processing method and relevant device |
CN111143295A (en) * | 2019-11-14 | 2020-05-12 | 泰康保险集团股份有限公司 | Policy information processing method, apparatus, device and storage medium |
CN111143295B (en) * | 2019-11-14 | 2024-01-30 | 泰康保险集团股份有限公司 | Policy information processing method, device, equipment and storage medium |
CN113067841A (en) * | 2019-12-13 | 2021-07-02 | 航天信息股份有限公司 | Cross-system invoice authentication data synchronization method and device |
CN113067841B (en) * | 2019-12-13 | 2022-10-11 | 航天信息股份有限公司 | Cross-system invoice authentication data synchronization method and device |
CN112052074A (en) * | 2020-09-29 | 2020-12-08 | 上海兆芯集成电路有限公司 | Processor modeling system and processor modeling method |
CN112052074B (en) * | 2020-09-29 | 2024-05-03 | 上海兆芯集成电路股份有限公司 | Processor modeling system and processor modeling method |
CN112487007A (en) * | 2020-12-01 | 2021-03-12 | 银清科技有限公司 | Multi-inter-network flow synchronous management method, device and system |
CN112487007B (en) * | 2020-12-01 | 2024-05-10 | 银清科技有限公司 | Method, device and system for synchronously managing flow among multiple networks |
CN113190536B (en) * | 2021-03-02 | 2023-01-17 | 上海英方软件股份有限公司 | Rapid repair method and device for double-active database management replication system |
CN113190536A (en) * | 2021-03-02 | 2021-07-30 | 上海英方软件股份有限公司 | Rapid repair method and device for double-active database management replication system |
CN113157716A (en) * | 2021-05-13 | 2021-07-23 | 杭州网易云音乐科技有限公司 | Data processing method, device, equipment and medium |
CN114157677A (en) * | 2021-12-14 | 2022-03-08 | 南京欧珀软件科技有限公司 | Data synchronization method and related product |
CN114157677B (en) * | 2021-12-14 | 2023-11-28 | 南京欧珀软件科技有限公司 | Data synchronization method and related product |
CN115858252A (en) * | 2023-02-21 | 2023-03-28 | 浙江智臾科技有限公司 | Data recovery method, device and storage medium |
CN115858252B (en) * | 2023-02-21 | 2023-06-02 | 浙江智臾科技有限公司 | Data recovery method, device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN106254094B (en) | 2019-08-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106254094A (en) | A kind of method of data synchronization and system | |
CN103902617B (en) | Distributed data base synchronous method and system | |
CN103699580B (en) | Database synchronization method and device | |
CN109729129A (en) | Configuration modification method, storage cluster and the computer system of storage cluster | |
CN106878473A (en) | A kind of message treatment method, server cluster and system | |
CN109995850A (en) | A kind of transaction processing method of block catenary system and block catenary system | |
CN107291787A (en) | Master/slave data storehouse switching method and apparatus | |
CN107040594A (en) | The method and device of license block chain node access based on PBFT | |
CN109688012A (en) | A kind of method of alliance's chain node hot standby switch | |
CN105930498A (en) | Distributed database management method and system | |
CN106789157B (en) | The hardware resource management method of stacking system and stacked switch | |
CN114301972B (en) | Hierarchical deployment method and system for blockchain nodes based on cloud edge cooperation | |
CN102054035A (en) | Data range-based method for synchronizing data in database | |
CN107122262A (en) | Database intelligent backup system based on agent | |
CN105471960A (en) | Information interaction system and method between private clouds and public cloud | |
CN109542330B (en) | Data storage method, data query method and device | |
CN106156318A (en) | A kind of system and method realizing multinode data base's High Availabitity | |
CN107153660A (en) | The fault detect processing method and its system of distributed data base system | |
CN104077181A (en) | Status consistent maintaining method applicable to distributed task management system | |
CN109669812A (en) | Cloud data center disaster tolerance system and method based on data distribution backup | |
CN105812161B (en) | A kind of controller failure backup method and system | |
CN105302670B (en) | A kind of method and device that station is monitored using multi-computer Redundancy mode | |
CN105827678A (en) | High-availability framework based communication method and node | |
CN115473908A (en) | Block chain link point fault recovery method and block chain system | |
CN107257295B (en) | Scheduling method of distributed architecture software defined network controller |
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 |