CN110300015A - Method of data synchronization and system - Google Patents

Method of data synchronization and system Download PDF

Info

Publication number
CN110300015A
CN110300015A CN201910384226.9A CN201910384226A CN110300015A CN 110300015 A CN110300015 A CN 110300015A CN 201910384226 A CN201910384226 A CN 201910384226A CN 110300015 A CN110300015 A CN 110300015A
Authority
CN
China
Prior art keywords
business datum
computer room
target service
component
service data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910384226.9A
Other languages
Chinese (zh)
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.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201910384226.9A priority Critical patent/CN110300015A/en
Publication of CN110300015A publication Critical patent/CN110300015A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • 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
    • 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/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • 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)
  • Telephonic Communication Services (AREA)

Abstract

The present embodiments relate to network technique field, a kind of method of data synchronization and system are disclosed.Method of data synchronization include: receive Synchronization Component transmission the business datum including a computer room notification message when, judge correct component in whether there is another computer room with the matched target service data of business datum;When the target service data matched with business datum of another computer room are not present in determining correction component, start timing, and caching includes the notification message of business datum;When timing terminates and does not receive the notification information of the target service data including another computer room, another computer room is sent by business datum.In the present invention, the synchronization of business datum can be carried out in time, it is ensured that the consistency of the business datum of multiple computer rooms when the business datum in multiple computer rooms is inconsistent.

Description

