CN101826073B - Synchronous method, apparatus and system for distributed database - Google Patents

Synchronous method, apparatus and system for distributed database Download PDF

Info

Publication number
CN101826073B
CN101826073B CN 200910037676 CN200910037676A CN101826073B CN 101826073 B CN101826073 B CN 101826073B CN 200910037676 CN200910037676 CN 200910037676 CN 200910037676 A CN200910037676 A CN 200910037676A CN 101826073 B CN101826073 B CN 101826073B
Authority
CN
China
Prior art keywords
node
synchronous operation
centroid
data sync
data base
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN 200910037676
Other languages
Chinese (zh)
Other versions
CN101826073A (en
Inventor
瓦嘎
沙欧
柯仁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN 200910037676 priority Critical patent/CN101826073B/en
Publication of CN101826073A publication Critical patent/CN101826073A/en
Application granted granted Critical
Publication of CN101826073B publication Critical patent/CN101826073B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses synchronous method, apparatus and system for a distributed database. The synchronous method of the distributed database comprises the following steps of: updating a local database of a first node by the first node according to a user request, generating a synchronous operation message and sending the synchronous operation message to a central node; updating a central database by the central node according to the synchronous operation message sent by the first node, generating a data synchronous mark, feeding back the data synchronous mark to the first node and sending the synchronous operation message and the data synchronous mark to the other nodes; and updating the local database of the other nodes by the other nodes according to the synchronous operation message. By adopting the embodiment of the invention, the data synchronization of the distributed database is more reliable and more effective.

Description

Distributed data base method for synchronous, equipment and system
Technical field
The present invention relates to database technology, relate in particular to a kind of distributed data base method for synchronous, equipment and system.
Background technology
Distributed data base system is formed by several station set.These stations are called node or agency (Agent) again, and they are linked together in communication network.Each node is an independent database system, comprises database, CPU (central processing unit), terminal and the local data base management system (local DBMS) of oneself.Distributed data base system can be regarded as the associating of a series of centralized data base system, logically belongs to same system, but is distributed in physical arrangement.Angle from the user, a distributed data base system is logically the same with the centralized data base system, the user can carry out global application in any one LAN (Local Area Network), is to be stored on same the computing machine just as those data, and is the same by a database system management.
For guaranteeing that the user can carry out local control at local typing, inquiry or maintenance data base, must guarantee data data sync reliable in real time between each node under distributed data base system, make data consistent in the total system.
The method for synchronous that existing a kind of off-line that is applied to the master-slave mode pattern database copies, master data base is by the standby server that copies to of asynchronous (non real-time) in the master-slave mode pattern.Master slave mode is active/standby mode, and main equipment externally provides service, and stand-by equipment provides backup; When main equipment was unusual, stand-by equipment transfers main equipment to provided service, and original main equipment transfers stand-by equipment to.Existing another kind is applied to the online method for synchronous that copies of master-slave mode pattern database, and master data base is by the standby server that copies to of synchronously (in real time).Existing another kind is applied to the method for synchronous of distributed cache, and the Data Update broadcasting in the central server sends the cache manger of each node to, and these nodes upgrade local cache manger according to latest data.
The inventor finds in realizing process of the present invention, existing database synchronization method only can be applied to be synchronized to standby server from master server, perhaps be synchronized to the special circumstances of user's side cache manger (user's side high-speed cache is read-only type) from master server, can not be applied to the distributed data base of general mode.Namely do not have a kind of be applied to non-master-slave mode, non-high-speed cache reliably, method for synchronous efficiently, make each internodal data consistent, complete on the common distributed data base.
Summary of the invention
The technical matters that the embodiment of the invention solves is to have proposed a kind of distributed data base method for synchronous, equipment and system, makes each internodal data consistent, complete on the common distributed data base.
In order to reach above-mentioned technique effect, a kind of distributed data base method for synchronous of the embodiment of the invention, this method comprises:
Centroid receives the synchronous operation message that first node sends, and described synchronous operation message generates after to be described first node according to the user ask to upgrade the local data base of this first node; Described Centroid is according to the central database of described this Centroid of synchronous operation information updating, and sends described synchronous operation message to described other node; So that described other node is according to the local data base of described this other node of synchronous operation information updating;
Described method further comprises:
Described Centroid generates and preserves the data sync sign according to the synchronous operation message of described reception, and described data sync sign is corresponding one by one with described synchronous operation message;
Described Centroid sends to described first node and described other node with described data sync sign, and described first node and described other node receive and preserve described data sync sign;
The difference of the number that described first node or described other node calculate the data sync sign that described first node or other node preserve in particular moment number and the data sync that described Centroid is preserved identify;
If the described difference that calculates is more than or equal to predetermined threshold value, then described first node or described other node upgrade the local data base of described first node or described other node according to the total data of the central database of described Centroid.
Accordingly, the embodiment of the invention also proposes a kind of node for distributed data base, and described node comprises:
First receiving element is used for receiving user's request;
First updating block is connected with described first receiving element, is used for asking to upgrade local data base according to described user, and generates synchronous operation message;
First transmitting element is connected with described first updating block, is used for that described synchronous operation message is sent to Centroid and handles synchronously;
Second receiving element is used for synchronous operation message and/or data sync sign that the receiving center node sends;
Second updating block is connected with described second receiving element, is used for according to the described local data base of described synchronous operation information updating;
Preserve identify unit, be connected with described second receiving element, be used for preserving described data sync sign;
Computing unit is connected with described preservation identify unit, and the data sync of preserving in being used for calculating data sync sign number that described node preserves and described Centroid in particular moment identifies the difference of number;
Judging unit is used for judging whether the difference that described computing unit calculates is greater than or equal to a threshold value;
Repair the unit, when the judged result of described judging unit when being, then upgrade the local data base of described node according to the total data of the central database of described Centroid;
Accordingly, the embodiment of the invention also proposes the Centroid for distributed data base, and described Centroid comprises:
Central authorities' receiving element is used for receiving the synchronous operation message that first node sends;
Central authorities' updating block is connected with described central receiving element, be used for according to described synchronous operation information updating central database, and generation and described synchronous operation message one to one data sync identify;
Central authorities' transmitting element, be connected with described central updating block, be used for giving described first node with described data sync identification feedback, and described synchronous operation message and described data sync sign sent to other node, so that described first node or other node calculate the difference that the data sync of preserving in the described node identifies the data sync sign number of preserving in number and the described Centroid in particular moment, if the described difference that calculates is more than or equal to predetermined threshold value, then described first node or described other node upgrade the local data base of described first node or described other node according to the total data of the central database of described Centroid.
The embodiment of the invention also proposes a kind of distributed data base synchro system, and this system comprises the Centroid that disposes central database, disposes at least two nodes of local data base, wherein:
First node, the local data base according to the user asks to upgrade this first node generates synchronous operation message, and described synchronous operation message is sent to described Centroid;
Described Centroid, according to described synchronous operation information updating central database, and generation and described synchronous operation message data sync sign one to one, give described first node with described data sync identification feedback, and described synchronous operation message and described data sync sign are sent to other node;
Described other node is according to the local data base of described this other node of synchronous operation information updating;
The difference of the number that the number that described first node or described other node are further used for calculating the data sync sign that described first node or other node preserve in particular moment and the data sync that described Centroid is preserved identify; If the described difference that calculates is more than or equal to predetermined threshold value, then described first node or described other node upgrade the local data base of described first node or described other node according to the total data of the central database of described Centroid.
By implementing distributed data base method for synchronous, equipment and the system of the embodiment of the invention, the node of one of them node is by sending to Centroid with synchronous operation message, and by Centroid described synchronous operation message is sent to other node, described Centroid and other node carry out database update according to described synchronous operation message, make the database of all nodes of whole distributed data base system keep consistency, realize the data sync of distributed data base system, and improved reliability and the high efficiency of distributed data base data sync.
Description of drawings
Fig. 1 is the message flow chart of a kind of distributed data base method for synchronous of the embodiment of the invention;
Fig. 2 is the message flow chart of a kind of distributed data base method for synchronous of the embodiment of the invention;
Fig. 3 is a kind of node structure synoptic diagram for distributed data base of the embodiment of the invention;
Fig. 4 is a kind of Centroid structural representation for distributed data base of the embodiment of the invention;
Fig. 5 is a kind of distributed data base synchronous system architecture synoptic diagram of the embodiment of the invention.
Embodiment
Below in conjunction with accompanying drawing the preferred embodiments of the present invention are described.
Distributed data base in the various embodiments of the present invention comprises a Centroid, this Centroid disposes central database, and another one or a plurality of node, each node comprises (perhaps disposing) local data base, is example with first node and other node hereinafter.
In the specific embodiment, provide a kind of distributed data base method for synchronous, this method comprises: first node generates synchronous operation message, and this synchronous operation message is sent to Centroid according to the local data base that the user asks to upgrade this first node; The synchronous operation information updating central database that this Centroid sends according to this first node, and generate the data sync sign, give this first node with this data sync identification feedback, and this synchronous operation message and data sync sign are sent to other node; This other node is according to the local data base of this this other node of synchronous operation information updating; This Centroid generates and preserves the data sync sign according to the synchronous operation message of this reception, and this data sync sign is corresponding one by one with this synchronous operation message; This Centroid sends to this first node and this other node with this data sync sign, and this first node and this other node receive and preserve this data sync sign; The difference of the number that this first node or this other node calculate the data sync sign that this first node or other node preserve in particular moment number and the data sync that this Centroid is preserved identify; If this difference that calculates is more than or equal to predetermined threshold value, then this first node or this other node upgrade the local data base of this first node or this other node according to the total data of the central database of this Centroid.
As shown in Figure 1, be the message flow chart of another distributed data base method for synchronous embodiment.In this method for synchronous, comprising:
Step S01: receive the update request that the user sends.
Step S02: (Database DB), and generates synchronous operation (Synchronization Operation, SYNC OP) message to upgrade local data base according to this user's update request.
Step S03: this synchronous operation message SYNC OP is sent to Centroid.
Step S04: the synchronous operation message SYNC OP that Centroid sends according to this first node upgrades the central database of this Centroid, generates data sync sign (Synchronization Identification, SYNC ID).For example, this data sync sign can be SYN, and other embodiment is not limited thereto certainly.
Step S05: this Centroid is preserved synchronous operation message and data sync sign.
Concrete, Centroid can be saved in this synchronous operation message SYNC OP and this data sync sign SYNC ID in the synchronous operation tabulation (SYNC HIST) one to one.
Step S06: Centroid feeds back to this first node with this data sync sign SYNC ID.
Step S07, first node receive this data sync sign SYNC ID, and this data sync sign is kept in the local data base.
Step S08: this Centroid sends to other node with this synchronous operation message SYNC OP and this data sync sign SYNC OP.
Step S09: other node receives synchronous operation message SYNC OP and this data sync sign SYNC ID that this Centroid sends, according to this synchronous operation information updating local data base;
Step S10: other node is preserved this data sync sign that receives.
By implementing the distributed data base method for synchronous of the embodiment of the invention, one of them node is by sending to Centroid with local synchronous operation message, and by Centroid synchronous operation message is sent to other nodes, Centroid and other nodes carry out database update according to synchronous operation message, make the database of all nodes of whole distributed data base system keep consistency, realize the data sync of distributed data base system, and improved reliability and the high efficiency of distributed data base data sync.This method for synchronous makes the distributed data base under non-master-slave mode, the non-high-speed cache situation can carry out reliable data sync.
In a certain particular moment, for example when distributed data base system starts, and/or system starts the back every a time period (this time period can be fixed or change), the difference of the number that the number that each node in this distributed data base system (for example first node or other node) calculates the data sync sign that this Centroid preserves and the data sync that this node (first node or other node) is preserved identify; And judge whether this difference is greater than or equal to a threshold value, if this difference is greater than or equal to this threshold value, upgrade the local data base of this node (first node or other node) according to the total data of the central database of this Centroid.If this difference is less than this threshold value, then determine this first node or this other node with respect to the data sync sign of this Centroid disappearance, and according to other the local data base of node of corresponding this first node of synchronous operation information updating of the data sync sign of this disappearance or this.If this difference is less than this threshold value, this first node or this other node can not process yet.
As shown in Figure 2, the concrete steps of above-mentioned treatment scheme are as follows:
Step S21: a node in the distributed data base system obtains the number information of the data sync sign of Centroid;
Step S22: the difference of the number of the number of the data sync sign that this node computing center node is preserved and the data sync sign that this node is preserved.
For example, this node has comprised 4 subsynchronous operations from the synchronous operation tabulation that Centroid obtains, and the data sync sign is respectively 1,2,3,4.But the historical synchronous operation information that this node is preserved has twice synchronous operation, and local sync id is respectively 1,2.By calculating, the data sync sign of Centroid is 2 with the local sync id difference of this node, that is: Centroid and this node have not success synchronously of twice operation, and the data of Centroid and this node are inconsistent.
Step S23: this node judges whether this difference is greater than or equal to a threshold value, if, execution in step 24; Otherwise execution in step 25.
For example, if this threshold value is 2, difference 2 equals this threshold value 2 in the example of above-mentioned S22, and then execution in step 24.For example, if this threshold value is 3, difference 2 is less than this threshold value 3 in the example of above-mentioned S22, and then execution in step 25.
This threshold value is the predefined value of system, can be 2,3,4 or 5, and perhaps other numerical value is good with the net synchronization capability that keeps distributed operating system preferably.
Step S24: the data that this node obtains the central database of complete Centroid are replaced the local data base of this node;
Step S25: this node is according to the local data base of corresponding this node of synchronous operation information updating of the data sync sign of this disappearance.
Alternatively, if this difference less than this threshold value, also can adopt the method that does not process.
Concrete, this can comprise according to this first node of synchronous operation information updating of the data sync sign correspondence of disappearance or the local data base of this other node: inquire about the synchronous operation tabulation of preserving on this Centroid, the data sync of obtaining this disappearance from this Centroid identifies corresponding synchronous operation message, according to this this first node of synchronous operation information updating that obtains or the local data base of this other node.
By implementing the distributed data base method for synchronous of the embodiment of the invention, one of them node is by sending to Centroid with local synchronous operation message, and by Centroid synchronous operation message is sent to other node, Centroid and other node carry out database update according to synchronous operation message, make the database of all nodes of whole distributed data base system keep consistency, realize the data sync of distributed data base system, and improved reliability and the high efficiency of distributed data base data sync.This method for synchronous makes the distributed data base under non-master-slave mode, the non-high-speed cache situation can carry out reliable data sync.By the method for above-mentioned data sync, each node in the distributed data base system can carry out Data Update automatically, and only upgrades processing satisfying under the certain condition, has further improved the efficient of the data sync of common distributed data base.
Need to prove, the distributed data base method for synchronous that the invention described above embodiment proposes can pass through computer program, sequence of computer instructions or programmable logic device (PLD) programming to be realized, this program can be saved on the storage medium, for example CD or disk, hard disk, and the storage medium that can know of any other those skilled in the art, as flash memory etc.In other embodiment, also can be realized by hardware.
Accordingly, the embodiment of the invention also proposes the node in a kind of distributed data base, and its structural representation as shown in Figure 3.
This node comprises:
First receiving element 31 is used for receiving user's request;
First updating block 32, the user who receives according to first receiving element 31 asks to upgrade local data base, and generates synchronous operation message;
First transmitting element 33, the synchronous operation message that first updating block 32 is generated sends to Centroid and handles synchronously.
Second receiving element 41 is used for synchronous operation message and/or data sync sign that the receiving center node sends;
Second updating block 42 is used for the local data base according to this node of synchronous operation information updating of these second receiving element, 41 receptions;
Preserve identify unit 43, be used for preserving this data sync sign.
This computing unit 44, the data sync of preserving for this node of calculating identifies the difference that the data sync of preserving in number and this Centroid identifies number;
Judging unit 45 is used for judging whether the difference that this computing unit 44 calculates is greater than or equal to a threshold value;
Repair unit 46, when judged result when being, then upgrade the local data base of this node according to the total data of the central database of this Centroid;
In other embodiment, this reparation unit 46 can be further used for when the judged result of this judging unit for not the time, determine that this node is with respect to the data sync sign of this Centroid disappearance, and according to the local data base of corresponding this node of synchronous operation information updating of the data sync of this disappearance sign, perhaps, do not process.
Correspondingly, the embodiment of the invention also proposes a kind of Centroid of distributed data base, and its structural representation as shown in Figure 4.
This Centroid comprises:
Central authorities' receiving element 51 is used for receiving the synchronous operation message that first node sends;
Central authorities' updating block 52 is used for the synchronous operation information updating central database that receives according to this central authorities' receiving element 51, and generate with this synchronous operation message one to one data sync identify;
Central authorities' transmitting element 53, the data sync identification feedback that is used for should central authorities' updating block 52 generating is given first node, and this synchronous operation operation information and this data sync sign sent to other node, so that this first node and other node carry out the synchronous processing shown in the aforementioned method for synchronous.The processing of this first node and other node can not given unnecessary details at this with reference to figure 1, Fig. 2 and explanation thereof.
In the concrete embodiment, Centroid can comprise synchronous operation tabulation 54, preserve this synchronous operation message and with this synchronous operation message data sync sign one to one.
Correspondingly, the embodiment of the invention also proposes a kind of distributed data base synchro system, and this system comprises the central database that disposes Centroid, at least two local data bases that dispose node.
This distributed data base synchro system as shown in Figure 5 comprises a Centroid, and this Centroid disposes central database, and another one or a plurality of node, each node or dispose local data base.Other present embodiment is example with two nodes, wherein,
First node 62 generates synchronous operation message, and this synchronous operation message is sent to Centroid 61 according to the local data base that the user asks to upgrade this first node; The synchronous operation information updating central database that Centroid 61 sends according to first node 62, and generate with this synchronous operation message one to one data sync identify, give first node 62 with this data sync identification feedback, and this synchronous operation message and data sync sign are sent to other node 63; Other node 63 is according to the local data base of this other node of synchronous operation message; The difference of the number that the number that this first node 62 or this other node 63 are further used for calculating the data sync sign that this first node 62 or other node 63 preserve in particular moment and the data sync that this Centroid 61 is preserved identify; If this difference that calculates is more than or equal to predetermined threshold value, then this first node 62 or this other node 63 upgrade the local data base of this first node 62 or this other node 63 according to the total data of the central database of this Centroid.
The first node 62 that comprises in the above-mentioned distributed data base synchro system or the embodiment of other node 63 can be with reference to figure 3, Fig. 4 and explanations thereof, and the embodiment of Centroid 61 can not give unnecessary details at this with reference to figure 6 and explanation thereof.
Above-mentioned distributed data base synchro system when using, can carry out earlier figures 1, Fig. 2 with and the method for data synchronization of explanation, do not give unnecessary details at this yet.
One of ordinary skill in the art will appreciate that some or all of module among the embodiment of above-mentioned distributed data base method for synchronous, equipment and system or the division of unit only are for example, can carry out different combinations or thinner division.Some or all of module wherein or unit can be hardware, software, perhaps are the combination of software and hardware.The part of being finished by software can be stored in the computer read/write memory medium, and this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, the storage medium of this program can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
By implementing distributed data base method for synchronous, equipment and the system of the embodiment of the invention, node can carry out synchronously Centroid, and the while Centroid also can carry out synchronously node, but two-way synchronisation measures makes the more efficient synchronously of distributed data base.In another specific embodiment, the distributed data base node regularly carries out the database reparation, further improves the comprehensive and reliability of data sync.
What more than disclose only is a kind of preferred embodiment of the embodiment of the invention, can not limit interest field of the present invention with this, the equivalent variations of doing according to this content of claim of the present invention all is apparent to those skilled in the art, still belongs to institute of the present invention covering scope.

