CN109165261A - Method of data synchronization, device, server and computer storage medium - Google Patents

Method of data synchronization, device, server and computer storage medium Download PDF

Info

Publication number
CN109165261A
CN109165261A CN201811180360.9A CN201811180360A CN109165261A CN 109165261 A CN109165261 A CN 109165261A CN 201811180360 A CN201811180360 A CN 201811180360A CN 109165261 A CN109165261 A CN 109165261A
Authority
CN
China
Prior art keywords
node
message
data
synchronization
demons
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
CN201811180360.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.)
Shenzhen Oribo Technology Co Ltd
Original Assignee
Shenzhen Oribo 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 Shenzhen Oribo Technology Co Ltd filed Critical Shenzhen Oribo Technology Co Ltd
Priority to CN201811180360.9A priority Critical patent/CN109165261A/en
Publication of CN109165261A publication Critical patent/CN109165261A/en
Pending legal-status Critical Current

Links

Landscapes

  • Telephonic Communication Services (AREA)

Abstract

The disclosure provides a kind of method of data synchronization, device, server and computer readable storage medium, and by receiving an at least synchronization message, the synchronization message includes node identification;By described at least one synchronous message distribution to the corresponding message queue of each node;The synchronization message is pushed to by the message queue according to preset order the demons of corresponding node, so that the demons of the corresponding node update the data of corresponding node according to the synchronization message, solve in existing data synchronization scheme to the technical problem that the dependence of central node is high, system performance expense is big, data synchronization efficiency is low.

Description

