CN106254094B - A kind of method of data synchronization and system - Google Patents

A kind of method of data synchronization and system Download PDF

Info

Publication number
CN106254094B
CN106254094B CN201610569538.3A CN201610569538A CN106254094B CN 106254094 B CN106254094 B CN 106254094B CN 201610569538 A CN201610569538 A CN 201610569538A CN 106254094 B CN106254094 B CN 106254094B
Authority
CN
China
Prior art keywords
data
log information
source
mark
log
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.)
Active
Application number
CN201610569538.3A
Other languages
Chinese (zh)
Other versions
CN106254094A (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.)
China Unionpay Co Ltd
Original Assignee
China Unionpay 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 China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN201610569538.3A priority Critical patent/CN106254094B/en
Publication of CN106254094A publication Critical patent/CN106254094A/en
Application granted granted Critical
Publication of CN106254094B publication Critical patent/CN106254094B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • H04L43/106Active monitoring, e.g. heartbeat, ping or trace-route using time related information in packets, e.g. by adding timestamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication 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 present invention discloses a kind of method of data synchronization and system, this method comprises: destination sends data synchronization request to source, the data synchronization request includes the log packet identification of data to be synchronized;The destination receives N log information of the log packet identification that the source is sent, and every log information includes at least the mark of data to be synchronized and data to be synchronized are stabbed in the first time of source, and N is positive integer;N log information of destination log packet identification described in parallel processing as follows: it is directed to every log information, according to the mark of the data to be synchronized in the log information, determines the second timestamp of purpose end data corresponding with the mark;If the first time stamp is later than second timestamp, then source data corresponding with the mark are obtained to update the purpose end data, to solve the problems, such as that master/backup system data synchronizing method cannot be guaranteed real-time in existing disaster recovery and backup systems structure from the source.

Description