Method of data synchronization and system
Technical field
The present embodiments relate to network technique field, in particular to a kind of method of data synchronization and system.
Background technique
With the development of internet technology, the base that reliable, stable service has become internet industry is provided for user This index in order to ensure the reliable of service and is stablized, it usually needs build the service environment of redundancy, therefore more and more enterprises Traditional monomer-type server architecture is abandoned, using two-shipper room backup High Availabitity framework.In two-shipper room backup High Availabitity framework, Service is provided by main equipment room, when main equipment room, which encounters network fluctuation, failure, cutover etc., to resist factor, is switched to standby host room, by Standby host room continues externally to provide service, ensures that reliability of service and stability.
In two-shipper room backup High Availabitity framework, main equipment room and the consistency of data in standby host room are particularly important, logical at present Often by the direct report data of client to main equipment room and standby host room, to guarantee the consistency of data in main equipment room and standby host room.
At least there are the following problems in the prior art for inventor's discovery: in client report data to main equipment room and standby host room When, when if there is when network fluctuation or computer room cutover, loss of data is still resulted in, main equipment room and standby host are caused Data are inconsistent in room.
Summary of the invention
Embodiment of the present invention is designed to provide a kind of method of data synchronization and system, can be in multiple computer rooms When business datum is inconsistent, the synchronization of business datum is carried out in time, it is ensured that the consistency of the business datum of multiple computer rooms.
In order to solve the above technical problems, embodiments of the present invention provide a kind of method of data synchronization, it is applied to data The correction component of synchronization system, data synchronous system further include and are connected to the Synchronization Component of correction component, correction component and same Step component is connect with multiple computer rooms respectively;Method includes: in the business number including a computer room for receiving Synchronization Component transmission According to notification message when, judge to correct in component with the presence or absence of another computer room and business datum matched target service number According to;When the target service data matched with business datum of another computer room are not present in determining correction component, start timing, And cache the notification message including business datum;Terminate in timing and does not receive the target service data including another computer room Notification information when, send another computer room for business datum.
Embodiments of the present invention additionally provide a kind of method of data synchronization, the synchronization group applied to data synchronous system Part, data synchronous system further include and are connected to the correction component of Synchronization Component, correction component and Synchronization Component respectively with it is multiple Computer room connection, method include: to send the notification message including business datum to correction after the business datum for obtaining a computer room So that correction component is receiving the notification message including business datum, and another machine is not present in correction component in component When the target service data matched with business datum in room, start timing, and cache the notification message including business datum, and When timing terminates and do not receive the notification information of the target service data including another computer room, send business datum to separately One computer room.
Embodiments of the present invention additionally provide a kind of data synchronous system, comprising: correction component, and it is connected to correction The Synchronization Component of component, correction component are connect with multiple computer rooms respectively with Synchronization Component;Correction component is for executing above-mentioned first A method of data synchronization;Synchronization Component is for executing above-mentioned second method of data synchronization.
Embodiment of the present invention in terms of existing technologies, Synchronization Component obtain a computer room business datum after, The notification message for including at least the business datum is sent to correction component, component is corrected and is receiving leading to including the business datum After knowing message, judge to correct with the presence or absence of another computer room and the business datum matched target service data in component, if It is not present, then illustrates that another computer room is received not yet with the matched target service data of business datum, start timing, and cache Notification message including business datum, if still not receiving the target service number including another computer room at the end of timing According to notification information, then illustrate in another computer room missing and the matched target service data of business datum, by the business datum Be sent to another computer room, realize the synchronization of business datum, can when the business datum in multiple computer rooms is inconsistent, and The synchronization of Shi Jinhang business datum, it is ensured that the consistency of the business datum of multiple computer rooms;Meanwhile the synchronous system of data of the invention It unites and the framework zero of each computer room is invaded.
In addition, judging to correct in component is when receiving the notification message including business datum of Synchronization Component transmission It is no there are another computer room and business datum matched target service data, specifically: receiving Synchronization Component transmission When the notification message of the timestamp including business datum and business datum, judge to correct in component with the presence or absence of another computer room With the matched target service data of business datum;There are the matched with business datum of another computer room in determining correction component When target service data, judge whether the timestamp of business datum is greater than the timestamp of the target service data of another computer room; When the timestamp for determining business datum is greater than the timestamp of the target service data of another computer room, into beginning timing, and Caching includes the steps that the notification message of business datum.In present embodiment, the target service number to another computer room is increased According to the comparison with business datum timestamp, causes business datum not to be synchronized to avoid the two timestamp difference, be further ensured that The consistency of the business datum of multiple computer rooms.
In addition, judging to correct in component is when receiving the notification message including business datum of Synchronization Component transmission It is no there are another computer room and business datum matched target service data, specifically: receiving Synchronization Component transmission When the notification message of the validation value including business datum and business datum, judge to correct in component with the presence or absence of another computer room The validation value of the validation value and business datum of target service data it is equal;If correcting in component, there are the targets of another computer room The validation value of the validation value and business datum of business datum it is equal, determine correction component in there are another computer room and business The target service data of Data Matching.Present embodiments provide for whether there is another computer room in a kind of judgement correction component With the specific implementation of the matched target service data of business datum.
In addition, after the notification message including business datum for receiving Synchronization Component transmission, and judging correction group In part with the presence or absence of another computer room with before the matched target service data of business datum, further includes: judgement correction component In with the presence or absence of computer room and the matched target service data of business datum;A computer room is not present in correction component When target service data matched with business datum, into judgement correction component with the presence or absence of another computer room and business number The step of according to matched target service data.Increased in present embodiment in correction component with the presence or absence of computer room with The judgement of the matched target service data of business datum reduces correction component so as to avoid repeating cache business data Performance consumption.
In addition, judging to correct in component is when receiving the notification message including business datum of Synchronization Component transmission It is no there are another computer room and business datum matched target service data, specifically: receiving Synchronization Component transmission When the notification message of the timestamp including business datum and business datum, judge to correct in component with the presence or absence of another computer room With the matched target service data of business datum;With the presence or absence of another computer room and business datum in judgement correction component Before the target service data matched, further includes: judge whether the timestamp of business datum is greater than the target service number an of computer room According to timestamp;When the timestamp for determining business datum is greater than the timestamp of the target service data of a computer room, into sentencing The step of whether there is the target service data matched with business datum of another computer room in disconnected correction component.Present embodiment In, the comparison of the target service data and business datum timestamp to a computer room is increased, to guarantee newest business datum It can be synchronized, further ensure the consistency of the business datum of multiple computer rooms.
In addition, after the business datum for obtaining a computer room, notification message of the transmission including business datum to correction component, It include: to judge whether business datum is legal after the business datum for obtaining a computer room;When determining that business datum is legal, hair Send notification message including at least business datum to correcting component.In present embodiment, Synchronization Component can be to business datum Legitimacy is verified, and illegal business datum is avoided to be synchronized.
In addition, judge whether business datum legal, specifically: judge business datum format whether with preset format Match;If the format of business datum is matched with preset format, determine that business datum is legal.Present embodiment provides a kind of judgement business The whether legal specific implementation of data.
In addition, being equipped with the thread pool including multiple single threads in correction component;Each single thread and each business datum one are a pair of It answers;With the presence or absence of another computer room and business datum matched target service data in judgement correction component, specifically: pass through With the presence or absence of another computer room and the matched target industry of business datum in corresponding with business datum single thread judgement correction component Business data;Correction component starts timing, and cache include business datum notification message, specifically: by with business datum pair It answers single thread to start timing, and caches the notification message including business datum;Another computer room is sent by business datum, specifically Are as follows: another computer room is sent for business datum by single thread corresponding with business datum.It respectively include industry in present embodiment The notification message of business data is handled by the corresponding single thread of business datum, realizes grasping without lockization for notification message Make, from locking problem when being operated without multi-thread concurrent, avoids and lock the loss of bring performance.
In addition, each single thread corresponds to the check value of the validation value of a business datum;Receiving Synchronization Component hair When the notification message including business datum sent, judge to correct matching with business datum with the presence or absence of another computer room in component Target service data, specifically: receiving Synchronization Component transmission include business datum and business datum validation value When notification message, judge to correct in component with the presence or absence of another computer room and business datum matched target service data;? Judged in correction component by single thread corresponding with business datum with the presence or absence of another computer room and business datum matched mesh Before mark business datum, further includes: the check value that the validation value of business datum is calculated by predetermined manner, it is corresponding according to business datum Check value, the corresponding single thread of selecting business data.Present embodiments provide for a kind of corresponding single lines of selecting business data The specific implementation of journey.
In addition, Synchronization Component includes multiple sub-components, and multiple sub-components and multiple computer rooms correspond;Obtaining one After the business datum of computer room, notification message of the transmission including business datum to correction component, specifically: pass through sub-component acquisition pair After the business datum for the computer room answered, and send include at least business datum notification message to correct component.
In addition, being preset with the buffer queue of each computer room in correction component;It whether there is another machine in judgement correction component Room with the matched target service data of business datum, specifically: judgement correction component in another computer room buffer queue In whether there is and the matched target service data of business datum;Caching includes the notification message of business datum, specifically: one Caching includes the notification message of business datum in the buffer queue of a computer room.
Detailed description of the invention
One or more embodiments are illustrated by the picture in corresponding attached drawing, these exemplary theorys The bright restriction not constituted to embodiment, the element in attached drawing with same reference numbers label are expressed as similar element, remove Non- to have special statement, composition does not limit the figure in attached drawing.
Fig. 1 is the block diagram of the data synchronous system in first embodiment according to the present invention;
Fig. 2 is the specific flow chart of the method for data synchronization in sixth embodiment according to the present invention;
Fig. 3 is the specific flow chart of the method for data synchronization in the 7th embodiment according to the present invention;
Fig. 4 is the specific flow chart of the method for data synchronization in the 8th embodiment according to the present invention;
Fig. 5 is the specific flow chart of the method for data synchronization in the 9th embodiment according to the present invention;
Fig. 6 is the specific flow chart of the method for data synchronization in the tenth embodiment according to the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention Each embodiment be explained in detail.However, it will be understood by those skilled in the art that in each embodiment party of the present invention In formula, in order to make the reader understand this application better, many technical details are proposed.But even if without these technical details And various changes and modifications based on the following respective embodiments, the application technical solution claimed also may be implemented.
The first embodiment of the present invention is related to a kind of data synchronous systems, referring to FIG. 1, data synchronous system includes school Positive component 1, and it is connected to the Synchronization Component 2 of correction component 1, correction component 1 and Synchronization Component 2 connect with multiple computer rooms respectively It connects, the synchronous transmission business datum of client (not shown) to each computer room, the quantity of computer room is two, respectively machine in Fig. 1 Room A and computer room B;It should be noted that in embodiment in the present embodiment and later by taking the quantity of computer room is two as an example It is illustrated.
In present embodiment, each computer room includes sequentially connected access component 3, message-oriented middleware 4 and business processing Component 5, the access component 3 of computer room can test to business datum when receiving the business datum of client transmission, to protect Demonstrate,proving the business datum not is aggressive data, then sends message-oriented middleware 4 for the business datum again, in message-oriented middleware 4 Business datum consumed for the data synchronous system of business processing component 5 and the present embodiment, correction component 1 divides with Synchronization Component 2 It is not connect with the message-oriented middleware 4 of each computer room.
Synchronization Component 2 is used to obtain the business datum of each computer room, will at least after the business datum for obtaining a computer room Notification message including the business datum is sent to correction component 5;Specifically, message-oriented middleware 4 of the Synchronization Component 2 from each computer room Business datum is pulled in real time, and sends correction component 1 for the notification message that the business datum pulled is assembled into fixed format, is led to Know that message includes at least business datum.
In one example, Synchronization Component 2 includes multiple sub-components 21;Multiple sub-components 21 and multiple computer rooms one are a pair of It answers;Sub-component 21 is used for after the business datum for obtaining a corresponding computer room, and the notice sent including at least business datum disappears Cease correction component 1.
It corrects component 1 to be used for when receiving the notification message including business datum, judging to correct whether there is in component 1 Another computer room with the matched target service data of business datum;If correction component in there is no another computer room and industry The target service data for Data Matching of being engaged in start timing, and cache the notification message including business datum;Correction component 1 is being counted When terminating and not receiving the notification information of the target service data including another computer room, send business datum to another A computer room.
In one example, the buffer queue that each computer room is preset in component 1 is corrected;Correction component 1 is specifically used for connecing When receiving the notification message including business datum, judge correct component 1 in another computer room buffer queue in the presence or absence of with The matched target service data of business datum;Correct the caching team for another computer room that component 1 is specifically used in correction component 1 When target service data matched with business datum being not present in column, start timing, and delays in the buffer queue of a computer room Bag deposit includes the notification message of business datum.
Below by taking computer room A and computer room B as an example, the synchronous process of data is carried out to data synchronous system and is described in detail, It is specific as follows:
Client sends a business datum to computer room A and computer room B, and the access component 3 of computer room A receives the business number According to, and sending the business datum to the message-oriented middleware 4 of computer room A, Synchronization Component 2 pulls the industry from message-oriented middleware 4 in real time Business data, and correction component 1 will be sent by the notification message that include at least the business datum, correction component 1 is received including this When the notification message of business datum, judge to correct matched with the presence or absence of the business datum in the buffer queue of the computer room B of component 1 Target service data, if existing and the matched target service number of the business datum in the buffer queue of the computer room B of correction component 1 According to, delete computer room B buffer queue in the matched target service data of the business datum;If correcting the computer room B of component 1 In buffer queue there is no with the matched target service data of the business datum, based on client send business datum there are one Sequencing, computer room B receives business datum, and there may be delays, open preset synchro timer, start timing, and in computer room Caching includes the notification message of business datum in the buffer queue of A;If the timing in synchro timer arrives, i.e. timing knot Shu Shi, Synchronization Component 2 are not still pulled from computer room B to target service data, i.e., correction component 2 be still not received by including The notification message of the target service data of computer room B then illustrates that computer room B may be because that the reasons such as network fluctuation or computer room cutover do not have There is the business datum for receiving client transmission, then the business datum is sent to the message-oriented middleware 4 of computer room B, for computer room B Business processing component 5 consume, ensure that the consistency of data in computer room A and computer room B;In addition, in the message-oriented middleware of computer room B After 4 receive business datum, the notification message including business datum in the buffer queue of computer room A is deleted.
In the present embodiment, correction component 1 and Synchronization Component 2 can be set in the same server, to avoid network wave The dynamic interaction influenced between correction component 1 and Synchronization Component 2.
In terms of existing technologies, Synchronization Component is sent present embodiment after the business datum for obtaining a computer room Including at least the business datum notification message to correction component, correction component disappears receiving the notice including the business datum After breath, judge to correct with the presence or absence of another computer room and the business datum matched target service data in component, if not depositing Then illustrating that another computer room is received not yet with the matched target service data of business datum, is starting timing, and cache and include The notification message of business datum, if still not receiving the target service data including another computer room at the end of timing Notification information then illustrates missing and the matched target service data of business datum in another computer room, which is sent To another computer room, realize the synchronization of business datum, can when the business datum in multiple computer rooms is inconsistent, in time into The synchronization of row business datum, it is ensured that the consistency of the business datum of multiple computer rooms;Meanwhile data synchronous system pair of the invention The framework zero of each computer room is invaded.
Second embodiment of the present invention is related to a kind of data synchronous system.Second embodiment is in first embodiment On the basis of improvement, mainly the improvement is that: in present embodiment, increasing to target service data and business datum time The comparison of stamp.
Referring to FIG. 1, Synchronization Component 2 is specifically used for after the business datum for obtaining a computer room, the business datum is extracted Timestamp, and send include the business datum and business datum timestamp notification message to correcting component 1.
It corrects component 1 to be used for when receiving the notification message of the timestamp including business datum and business datum, judgement It corrects in component 1 with the presence or absence of another computer room and business datum matched target service data.
It corrects component 1 and is used in determining correction component 1 that there are another computer rooms and business datum matched target industry When data of being engaged in, judge whether the timestamp of business datum is greater than the timestamp of the target service data of another computer room, if business The timestamp of data is greater than the timestamp of the target service data of another computer room, starts timing, and caching includes business datum Notification message.
In one example, Synchronization Component 2 is also used to after the business datum for obtaining a computer room, extracts business datum Validation value sends and includes at least the notification message of the validation value of business datum and business datum to correcting component;
Component 1 is corrected to be specifically used for when receiving the notification message of the validation value including business datum and business datum, With the presence or absence of the phase of the validation value and the validation value of business datum of the target service data of another computer room in judgement correction component 1 Deng;If correcting in component 1 there are the validation value of the target service data of another computer room is equal with the validation value of business datum, Determine that there are another computer rooms and business datum matched target service data in correction component 1.
Below by taking computer room A and computer room B as an example, the synchronous process of data is carried out to data synchronous system and is described in detail, It is specific as follows:
Client sends a business datum to computer room A and computer room B, and the access component 3 of computer room A receives the business number According to, and sending the business datum to the message-oriented middleware 4 of computer room A, Synchronization Component 2 pulls the industry from message-oriented middleware 4 in real time It is engaged in data, which is parsed, extracts validation value and timestamp therein, and by business datum, business datum Timestamp and the validation value of business datum are assembled into the notification information of fixed format, then send correction for the notification message Component 1 after correction component 1 receives notification message, judges to correct in the buffer queue of the computer room B of component 1 with the presence or absence of verifying It is worth target service data identical with the business datum, if there is no validation value and the business datums in the buffer queue of computer room B Identical target service data then illustrate to be not present and the matched target service number of the business datum in the buffer queue of computer room B According to based on client transmission business datum there are a sequencing, computer room B receives business datum, and there may be delays, open Preset synchro timer starts timing, and caches the notification message received in the buffer queue of computer room A;If computer room B's There are validation value target service data identical with the business datum in buffer queue, then illustrate to deposit in the buffer queue of computer room B With the matched target service data of the business datum, judge the timestamp of business datum whether be greater than target service data when Between stab, if the timestamp of business datum be greater than target service data timestamp, illustrate that target service data are not newest Business datum, open preset synchro timer, start timing, and in the buffer queue of computer room A caching receive it is logical Know message, delete in the buffer queue of computer room B with the matched target service data of business datum;If the timestamp etc. of business datum In the timestamp of target service data, then illustrate that computer room A and computer room B have been processed by the business datum, deletes the slow of computer room B Deposit in queue with the matched target service data of the business datum;If the timestamp of the business datum is less than target service data Timestamp then abandons the business datum.
If the timing in synchro timer arrives, i.e., at the end of timing, Synchronization Component 2 is not still drawn from computer room B Target service data are got, that is, correct the notification message that component 2 is still not received by the target service data including computer room B, Then illustrate that computer room B may be because that the reasons such as network fluctuation or computer room cutover are not received by the business datum of client transmission, It then sends the business datum to the message-oriented middleware 4 of computer room B, so that the business processing component 5 of computer room B is consumed, ensure that machine The consistency of data in room A and computer room B;In addition, deleting computer room A after the message-oriented middleware 4 of computer room B receives business datum Buffer queue in the notification message that caches.
Present embodiment increases for first embodiment to target service data and business datum timestamp Comparison, cause business datum not to be synchronized to avoid the two timestamp difference, further ensure the business number of multiple computer rooms According to consistency.
Third embodiment of the present invention is related to a kind of data synchronous system.Third embodiment is in second embodiment On the basis of improvement, mainly the improvement is that: in present embodiment, increasing in correction component with the presence or absence of computer room With the judgement of the matched target service data of business datum.
Referring to FIG. 1, correction component 1 is also used to judge correction group when receiving the notification message including business datum With the presence or absence of computer room and the matched target service data of business datum in part 1;
It corrects component 1 and is used in the correction component that there is no computer rooms and the matched target service data of business datum When, judge to correct in component 1 with the presence or absence of another computer room and business datum matched target service data.
In one example, correction component 1 is used in correction component 1 that there are the matched with business datum of computer room When target service data, judge whether the timestamp of business datum is greater than the timestamp of the target service data an of computer room;
Correction component 1 is used to whether be greater than the timestamp of the target service data an of computer room in the timestamp of business datum When, judge to correct in component 1 with the presence or absence of another computer room and business datum matched target service data.
Below by taking computer room A and computer room B as an example, the synchronous process of data is carried out to data synchronous system and is described in detail, It is specific as follows:
Client sends a business datum to computer room A and computer room B, and the access component 3 of computer room A receives the business number According to, and sending the business datum to the message-oriented middleware 4 of computer room A, Synchronization Component 2 pulls the industry from message-oriented middleware 4 in real time It is engaged in data, which is parsed, extracts validation value and timestamp therein, and by business datum, business datum Timestamp and the validation value of business datum are assembled into the notification information of fixed format, then send correction for the notification message Component 1.
After correction component 1 receives notification message, it whether there is in the buffer queue of the computer room A of first judgement correction component 1 Validation value target service data identical with the business datum, if there are validation values and the business number in the buffer queue of computer room A According to identical target service data, then illustrate exist and the matched target service number of the business datum in the buffer queue of computer room A According to, then judge whether the timestamp of the business datum of computer room A is greater than the timestamp of the target service data of computer room A, if computer room A The timestamp of target service data of the timestamp of business datum greater than computer room A, deletes in the buffer queue of computer room A and business The target service data of Data Matching;If the time of target service data of the timestamp of the business datum of computer room A equal to computer room A Stamp, then illustrate that the business datum has processed, and directly abandons;If the timestamp of the business datum of computer room A is less than computer room A's The timestamp of target service data then illustrates that the target service data in the buffer queue of computer room A are newest business datums, loses Abandon current business datum.
If validation value target service data identical with the business datum are not present in the buffer queue of computer room A, illustrate In the buffer queue of computer room A there is no with the matched target service data of the business datum, then judge correct component 1 computer room B Buffer queue in whether there is validation value target service data identical with the business datum, if in the buffer queue of computer room B There is no validation value target service data identical with the business datum, then illustrate to be not present and this in the buffer queue of computer room B The matched target service data of business datum send business datum there are a sequencing based on client, and computer room B receives industry There may be delays for data of being engaged in, and open preset synchro timer, start timing, and cache and connect in the buffer queue of computer room A The notification message received;If there are validation value target service data identical with the business datum in the buffer queue of computer room B, Illustrate in the buffer queue of computer room B exist with the matched target service data of the business datum, judge the timestamp of business datum Whether the timestamp of the target service data of computer room B is greater than, if the timestamp of business datum is greater than the target service data of computer room B Timestamp, then illustrate that the target service data of computer room B are not newest business datum, open preset synchro timer, Start timing, and cache the notification message received in the buffer queue of computer room A, delete in the buffer queue of computer room B with industry The target service data for Data Matching of being engaged in;If the timestamp of business datum is equal to the timestamp of target service data, illustrate machine Room A and computer room B has been processed by the business datum, delete in the buffer queue of computer room B with the matched target of the business datum Business datum;If the timestamp of the business datum is less than the timestamp of target service data, the business datum is abandoned.
If the timing in synchro timer arrives, i.e., at the end of timing, Synchronization Component 2 is not still drawn from computer room B Target service data are got, that is, correct the notification message that component 2 is still not received by the target service data including computer room B, Then illustrate that computer room B may be because that the reasons such as network fluctuation or computer room cutover are not received by the business datum of client transmission, It then sends the business datum to the message-oriented middleware 4 of computer room B, so that the business processing component 5 of computer room B is consumed, ensure that machine The consistency of data in room A and computer room B;In addition, deleting computer room A after the message-oriented middleware 4 of computer room B receives business datum Buffer queue in the notification message that caches.
Present embodiment for second embodiment, increase in correction component with the presence or absence of computer room with The judgement of the matched target service data of business datum reduces correction component so as to avoid repeating cache business data Performance consumption;Meanwhile the comparison of the target service data and business datum timestamp to a computer room is increased, to guarantee most New business datum can be synchronized, and further ensure the consistency of the business datum of multiple computer rooms.It should be noted that this Embodiment can also be used as improvement on the basis of first embodiment, can achieve same technical effect.
4th embodiment of the invention is related to a kind of data synchronous system.4th embodiment is in first embodiment On the basis of improvement, mainly the improvement is that: Synchronization Component 2 can verify the legitimacy of business datum.
In present embodiment, referring to FIG. 1, Synchronization Component 2 is also used to after the business datum for obtaining a computer room, judgement Whether the business datum is legal, and when determining that the business datum is legal, the notification message retransmited including at least business datum is arrived Correct component 1;When determining that the business datum is illegal, directly abandons and do not deal with.Specifically, Synchronization Component 2 is obtaining one After the business datum of computer room, judge whether the format of business datum matches with preset format;If the format of business datum and default Format match determines that business datum is legal.
Present embodiment for first embodiment, Synchronization Component can the legitimacy to business datum carry out school It tests, illegal business datum is avoided to be synchronized.Present embodiment is also used as changing on the basis of second or third embodiments Into can achieve same technical effect.
5th embodiment of the invention is related to a kind of data synchronous system.5th embodiment is in first embodiment On the basis of improvement, mainly the improvement is that: respectively comprising business datum notification message by the corresponding list of business datum Thread is handled.
In the present embodiment, referring to FIG. 1, correction component 1 is equipped with the thread pool including multiple single threads;Each single thread and each Business datum corresponds.Correct component 1 be specifically used for when receiving the notification message including business datum, by with business Data correspond in single thread judgement correction component 1 with the presence or absence of another computer room and business datum matched target service number According to.It corrects component 1 and is specifically used in correction component 1 that there is no another computer rooms and business datum matched target service number According to when, timing is started by single thread corresponding with business datum, and cache include business datum notification message.Correct component 1 Specifically for when timing terminates and does not receive the notification information of the target service data including another computer room, by with industry Business datum is sent another computer room by the corresponding single thread of business data.
In the present embodiment, Synchronization Component 2 is specifically used for after the business datum for obtaining a computer room, extracts business datum Validation value sends and includes at least the notification message of the validation value of business datum and business datum to correcting component.Component 1 is corrected to use In when receiving the notification message of the validation value including business datum and business datum, business datum is calculated by predetermined manner The check value of validation value, each single thread corresponds to the check value of the validation value of a business datum, so as to according to business The corresponding check value of data, the corresponding single thread of selecting business data.Specifically, predetermined manner is hash algorithm, then check value For the cryptographic Hash of the validation value of business datum.
Present embodiment is for first embodiment, and respectively the notification message comprising business datum is by business datum pair The single thread answered is handled, and is realized operating without lockization for notification message, is operated from without multi-thread concurrent When locking problem, avoid lock bring performance loss.Present embodiment is also used as second to fourth embodiment In it is any on the basis of improvement, can achieve same technical effect.
Sixth embodiment of the invention is related to a kind of method of data synchronization, applied to any in the first to the 5th embodiment The correction component of data synchronous system.It should be noted that being with the data synchronous system of Fig. 1 in the present embodiment embodiment Example is illustrated, and is so not limited.
The detailed process of the method for data synchronization of present embodiment is as shown in Figure 2.
Step 101, when receiving the notification message of the business datum including a computer room of Synchronization Component transmission, judgement It corrects in component with the presence or absence of another computer room and business datum matched target service data.If so, directly terminating;If It is no, then enter step 102.
Specifically, client sends a business datum to computer room A and computer room B, the access component 3 of computer room A is received The business datum, and send the business datum to the message-oriented middleware 4 of computer room A, Synchronization Component 2 is in real time from message-oriented middleware 4 The business datum is pulled, and sends correction component 1 for the notification message for including at least the business datum, correction component 1 receives To include the notification message of the business datum when, judge to correct in the buffer queue of the computer room B of component 1 with the presence or absence of the business number According to matched target service data, if being not present and the matched mesh of the business datum in the buffer queue of the computer room B of correction component 1 Business datum is marked, enters step 102.Conversely, then illustrating exist and the matched target of the business datum in the buffer queue of computer room B Business datum, delete computer room B buffer queue in the matched target service data of the business datum.
In one example, Synchronization Component 2 includes multiple sub-components 21;Multiple sub-components 21 and multiple computer rooms one are a pair of It answers;Sub-component 21 is used for after the business datum for obtaining a corresponding computer room, and the notice sent including at least business datum disappears Cease correction component 1.
Step 102, start timing, and cache the notification message including business datum.
Specifically, sending business datum based on client, there are a sequencings, and computer room B receives business datum may There are delays, open preset synchro timer, start timing, and caching includes business datum in the buffer queue of computer room A Notification message.
Step 103, when timing terminates and does not receive the notification information of the target service data including another computer room, Another computer room is sent by business datum.
Specifically, that is, at the end of timing, Synchronization Component 2 does not still have if the timing in synchro timer arrives It pulls from computer room B to target service data, that is, corrects component 2 and be still not received by the target service data including computer room B Notification message then illustrates that computer room B may be because that the reasons such as network fluctuation or computer room cutover are not received by client transmission Business datum then sends the business datum to the message-oriented middleware 4 of computer room B, so that the business processing component 5 of computer room B is consumed, It ensure that the consistency of data in computer room A and computer room B;In addition, being deleted after the message-oriented middleware 4 of computer room B receives business datum Except the notification message including business datum in the buffer queue of computer room A.
Since first embodiment is corresponded to each other with the present embodiment, the present embodiment can work in coordination reality with first embodiment It applies.The relevant technical details mentioned in first embodiment are still effective in the present embodiment, can reach in the first embodiment Technical effect similarly may be implemented in the present embodiment, in order to reduce repetition, which is not described herein again.Correspondingly, this implementation The relevant technical details mentioned in example are also applicable in first embodiment.
In terms of existing technologies, Synchronization Component is sent present embodiment after the business datum for obtaining a computer room Including at least the business datum notification message to correction component, correction component disappears receiving the notice including the business datum After breath, judge to correct with the presence or absence of another computer room and the business datum matched target service data in component, if not depositing Then illustrating that another computer room is received not yet with the matched target service data of business datum, is starting timing, and cache and include The notification message of business datum, if still not receiving the target service data including another computer room at the end of timing Notification information then illustrates missing and the matched target service data of business datum in another computer room, which is sent To another computer room, realize the synchronization of business datum, can when the business datum in multiple computer rooms is inconsistent, in time into The synchronization of row business datum, it is ensured that the consistency of the business datum of multiple computer rooms;Meanwhile data synchronous system pair of the invention The framework zero of each computer room is invaded.
7th embodiment of the invention is related to a kind of method of data synchronization.7th embodiment is in sixth embodiment On the basis of improvement, mainly the improvement is that: in present embodiment, increasing to target service data and business datum time The comparison of stamp.
The detailed process of the method for data synchronization of present embodiment is as shown in Figure 3.
Step 201, disappear in the notice for the timestamp including business datum and business datum for receiving Synchronization Component transmission When breath, judge to correct in component with the presence or absence of another computer room and business datum matched target service data.If so, into Enter step 202;If it is not, then entering step 203.
Specifically, client sends a business datum to computer room A and computer room B, the access component 3 of computer room A is received The business datum, and send the business datum to the message-oriented middleware 4 of computer room A, Synchronization Component 2 is in real time from message-oriented middleware 4 The business datum is pulled, which is parsed, extracts validation value and timestamp therein, and by business datum, industry The timestamp for data of being engaged in and the validation value of business datum are assembled into the notification information of fixed format, then send out the notification message Be sent to correction component 1, correction component 1 receive notification message after, judge correct component 1 computer room B buffer queue in whether There are validation value target service data identical with the business datum, if there are validation values and the industry in the buffer queue of computer room B The identical target service data of data of being engaged in then illustrate exist and the matched target industry of the business datum in the buffer queue of computer room B Business data, enter step 202;If validation value target service identical with the business datum is not present in the buffer queue of computer room B Data, then illustrate in the buffer queue of computer room B there is no with the matched target service data of the business datum, enter step 203 Start timing, and caches the notification message including business datum.
Step 202, judge whether the timestamp of business datum is greater than the timestamp of the target service data of another computer room. If so, entering step 203;If it is not, then directly terminating.
Specifically, correction component 1 judges whether the timestamp of business datum is greater than the timestamp of target service data, if The timestamp of business datum is greater than the timestamp of target service data, then illustrates that target service data are not newest business number According to entering step 203;If the timestamp of business datum is equal to the timestamp of target service data, illustrate computer room A and computer room B All have been processed by the business datum, delete in the buffer queue of computer room B with the matched target service data of the business datum;If The timestamp of the business datum is less than the timestamp of target service data, then abandons the business datum.
Step 203, start timing, and cache the notification message including business datum.
Specifically, sending business datum based on client, there are a sequencings, and computer room B receives business datum may There are delays, open preset synchro timer, start timing, and caching includes business datum in the buffer queue of computer room A Notification message.
Step 204, when timing terminates and does not receive the notification information of the target service data including another computer room, Another computer room is sent by business datum.
Specifically, that is, at the end of timing, Synchronization Component 2 does not still have if the timing in synchro timer arrives It pulls from computer room B to target service data, that is, corrects component 2 and be still not received by the target service data including computer room B Notification message then illustrates that computer room B may be because that the reasons such as network fluctuation or computer room cutover are not received by client transmission Business datum then sends the business datum to the message-oriented middleware 4 of computer room B, so that the business processing component 5 of computer room B is consumed, It ensure that the consistency of data in computer room A and computer room B;In addition, being deleted after the message-oriented middleware 4 of computer room B receives business datum Except the notification message cached in the buffer queue of computer room A.
Since second embodiment is corresponded to each other with the present embodiment, the present embodiment can work in coordination reality with second embodiment It applies.The relevant technical details mentioned in second embodiment are still effective in the present embodiment, can reach in a second embodiment Technical effect similarly may be implemented in the present embodiment, in order to reduce repetition, which is not described herein again.Correspondingly, this implementation The relevant technical details mentioned in example are also applicable in second embodiment.
Present embodiment increases for sixth embodiment to target service data and business datum timestamp Comparison, cause business datum not to be synchronized to avoid the two timestamp difference, further ensure the business number of multiple computer rooms According to consistency.
Eighth embodiment of the invention is related to a kind of method of data synchronization, and the 8th embodiment is in the 7th embodiment base Improvement on plinth, mainly thes improvement is that: in present embodiment, increase in correction component with the presence or absence of computer room with The judgement of the matched target service data of business datum.
The detailed process of the method for data synchronization of present embodiment is as shown in Figure 4.
Wherein, step 303 is roughly the same to step 204 with step 201 to step 306, and details are not described herein, main difference Place is, increases step 301 and step 302, specific as follows:
Step 301, disappear in the notice for the timestamp including business datum and business datum for receiving Synchronization Component transmission When breath, judge to correct in component with the presence or absence of computer room and the matched target service data of business datum;If so, into Step 302;If it is not, then entering step 303.
Specifically, client sends a business datum to computer room A and computer room B, the access component 3 of computer room A is received The business datum, and send the business datum to the message-oriented middleware 4 of computer room A, Synchronization Component 2 is in real time from message-oriented middleware 4 The business datum is pulled, which is parsed, extracts validation value and timestamp therein, and by business datum, industry The timestamp for data of being engaged in and the validation value of business datum are assembled into the notification information of fixed format, then send out the notification message It is sent to correction component 1.After correction component 1 receives notification message, it is in the buffer queue of the computer room A of first judgement correction component 1 No there are validation value target service data identical with the business datum, if there are validation value and being somebody's turn to do in the buffer queue of computer room A The identical target service data of business datum then illustrate exist and the matched target of the business datum in the buffer queue of computer room A Business datum enters step 302;If validation value target industry identical with the business datum is not present in the buffer queue of computer room A Be engaged in data, then illustrate in the buffer queue of computer room A there is no with the matched target service data of the business datum, enter step With the presence or absence of another computer room and business datum matched target service data in 303 judgement correction components.
Step 302, judge whether the timestamp of business datum is greater than the timestamp of the target service data an of computer room.If It is then to enter step 303;If it is not, then directly terminating.
Specifically, correction component 1 judges whether the timestamp of the business datum of computer room A is greater than the target service of computer room A The timestamp of data, if the timestamp of target service data of the timestamp of the business datum of computer room A greater than computer room A, deletes machine In the buffer queue of room A with the matched target service data of business datum, enter step 303;If the business datum of computer room A The timestamp of target service data of the timestamp equal to computer room A, then illustrate that the business datum has processed, and directly abandons; If the timestamp of target service data of the timestamp of the business datum of computer room A less than computer room A, illustrates the caching team of computer room A Target service data in column are newest business datums, abandon current business datum.
Since 3rd embodiment is corresponded to each other with the present embodiment, the present embodiment can work in coordination reality with 3rd embodiment It applies.The relevant technical details mentioned in 3rd embodiment are still effective in the present embodiment, can reach in the third embodiment Technical effect similarly may be implemented in the present embodiment, in order to reduce repetition, which is not described herein again.Correspondingly, this implementation The relevant technical details mentioned in example are also applicable in 3rd embodiment.
Present embodiment for the 7th embodiment, increase in correction component with the presence or absence of computer room with The judgement of the matched target service data of business datum reduces correction component so as to avoid repeating cache business data Performance consumption;Meanwhile the comparison of the target service data and business datum timestamp to a computer room is increased, to guarantee most New business datum can be synchronized, and further ensure the consistency of the business datum of multiple computer rooms.It should be noted that this Embodiment can also be used as improvement on the basis of sixth embodiment, can achieve same technical effect.
9th embodiment of the invention is related to a kind of method of data synchronization, and the 9th embodiment is in sixth embodiment On the basis of improvement, mainly the improvement is that: respectively comprising business datum notification message by the corresponding list of business datum Thread is handled.In the present embodiment, corrects and be equipped with the thread pool including multiple single threads in component 1;Each single thread and each industry Data of being engaged in correspond, specifically, each single thread corresponds to the check value of the validation value of a business datum;Synchronization Component 2 After the business datum for obtaining a computer room, the validation value of business datum is extracted, sends and includes at least business datum and business number According to validation value notification message to correction component 1.
The detailed process of the method for data synchronization of present embodiment is as shown in Figure 5.
Step 401, receive Synchronization Component transmission the notification message including business datum when, by with business datum With the presence or absence of another computer room and the matched target service data of business datum in corresponding single thread judgement correction component.
Specifically, component 1 is corrected when receiving the notification message of the validation value including business datum and business datum, The check value of the validation value of business datum is calculated by predetermined manner, each single thread corresponds to the validation value of a business datum Check value, so as to according to the corresponding check value of business datum, the corresponding single thread of selecting business data, so by with industry Business data correspond to single thread judgement correction component in whether there is another computer room with the matched target service number of business datum According to.Wherein, predetermined manner is hash algorithm, then check value is the cryptographic Hash of the validation value of business datum.
Step 402, timing is started by single thread corresponding with business datum, and caches the notice including business datum and disappears Breath.
Specifically, similar with the step 102 in first embodiment, details are not described herein.
Step 403, another computer room is sent for business datum by single thread corresponding with business datum.
Specifically, similar with the step 103 in first embodiment, details are not described herein.
Since the 5th embodiment is corresponded to each other with the present embodiment, the present embodiment can work in coordination reality with the 5th embodiment It applies.The relevant technical details mentioned in 5th embodiment are still effective in the present embodiment, can reach in the 5th embodiment Technical effect similarly may be implemented in the present embodiment, in order to reduce repetition, which is not described herein again.Correspondingly, this implementation The relevant technical details mentioned in example are also applicable in the 5th embodiment.
For present embodiment is with respect to sixth embodiment, respectively the notification message comprising business datum is corresponded to by business datum A single thread handled, realize notification message without lockization operate, from when being operated without multi-thread concurrent Locking problem, avoid lock bring performance loss.Present embodiment is also used as in the 7th or the 8th embodiment base Improvement on plinth can achieve same technical effect.
Tenth embodiment of the invention is related to a kind of server, and a kind of method of data synchronization is applied to first to the 5th The Synchronization Component of any data synchronous system in embodiment.It should be noted that in the present embodiment embodiment, with Fig. 1's It is illustrated for data synchronous system, is so not limited.
The detailed process of the method for data synchronization of present embodiment is as shown in Figure 6.
Step 501, after the business datum for obtaining a computer room, the notification message including business datum is sent to correction group Part judges to correct in component with the presence or absence of another so that correction component is when receiving the notification message including business datum Computer room with the matched target service data of business datum;There is no another computer rooms and business datum in correction component When the target service data matched, start timing, and cache the notification message including business datum, and terminate in timing and do not receive To include another computer room target service data notification information when, send another computer room for business datum.
In one example, whether Synchronization Component 2 judges the business datum also after the business datum for obtaining a computer room It is legal, when determining that the business datum is legal, notification message including at least business datum is retransmited to correcting component 1;Sentencing When the business datum is illegal calmly, directly abandons and do not deal with.Specifically, Synchronization Component 2 is in the business datum for obtaining a computer room Afterwards, judge whether the format of business datum matches with preset format;If the format of business datum is matched with preset format, industry is determined Data of being engaged in are legal.
Since the first to the 5th embodiment is corresponded to each other with the present embodiment, the present embodiment can be implemented with first to the 5th Example is worked in coordination implementation.The relevant technical details mentioned in first to the 5th embodiment in the present embodiment still effectively, the The attainable technical effect of institute similarly may be implemented in the present embodiment in one to the 5th embodiment, in order to reduce repetition, this In repeat no more.Correspondingly, the relevant technical details mentioned in the present embodiment are also applicable in the first to the 5th embodiment.
In terms of existing technologies, Synchronization Component is sent present embodiment after the business datum for obtaining a computer room Including at least the business datum notification message to correction component, correction component disappears receiving the notice including the business datum After breath, judge to correct with the presence or absence of another computer room and the business datum matched target service data in component, if not depositing Then illustrating that another computer room is received not yet with the matched target service data of business datum, is starting timing, and cache and include The notification message of business datum, if still not receiving the target service data including another computer room at the end of timing Notification information then illustrates missing and the matched target service data of business datum in another computer room, which is sent To another computer room, realize the synchronization of business datum, can when the business datum in multiple computer rooms is inconsistent, in time into The synchronization of row business datum, it is ensured that the consistency of the business datum of multiple computer rooms;Meanwhile data synchronous system pair of the invention The framework zero of each computer room is invaded.
It will be understood by those skilled in the art that the respective embodiments described above are to realize specific embodiments of the present invention, And in practical applications, can to it, various changes can be made in the form and details, without departing from the spirit and scope of the present invention.