Method of data synchronization, device, server and computer storage medium
Technical field
The present invention relates to field of computer technology more particularly to a kind of method of data synchronization, device, server and computers Storage medium.
Background technique
With the rapid development of computer technology, more and more computer systems need to keep each by the way that data are synchronous Consistency on messaging between node.Currently more popular data synchronization scheme has:
1, Master-Slave mode data is synchronous.The data synchronization scheme supported in a manner of binlog multiple Slave from Data of the synchronous master library in library, but when use is from library, from library can only reading mode and be unable to write operation.In distributed system In, consider from efficiency and performance, each node should can be with read-write operation to the database currently connected.However this master Slave pattern, if node connection is not to be able to satisfy from library and carry out read-write business demand, if node all connects master Distributed original intention has then been violated in library.
2, distributed system asynchronous system method of data synchronization.In the data synchronization scheme, message center is with synchronous meter Intermediary is stored, not just very based on the lining up mode of message server;The non-disparate step mode of Message Processing, message center are only accused Tell that client changes the version number of data, client needs from message center pulling data and are handled according to version number, finally Also to report more new version number;Message center responsibility weight, message center will not only tell client to have new data, must provide and connect Oral business, and guarantee versions of data consistency.
Above two data synchronization scheme currently popular, is all individually present defect:
In Master-Slave mode data synchronization scheme, each slave node can not achieve free read-write need It asks, while higher to the performance requirement of master, can not accomplish taking into account for efficiency and performance.
(2) in distributed system asynchronous system data synchronization scheme, the synchronization between node is guaranteed by more new version number, Need to expend higher overhead in terms of data communication, very high further for the performance requirement of message center, message center is not Only need maintenance release number, it is also necessary to interface service is provided for each several points, it is entire distributed if message center paralysis delay machine System can paralyse at once.
Summary of the invention
Main purpose disclosed by the invention is to propose a kind of method of data synchronization, device, server and computer storage Medium, it is intended to solve in existing data synchronization scheme it is high to the dependence of central node, system performance expense is big, data are synchronous The technical issues of low efficiency.
To achieve the above object, the present invention, which discloses, provides a kind of method of data synchronization, and method includes: to receive at least one to synchronize Message, the synchronization message include node identification;By described at least one synchronous message distribution to the corresponding message team of each node Column;The synchronization message is pushed to the demons of corresponding node by the message queue according to preset order, so that institute The demons for stating corresponding node update the data of corresponding node according to the synchronization message.
Optionally, described so that each node demons according to the synchronization message update corresponding node number According to, comprising: so that the demons judge the node identification of the node identification that the synchronization message includes and corresponding node is It is no identical;If the node identification of node identification and corresponding node that the synchronization message includes is not identical, according to described same Walk the data of information updating corresponding node.
Optionally, the method also includes: if the node of node identification and corresponding node that the synchronization message includes It identifies identical, then abandons the synchronization message, and read next synchronization message.
Optionally, the synchronization message is when monitoring that each node data changes by the demons of each node It generates.
Optionally, the demons of each node monitor that each node data changes, comprising: when node When data change, changed data are stored in interim table;Demons detect interim according to the first scheduled duration Table obtains changed data.
Optionally, described that the synchronization message is pushed to according to preset order by corresponding node by the message queue Demons, further includes: the synchronization message is pushed to according to the sequence of first in first out by corresponding section by the message queue The demons of point;After the confirmation response for receiving the demons feedback, next pushed in the message queue is same Walk message.
Optionally, the method also includes: do not receive in the second preset duration the confirmation of the demons feedback When response, the synchronization message is sent by the message queue again.
The present invention, which discloses, provides a kind of data synchronization unit, which includes: receiving module, synchronous for receiving at least one Message, the synchronization message include node identification;Distribution module, for synchronizing message distribution to each node for described at least one Corresponding message queue;Pushing module, user are pushed to the synchronization message according to preset order by the message queue The demons of corresponding node, so that the demons of the corresponding node update the number of corresponding node according to the synchronization message According to.
Invention additionally discloses a kind of server is provided, the server includes: processor;Memory, with the processor Connection, the memory include control instruction, and when the processor reads the control instruction, it is real to control the electronic equipment The method of data synchronization of existing any of the above-described.
Invention additionally discloses a kind of computer storage medium is also provided, the computer storage medium has one or more journeys Sequence, one or more of programs are executed by one or more processors, to realize the data side of synchronization of any of the above-described Method.
Method of data synchronization, device, server and the computer-readable storage medium that a kind of example embodiment of the disclosure provides In matter, by receiving an at least synchronization message, the synchronization message includes node identification;It will at least one synchronous message distribution To the corresponding message queue of each node;The synchronization message is pushed into correspondence according to preset order by the message queue The demons of node, so that the demons of the corresponding node update the data of corresponding node according to the synchronization message, It solves in existing data synchronization scheme to the dependence of central node is high, system performance expense is big, data synchronization efficiency is low Technical problem realizes the free read-write operation for guaranteeing each node, while effectively reducing to the higher dependence of central node, System performance expense is reduced, and effectively reduces the synchronous failure rate of data, substantially increases the technology effect of data synchronization efficiency Fruit.
Detailed description of the invention
Fig. 1 is a kind of flow chart of method of data synchronization of one of disclosure embodiment signal;
Fig. 2 is a kind of flow chart of method of data synchronization of one of disclosure embodiment signal;
Fig. 3 is a kind of block diagram of data synchronization unit of one of disclosure embodiment signal;
Fig. 4 is a kind of structure chart of server of one of disclosure embodiment signal;
Fig. 5 is a kind of computer storage medium synchronous for data of one of disclosure embodiment signal.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In subsequent description, it is only using the suffix for indicating such as " module ", " component " or " unit " of element Be conducive to explanation of the invention, itself there is no a specific meaning.Therefore, " module ", " component " or " unit " can mix Ground uses.
One of present exemplary embodiment discloses a kind of method of data synchronization first.The method of data synchronization is held Row main body can be server-side one or more electronic equipment, such as: server, cluster equipment;The information processing method Executing subject is also possible to third party device, the third party device by way of wirelessly or non-wirelessly with server-side, client, inspection It surveys end and carries out data communication, to realize method of data synchronization described in the disclosure.The disclosure to this with no restriction.But in order to more Method of data synchronization described in the good explanation disclosure, present embodiment carry out embodiment by executing subject of message server Explanation, Fig. 1 is a kind of flow chart of method of data synchronization of one of disclosure embodiment signal, as shown in Figure 1, should Method of data synchronization may comprise steps of:
Step S110, receives an at least synchronization message, and the synchronization message includes node identification;
Step S120, by described at least one synchronous message distribution to the corresponding message queue of each node;
The synchronization message is pushed to keeping for corresponding node according to preset order by the message queue by step S130 Program is protected, so that the demons of the corresponding node update the data of corresponding node according to the synchronization message.
By above embodiment, the present invention discloses the dependence solved in existing data synchronization scheme to central node The technical problem high, system performance expense is big, data synchronization efficiency is low, realizes the free read-write operation for guaranteeing each node, together When effectively reduce to the higher dependence of central node, reduce system performance expense, and effectively reduce the synchronous mistake of data Rate is lost, the technical effect of data synchronization efficiency is substantially increased.
In the following, by being described further shown in reference Fig. 1 to the method for data synchronization in this example embodiment.
In step s 110, an at least synchronization message is received, the synchronization message includes node identification.
In this illustrative embodiment, message server receives each node or third party system is sent at least One synchronization message, the synchronization message include the data to change, and the data for each node update, in addition, described synchronize disappears Breath also includes node identification, and for identifying the data source to change, which can be any in data synchronous system The node identification of node is also possible to third party system node identification.Such as: 0001 is the node identification of node 1;Xxxx is The node identification of tripartite's section system.
It should be noted that each node refers to that the storage of each offer data in data synchronous system, read-write service Node, such as server-side, service cluster, third party system refer to the system except data synchronous system, update number for providing According to so that each node in data synchronous system carries out, data are synchronous, and the third party system, which can be, has data output work The arbitrary system of energy.
In the step s 120, by described at least one synchronous message distribution to the corresponding message queue of each node.
In this illustrative embodiment, the local third party that either can communicate with it of message server is tieed up Shield has an at least message queue, and the message queue and each node correspond, and in other words, each node is assigned each other Independent message queue.The synchronization message received is distributed to that each node is corresponding to disappear by message server according to preset rules Cease queue.
In a kind of optional embodiment, message server routes to synchronization message respectively according to preset routing rule In the corresponding message queue of a node.Wherein, routing rule can be any Routing Protocol in the prior art, and the disclosure is no longer It repeats.
In step s 130, the synchronization message is pushed to according to preset order by corresponding node by the message queue Demons so that the demons of the corresponding node according to the synchronization message update corresponding node data.
In this illustrative embodiment, there are a corresponding demons for each node, that is to say, that section Point, demons, message queue three correspond and mutually indepedent, on the one hand which can monitor corresponding node On the other hand data variation can parse the synchronization message of message queue push, update corresponding node according to the synchronization message Data.
Synchronization message is pushed to the demons of corresponding node by message queue according to preset order, wherein default Sequence can be the sequence of first in first out, is also possible to sequence first-in last-out, can also be the sequence for meeting time window rule And random order, this sequentially can demand according to the actual situation be arbitrarily arranged, the disclosure is not particularly limited.
By present embodiment, distributed multinode deployment, the demons of each node monitor the message queue of oneself, Independent operating and can the database to node location can be written and read.The team for thering is oneself to monitor due to each node Column, so being parallel processing, are independent of each other between node.
In a kind of optional embodiment, in step s 130, by the message queue according to preset order by institute State the demons that synchronization message pushes to corresponding node, further includes:
The synchronization message is pushed to correspondence according to the sequence of first in first out by the message queue by step S1301 The demons of node;
Step S1302 is pushed next in the message queue after the confirmation response for receiving the demons feedback Synchronization message.
Wherein, the synchronization message is pushed to according to the sequence of first in first out by corresponding node by the message queue Demons, to ensure that the order that demons handle synchronization message.
Message server passes through TCP communication agreement or other can ensure that the communication protocol of message reliability is connected to each section The corresponding demons of point, to ensure that the reliability of synchronization message.When message server receives demons feedback After confirmation response, that is to say, that demons, which have been received that the synchronization message or have been successfully processed, finishes the synchronization Message, at this point, message server can be to next synchronization message in the demons PUSH message queue.
It should be noted that each message queue with demons be it is independent of each other, concurrent working is independent of each other.Due to The processing progress of each demons is different, thus each message queue can be in the synchronization message of push it is synchronous, It can be nonsynchronous.
Such as: in message queue 1 and message queue 2 simultaneously store 3 synchronization messages, be respectively synchronization message 0010, Synchronization message 0011, synchronization message 0012.At this point, message queue 1 and message queue 2 are respectively to corresponding node 1 and section After the demons of point 2 have pushed synchronization message 0010, the confirmation response of the demons of node 1 is had received, but not Receive the demons of node 2 confirmation response, at this point, demons from message server control message queue 1 to node 1 after Supervention send next synchronization message 0011, and continues waiting for the confirmation response of the demons of node 2.
Pass through above embodiment, on the one hand, solve synchronous communication by asynchronous communication and make message blocking, performance decline The technical issues of;On the other hand, by confirming that response ensure that the synchronous reliability of data.
In a kind of optional embodiment, in step s 130, by the message queue according to preset order by institute State the demons that synchronization message pushes to corresponding node, further includes:
Step S1303 passes through institute when not receiving the confirmation response of the demons feedback in the second preset duration It states message queue and sends the synchronization message again.
Wherein, when not receiving the confirmation response of the demons feedback in the second preset duration, explanation should at this time Demons do not receive the synchronization message or the demons are not successfully processed the synchronization message, then messaging service Device sends the synchronization message by message queue again.Second preset duration can be configured according to actual needs.
By above embodiment, pass through Retransmission timeout technology, it is ensured that each synchronization message can successfully be located Reason, to further ensure the synchronous reliability of data.
In a kind of optional embodiment, in step s 130, so that the demons of each node are according to institute State the data that synchronization message updates corresponding node, further includes:
Step S1304, so that the demons judge the node identification and corresponding node that the synchronization message includes Whether node identification is identical;
Step S1305, if the node identification of node identification and corresponding node that the synchronization message includes is not identical, The data of corresponding node are updated according to the synchronization message.
Wherein, after demons receive the synchronization message that message queue pushes, the synchronization message is parsed, is obtained The node identification in synchronization message is taken, demons judge the node of node identification and corresponding node in synchronization message Identify whether it is identical, if it is not the same, then showing that the changed data source for including in the synchronization message is not this section Point enables this node quickly to carry out data with other nodes same to update the data of this node according to the synchronization message Step.
Pass through above embodiment, on the one hand, solve synchronous communication by asynchronous communication and make message blocking, performance decline The technical issues of;On the other hand, the delta data of other nodes is quickly recognized by node identification, to reduce to center The dependency degree of node, and it is able to ascend the synchronous efficiency of data;Also on the one hand, since each node is there are finger daemon, one A node failure does not influence other nodes and normally handles, to reduce synchronization failure rate, reduces the complexity of system.
In a kind of optional embodiment, in step s 130, so that the demons of each node are according to institute State the data that synchronization message updates corresponding node, further includes:
Step S1306 loses if the node identification that the synchronization message includes is identical as the node identification of corresponding node The synchronization message is abandoned, and reads next synchronization message.
Wherein, after demons receive the synchronization message that message queue pushes, the synchronization message is parsed, is obtained The node identification in synchronization message is taken, demons judge the node of node identification and corresponding node in synchronization message Identify whether it is identical, if identical, show the changed data source for including in the synchronization message in this node, thus The data of this node are not updated further according to synchronization message repetition, and carries out the reading of next synchronization message.
By above embodiment, the source of delta data is quickly recognized, the data variation for abandoning this node is corresponding Synchronization message, effectively promotion data synchronization efficiency.
In a kind of optional embodiment, synchronization message is to monitor each number of nodes by the demons of each node According to generation when changing.
Wherein, each node is assigned a corresponding demons, which can monitor to be corresponding to it The data of node whether change, if data change, demons will acquire delta data, and obtain node Node identification is to generate synchronization message.
In a kind of optional embodiment, the demons of each node monitor that each node data changes, The following steps are included:
Step S210, when the data of node change, changed data are stored in interim table;
Step S220, demons detect interim table according to the first scheduled duration, obtain changed data.
Wherein, when the data of node change, which records changed data, will be changed Data are stored to interim table, and identify the source Nodes of the data, include a plurality of record in interim table, and each record is expressed as Primary changed data;Demons detect interim table according to the first scheduled duration, obtain send out from interim table in sequence The data for changing generate synchronization message and are sent to message server, and demons should after sending the synchronization message successfully Item record mark is processed, and continues with next record.
By above embodiment, the data modification that demons monitor node is set, and is saved and is occurred by interim table The data of variation realize the read-write operation of each node so that it is guaranteed that demons can be quickly obtained the data variation of node, Effectively promote data synchronization efficiency.
In a kind of optional embodiment, Fig. 2 is that a kind of data of one of disclosure embodiment signal are synchronous The flow chart of method.As shown in Fig. 2, the method for data synchronization of the disclosure comprises the steps of:
Step 1, the demons of node 1 monitor that data variation has occurred in the database of node 1, and node 1 passes through interim Table obtains changed data and the node identification Idc=1 of node 1 generates synchronization message, which includes node Identify Idc=1;
Step 2, synchronization message Idc=1 is sent to message server by TCP connection by the demons of node 1, and The confirmation response of message server feedback is received, to indicate that message server is successfully received synchronization message Idc= 1。
Step 3, synchronization message Idc=1 is distributed to each node pair according to preset routing rule by message server Among the message queue answered, such as: this system includes 3 nodes, and message server is according to preset routing rule by the synchronization Message Idc=1 is distributed among the corresponding message queue of 3 nodes.
When again data variation occurs for node 2, repeat the above steps, message server is according to according to preset routing rule Synchronization message Idc=2 is distributed among the corresponding message queue of each node, message queue is as shown in Fig. 2, include at this time Synchronization message Idc=1 and synchronization message Idc=2, and being stored sequentially among each message queue with first in first out.
Step 4, each message queue guards journey for what synchronization message Idc=1 pushed to each node according to preset order Sequence, demons judge whether the node identification of the node identification of the synchronization message and the node that is corresponding to it is identical.If not phase Together, 350 are thened follow the steps, if identical, thens follow the steps 360.
Step 5, demons obtain the delta data of the synchronization message, update and be saved in the number of corresponding node According in library.Such as in Fig. 2, the demons of node 3 judge the node identification of synchronization message Idc=1 for Idc=1, and it is right therewith The node identification Idc=3 for the node 3 answered is different, obtains the delta data of synchronization message Idc=1, updates and be saved in node In 3 database.
Step 6, demons abandon the synchronization message, and read next synchronization message.Such as: node 1 guards journey Sequence judges that the node identification of synchronization message Idc=1 is identical with the node identification Idc=1 of corresponding node 1 for Idc=1, Synchronization message Idc=1 is abandoned, and reads next synchronization message Idc=2 in message queue.
By above embodiment, the disclosure solve in existing data synchronization scheme it is high to the dependence of central node, The technical problem that system performance expense is big, data synchronization efficiency is low realizes the free read-write operation for guaranteeing each node, has simultaneously Effect is reduced to the higher dependence of central node, reduces system performance expense, and effectively reduces the synchronous failure rate of data, Substantially increase the technical effect of data synchronization efficiency.
In an exemplary embodiment of the disclosure, a kind of data synchronization unit is additionally provided, Fig. 3 is one of disclosure A kind of block diagram of data synchronization unit of embodiment signal, referring to shown in Fig. 3, which includes:
Receiving module 410, for receiving an at least synchronization message, the synchronization message includes node identification;
Distribution module 420, for synchronizing message distribution to the corresponding message queue of each node for described at least one;
The synchronization message is pushed to correspondence according to preset order by the message queue by pushing module 430, user The demons of node, so that the demons of the corresponding node update the data of corresponding node according to the synchronization message.
By above embodiment, the disclosure solve in existing data synchronization scheme it is high to the dependence of central node, The technical problem that system performance expense is big, data synchronization efficiency is low realizes the free read-write operation for guaranteeing each node, has simultaneously Effect is reduced to the higher dependence of central node, reduces system performance expense, and effectively reduces the synchronous failure rate of data, Substantially increase the technical effect of data synchronization efficiency.
In the following, by being described further shown in reference Fig. 3 to the interface control unit in this example embodiment.
Receiving module 410, for receiving an at least synchronization message, the synchronization message includes node identification.
In this illustrative embodiment, message server receives each node or third party system is sent at least One synchronization message, the synchronization message include the data to change, and the data for each node update, in addition, described synchronize disappears Breath also includes node identification, and for identifying the data source to change, which can be any in data synchronous system The node identification of node is also possible to third party system node identification.Such as: 0001 is the node identification of node 1;Xxxx is The node identification of tripartite's section system.
It should be noted that each node refers to that the storage of each offer data in data synchronous system, read-write service Node, such as server-side, service cluster, third party system refer to the system except data synchronous system, update number for providing According to so that each node in data synchronous system carries out, data are synchronous, and the third party system, which can be, has data output work The arbitrary system of energy.
Distribution module 420, for synchronizing message distribution to the corresponding message queue of each node for described at least one.
In this illustrative embodiment, the local third party that either can communicate with it of message server is tieed up Shield has an at least message queue, and the message queue and each node correspond, and in other words, each node is assigned each other Independent message queue.The synchronization message received is distributed to that each node is corresponding to disappear by message server according to preset rules Cease queue.
In a kind of optional embodiment, message server routes to synchronization message respectively according to preset routing rule In the corresponding message queue of a node.Wherein, routing rule can be any Routing Protocol in the prior art, and the disclosure is no longer It repeats.
Pushing module 430, for the synchronization message to be pushed to correspondence according to preset order by the message queue The demons of node, so that the demons of the corresponding node update the data of corresponding node according to the synchronization message.
In this illustrative embodiment, there are a corresponding demons for each node, that is to say, that section Point, demons, message queue three correspond and mutually indepedent, on the one hand which can monitor corresponding node On the other hand data variation can parse the synchronization message of message queue push, update corresponding node according to the synchronization message Data.
Synchronization message is pushed to the demons of corresponding node by message queue according to preset order, wherein default Sequence can be the sequence of first in first out, is also possible to sequence first-in last-out, can also be the sequence for meeting time window rule And random order, this sequentially can demand according to the actual situation be arbitrarily arranged, the disclosure is not particularly limited.
By present embodiment, distributed multinode deployment, the demons of each node monitor the message queue of oneself, Independent operating and can the database to node location can be written and read.The team for thering is oneself to monitor due to each node Column, so being parallel processing, are independent of each other between node.
In a kind of optional embodiment, pushing module 430, further includes:
First push unit (not shown), for will be described according to the sequence of first in first out by the message queue Synchronization message pushes to the demons of corresponding node;
First receiving unit (not shown), after the confirmation response for receiving the demons feedback, push Next synchronization message in the message queue.
Wherein, the synchronization message is pushed to according to the sequence of first in first out by corresponding node by the message queue Demons, to ensure that the order that demons handle synchronization message.
Message server passes through TCP communication agreement or other can ensure that the communication protocol of message reliability is connected to each section The corresponding demons of point, to ensure that the reliability of synchronization message.When message server receives demons feedback After confirmation response, that is to say, that demons, which have been received that the synchronization message or have been successfully processed, finishes the synchronization Message, at this point, message server can be to next synchronization message in the demons PUSH message queue.
It should be noted that each message queue with demons be it is independent of each other, concurrent working is independent of each other.Due to The processing progress of each demons is different, thus each message queue can be in the synchronization message of push it is synchronous, It can be nonsynchronous.
Such as: in message queue 1 and message queue 2 simultaneously store 3 synchronization messages, be respectively synchronization message 0010, Synchronization message 0011, synchronization message 0012.At this point, message queue 1 and message queue 2 are respectively to corresponding node 1 and section After the demons of point 2 have pushed synchronization message 0010, the confirmation response of the demons of node 1 is had received, but not Receive the demons of node 2 confirmation response, at this point, demons from message server control message queue 1 to node 1 after Supervention send next synchronization message 0011, and continues waiting for the confirmation response of the demons of node 2.
Pass through above embodiment, on the one hand, solve synchronous communication by asynchronous communication and make message blocking, performance decline The technical issues of;On the other hand, by confirming that response ensure that the synchronous reliability of data.
In a kind of optional embodiment, pushing module 430, further includes:
Second push unit (not shown), for not receiving the demons feedback in the second preset duration Confirmation response when, the synchronization message is sent by the message queue again.
Wherein, when not receiving the confirmation response of the demons feedback in the second preset duration, explanation should at this time Demons do not receive the synchronization message or the demons are not successfully processed the synchronization message, then messaging service Device sends the synchronization message by message queue again.Second preset duration can be configured according to actual needs.
By above embodiment, pass through Retransmission timeout technology, it is ensured that each synchronization message can successfully be located Reason, to further ensure the synchronous reliability of data.
In a kind of optional embodiment, pushing module 430 is also used to so that the demons judge the synchronization Whether the node identification of node identification and corresponding node that message includes is identical;If the node identification that the synchronization message includes It is not identical as the node identification of corresponding node, then the data of corresponding node are updated according to the synchronization message.
Wherein, after demons receive the synchronization message that message queue pushes, the synchronization message is parsed, is obtained The node identification in synchronization message is taken, demons judge the node of node identification and corresponding node in synchronization message Identify whether it is identical, if it is not the same, then showing that the changed data source for including in the synchronization message is not this section Point enables this node quickly to carry out data with other nodes same to update the data of this node according to the synchronization message Step.
Pass through above embodiment, on the one hand, solve synchronous communication by asynchronous communication and make message blocking, performance decline The technical issues of;On the other hand, the delta data of other nodes is quickly recognized by node identification, to reduce to center The dependency degree of node, and it is able to ascend the synchronous efficiency of data;Also on the one hand, since each node is there are finger daemon, one A node failure does not influence other nodes and normally handles, to reduce synchronization failure rate, reduces the complexity of system.
In a kind of optional embodiment, pushing module 430, for so that each node demons according to The synchronization message updates the data of corresponding node, further includes:
If the node identification that the synchronization message includes is identical as the node identification of corresponding node, the synchronization is abandoned Message, and read next synchronization message.
Wherein, after demons receive the synchronization message that message queue pushes, the synchronization message is parsed, is obtained The node identification in synchronization message is taken, demons judge the node of node identification and corresponding node in synchronization message Identify whether it is identical, if identical, show the changed data source for including in the synchronization message in this node, thus The data of this node are not updated further according to synchronization message repetition, and carries out the reading of next synchronization message.
By above embodiment, the source of delta data is quickly recognized, the data variation for abandoning this node is corresponding Synchronization message, effectively promotion data synchronization efficiency.
In a kind of optional embodiment, synchronization message is to monitor each number of nodes by the demons of each node According to generation when changing.
Wherein, each node is assigned a corresponding demons, which can monitor to be corresponding to it The data of node whether change, if data change, demons will acquire delta data, and obtain node Node identification is to generate synchronization message.
In an exemplary embodiment of the disclosure, a kind of server that can be realized the above method is additionally provided.
Person of ordinary skill in the field it is understood that various aspects of the invention can be implemented as system, method or Program product.Therefore, various aspects of the invention can be embodied in the following forms, it may be assumed that complete hardware embodiment, complete The embodiment combined in terms of full Software Implementation (including firmware, microcode etc.) or hardware and software, can unite here Referred to as circuit, " module " or " system ".
Fig. 4 is a kind of structure chart of server of one of disclosure embodiment signal.It is described referring to Fig. 4 The server 600 of this embodiment according to the present invention.The server 600 that Fig. 4 is shown is only an example, should not be to this The function and use scope of inventive embodiments bring any restrictions.
As shown in figure 4, server 600 is showed in the form of universal computing device.The component of server 600 may include but Be not limited to: at least one above-mentioned processing unit 610, at least one above-mentioned storage unit 620, the different system components of connection (including Storage unit 620 and processing unit 610) bus 630, display unit 640.
Wherein, the storage unit is stored with program code, and said program code can be held by the processing unit 610 Row, so that the processing unit 610 executes the above-mentioned method of data synchronization of the disclosure.
Storage unit 620 may include the readable medium of volatile memory cell form, such as Random Access Storage Unit (RAM) 6201 and/or cache memory unit 6202, it can further include read-only memory unit (ROM) 6203.
Storage unit 620 can also include program/utility with one group of (at least one) program module 6205 6204, such program module 6205 includes but is not limited to: operating system, one or more application program, other program moulds It may include the realization of network environment in block and program data, each of these examples or certain combination.
Bus 630 can be to indicate one of a few class bus structures or a variety of, including storage unit bus or storage Cell controller, peripheral bus, graphics acceleration port, processing unit use any bus structures in a variety of bus structures Local bus.
Server 600 can also be with one or more external equipments 700 (such as keyboard, sensing equipment, bluetooth equipment etc.) Communication, can also be enabled a user to one or more equipment interact with the server 600 communicate, and/or with make the clothes Any equipment (such as router, modem etc. that business device 600 can be communicated with one or more of the other calculating equipment Deng) communication.This communication can be carried out by input/output (I/O) interface 650.Also, server 600 can also pass through net Network adapter 660 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network, such as because Special net) communication.As shown, network adapter 660 is communicated by bus 630 with other modules of server 600.It should be bright It is white, although not shown in the drawings, other hardware and/or software module can be used in conjunction with server 600, including but not limited to: micro- Code, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and data backup Storage system etc..
By above embodiment, the disclosure solve in existing data synchronization scheme it is high to the dependence of central node, The technical problem that system performance expense is big, data synchronization efficiency is low realizes the free read-write operation for guaranteeing each node, has simultaneously Effect is reduced to the higher dependence of central node, reduces system performance expense, and effectively reduces the synchronous failure rate of data, Substantially increase the technical effect of data synchronization efficiency.
In an exemplary embodiment of the disclosure, a kind of computer readable storage medium is additionally provided, energy is stored thereon with Enough realize the program product of this specification above method.In some possible embodiments, various aspects of the invention may be used also In the form of being embodied as a kind of program product comprising program code, when described program product is run on an electronic device, institute Program code is stated for making the electronic equipment execute the above-mentioned method of data synchronization of the disclosure.
Refering to what is shown in Fig. 5, describing the program product for realizing the above method of embodiment according to the present invention 800, can using portable compact disc read only memory (CD-ROM) and including program code, and can in terminal device, Such as it is run on PC.However, program product of the invention is without being limited thereto, in this document, readable storage medium storing program for executing can be with To be any include or the tangible medium of storage program, the program can be commanded execution system, device or device use or It is in connection.
Described program product can be using any combination of one or more readable mediums.Readable medium can be readable letter Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example can be but be not limited to electricity, magnetic, optical, electromagnetic, infrared ray or System, device or the device of semiconductor, or any above combination.The more specific example of readable storage medium storing program for executing is (non exhaustive List) include: electrical connection with one or more conducting wires, portable disc, hard disk, random access memory (RAM), read-only Memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read only memory (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, In carry readable program code.The data-signal of this propagation can take various forms, including but not limited to electromagnetic signal, Optical signal or above-mentioned any appropriate combination.Readable signal medium can also be any readable Jie other than readable storage medium storing program for executing Matter, the readable medium can send, propagate or transmit for by instruction execution system, device or device use or and its The program of combined use.
The program code for including on readable medium can transmit with any suitable medium, including but not limited to wirelessly, have Line, optical cable, RF etc. or above-mentioned any appropriate combination.
The program for executing operation of the present invention can be write with any combination of one or more programming languages Code, described program design language include object oriented program language-Java, C++ etc., further include conventional Procedural programming language-such as " C " language or similar programming language.Program code can be fully in user It calculates and executes in equipment, partly executes on a user device, being executed as an independent software package, partially in user's calculating Upper side point is executed on a remote computing or is executed in remote computing device or server completely.It is being related to far Journey calculates in the situation of equipment, and remote computing device can pass through the network of any kind, including local area network (LAN) or wide area network (WAN), it is connected to user calculating equipment, or, it may be connected to external computing device (such as utilize ISP To be connected by internet).
By above embodiment, the disclosure solve in existing data synchronization scheme it is high to the dependence of central node, The technical problem that system performance expense is big, data synchronization efficiency is low realizes the free read-write operation for guaranteeing each node, has simultaneously Effect is reduced to the higher dependence of central node, reduces system performance expense, and effectively reduces the synchronous failure rate of data, Substantially increase the technical effect of data synchronization efficiency.
Corresponding technical characteristic in the respective embodiments described above do not cause scheme contradiction or it is not implementable under the premise of, can Mutually to use.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) method that executes each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form, all of these belong to the protection of the present invention.