A kind of method of data synchronization and system
Technical field
The present invention relates to the communications field more particularly to a kind of method of data synchronization and systems.
Background technique
Banking is one of widest industry of application message science and technology.With the fast development of bank informationization, silver Row information system uses the big hubbed mode that data are left concentratedly, focused on mostly, this hubbed mode bring it is huge There is also many risks while benefit, one aspect is exactly that diversifying risks for multiple spot has accumulated data center a bit Centralized risk, once center-side is beset by technical hitches (such as caused by hardware fault, human operational error and virus attack Destroy), consequence will be catastrophic.Therefore, the highly reliable storage of data, the prevention that disaster occurs fully consider that disaster is sent out The quick recovery ways of raw consequence, become a ring particularly important in bank information trouble free service.
In general, it is standby to carry out data calamity, the system in core status can be backed up using 1+1 backup or N+1.One When denier active system breaks down, back-up system can soon adapter tube active system work, keep entire working environment just Often.Wherein, active system and back-up system can be that function under normal circumstances is identical and operate independently of each other two are System, also referred to as active-standby active-active system.In such active-standby active-active system, it will usually be related to more dynamic data and match The operation such as data is set, so that the primary switching between back-up system is not influenced the normal operation of entire working environment, wherein one The problem of a key is exactly that the primary data between back-up system being in active state simultaneously synchronize.When active system occurs When problem can not be competent, back-up system can replace active system to work completely in time, to improve the reliable of system Property.
In current disaster recovery and backup systems structure, active system or back-up system itself obtain hair often through the mode of poll The source data updated is given birth to, such as back-up system checks that the timestamps of the data in active system source data table is by poll It is no to change.The shortcomings that this mode, is that the update of back-up system data has hysteresis quality always, especially in active system In the case where having a large amount of dynamic datas, because every to active system source data table when carrying out a poll and all will spend very much Between, therefore lead between active system or back-up system the real-time it is impossible to ensure that synchronous.
Summary of the invention
The embodiment of the present invention provides a kind of method of data synchronization, to solve main preparation system in existing disaster recovery and backup systems structure Method of data synchronization cannot be guaranteed the problem of real-time.
The method of the present invention includes a kind of method of data synchronization, is asked this method comprises: destination is synchronized to source transmission data It asks, the data synchronization request includes the log packet identification of data to be synchronized;
The destination receives N log information of the log packet identification that the source is sent, every log letter Breath includes at least the mark of data to be synchronized and data to be synchronized are stabbed in the first time of source, and N is positive integer;
N log information of destination log packet identification described in parallel processing as follows:
For every log information, according to the mark of the data to be synchronized in the log information, the determining and mark Second timestamp of corresponding purpose end data;If the first time stamp is later than second timestamp, from the source Source data corresponding with the mark are obtained to update the purpose end data.
Based on same inventive concept, the embodiment of the present invention further provides a kind of data synchronous system, the system packet Source and destination are included, the destination includes: transmission unit, and for sending data synchronization request to source, the data are same Step request includes the log packet identification of data to be synchronized;
Receiving unit, for receiving N log information of the log packet identification that the source is sent, every log Information includes at least the mark of data to be synchronized and data to be synchronized are stabbed in the first time of source, and N is positive integer;
Processing unit, the N log information for log packet identification described in parallel processing as follows: for every Log information determines destination number corresponding with the mark according to the mark of the data to be synchronized in the log information According to the second timestamp;If the first time stamp is later than second timestamp, obtained and the mark from the source Corresponding source data are to update the purpose end data.
Method of data synchronization provided in an embodiment of the present invention, destination are equal into the data synchronization request of source transmission every time Log packet identification belonging to log information is carried, the log information in the log packet identification can be sent to purpose by source End, then destination can be with the log information in the different log packet identification of parallel processing, and specifically processing method is first true The second timestamp for determining the corresponding purpose end data of mark of the data to be synchronized in log information, then compares the second timestamp It is stabbed with the mark of the data to be synchronized in log information in the first time of source, if if the judgement first time stamp is later than institute The second timestamp is stated, then obtains source data corresponding with the mark from source to update the purpose end data.As it can be seen that logical The time of source data log information can be obtained to avoid the timestamp of direct relatively source data by crossing this method of data synchronization Stamp, compares the timestamp in log information, it is clear that log information, therefore this ratio are only just had when source data changes The reading frequency to source data can be significantly reduced compared with method, in addition, destination can be with parallel processing difference log packet identification In log information, therefore further improve treatment effeciency.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this For the those of ordinary skill in field, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 provides a kind of method of data synchronization flow diagram for the embodiment of the present invention;
Fig. 2 provides a kind of one flow diagram of method of data synchronization embodiment 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 a kind of destination configuration diagram of data synchronous system for the embodiment of the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention make into It is described in detail to one step, it is clear that the described embodiments are only some of the embodiments of the present invention, rather than whole implementation Example.Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative efforts All other embodiment, shall fall within the protection scope of the present invention.
Shown in Figure 1, the embodiment of the present invention provides a kind of method of data synchronization flow diagram, specifically implementation method Include:
Step S101, destination send data synchronization request to source, and the data synchronization request includes data to be synchronized Log packet identification.
Step S102, the destination receive N log information of the log packet identification that the source is sent, often Log information includes at least the mark of data to be synchronized and data to be synchronized are stabbed in the first time of source, and N is positive integer.
Step S103, N log information of destination log packet identification described in parallel processing as follows: Mesh corresponding with the mark is determined according to the mark of the data to be synchronized in the log information for every log information End data the second timestamp;If the first time stamp is later than second timestamp, from source acquisition and institute The corresponding source data of mark are stated to update the purpose end data.
Destination refers to the back-up system of backup source end data in the above-mentioned methods, and source refers to generating data Active system, usual source and destination are present in disaster recovery and backup systems structure, destination in order to keep synchronous with the data of source, With regard to needing constantly to issue data synchronization request to source, in order to improve the synchronous real-time of data, the embodiment of the present invention is being held Before row step S101, the log information locally generated can be grouped by source, i.e., by the log information inside log according to Index is divided into multiple groups, and specifically group technology can be using the method for TAG dispersion, such as total TAG number is 8, and source is every The index Index for generating this log will be corresponded to by generating a log, by this Index divided by remainder after maximum TAG number, institute Obtaining remainder is exactly the corresponding packet count of this log.As it can be seen that can be by the log set in source by this group technology Multiple groups are divided into, it should be noted that above-mentioned grouping is that in real time, i.e. one log of the every generation of source, this log will be by It is divided in group immediately.
After log set is divided into multiple groups by source, log packet identification can be established for each group, and by these Log packet identification shares to destination.When destination sends data synchronization request to source, it will be taken in data synchronization request With these log packet identification information, the log in these log packet identification information is sent to destination, destination by source Log in different log packet identifications can be received parallel, and compare timestamp in log information, then according to comparison result into Row synchronizes, in addition, before the log in these log packet identification information is sent to destination by source, it can be further Log in screening group, the method for screening be exactly will compare data to be synchronized in the timestamp and log of log mark it is corresponding The timestamp of the data of source is compared, if the data of the discovery source mark are newer than timestamp in log, directly This log can be filtered, i.e., this log is no longer sent to destination and made comparisons, certainly, if the number of the discovery source mark According to consistent with timestamp in log, will just be grouped in log be accordingly sent to destination, it is seen then that pass through this screening log Step can be further improved the efficiency of destination processing data.
Further, it is contemplated that the journalizing type of source data can have it is newly-increased, modify, delete these three types, For different action types, destination needs to carry out different synchronization process, and specifically, the destination is believed from the log Determine that the action type is the log information of modification or deletion in breath;It is the log information of modification for action type, The destination obtains source data corresponding with the mark in the log information from the source and replaces the destination number According to;It is the log information deleted for action type, the destination deletes the mesh according to the mark in the log information End data.
Further, the destination determines that the action type is newly-increased log letter from the log information Breath;It is newly-increased log information for action type, the destination obtains source corresponding with the mark from the source Data are added to the destination.
For the above-mentioned method of data synchronization that describes in a systematic way, the embodiment of the present invention further provides for flow chart shown in Fig. 2 It elaborates.
Step 201, destination sends data synchronization request to source, includes log packet identification in data synchronization request.
Step 202, the log in the log packet identification in data synchronization request is sent to destination by source.
Step 203, after destination receives the log information that source is sent, judge that the action type of log is newly-increased type, Or modify or delete type.
Step 204, if action type is modification or deletes type, the data to be synchronized in log information are obtained in source The first time at end stabs, and then the second timestamp with the corresponding purpose end data of mark of data to be synchronized in destination carries out Compare.
Step 205, it if stamp is later than second timestamp at the first time for discovery, is obtained and the mark from the source Corresponding source data are to update the purpose end data, and this log information labeled as processed.
Step 206, if stamp is earlier than second timestamp at the first time for discovery, without synchronization, and by this day Will is labeled as processed.
Step 207, if action type is newly-increased type, destination obtains source corresponding with the mark from the source Data are added to the destination.
Step 208, it will be updated the second timestamp of purpose end data after destination completes synchronization process.
As an example it is assumed that Beijing back-up system synchronizes the Shanghai centre data of Shanghai active system, it is upper marine Calculation has 4 sheet table data in, has the partial data in partial table to occur more in 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, Corresponding at this time to generate first log: 2016.07.01 10:00a [1] [1] data update, the index record of corresponding this log For index1;And so on generate Article 2 log and Article 3 log;A in this day AM10:30 this moment sheet1 [1] [1] (source data of the first row first row) is updated, corresponding at this time to generate Article 4 log: 2016.07.01 10:30a [1] [1] data update, and the index record of corresponding this log is index4;And so on generate Article 5 log;This day AM B [5] [1] (source data of fifth line first row) in 11:00 this moment Sheet2 is deleted, corresponding at this time to generate Article 6 Log: 2016.07.01 11:00 data delete data, and the index record of corresponding this log is index6.According to above-mentioned TAG Index1, index3, index5 are grouped into TAG1 (packet label 1) by dispersing method by three logs, index2, Index4, index6 are grouped into TAG2 (packet label 2).
In addition, also having 4 sheet table data (being the backup of Shanghai centre data), this four tables in Beijing Center data Finally the synchronous time is 2016.06.30, moment 23:00, therefore second timestamp of this four tables falls in 2016.06.30, Moment 23:00.Assuming that at this day this moment of AM12:00 of 2016.07.01, the synchronous Shanghai of the second client request of Pekinese Source data corresponding to the log packet identification TAG2 at center, the server in Shanghai receive log in TAG2 after synchronization request It is sent to the second client of Pekinese, the second client is carried out as follows synchronization: for example, for Article 4 log, than Source data of the timestamp 2016.07.01 moment 10:30 of log corresponding compared with index4 than Beijing Center data a [1] [1] is most Renewal time stamp 2016.06.30 23:00 evening afterwards updates Pekinese's centre data a so being updated processing to a [1] [1] [1] [1], and updating the second timestamp is 2016.07.01 10:30.To Article 6 log, compare the corresponding log of index6 Source data final updating timestamp 2016.06.30 of the timestamp 2016.07.01 11:00 than Beijing Center data b [5] [1] In 23:00 evening, so being updated processing to b [5] [1], the timestamp for updating b [5] [1] source data record is 2016.07.01 11:00, when the corresponding log of index2, index4, index6 all complete by processing, then for the synchronous knot of this synchronization request Beam.
Assuming that the second client request of Pekinese synchronizes marine at this day this moment of AM12:05 of 2016.07.01 Source data corresponding to the log packet identification TAG1 of the heart, after the server in Shanghai receives synchronization request, by log in TAG1 It is sent to the second client of Pekinese, the second client is carried out as follows synchronization: for example, for first log, than Source data final updating timestamp of the timestamp 2016.07.01 10:00 than Beijing Center data a [1] [1] compared with index1 2016.07.01 10:30 is early, so do not handle a [1] [1], and identifies this to index index1 processed, and so on Reprocess other log informations of TAG1.
Further, the source and the destination active system and back-up system in active-standby active-active system each other; The source includes first server and multiple first clients, is sent by first client to the second server Information;
The destination includes second server and multiple second clients, by second client to described first Server sends information.
As shown in figure 3, the active system in Shanghai mainly includes first server and the first client, Pekinese's back-up system It mainly include second server and the second client, when the data of the synchronous Shanghai side in Beijing side, 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 The second client of Beijing back-up system is sent to by first server afterwards, and then the second client is synchronous according to above-mentioned data Method synchronizes;In addition, the first client of Shanghai back-up system takes to second when the data of the synchronous Beijing side in Shanghai side Business device sends data synchronization request, and second server obtains log information from Beijing Center data, then passes through second service Device is sent to the first client of Shanghai active system, and then the first client is synchronized according to above-mentioned method of data synchronization. It can be seen that this method of data synchronization can be as needed because of server and client side, distributed deployment.Multiple servers it Between can be active and standby each other.Client can also handle the corresponding log information of the same log packet identification with every two for one group, So there is transversal stretching, the characteristics of multimachine High Availabitity.
Further, second client is elected to send to the first server from the multiple second client Data synchronization request;The multiple second client competition receives the same log packet identification that the first server is sent Each log information;For the received every log information of each second client, each second client is as follows The received every log information of parallel processing.
As shown in figure 4, the back-up system of Beijing side has multiple second clients, when the data of the synchronous Shanghai side in Beijing side When, Beijing side elects a client from multiple second clients and sends to the first server in Shanghai comprising log grouping The data synchronization request of TAG1 is identified, then the first server of Shanghai side sends every in TAG1 to each second client Log information, at this moment each second client competes receives every log information, then the received log information of parallel processing, can See and the synchronous efficiency of each data can be improved in this way.
Further, if the second client continuous N time is corresponded to from the mark that the source obtains the log information Source data fail, then second client stops obtaining the source data, and marks the shape of the log information State is processing failure, and M is positive integer.
It should be noted that it is adjustable that client synchronization, which requests fault-tolerant number M, even if final synchronization failure, still may be used Retrospect, and the problem of handling synchronization failure record is only needed, it solves to be joined according to time parameter full dose when recording synchronism failure The synchronous problem of machine;At present client have 5 times trial synchronous recording chances, if 5 it is subsynchronous fail, the source record shape State is set to prove an abortion, and is no longer obtained by client.This number is adjustable.Even if proving an abortion, also can be convenient The record of failure is found by concordance list, and the record of these failures is resynchronized after orientation problem.It then is that processing is lost for state The log information lost is subsequent to carry out artificial treatment by administrator.
It should be noted that if the corresponding source number of mark that second client successfully obtains the log information According to then second client is updated according to the mark of the data to be synchronized in the log information with the source data of acquisition The purpose end data, and second update of time stamp of the purpose end data is source data by the destination The first time stamp.So next time when synchronizing, the newer data of the client synchronized update timestamp of back-up system, Guarantee that targeted data states are newest effectively.
Based on the same technical idea, the embodiment of the present invention also provides a kind of data synchronous system, which includes source And above method embodiment can be performed in destination, the destination.Destination provided in an embodiment of the present invention is as shown in figure 5, packet It includes: transmission unit 401, receiving unit 402, processing unit 403, in which:
Transmission unit 401, for sending data synchronization request to source, the data synchronization request includes data to be synchronized Log packet identification;
Receiving unit 402, N log information of the log packet identification for receiving the source transmission, every Log information includes at least the mark of data to be synchronized and data to be synchronized are stabbed in the first time of source, and N is positive integer;
Processing unit 403, the N log information for log packet identification described in parallel processing as follows: needle Purpose corresponding with the mark is determined according to the mark of the data to be synchronized in the log information to every log information Second timestamp of end data;If first time stamp is later than second timestamp, from the source obtain with it is described Corresponding source data are identified to update the purpose end data.
Further, every log information further includes action type;The destination further include: selecting unit 404 is used for Determine that the action type is the log information of modification or deletion from the log information;
The processing unit 403 is specifically used for: for action type be modification log information, from the source obtain with The corresponding source data of mark in the log information replace the purpose end data;It is the log deleted for action type Information deletes the purpose end data according to the mark in the log information.
Further, the selecting unit 404 is also used to: determining that the action type is new from the log information The log information of increasing;
The processing unit 403 is also used to: being newly-increased log information for action type, from source acquisition and institute It states the corresponding source data of mark and is added to the destination.
Further, further includes: the source and the destination active system in active-standby active-active system and standby each other Use system;The source includes first server and multiple first clients, is taken by first client to described second Business device sends information;
The destination includes second server and multiple second clients, by second client to described first Server sends information.
Further, the transmission unit 401 is specifically used for: one second visitor is elected from the multiple second client Family end sends data synchronization request to the first server;
The receiving unit 402 is specifically used for: competition receives the same log packet identification that the first server is sent Each log information;
The processing unit 403 is specifically used for: the received every log information of each second client is directed to, according to as follows The received every log information of mode parallel processing.
Further, the processing unit 403 is also used to: if the second client continuous N time is obtained from the source The corresponding source data of the mark of the log information fail, then second client stops obtaining the source data, And marking the state of the log information is processing failure, M is positive integer.
Further, the processing unit 403 is also used to: being by second update of time stamp of the purpose end data The first time of source data stabs.
In conclusion method of data synchronization provided in an embodiment of the present invention, the data that destination is sent to source every time are same Log packet identification belonging to log information is carried in step request, source can send out the log information in the log packet identification Destination is given, then destination can be with the log information in the different log packet identification of parallel processing, specifically processing side Method is the second timestamp of the corresponding purpose end data of mark of the first data to be synchronized in determining log information, then compares the The mark of data to be synchronized in two timestamps and log information is stabbed in the first time of source, if if the judgement first time Stamp is later than second timestamp, then obtains source data corresponding with the mark from source to update the destination number According to.As it can be seen that by this method of data synchronization source data log can be obtained to avoid the timestamp of directly comparison source data The timestamp of information compares the timestamp in log information, it is clear that log information is only just had when source data changes, Therefore this comparative approach can significantly reduce the reading frequency to source data, in addition, destination can be with parallel processing not on the same day Log information in will packet identification, therefore further improve treatment effeciency.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (10)