Claims (13)

1. a distributed data base method for synchronous is applied to distributed data base system, and this system comprises Centroid, first node and at least one other node, it is characterized in that,
Centroid receives the synchronous operation message that first node sends, and described synchronous operation message generates after to be described first node according to the user ask to upgrade the local data base of this first node; Described Centroid is according to the central database of described this Centroid of synchronous operation information updating, and sends described synchronous operation message to described other node; So that described other node is according to the local data base of described this other node of synchronous operation information updating;
Described method further comprises:
Described Centroid generates and preserves the data sync sign according to the synchronous operation message of described reception, and described data sync sign is corresponding one by one with described synchronous operation message;
Described Centroid sends to described first node and described other node with described data sync sign, and described first node and described other node receive and preserve described data sync sign;
The difference of the number that described first node or described other node calculate the data sync sign that described node preserves in particular moment number and the data sync that described Centroid is preserved identify;
If the described difference that calculates is more than or equal to predetermined threshold value, then described first node or described other node upgrade the local data base of described first node or described other node according to the total data of the central database of described Centroid.
2. the method for claim 1 is characterized in that, this method further comprises:
If the described difference that calculates is less than described predetermined threshold value, then determine described first node or described other node with respect to the data sync sign of described Centroid disappearance, and according to the corresponding described first node of synchronous operation information updating of the data sync sign of described disappearance or described other the local data base of node.
3. the method for claim 1 is characterized in that, this method further comprises:
If the described difference that calculates is less than described predetermined threshold value, then described first node or described other node do not process.
4. method as claimed in claim 2 is characterized in that:
Described Centroid generates and preservation data sync sign comprises: described Centroid generates the data sync sign, and described synchronous operation message and described data sync sign are tabulated to be saved in synchronous operation correspondingly;
Described data sync according to disappearance identifies the corresponding described first node of synchronous operation information updating or the local data base of described other node comprises: inquire about the synchronous operation tabulation of preserving on the described Centroid, the data sync of obtaining described disappearance from described Centroid identifies corresponding synchronous operation message, according to this described first node of synchronous operation information updating that obtains or the local data base of described other node.
5. as any one described method among the claim 1-4, it is characterized in that, describedly be included in when starting in particular moment, perhaps when section at regular intervals.
6. the node in the distributed data base system is characterized in that described node comprises:
First receiving element is used for receiving user's request;
First updating block is connected with described first receiving element, is used for asking to upgrade local data base according to described user, and generates synchronous operation message;
First transmitting element is connected with described first updating block, is used for that described synchronous operation message is sent to Centroid and handles synchronously;
Second receiving element is used for synchronous operation message and/or data sync sign that the receiving center node sends;
Second updating block is connected with described second receiving element, is used for according to the described local data base of described synchronous operation information updating;
Preserve identify unit, be connected with described second receiving element, be used for preserving described data sync sign;
Computing unit is connected with described preservation identify unit, and the data sync of preserving in being used for calculating data sync sign number that described node preserves and described Centroid in particular moment identifies the difference of number;
Judging unit is used for judging whether the difference that described computing unit calculates is greater than or equal to a threshold value;
Repair the unit, when the judged result of described judging unit when being, then upgrade the local data base of described node according to the total data of the central database of described Centroid;
Wherein,
Described data sync sign is generated by the synchronous operation message of described Centroid according to described reception, and described data sync sign is corresponding one by one with described synchronous operation message.
7. node according to claim 6 is characterized in that,
Described reparation unit, be further used for when the judged result of described judging unit for not the time, determine that described node is with respect to the data sync sign of described Centroid disappearance, and according to the local data base of the corresponding described node of synchronous operation information updating of the data sync of described disappearance sign, perhaps, do not process.
8. Centroid that is used for distributed data base system is characterized in that described Centroid comprises:
Central authorities' receiving element is used for receiving the synchronous operation message that first node sends;
Central authorities' updating block is connected with described central receiving element, be used for according to described synchronous operation information updating central database, and generation and described synchronous operation message one to one data sync identify;
Central authorities' transmitting element, be connected with described central updating block, be used for giving described first node with described data sync identification feedback, and described synchronous operation message and described data sync sign sent to other node, so that described first node or other node calculate the difference that the data sync of preserving in the described node identifies the data sync sign number of preserving in number and the described Centroid in particular moment, if the described difference that calculates is more than or equal to predetermined threshold value, then described first node or described other node upgrade the local data base of described first node or described other node according to the total data of the central database of described Centroid.
9. a kind of Centroid for distributed data base system as claimed in claim 8 is characterized in that described Centroid also comprises:
Synchronous operation tabulation is connected with described central updating block, be used for preserving described synchronous operation message and with described synchronous operation message one to one data sync identify.
10. a distributed data base system is characterized in that, this system comprises the Centroid that disposes central database, disposes first node and other node of local data base, wherein:
First node, the local data base according to the user asks to upgrade this first node generates synchronous operation message, and described synchronous operation message is sent to described Centroid;
Described Centroid, according to described synchronous operation information updating central database, and generation and described synchronous operation message data sync sign one to one, give described first node with described data sync identification feedback, and described synchronous operation message and described data sync sign are sent to other node;
Described other node is according to the local data base of described this other node of synchronous operation information updating;
The difference of the number that the number that described first node or described other node are further used for calculating the data sync sign that described node preserves in particular moment and the data sync that described Centroid is preserved identify; If the described difference that calculates is more than or equal to predetermined threshold value, then described first node or described other node upgrade the local data base of described first node or described other node according to the total data of the central database of described Centroid.
11. system as claimed in claim 10 is characterized in that, described first node comprises:
First receiving element is used for receiving user's request;
First updating block is connected with described first receiving element, is used for asking to upgrade first database according to described user, and generates synchronous operation message;
First transmitting element is connected with described first updating block, is used for that described synchronous operation message is sent to Centroid and handles synchronously;
Second receiving element is used for synchronous operation message and/or data sync sign that the receiving center node sends;
Second updating block is connected with described second receiving element, is used for according to the described local data base of described synchronous operation information updating;
Preserve identify unit, be connected with described second receiving element, be used for preserving described data sync identification nodes;
Computing unit is connected with described preservation identify unit, and the data sync of preserving in being used for calculating data sync sign number that described node preserves and described Centroid in particular moment identifies the difference of number;
Judging unit is used for judging whether the difference that described computing unit calculates is greater than or equal to a threshold value;
Repair the unit, when the judged result of described judging unit when being, then upgrade the local data base of described node according to the total data of the central database of described Centroid.
12. system according to claim 11, it is characterized in that, described reparation unit, be further used for when the judged result of described judging unit for not the time, determine that described node is with respect to the data sync sign of described Centroid disappearance, and according to the local data base of the corresponding described node of synchronous operation information updating of the data sync of described disappearance sign, perhaps, do not process.
13. system as claimed in claim 10 is characterized in that, described Centroid comprises:
Central authorities' receiving element is used for receiving the synchronous operation message that described first node sends;
Central authorities' updating block is connected with described central receiving element, be used for according to described synchronous operation information updating central database, and generation and described synchronous operation message one to one data sync identify;
Central authorities' transmitting element is connected with described central updating block, is used for giving described first node with described data sync identification feedback, and described synchronous operation message and described data sync identified sends to described other node and handle synchronously.
CN 200910037676 2009-03-06 2009-03-06 Synchronous method, apparatus and system for distributed database Active CN101826073B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200910037676 CN101826073B (en) 2009-03-06 2009-03-06 Synchronous method, apparatus and system for distributed database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200910037676 CN101826073B (en) 2009-03-06 2009-03-06 Synchronous method, apparatus and system for distributed database