Claims (10)

1. a kind of method of data synchronization, which is characterized in that the described method includes:
An at least synchronization message is received, the synchronization message includes node identification;
By described at least one synchronous message distribution to the corresponding message queue of each node;
The synchronization message is pushed to the demons of corresponding node by the message queue according to preset order, so that institute The demons for stating corresponding node update the data of corresponding node according to the synchronization message.
2. the method as described in claim 1, which is characterized in that described so that the demons of each node are according to The data of synchronization message update corresponding node, comprising:
So that the demons judge node identification that the synchronization message includes and corresponding node node identification whether phase Together;
If the node identification of node identification and corresponding node that the synchronization message includes is not identical, disappeared according to described synchronize Breath updates the data of corresponding node.
3. method according to claim 2, which is characterized in that the method also includes:
If the node identification that the synchronization message includes is identical as the node identification of corresponding node, abandons described synchronize and disappear Breath, and read next synchronization message.
4. the method as described in claim 1, which is characterized in that the synchronization message is monitored by the demons of each node Generation when changing to each node data.
5. method as claimed in claim 4, which is characterized in that the demons of each node monitor each number of nodes According to changing, comprising:
When the data of node change, changed data are stored in interim table;
Demons detect interim table according to the first scheduled duration, obtain changed data.
6. the method as described in claim 1, which is characterized in that it is described will be described according to preset order by the message queue Synchronization message pushes to the demons of corresponding node, further includes:
The synchronization message is pushed to by the message queue according to the sequence of first in first out the demons of corresponding node;
After the confirmation response for receiving the demons feedback, next synchronization message in the message queue is pushed.
7. method as claimed in claim 6, which is characterized in that the method also includes:
When not receiving the confirmation response of the demons feedback in the second preset duration, again by the message queue Send the synchronization message.
8. a kind of data synchronization unit, which is characterized in that described device includes:
Receiving module, for receiving an at least synchronization message, the synchronization message includes node identification;
Distribution module, for synchronizing message distribution to the corresponding message queue of each node for described at least one;
The synchronization message is pushed to keeping for corresponding node according to preset order by the message queue by pushing module, user Program is protected, so that the demons of the corresponding node update the data of corresponding node according to the synchronization message.
9. a kind of server, which is characterized in that the server includes:
Processor;
Memory is connected to the processor, and the memory includes control instruction, is referred to when the processor reads the control When enabling, the method for data synchronization that the server realizes any one of claim 1-7 is controlled.
10. a kind of computer storage medium, which is characterized in that the computer storage medium has one or more programs, described One or more programs are executed by one or more processors, to realize the data side of synchronization of any one of claim 1-7 Method.
CN201811180360.9A 2018-10-10 2018-10-10 Method of data synchronization, device, server and computer storage medium Pending CN109165261A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811180360.9A CN109165261A (en) 2018-10-10 2018-10-10 Method of data synchronization, device, server and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811180360.9A CN109165261A (en) 2018-10-10 2018-10-10 Method of data synchronization, device, server and computer storage medium

Publications (1)

Publication Number Publication Date
CN109165261A true CN109165261A (en) 2019-01-08

Family

ID=64877682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811180360.9A Pending CN109165261A (en) 2018-10-10 2018-10-10 Method of data synchronization, device, server and computer storage medium

Country Status (1)

Country Link
CN (1) CN109165261A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111343277A (en) * 2020-03-04 2020-06-26 腾讯科技(深圳)有限公司 Distributed data storage method, system, computer device and storage medium
CN112202640A (en) * 2020-09-30 2021-01-08 中国工商银行股份有限公司 Monitoring method and device applied to container cloud platform
CN112269337A (en) * 2020-10-21 2021-01-26 深圳昆仑通态科技有限责任公司 Method, system and storage medium for operating SCADA system
CN116414579A (en) * 2023-02-21 2023-07-11 北京友友天宇系统技术有限公司 Method for realizing data consistency among multiple copies based on distributed group communication

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101902473A (en) * 2010-07-22 2010-12-01 武汉中地数码科技有限公司 Method for synchronously updating data based on grid GIS (Geographic Information System)
CN103942110A (en) * 2013-01-17 2014-07-23 腾讯科技(深圳)有限公司 Data sharing and synchronization method and system
CN105162879A (en) * 2015-09-24 2015-12-16 北京奇虎科技有限公司 Method, device and system for realizing data consistency among plurality of machine rooms
CN106528574A (en) * 2015-09-14 2017-03-22 阿里巴巴集团控股有限公司 Data synchronization method and device
CN106657314A (en) * 2016-12-14 2017-05-10 北京奇艺世纪科技有限公司 Cross-data center data synchronization system and method
CN107180116A (en) * 2017-06-28 2017-09-19 努比亚技术有限公司 A kind of data synchronizing processing method, mobile terminal and computer-readable recording medium
CN107590277A (en) * 2017-09-28 2018-01-16 泰康保险集团股份有限公司 Method of data synchronization, device, electronic equipment and storage medium
WO2018046910A1 (en) * 2016-09-06 2018-03-15 Cambridge Communication Systems Limited A node for a communications system
US20180075120A1 (en) * 2013-02-15 2018-03-15 Intuitive Surgical Operations, Inc. Systems and methods for synchronizing nodes of a robotic system
US20180139742A1 (en) * 2016-11-11 2018-05-17 Qualcomm Incorporated Data and control channels in synchronization bursts for millimeter wave new radio
CN108322533A (en) * 2018-01-31 2018-07-24 广州鼎甲计算机科技有限公司 Configuration and synchronization method between distributed type assemblies node based on operation log

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101902473A (en) * 2010-07-22 2010-12-01 武汉中地数码科技有限公司 Method for synchronously updating data based on grid GIS (Geographic Information System)
CN103942110A (en) * 2013-01-17 2014-07-23 腾讯科技(深圳)有限公司 Data sharing and synchronization method and system
US20180075120A1 (en) * 2013-02-15 2018-03-15 Intuitive Surgical Operations, Inc. Systems and methods for synchronizing nodes of a robotic system
CN106528574A (en) * 2015-09-14 2017-03-22 阿里巴巴集团控股有限公司 Data synchronization method and device
CN105162879A (en) * 2015-09-24 2015-12-16 北京奇虎科技有限公司 Method, device and system for realizing data consistency among plurality of machine rooms
WO2018046910A1 (en) * 2016-09-06 2018-03-15 Cambridge Communication Systems Limited A node for a communications system
US20180139742A1 (en) * 2016-11-11 2018-05-17 Qualcomm Incorporated Data and control channels in synchronization bursts for millimeter wave new radio
CN106657314A (en) * 2016-12-14 2017-05-10 北京奇艺世纪科技有限公司 Cross-data center data synchronization system and method
CN107180116A (en) * 2017-06-28 2017-09-19 努比亚技术有限公司 A kind of data synchronizing processing method, mobile terminal and computer-readable recording medium
CN107590277A (en) * 2017-09-28 2018-01-16 泰康保险集团股份有限公司 Method of data synchronization, device, electronic equipment and storage medium
CN108322533A (en) * 2018-01-31 2018-07-24 广州鼎甲计算机科技有限公司 Configuration and synchronization method between distributed type assemblies node based on operation log

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111343277A (en) * 2020-03-04 2020-06-26 腾讯科技(深圳)有限公司 Distributed data storage method, system, computer device and storage medium
CN112202640A (en) * 2020-09-30 2021-01-08 中国工商银行股份有限公司 Monitoring method and device applied to container cloud platform
CN112269337A (en) * 2020-10-21 2021-01-26 深圳昆仑通态科技有限责任公司 Method, system and storage medium for operating SCADA system
CN116414579A (en) * 2023-02-21 2023-07-11 北京友友天宇系统技术有限公司 Method for realizing data consistency among multiple copies based on distributed group communication
CN116414579B (en) * 2023-02-21 2024-05-10 北京友友天宇系统技术有限公司 Method for realizing data consistency among multiple copies based on distributed group communication