Claims (16)

1. a kind of method of data synchronization, which is characterized in that applied to the correction component of data synchronous system, the synchronous system of the data System further includes the Synchronization Component for being connected to the correction component, and the correction component and Synchronization Component connect with multiple computer rooms respectively It connects;The described method includes:
When receiving the notification message for the business datum including a computer room that the Synchronization Component is sent, described in judgement It corrects in component with the presence or absence of another computer room and the business datum matched target service data;
When the target service data matched with business datum of another computer room are not present in determining the correction component, Start timing, and caches the notification message including the business datum;
When timing terminates and does not receive the notification information of the target service data including another computer room, by institute It states business datum and is sent to another described described computer room.
2. method of data synchronization according to claim 1, which is characterized in that described to receive the Synchronization Component transmission Notification message including the business datum when, judge in the correction component with the presence or absence of another computer room and institute The matched target service data of business datum are stated, specifically:
It include that the business datum and the notice of the timestamp of the business datum disappear receive the Synchronization Component transmission When breath, judge in the correction component with the presence or absence of another computer room and the business datum matched target service number According to;
There are computer rooms described in another and the business datum matched target service data in determining the correction component When, judge whether the timestamp of the business datum is greater than the timestamp of the target service data of another computer room;
When the timestamp for determining the business datum is greater than the timestamp of the target service data of another computer room, Into the beginning timing, and cache the notification message for including the steps that business datum.
3. method of data synchronization according to claim 1, which is characterized in that described to receive the Synchronization Component transmission Notification message including the business datum when, judge in the correction component with the presence or absence of another computer room and institute The matched target service data of business datum are stated, specifically:
It include that the business datum and the notice of the validation value of the business datum disappear receive the Synchronization Component transmission When breath, the validation value and the business in the correction component with the presence or absence of the target service data of another computer room are judged The validation value of data it is equal;If in the correction component there are the validation value of the target service data of computer room described in another with The validation value of the business datum it is equal, it is determining to exist in the correction component another computer room with the industry The target service data for Data Matching of being engaged in.
4. method of data synchronization according to claim 1, which is characterized in that receive the Synchronization Component transmission described The notification message including the business datum after, and whether there is described in another in the judgement correction component Computer room with before the matched target service data of the business datum, further includes:
Judge in the correction component with the presence or absence of one computer room and the business datum matched target service Data;
There is no one computer rooms and the business datum matched target service data in the correction component When, into the judgement correction component with the presence or absence of another computer room and the business datum matched target The step of business datum.
5. method of data synchronization according to claim 4, which is characterized in that described to receive the Synchronization Component transmission Notification message including the business datum when, judge in the correction component with the presence or absence of another computer room and institute The matched target service data of business datum are stated, specifically:
It include that the business datum and the notice of the timestamp of the business datum disappear receive the Synchronization Component transmission When breath, judge in the correction component with the presence or absence of another computer room and the business datum matched target service number According to;
With the presence or absence of another computer room and the business datum matched target in the judgement correction component Before business datum, further includes:
Judge whether the timestamp of the business datum is greater than the timestamp of the target service data of one computer room;
When the timestamp for determining the business datum is greater than the timestamp of the target service data of one computer room, into Enter in the judgement correction component with the presence or absence of another computer room and the business datum matched target service The step of data.
6. method of data synchronization according to claim 1, which is characterized in that being equipped in the correction component includes multiple lists The thread pool of thread;Each single thread and each business datum correspond;
With the presence or absence of another computer room and the business datum matched target industry in the judgement correction component Business data, specifically:
Judged in the correction component by the single thread corresponding with the business datum with the presence or absence of another described computer room With the matched target service data of the business datum;
The correction component starts timing, and caches the notification message including the business datum, specifically:
Start timing by the single thread corresponding with the business datum, and caches the notice including the business datum and disappear Breath;
It is described to send another described described computer room for the business datum, specifically:
Another described described computer room is sent by the business datum by the single thread corresponding with the business datum.
7. method of data synchronization according to claim 6, which is characterized in that each single thread corresponds to described in one The check value of the validation value of business datum;
It is described when receiving the notification message including the business datum that the Synchronization Component is sent, judge the correction group With the presence or absence of another computer room and the business datum matched target service data in part, specifically:
It include that the business datum and the notice of the validation value of the business datum disappear receive the Synchronization Component transmission When breath, judge in the correction component with the presence or absence of another computer room and the business datum matched target service number According to;
Judged in the correction component by the single thread corresponding with the business datum with the presence or absence of another institute described State computer room with before the matched target service data of the business datum, further includes:
The check value that the validation value of the business datum is calculated by predetermined manner, according to the corresponding check value of the business datum, Select the corresponding single thread of the business datum.
8. method of data synchronization according to claim 1, which is characterized in that be preset with each machine in the correction component The buffer queue in room;
With the presence or absence of another computer room and the business datum matched target industry in the judgement correction component Business data, specifically:
Judging whether there is in the buffer queue of another computer room in the correction component matches with the business datum Target service data;
The caching includes the notification message of the business datum, specifically:
Caching includes the notification message of the business datum in the buffer queue of one computer room.
9. a kind of method of data synchronization, which is characterized in that applied to the Synchronization Component of data synchronous system, the synchronous system of the data System further includes and is connected to the correction component of the Synchronization Component, and the correction component and Synchronization Component connect with multiple computer rooms respectively It connects, which comprises
After the business datum for obtaining a computer room, the notification message including the business datum is sent to the correction group Part so that the correction component is receiving the notification message including the business datum, and is not deposited in the correction component In the target service data matched with business datum of another computer room, start timing, and caching includes the business The notification message of data, and terminate in timing and do not receive the logical of the target service data including another computer room When knowing information, another described described computer room is sent by the business datum.
10. method of data synchronization according to claim 9, which is characterized in that described in the industry for obtaining a computer room After data of being engaged in, notification message of the transmission including the business datum to the correction component, specifically:
After the business datum for obtaining a computer room, the timestamp of the business datum is extracted, is sent described in including at least The notification message of the timestamp of business datum and the business datum is to the correction component, so that the correction component is receiving Exist to the notification message for the timestamp for including the business datum and the business datum, and in determining the correction component When the target service data matched with the business datum of another computer room, judge that the timestamp of the business datum is The timestamp of the no target service data for being greater than another computer room, and it is big in the timestamp for determining the business datum When the timestamp of the target service data of another computer room, start timing, and caching includes the logical of business datum Know message.
11. method of data synchronization according to claim 9, which is characterized in that described in the industry for obtaining a computer room After data of being engaged in, notification message of the transmission including the business datum to the correction component, specifically:
After the business datum for obtaining a computer room, the validation value of the business datum is extracted, is sent described in including at least The notification message of the validation value of business datum and the business datum is to the correction component, so that the correction component is receiving To the notification message for the validation value for including the business datum and the business datum, and there are another in the correction component The validation value of the target service data of a computer room is equal with the validation value of the business datum, determines the correction component It is middle there is another computer room with the matched target service data of the business datum.
12. method of data synchronization according to claim 9, which is characterized in that the correction component is being received including institute State the notification message of business datum, and there is no one computer rooms and the business datum in the correction component When matched target service data, judge in the correction component with the presence or absence of another computer room and the business datum Matched target service data;
It is described after the business datum for obtaining a computer room, send include the business datum notification message to the school Positive component, specifically:
After the business datum for obtaining a computer room, the timestamp of the business datum is extracted, is sent described in including at least The notification message of the timestamp of business datum and the business datum is to the correction component, so that the correction component is receiving To the notification message for the timestamp for including the business datum and the business datum, and in the presence of described in the correction component When the target service data matched with the business datum of one computer room, judge the business datum timestamp whether Whether it is greater than greater than the timestamp of the target service data of one computer room, and in the timestamp in the business datum When the timestamp of the target service data of one computer room, judge in the correction component with the presence or absence of described in another Computer room with the matched target service data of the business datum.
13. method of data synchronization according to claim 9, which is characterized in that described in the industry for obtaining a computer room After data of being engaged in, the notification message including the business datum is sent to the correction component, comprising:
After the business datum for obtaining a computer room, judge whether the business datum is legal;
When determining that the business datum is legal, sends and include at least the notification message of the business datum to the correction group Part.
14. method of data synchronization according to claim 13, which is characterized in that described to judge whether the business datum closes Method, specifically:
Judge whether the format of the business datum matches with preset format;
If the format of the business datum is matched with preset format, determine that the business datum is legal.
15. method of data synchronization according to claim 9, the Synchronization Component includes multiple sub-components, and the multiple Sub-component and the multiple computer room correspond;
It is described after the business datum for obtaining a computer room, send include the business datum notification message to the school Positive component, specifically:
After the business datum for obtaining a corresponding computer room by the sub-component, and sends and include at least the business number According to notification message to the correction component.
16. a kind of data synchronous system characterized by comprising correction component, and it is connected to the synchronization of the correction component Component, the correction component are connect with multiple computer rooms respectively with Synchronization Component;
The correction component is for method of data synchronization described in any one of perform claim requirement 1 to 8;
The Synchronization Component is for method of data synchronization described in any one of perform claim requirement 9 to 15.
CN201910384226.9A 2019-05-09 2019-05-09 Method of data synchronization and system Pending CN110300015A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910384226.9A CN110300015A (en) 2019-05-09 2019-05-09 Method of data synchronization and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910384226.9A CN110300015A (en) 2019-05-09 2019-05-09 Method of data synchronization and system

Publications (1)

Publication Number Publication Date
CN110300015A true CN110300015A (en) 2019-10-01

Family

ID=68026751

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910384226.9A Pending CN110300015A (en) 2019-05-09 2019-05-09 Method of data synchronization and system

Country Status (1)

Country Link
CN (1) CN110300015A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115104295A (en) * 2020-03-25 2022-09-23 深圳市欢太科技有限公司 Data processing method, data processing device, electronic device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030185104A1 (en) * 2002-04-02 2003-10-02 Nate Goergen Method and apparatus for synchronizing timekeeping devices
CN106708842A (en) * 2015-11-12 2017-05-24 阿里巴巴集团控股有限公司 Data loading method for application system, database and application system
CN107301196A (en) * 2017-05-03 2017-10-27 北京小度信息科技有限公司 Method of data synchronization, device, equipment and monitoring server
CN108123866A (en) * 2016-11-30 2018-06-05 北京云中融信网络科技有限公司 Method for message transmission and device
CN109189851A (en) * 2018-06-29 2019-01-11 网宿科技股份有限公司 Data access method, database facility and master-slave database instance system
CN109684130A (en) * 2018-12-12 2019-04-26 网宿科技股份有限公司 The method and device of data backup between a kind of computer room

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030185104A1 (en) * 2002-04-02 2003-10-02 Nate Goergen Method and apparatus for synchronizing timekeeping devices
CN106708842A (en) * 2015-11-12 2017-05-24 阿里巴巴集团控股有限公司 Data loading method for application system, database and application system
CN108123866A (en) * 2016-11-30 2018-06-05 北京云中融信网络科技有限公司 Method for message transmission and device
CN107301196A (en) * 2017-05-03 2017-10-27 北京小度信息科技有限公司 Method of data synchronization, device, equipment and monitoring server
CN109189851A (en) * 2018-06-29 2019-01-11 网宿科技股份有限公司 Data access method, database facility and master-slave database instance system
CN109684130A (en) * 2018-12-12 2019-04-26 网宿科技股份有限公司 The method and device of data backup between a kind of computer room

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115104295A (en) * 2020-03-25 2022-09-23 深圳市欢太科技有限公司 Data processing method, data processing device, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN106991607B (en) Disordered transaction control method based on block chain account model
US7792790B2 (en) System and method of synchronizing data between a server and a client
US7672005B1 (en) Methods and apparatus for scan block caching
US20070255823A1 (en) Method for low-overhead message tracking in a distributed messaging system
US9256658B2 (en) Ranging scalable time stamp data synchronization
US8291101B1 (en) Synchronization of mutually shared data stored on network devices
CN105162879B (en) Realize the method, apparatus and system of multimachine room data consistency
CN112597249B (en) Synchronous distribution storage method and system for service data
CN103763380B (en) A kind of method and system of synchronous demonstrating data
CN113409145A (en) Cross-block-chain transaction synchronization method and device
CN109167850A (en) A kind of method, apparatus and storage medium of determining CDN service operator
WO2024051454A1 (en) Method and apparatus for processing transaction log
US20100103946A1 (en) Packet capturing device
CN111581028A (en) Data block-based method and system for rapid data backup and consistency verification
CN110300015A (en) Method of data synchronization and system
CN105933379A (en) Business processing method, device and system
US20160269335A1 (en) Method and apparatus for identifying changed mailboxes in an internet message access protocol (imap) list
US20160285969A1 (en) Ordered execution of tasks
CN105991592A (en) Same-natural-person identity maintenance method and apparatus, and server
US8458803B2 (en) Global account lockout (GAL) and expiration using an ordered message service (OMS)
CN106454767A (en) Business data synchronization method, device and system
CN107547160A (en) A kind of method for synchronizing time and device
CN109086335A (en) A method of make MFS distributed file system that there is high availability
US20080002743A1 (en) System and method for synchronizing in-memory caches while being updated by a high rate data stream
US7516204B2 (en) Information processing method and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191001