1. a kind of method of data synchronization, which is characterized in that the dual-active system active and standby each other suitable for source and destination, the source End includes first server and multiple first clients, sends information to second server by first client;It is described Destination includes second server and multiple second clients, is sent and is believed to the first server by second client Breath;This method comprises:
Second client is elected to send data synchronization request to the first server from the multiple second client, The data synchronization request includes the log packet identification of data to be synchronized;
The multiple second client competition receives the N log letter for the same log packet identification that the first server is sent Breath, every log information includes at least the mark of data to be synchronized and data to be synchronized are stabbed in the first time of source, and N is positive whole Number;
For the received every log information of each second client, each second client parallel processing institute as follows State N log information of log packet identification:
For every log information, according to the mark of the data to be synchronized in the log information, determination is corresponding with the mark Purpose end data the second timestamp;If the first time stamp is later than second timestamp, obtained from the source Source data corresponding with the mark are to update the purpose end data.
2. the method as described in claim 1, which is characterized in that every log information further includes action type;
The mark according to the data to be synchronized in the log information determines purpose end data corresponding with the mark Before second timestamp, further includes:
The destination determines that the action type is the log information of modification or deletion from the log information;
It is described to obtain source data corresponding with the mark from the source to update the purpose end data, comprising:
It is the log information of modification for action type, the destination obtains and the mark in the log information from the source Know corresponding source data and replaces the purpose end data;
It is the log information deleted for action type, the destination deletes the mesh according to the mark in the log information End data.
3. method according to claim 2, which is characterized in that further include:
The destination determines that the action type is newly-increased log information from the log information;
It is newly-increased log information for action type, the destination obtains source corresponding with the mark from the source Data are added to the destination.
4. the method as described in claim 1, which is characterized in that described to obtain source corresponding with the mark from the source Data are to update the purpose end data, comprising:
If the corresponding source data of mark that the second client continuous N time obtains the log information from the source are lost It loses, then second client stops obtaining the source data, and marking the state of the log information is processing failure, M For positive integer.
5. such as the described in any item methods of Claims 1-4, which is characterized in that described to be obtained and the mark from the source Corresponding source data are to update the purpose end data, later, further includes:
The destination stabs the first time that second update of time stamp of the purpose end data is source data.
6. a kind of data synchronous system, which is characterized in that the dual-active system active and standby each other suitable for source and destination, the source End includes first server and multiple first clients, sends information to second server by first client;It is described Destination includes second server and multiple second clients, is sent and is believed to the first server by second client Breath;The destination includes:
Transmission unit, for electing second client to send to the first server from the multiple second client Data synchronization request, the data synchronization request include the log packet identification of data to be synchronized;
Receiving unit, for competing N log information for receiving the same log packet identification that the first server is sent, often Log information includes at least the mark of data to be synchronized and data to be synchronized are stabbed in the first time of source, and N is positive integer;
Processing unit is used to be directed to the received every log information of each second client, as follows parallel processing institute State N log information of log packet identification: for every log information, according to the data to be synchronized in the log information Mark determines the second timestamp of purpose end data corresponding with the mark;If the first time stamp is later than described second Timestamp then obtains source data corresponding with the mark from the source to update the purpose end data.
7. system as claimed in claim 6, which is characterized in that every log information further includes action type;
The destination further include:
Selecting unit, for determining that the action type is the log information of modification or deletion from the log information;
The processing unit is specifically used for: being the log information of modification for action type, obtains and the day from the source The corresponding source data of mark in will information replace the purpose end data;It is the log information deleted for action type, The purpose end data is deleted according to the mark in the log information.
8. system as claimed in claim 7, which is characterized in that selecting unit is also used to: being determined from the log information Action type is newly-increased log information;
The processing unit is also used to: being newly-increased log information for action type, is obtained and the mark from the source Corresponding source data are added to the destination.
9. system as claimed in claim 8, which is characterized in that the processing unit is also used to:
If the corresponding source data of mark that the second client continuous N time obtains the log information from the source are lost It loses, then second client stops obtaining the source data, and marking the state of the log information is processing failure, M For positive integer.
10. such as the described in any item systems of claim 6 to 9, it is characterised in that: the processing unit is also used to: by the mesh End data second update of time stamp be source data the first time stab.
CN201610569538.3A 2016-07-19 2016-07-19 A kind of method of data synchronization and system Active CN106254094B (en)

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 CN106254094A (en) 2016-12-21
CN106254094B true 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)

Families Citing this family (21)

* Cited by examiner, † Cited by third party
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
CN108337303A (en) * 2018-01-24 2018-07-27 中国银联股份有限公司 A kind of method of data synchronization and distributed system
CN108322533B (en) * 2018-01-31 2019-02-19 广州鼎甲计算机科技有限公司 Configuration and synchronization method between distributed type assemblies node based on operation log
CN108449206B (en) * 2018-03-12 2020-11-27 新华三技术有限公司 Time synchronization method, device, equipment 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
CN110851526B (en) * 2018-08-02 2023-04-11 阿里巴巴集团控股有限公司 Data synchronization method, device and system
CN109462661B (en) * 2018-12-19 2021-08-10 深圳市卡牛科技有限公司 Data synchronization method and device, computer equipment and storage medium
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
CN111143295B (en) * 2019-11-14 2024-01-30 泰康保险集团股份有限公司 Policy information processing method, device, equipment and storage medium
CN113067841B (en) * 2019-12-13 2022-10-11 航天信息股份有限公司 Cross-system invoice authentication data synchronization method and device
CN112052074B (en) * 2020-09-29 2024-05-03 上海兆芯集成电路股份有限公司 Processor modeling system and processor modeling method
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
CN113157716B (en) * 2021-05-13 2023-05-26 杭州网易云音乐科技有限公司 Data processing method, device, equipment and medium
CN114157677B (en) * 2021-12-14 2023-11-28 南京欧珀软件科技有限公司 Data synchronization method and related product
CN115858252B (en) * 2023-02-21 2023-06-02 浙江智臾科技有限公司 Data recovery method, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
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

Also Published As

Publication number Publication date
CN106254094A (en) 2016-12-21

Similar Documents

Publication Publication Date Title
CN106254094B (en) A kind of method of data synchronization and system
CN109729129A (en) Configuration modification method, storage cluster and the computer system of storage cluster
CN102054035B (en) Data range-based method for synchronizing data in database
CN107291787A (en) Master/slave data storehouse switching method and apparatus
CN100426751C (en) Method for ensuring accordant configuration information in cluster system
CN110209726A (en) Distributed experiment & measurement system system, method of data synchronization and storage medium
KR20180101941A (en) Apparatus and method for replicating changed data in a source database management system to a target database management system in real time
CN110990200B (en) Flow switching method and device based on multiple active data centers
CN105512171B (en) The method and device of database synchronization
CN107257295B (en) Scheduling method of distributed architecture software defined network controller
CN109669812A (en) Cloud data center disaster tolerance system and method based on data distribution backup
CN106156318A (en) A kind of system and method realizing multinode data base's High Availabitity
CN111460039A (en) Relational database processing system, client, server and method
US20140101110A1 (en) High availability event log collection in a networked system
CN105610947A (en) Method, device and system for realizing high-available distributed queue service
CN110175089A (en) A kind of dual-active disaster recovery and backup systems with read and write abruption function
CN107153660A (en) The fault detect processing method and its system of distributed data base system
CN105827678B (en) Communication means and node under a kind of framework based on High Availabitity
CN105933379B (en) A kind of method for processing business, equipment and system
CN108173971A (en) A kind of MooseFS high availability methods and system based on active-standby switch
CN110489494A (en) Distributed data base on-line rapid estimation method and device
CN105302670B (en) A kind of method and device that station is monitored using multi-computer Redundancy mode
CN106888110B (en) Configuration data synchronization method and device
CN109347655A (en) Fault recovery system and method and storage medium based on network data
CN113190620B (en) Method, device, equipment and storage medium for synchronizing data between Redis clusters

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