Similar Documents

Publication Publication Date Title
CN109165261A (en) Method of data synchronization, device, server and computer storage medium
CN111459763B (en) Cross-kubernetes cluster monitoring system and method
CN110262902B (en) Information processing method and system, medium, and computing device
US10129373B2 (en) Recovery of a network infrastructure to facilitate business continuity
CN109710615A (en) Access management method, system, electronic equipment and the storage medium of database
CN107608710A (en) Software project structure task collocation method and device based on Jenkins instruments
US10652099B2 (en) Site asymmetric topology reconciliation in a computer cluster
JP6279744B2 (en) How to queue email web client notifications
CN110083455A (en) Figure computation processing method, device, medium and electronic equipment
US20230403215A1 (en) Systems and methods of monitoring and controlling remote assets
CN109905286A (en) A kind of method and system of monitoring device operating status
CN112583931A (en) Message processing method, message middleware, electronic device and storage medium
CN108874828A (en) The method and apparatus of Data Migration
CN109144785A (en) Method and apparatus for Backup Data
WO2008091037A1 (en) Realtime unification management information data conversion and monitoring apparatus and method for thereof
CN114089974B (en) Cloud code development system, method, device, equipment and storage medium
CN110399253A (en) Delay machine treating method and apparatus
CN111625949A (en) Simulation engine system, simulation processing method, device and medium
CN114900430A (en) Container network optimization method and device, computer equipment and storage medium
CN109873861A (en) The exchange method and device, storage medium and electronic equipment of transregional piece of chain node
CN111552494B (en) Method, device, system and medium for managing container group
US20220342742A1 (en) Graphical management of big data pipelines
JP6169485B2 (en) Distributed processing system
US11797388B1 (en) Systems and methods for lossless network restoration and syncing
Tu et al. Modeling and reliability evaluation of Avionics Clouds based on AADL and GSPN

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Nanshan District Xueyuan Road in Shenzhen city of Guangdong province 518000 No. 1001 Nanshan Chi Park A7 building 7 floor

Applicant after: Shenzhen euribo Technology Co., Ltd

Address before: Nanshan District Xueyuan Road in Shenzhen city of Guangdong province 518000 No. 1001 Nanshan Chi Park A7 building 7 floor

Applicant before: SHENZHEN ORVIBO TECHNOLOGY Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190108