Publications (2)

Publication Number Publication Date
CN101826073A CN101826073A (en) 2010-09-08
CN101826073B true CN101826073B (en) 2013-08-28

Family

ID=42689992

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200910037676 Active CN101826073B (en) 2009-03-06 2009-03-06 Synchronous method, apparatus and system for distributed database

Country Status (1)

Country Link
CN (1) CN101826073B (en)

Families Citing this family (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102142008B (en) * 2010-12-02 2013-04-17 华为技术有限公司 Method and system for implementing distributed memory database, token controller and memory database
CN102265277B (en) * 2011-06-01 2014-03-05 华为技术有限公司 Operation method and device for data memory system
CN102402600B (en) * 2011-11-18 2013-07-31 国电南瑞科技股份有限公司 Asynchronous collecting method for maintaining consistency of database replicas
CN102693324B (en) * 2012-01-09 2015-03-18 西安电子科技大学 Distributed database synchronization system, synchronization method and node management method
CN102638584B (en) * 2012-04-20 2014-11-19 青岛海信传媒网络技术有限公司 Data distributing and caching method and data distributing and caching system
CN103795754B (en) * 2012-10-31 2017-08-25 中国电信股份有限公司 Method of data synchronization and system between multisystem
CN103838757B (en) 2012-11-26 2017-06-09 腾讯科技(深圳)有限公司 To the processing system and method for the relation chain data long of user
CN103902617B (en) * 2012-12-28 2017-06-09 华为技术有限公司 Distributed data base synchronous method and system
CN103501337B (en) * 2013-09-29 2017-05-10 北大医疗信息技术有限公司 Multi-grade data node updating and synchronizing system and method
CN104079623B (en) * 2014-05-08 2018-03-20 深圳市中博科创信息技术有限公司 Multistage cloud storage synchronisation control means and system
CN104281643A (en) * 2014-08-12 2015-01-14 广州华多网络科技有限公司 Service data storage method, service machine and storage machine
CN105511808B (en) * 2015-12-01 2019-12-17 腾讯科技(深圳)有限公司 Data operation method, system and related device
CN106101229B (en) * 2016-06-15 2019-12-13 北京众享比特科技有限公司 Data synchronization network and method
CN107528816B (en) * 2016-06-22 2021-05-18 中兴通讯股份有限公司 Processing method, management system and server of ID in distributed database
CN106169964B (en) * 2016-09-28 2019-05-07 杭州迪普科技股份有限公司 Network equipments configuration synchronous method and device
CN107066570A (en) * 2017-04-07 2017-08-18 聚好看科技股份有限公司 Data managing method and device
CN107301196A (en) * 2017-05-03 2017-10-27 北京小度信息科技有限公司 Method of data synchronization, device, equipment and monitoring server
CN107332876B (en) * 2017-05-31 2020-05-08 深圳前海微众银行股份有限公司 Method and device for synchronizing block chain state
CN109032654B (en) * 2017-06-08 2022-06-07 北京京东尚科信息技术有限公司 Method and apparatus for configuring parameters in server, server and storage medium
CN107070753A (en) * 2017-06-15 2017-08-18 郑州云海信息技术有限公司 A kind of data monitoring method of distributed cluster system, apparatus and system
CN108055345A (en) * 2017-12-26 2018-05-18 天闻数媒科技(北京)有限公司 A kind of resource synchronization method, distributed apparatus and central apparatus
CN108959548B (en) * 2018-07-02 2023-04-18 创新先进技术有限公司 Service request processing method and device
CN109710427A (en) * 2018-12-26 2019-05-03 苏州沁游网络科技有限公司 A kind of information processing method, system and server
CN114466067B (en) * 2021-12-21 2023-08-04 天翼云科技有限公司 Data migration method and device and electronic equipment
CN115086065B (en) * 2022-07-12 2024-01-19 北斗星通智联科技有限责任公司 Block chain-based data synchronization method and device, electronic equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6438563B1 (en) * 1998-11-27 2002-08-20 Nec Corporation Method and device for synchronizing databases in a network management system
CN101038591A (en) * 2007-04-11 2007-09-19 华为技术有限公司 Method and system for synchronizing data base
CN101308513A (en) * 2008-06-27 2008-11-19 福建星网锐捷网络有限公司 Distributed system cache data synchronous configuration method and apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6438563B1 (en) * 1998-11-27 2002-08-20 Nec Corporation Method and device for synchronizing databases in a network management system
CN101038591A (en) * 2007-04-11 2007-09-19 华为技术有限公司 Method and system for synchronizing data base
CN101308513A (en) * 2008-06-27 2008-11-19 福建星网锐捷网络有限公司 Distributed system cache data synchronous configuration method and apparatus

Also Published As

Publication number Publication date
CN101826073A (en) 2010-09-08

Similar Documents

Publication Publication Date Title
CN101826073B (en) Synchronous method, apparatus and system for distributed database
CN106789362B (en) Equipment management method and network management system
CN103117901B (en) A kind of distributed heartbeat detection method, Apparatus and system
CN110995513B (en) Data sending and receiving method in Internet of things system, internet of things equipment and platform
CN107623703B (en) Synchronization method, device and system for Global Transaction Identifier (GTID)
CN101741635B (en) Method, system and device for synchronous altering message
CN102402441A (en) System and method for configuring multiple computers
CN104750738B (en) A kind of method for updating the data information, back end, management node and system
CN103944974A (en) Method for processing protocol messages, method for processing faults of controllers and related device
CN105007193A (en) Multi-layer information processing method, system thereof and cluster management node
CN102710438B (en) Node management method, device and system
CN112351068A (en) Information synchronization method, system, device, computer equipment and storage medium
CN110083504B (en) Running state monitoring method and device for distributed tasks
CN106911769B (en) Cloud platform routing data processing method and physical server of cloud platform
US20220166842A1 (en) Data distribution method and electronic device
CN114285695B (en) Communication method, device, apparatus, system and storage medium
US9767023B2 (en) Method of controlling data writing to persistent storage device
CN113268540A (en) Data synchronization method and device
CN105323271A (en) Cloud computing system, and processing method and apparatus thereof
CN107547605A (en) A kind of message reading/writing method and node device based on node queue
CN105511808A (en) Data operation method, system and related device
CN113676353B (en) Control method and device of equipment, storage medium and electronic device
US11381642B2 (en) Distributed storage system suitable for sensor data
JP2012128567A (en) Integrated simulation system and integrated simulation synchronization control method
CN105721531A (en) Message synchronization method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant