CN104394195A - Data updating method and device - Google Patents
Data updating method and device Download PDFInfo
- Publication number
- CN104394195A CN104394195A CN201410606041.5A CN201410606041A CN104394195A CN 104394195 A CN104394195 A CN 104394195A CN 201410606041 A CN201410606041 A CN 201410606041A CN 104394195 A CN104394195 A CN 104394195A
- Authority
- CN
- China
- Prior art keywords
- new data
- node
- version number
- overall version
- reception
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/2053—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
- G06F11/2056—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/2053—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
- G06F11/2056—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring
- G06F11/2082—Data synchronisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/30—Definitions, standards or architectural aspects of layered protocol stacks
- H04L69/32—Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
- H04L69/322—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
- H04L69/329—Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the application layer [OSI layer 7]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Quality & Reliability (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a data updating method and device, and belongs to the technical field of a computer. The method comprises the following steps: a node receives first updating data sent from an external host and records a receiving moment of the first updating data; according to the receiving moment, a first global version number of the first updating data is generated; according to the first global version number, an updating sequence of the first updating data is determined; and other nodes are notified to execute an updating operation to the first updating data in the updating sequence. A problem of low efficiency in sending the updating data to each slave node through the main node due to low processing capacity of the main node is solved, and an effect on improving the updating efficiency of the updating data is achieved.
Description
Technical field
The present invention relates to field of computer technology, particularly a kind of data-updating method and device.
Background technology
Distributed system generally includes several memory devices, and each memory device comprises several nodes, stores identical data in each node.When some nodes receive more new data time, need will upgrade data syn-chronization in all nodes of same memory device.
A kind of data-updating method that prior art provides comprises: all nodes in distributed system elect a host node, are defined as from node by the node except host node; When several from node receive more new data time, will more new data send to host node; Host node is to the renewal data genaration received overall version number at every turn, and the genesis sequence according to overall version number will more send to each from node by new data successively.Wherein, overall version number comprises host node mark and host node receives the order of more new data.
Inventor is realizing in process of the present invention, finds at least there is following defect in prior art: need will more send to each from node by new data by host node from node, when the disposal ability of host node is lower, cause the renewal efficiency of data lower.
Summary of the invention
What cause in order to the disposal ability solving host node is low sends to each from the inefficient problem of node more new data by host node, embodiments provides a kind of data-updating method and device.Described technical scheme is as follows:
First aspect, provides a kind of data-updating method, and described method comprises:
Node receives the first more new data that external host sends, and records the time of reception of the described first more new data;
According to the first overall version number generating described time of reception the described first more new data;
The renewal order of the described first more new data is determined according to described first overall version number;
Notify that each other node performs the renewal rewards theory to the described first more new data with described renewal order.
In the first possible implementation of first aspect, described the first overall version number according to generating described time of reception the described first more new data, comprising:
Obtain current host node mark, by described host node mark and the described first overall version number of the composition described time of reception.
In conjunction with the first possible implementation of first aspect, in the implementation that the second of first aspect is possible, the described renewal order determining the described first more new data according to described first overall version number, comprising:
By described first, more new data and described first overall version number are broadcast to each other nodes, other node described to be used for described in corresponding stored the first more new data and described first overall version number, determine the second more new data that the last time receives described external host and sends, feedback and described second the second overall version number that more new data is corresponding;
Receive the second overall version number that each other node sends;
From each second overall version number, the second overall version number that the time of reception comprised before selecting the time of reception comprised in described first overall version number time of reception of comprising and apart from described first overall version number is nearest;
Determine described first more new data renewal order the described second overall version number selected corresponding second more after new data.
In the third possible implementation of first aspect, describedly notify that each other node performs the renewal rewards theory to the described first more new data with described renewal order, comprising:
The described second overall version number selected is broadcast to each other nodes, other node described for determine described first more new data renewal order the described second overall version number received corresponding second more after new data.
In conjunction with the third possible implementation of first aspect or the first possible implementation of first aspect or the possible implementation of the second of first aspect or first aspect, in the 4th kind of possible implementation of first aspect, the described time of reception of recording the described first more new data, comprising:
Obtain the time of reception of the described first more new data from the clock source corresponding with described node, described clock source is arranged in described node, or described clock source is outer and and there is corresponding relation between described node at described node.
Second aspect, provides a kind of data update apparatus, and described device comprises:
Data obtaining module, for receiving the first more new data that external host sends, records the time of reception of the described first more new data;
Version generation module, generates the first overall version number of the described first more new data the described time of reception for getting according to described data obtaining module;
Order determining module, the described first overall version number for generating according to described version generation module determines the renewal order of the described first more new data;
Update notification module, for notifying that each other node performs the renewal rewards theory to the described first more new data with the described renewal order that described order determining module is determined.
In the first possible implementation of second aspect, described version generation module, specifically for obtaining current host node mark, by described host node mark and the described first overall version number of the composition described time of reception.
In conjunction with the first possible implementation of second aspect, in the implementation that the second of second aspect is possible, described order determining module, comprising:
Information transmitting unit, for by described first, more new data and described first overall version number are broadcast to each other nodes, other node described to be used for described in corresponding stored the first more new data and described first overall version number, determine the second more new data that the last time receives described external host and sends, feedback and described second the second overall version number that more new data is corresponding;
Version receiving element, for receiving the second overall version number that each other node sends;
Version selected cell, for in each second overall version number of receiving from described version receiving element, the second overall version number that the time of reception comprised before selecting the time of reception comprised in described first overall version number time of reception of comprising and apart from described first overall version number is nearest;
Order determining unit, for determine described first more new data renewal order the described second overall version number that described version selected cell is selected corresponding second more after new data.
In the third possible implementation of second aspect, described update notification module, specifically for the described second overall version number selected is broadcast to each other nodes, other node described for determine described first more new data renewal order the described second overall version number received corresponding second more after new data.
In conjunction with the third possible implementation of second aspect or the first possible implementation of second aspect or the possible implementation of the second of second aspect or second aspect, in the 4th kind of possible implementation of second aspect, described data obtaining module, specifically for obtaining the time of reception of the described first more new data from the clock source corresponding with described node, described clock source is arranged in described node, or described clock source is outer and and there is corresponding relation between described node at described node.
The beneficial effect of the technical scheme that the embodiment of the present invention provides is:
By receiving the first more new data that external host sends, the time of reception of record first more new data, according to the first overall version number generating the first more new data the time of reception, the renewal order of the first more new data is determined according to the first overall version number, notify that each other node performs renewal rewards theory to the first more new data to upgrade order, the renewal order of the first more new data can be determined by node, and notify that other node performs renewal rewards theory with this renewal order, and do not need more new data to send to host node, the renewal order of more new data is determined by host node, notify to perform renewal rewards theory from node with this renewal order, the disposal ability solving host node is low cause send to each from the inefficient problem of node more new data by host node, reach the effect of the renewal efficiency improving more new data.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the schematic diagram of the implementation environment involved by data-updating method that various embodiments of the present invention provide;
Fig. 2 is the method flow diagram of the data-updating method that one embodiment of the invention provides;
Fig. 3 A is the method flow diagram of the data-updating method that another embodiment of the present invention provides;
Fig. 3 B is the structural representation of the node that the embodiment of the present invention provides;
Fig. 4 is the structural framing figure of the data update apparatus that one embodiment of the invention provides;
Fig. 5 is the structural framing figure of the data update apparatus that yet another embodiment of the invention provides;
Fig. 6 is the structural framing figure of the data update apparatus that one embodiment of the invention provides;
Fig. 7 is the structural framing figure of the data update apparatus that yet another embodiment of the invention provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Please refer to the schematic diagram of the implementation environment involved by the data-updating method shown in Fig. 1, as shown in Figure 1, it is (English: storagearea network that this implementation environment can comprise memory device 110, external host 120 and storage area network; Be called for short: SAN).Wherein, connected by SAN between memory device 110 and external host 120.
Memory device 110 can comprise at least two nodes, and each node can receive the data that external host 110 sends, by data syn-chronization in other node in this memory device 110, to realize the backup to data.
Please refer to Fig. 2, it illustrates the method flow diagram of the data-updating method that one embodiment of the invention provides, this data-updating method can be applied in the node included by memory device 110 shown in Fig. 1.This data-updating method, comprising:
Step 201, node receives the first more new data that external host sends, the time of reception of record first more new data.
Step 202, node is according to the first overall version number generating the first more new data the time of reception.
Step 203, node determines the renewal order of the first more new data according to the first overall version number.
Step 204, node notifies that each other node performs renewal rewards theory to the first more new data to upgrade order.
In sum, the data-updating method that the embodiment of the present invention provides, by receiving the first more new data that external host sends, the time of reception of record first more new data, according to the first overall version number generating the first more new data the time of reception, the renewal order of the first more new data is determined according to the first overall version number, notify that each other node performs renewal rewards theory to the first more new data to upgrade order, the renewal order of the first more new data can be determined by node, and notify that other node performs renewal rewards theory with this renewal order, and do not need more new data to send to host node, the renewal order of more new data is determined by host node, notify to perform renewal rewards theory from node with this renewal order, the disposal ability solving host node is low cause send to each from the inefficient problem of node more new data by host node, reach the effect of the renewal efficiency improving more new data.
Please refer to Fig. 3 A, it illustrates the method flow diagram of the data-updating method that another embodiment of the present invention provides, this data-updating method can be applied in the node included by memory device 110 shown in Fig. 1.This data-updating method, comprising:
Step 301, node receives the first more new data that external host sends, the time of reception of record first more new data.
Receive more after new data at node, can upgrade data broadcast to each other nodes, each other node can perform the renewal rewards theory to more new data.When node all receives the different more new data that multiple node sends, because different renewal order can cause different renewal results, therefore, before node performs renewal rewards theory, need to determine the renewal order of each more new data.Wherein, node can be the host node elected, and also can be that the present embodiment is not construed as limiting node from node.
When the precision of clock source is higher than predetermined accuracy threshold value, the moment that different node receives different more new datas is different, therefore, node can get external host send first more new data time, record is carried out to the time of reception of this first more new data, according to the renewal order determined this time of reception the first more new data.Wherein, external host sends to the data of node to be called the first more new data by the present embodiment.
Particularly, the time of reception of record first more new data, comprising: the time of reception obtaining the first more new data from the clock source corresponding with node, this clock source is arranged in node, or this clock source is outer and and there is corresponding relation between node at node.
Please refer to the structural representation of the node shown in Fig. 3 B, in Fig. 3 B (1), clock source (CLOCK) is arranged in node, and now, a clock source corresponds to a node; In Fig. 3 B (2), clock source is positioned at outside node, and at least two nodes are (English: node inner connectionnetwork interface by intra-node internetwork interface; Be called for short: NI) interchanger shares a clock source, or all or part of node at least two memory devices shares a clock source, to save the cost of memory device by NI interchanger.Wherein, node also comprises CPU (English: Central Processing Unit; Be called for short: CPU), dual inline memory module is (English: dual inline memory modules; Be called for short: DIMM), front end is (English: front end; Be called for short: FE) interface, NI and rear end are (English: back end; Be called for short: BE).CPU is for the treatment of the logic of storage service; DIMM is used for Cache data; FE interface is for connecting external host; NI is used for communicating with other node; BE is for connecting hard disk or hard disk chassis.
When using the time of reception of nodes records first more new data of said structure, node can receive external host send first more new data time, clock source transmitting time to correspondence obtains request, the temporal information carrying current time is sent to node by clock source, and the current time in temporal information stores the time of reception as the first more new data by node.
Step 302, node obtains current host node mark, is identified by host node and forms the first overall version number the time of reception.
According to when determining the renewal order of the first more new data the time of reception, node can upgrade data genaration first overall version number according to the time of reception to each first, and this first overall version number is used for identifying one first more new data uniquely.
Wherein, according to the first overall version number generating the first more new data the time of reception, comprising: obtain current host node mark, by host node mark with form the first overall version number the time of reception.
In order to clearly upgrade first more new data time host node, node can also obtain host node host node mark, by host node mark and form the first overall version identifier the time of reception.The present embodiment take node as node in Zookeeper scene for example is illustrated, then the first overall version number can represent with zxid.Zxid comprises epoch and count, and wherein, the value of epoch is host node mark, and the value of count can be the time of reception, also can be the numerical value for generating renewal order according to determining the time of reception.
Step 303, node determines the renewal order of the first more new data according to the first overall version number.
Wherein, according to the renewal order that the first overall version number determines the first more new data, comprising:
1) by first, more new data and the first overall version number are broadcast to each other nodes, other node is used for corresponding stored first more new data and the first overall version number, determine the second more new data that the last time receives external host and sends, feedback and second the second overall version number that more new data is corresponding;
2) the second overall version number that each other node sends is received;
3) from each second overall version number, before selecting the time of reception comprised in the first overall version number time of reception of comprising and distance the first overall version number time of reception of comprising a nearest second overall version number;
4) determine first more new data renewal order the select second overall version number corresponding second more after new data.
The more new data that external host that other node receives by the present embodiment sends is called the second more new data, corresponding, this second overall version number that more new data is corresponding is the second overall version number.
Node can first by first, more new data and the first overall version number be broadcast to each other nodes, other node each by first, more add in preparation queue by new data and the first overall version number correspondence, read the second more new data that this node the last time receives, read this second the second overall version number more corresponding to new data again, this second overall version number is sent to this node.Wherein, because each node is after executing the renewal rewards theory to the more new data received, receive next more new data again, therefore, each node stores at most one and receives recently and the more new data not performing renewal rewards theory, that is, other node send second more new data be the data having executed renewal rewards theory or do not performed renewal rewards theory.
It should be noted that, in order to make clear and definite first of other node, more new data and the first overall version number are which node sends, node can also obtain self node identification, and this node identification is broadcast to each other node together with first more new data, the first overall version number.
Now, node can receive the second overall version number that other node each sends, first overall version number and each second overall version number are compared, find time of reception of comprising before the first overall version number and distance the first overall version number time of reception of comprising a nearest second overall version number, determine first more new data renewal order the select second overall version number corresponding second more after new data.
Such as, node A receives Node B respectively, the second overall version number B that node C and node D sends, second overall version number C and the second overall version number D, suppose that the time of reception that the first overall version number comprises is 18: 26: 39 on the 28th October in 2014, the time of reception that second overall version number B comprises is 18: 26: 20 on the 28th October in 2014, the time of reception that second overall version number C comprises is 18: 27: 17 on the 28th October in 2014, the time of reception that second overall version number D comprises is 18: 20: 38 on the 28th October in 2014, now according to by morning to the tactic overall version number in evening being the time of reception: the second overall version number D, second overall version number B, first overall version number, second overall version number C, determine that the renewal order of the first more new data is after second corresponding to the second overall version number B more new data.
Step 304, node notifies that each other node performs renewal rewards theory to the first more new data to upgrade order.
Node, after the renewal order determining the first more new data, also needs to notify other node, makes other node can perform renewal rewards theory to the first more new data according to upgrading order.
Wherein, notify that each other node performs renewal rewards theory to the first more new data to upgrade order, comprise: the select second overall version number is broadcast to each other nodes, this other node for determine first more new data renewal order the receive second overall version number corresponding second more after new data.
Such as, when node is determined first more new data is after the renewal rewards theory of the more new data of second corresponding to the second overall version number B, second overall version number B can be broadcast to each other nodes, other node each is after receiving the second overall version number B, by first more new data add to and submit in queue, make other after executing the renewal rewards theory to the more new data of second corresponding to the second overall version number B, perform the renewal rewards theory to the first more new data.
It should be noted that, that which node sends in order to make the clear and definite second overall version number of other node, node identification can also be broadcast to each other node by node together with the second overall version number, other node determines the first more new data according to node identification, then determines that the renewal order of the first more new data is after the second overall version number corresponding to the receive second overall version number.
It should be noted that, after the select second overall version number is broadcast to each other nodes, node externally main frame send response message, this response message for notify external host this first upgrade Data Update success.
In sum, the data-updating method that the embodiment of the present invention provides, by receiving the first more new data that external host sends, the time of reception of record first more new data, according to the first overall version number generating the first more new data the time of reception, the renewal order of the first more new data is determined according to the first overall version number, notify that each other node performs renewal rewards theory to the first more new data to upgrade order, the renewal order of the first more new data can be determined by node, and notify that other node performs renewal rewards theory with this renewal order, and do not need more new data to send to host node, the renewal order of more new data is determined by host node, notify to perform renewal rewards theory from node with this renewal order, the disposal ability solving host node is low cause send to each from the inefficient problem of node more new data by host node, reach the effect of the renewal efficiency improving more new data.
In addition, by the select second overall version number is broadcast to each other nodes, this other node for determine first more new data renewal order the receive second overall version number corresponding second more after new data, can ensure that node performs renewal rewards theory according to the reception order of more new data, ensure that the accuracy of renewal.
Please refer to Fig. 4, it illustrates the structural framing figure of the data update apparatus that one embodiment of the invention provides, this data update apparatus can be applied in the node included by memory device 110 shown in Fig. 1.This data update apparatus, comprising:
Data obtaining module 410, for receiving the first more new data that external host sends, the time of reception of record first more new data;
Version generation module 420, generates the first overall version number of the first more new data the time of reception for getting according to data obtaining module 410;
Order determining module 430, the first overall version number for generating according to version generation module 420 determines the renewal order of the first more new data;
Update notification module 440, for notifying that renewal order that each other node is determined with order determining module 430 performs the renewal rewards theory to the first more new data.
In sum, the data update apparatus that the embodiment of the present invention provides, by receiving the first more new data that external host sends, the time of reception of record first more new data, according to the first overall version number generating the first more new data the time of reception, the renewal order of the first more new data is determined according to the first overall version number, notify that each other node performs renewal rewards theory to the first more new data to upgrade order, the renewal order of the first more new data can be determined by node, and notify that other node performs renewal rewards theory with this renewal order, and do not need more new data to send to host node, the renewal order of more new data is determined by host node, notify to perform renewal rewards theory from node with this renewal order, the disposal ability solving host node is low cause send to each from the inefficient problem of node more new data by host node, reach the effect of the renewal efficiency improving more new data.
Please refer to Fig. 5, it illustrates the structural framing figure of the data update apparatus that yet another embodiment of the invention provides, this data update apparatus can be applied in the node included by memory device 110 shown in Fig. 1.This data update apparatus, comprising:
Data obtaining module 510, for receiving the first more new data that external host sends, the time of reception of record first more new data;
Version generation module 520, generates the first overall version number of the first more new data the time of reception for getting according to data obtaining module 510;
Order determining module 530, the first overall version number for generating according to version generation module 520 determines the renewal order of the first more new data;
Update notification module 540, for notifying that renewal order that each other node is determined with order determining module 530 performs the renewal rewards theory to the first more new data.
Optionally, version generation module 520, specifically for obtaining current host node mark, identifying host node and forming the first overall version number the time of reception.
Optionally, order determining module 530, comprising:
Information transmitting unit 531, for by first, more new data and the first overall version number are broadcast to each other nodes, other node is used for corresponding stored first more new data and the first overall version number, determine the second more new data that the last time receives external host and sends, feedback and second the second overall version number that more new data is corresponding;
Version receiving element 532, for receiving the second overall version number that each other node sends;
Version selected cell 533, for in each second overall version number of receiving from version receiving element 532, before selecting the time of reception comprised in the first overall version number time of reception of comprising and distance the first overall version number time of reception of comprising a nearest second overall version number;
Order determining unit 534, for determine first more new data renewal order the second overall version number that version selected cell 533 is selected corresponding second more after new data.
Optionally, update notification module 540, specifically for the select second overall version number is broadcast to each other nodes, other node for determine first more new data renewal order the receive second overall version number corresponding second more after new data.
Optionally, data obtaining module 510, specifically for obtaining the time of reception of the first more new data from the clock source corresponding with node, clock source is arranged in node, or clock source is outer and and there is corresponding relation between node at node.
In sum, the data update apparatus that the embodiment of the present invention provides, by receiving the first more new data that external host sends, the time of reception of record first more new data, according to the first overall version number generating the first more new data the time of reception, the renewal order of the first more new data is determined according to the first overall version number, notify that each other node performs renewal rewards theory to the first more new data to upgrade order, the renewal order of the first more new data can be determined by node, and notify that other node performs renewal rewards theory with this renewal order, and do not need more new data to send to host node, the renewal order of more new data is determined by host node, notify to perform renewal rewards theory from node with this renewal order, the disposal ability solving host node is low cause send to each from the inefficient problem of node more new data by host node, reach the effect of the renewal efficiency improving more new data.
In addition, by the select second overall version number is broadcast to each other nodes, this other node for determine first more new data renewal order the receive second overall version number corresponding second more after new data, can ensure that node performs renewal rewards theory according to the reception order of more new data, ensure that the accuracy of renewal.
Please refer to Fig. 6, it illustrates the structural framing figure of the data update apparatus that one embodiment of the invention provides, this data update apparatus can be applied in the node included by memory device 110 shown in Fig. 1.This data update apparatus, comprising: receiver 610, processor 620 and transmitter 630.
Receiver 610, for receiving the first more new data that external host sends;
Processor 620, for recording the time of reception of the first more new data, according to the first overall version number generating the first more new data the time of reception; The renewal order of the first more new data is determined according to the first overall version number;
Transmitter 630, for notifying that renewal order that each other node is determined with processor 620 performs the renewal rewards theory to the first more new data.
In sum, the data update apparatus that the embodiment of the present invention provides, by receiving the first more new data that external host sends, the time of reception of record first more new data, according to the first overall version number generating the first more new data the time of reception, the renewal order of the first more new data is determined according to the first overall version number, notify that each other node performs renewal rewards theory to the first more new data to upgrade order, the renewal order of the first more new data can be determined by node, and notify that other node performs renewal rewards theory with this renewal order, and do not need more new data to send to host node, the renewal order of more new data is determined by host node, notify to perform renewal rewards theory from node with this renewal order, the disposal ability solving host node is low cause send to each from the inefficient problem of node more new data by host node, reach the effect of the renewal efficiency improving more new data.
Please refer to Fig. 7, it illustrates the structural framing figure of the data update apparatus that yet another embodiment of the invention provides, this data update apparatus can be applied in the node included by memory device 110 shown in Fig. 1.This data update apparatus, comprising: receiver 710, processor 720 and transmitter 730.
Receiver 710, for receiving the first more new data that external host sends;
Processor 720, for recording the time of reception of the first more new data, according to the first overall version number generating the first more new data the time of reception; The renewal order of the first more new data is determined according to the first overall version number;
Transmitter 730, for notifying that renewal order that each other node is determined with processor 720 performs the renewal rewards theory to the first more new data.
Optionally, processor 720, specifically for obtaining current host node mark, identifying host node and forming the first overall version number the time of reception.
Optionally, transmitter 730, also for by first, more new data and the first overall version number are broadcast to each other nodes, other node is used for corresponding stored first more new data and the first overall version number, determine the second more new data that the last time receives external host and sends, feedback and second the second overall version number that more new data is corresponding;
Receiver 710, also for receiving the second overall version number that each other node sends;
Processor 720, also for from each second overall version number, before selecting the time of reception comprised in the first overall version number time of reception of comprising and distance the first overall version number time of reception of comprising a nearest second overall version number; Determine first more new data renewal order the select second overall version number corresponding second more after new data.
Optionally, transmitter 730, specifically for the select second overall version number is broadcast to each other nodes, other node for determine first more new data renewal order the receive second overall version number corresponding second more after new data.
Optionally, processor 720 is specifically for obtaining the time of reception of the first more new data from the clock source corresponding with node, clock source is arranged in node, or clock source is outer and and there is corresponding relation between node at node.
In sum, the data update apparatus that the embodiment of the present invention provides, by receiving the first more new data that external host sends, the time of reception of record first more new data, according to the first overall version number generating the first more new data the time of reception, the renewal order of the first more new data is determined according to the first overall version number, notify that each other node performs renewal rewards theory to the first more new data to upgrade order, the renewal order of the first more new data can be determined by node, and notify that other node performs renewal rewards theory with this renewal order, and do not need more new data to send to host node, the renewal order of more new data is determined by host node, notify to perform renewal rewards theory from node with this renewal order, the disposal ability solving host node is low cause send to each from the inefficient problem of node more new data by host node, reach the effect of the renewal efficiency improving more new data.
In addition, by the select second overall version number is broadcast to each other nodes, this other node for determine first more new data renewal order the receive second overall version number corresponding second more after new data, can ensure that node performs renewal rewards theory according to the reception order of more new data, ensure that the accuracy of renewal.
It should be noted that: the data update apparatus that above-described embodiment provides is when carrying out Data Update, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, internal structure by data update apparatus is divided into different functional modules, to complete all or part of function described above.In addition, the data update apparatus that above-described embodiment provides and data-updating method embodiment belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (10)
1. a data-updating method, is characterized in that, described method comprises:
Node receives the first more new data that external host sends, and records the time of reception of the described first more new data;
According to the first overall version number generating described time of reception the described first more new data;
The renewal order of the described first more new data is determined according to described first overall version number;
Notify that each other node performs the renewal rewards theory to the described first more new data with described renewal order.
2. method according to claim 1, is characterized in that, described the first overall version number according to generating described time of reception the described first more new data, comprising:
Obtain current host node mark, by described host node mark and the described first overall version number of the composition described time of reception.
3. method according to claim 2, is characterized in that, the described renewal order determining the described first more new data according to described first overall version number, comprising:
By described first, more new data and described first overall version number are broadcast to each other node, other node described to be used for described in corresponding stored the first more new data and described first overall version number, determine the second more new data that the last time receives described external host and sends, feedback and described second the second overall version number that more new data is corresponding;
Receive the second overall version number that each other node sends;
From each second overall version number, the second overall version number that the time of reception comprised before selecting the time of reception comprised in described first overall version number time of reception of comprising and apart from described first overall version number is nearest;
Determine described first more new data renewal order the described second overall version number selected corresponding second more after new data.
4. method according to claim 3, is characterized in that, describedly notifies that each other node performs the renewal rewards theory to the described first more new data with described renewal order, comprising:
The described second overall version number selected is broadcast to each other node, other node described for determine described first more new data renewal order the described second overall version number received corresponding second more after new data.
5. the method according to any one of Claims 1-4, is characterized in that, the described time of reception of recording the described first more new data, comprising:
Obtain the time of reception of the described first more new data from the clock source corresponding with described node, described clock source is arranged in described node, or described clock source is outer and and there is corresponding relation between described node at described node.
6. a data update apparatus, is characterized in that, described device comprises:
Data obtaining module, for receiving the first more new data that external host sends, records the time of reception of the described first more new data;
Version generation module, generates the first overall version number of the described first more new data the described time of reception for getting according to described data obtaining module;
Order determining module, the described first overall version number for generating according to described version generation module determines the renewal order of the described first more new data;
Update notification module, for notifying that each other node performs the renewal rewards theory to the described first more new data with the described renewal order that described order determining module is determined.
7. device according to claim 6, is characterized in that, described version generation module, specifically for obtaining current host node mark, by described host node mark and the described first overall version number of the composition described time of reception.
8. device according to claim 7, is characterized in that, described order determining module, comprising:
Information transmitting unit, for by described first, more new data and described first overall version number are broadcast to each other nodes, other node described to be used for described in corresponding stored the first more new data and described first overall version number, determine the second more new data that the last time receives described external host and sends, feedback and described second the second overall version number that more new data is corresponding;
Version receiving element, for receiving the second overall version number that each other node sends;
Version selected cell, for in each second overall version number of receiving from described version receiving element, the second overall version number that the time of reception comprised before selecting the time of reception comprised in described first overall version number time of reception of comprising and apart from described first overall version number is nearest;
Order determining unit, for determine described first more new data renewal order the described second overall version number that described version selected cell is selected corresponding second more after new data.
9. device according to claim 8, it is characterized in that, described update notification module, specifically for the described second overall version number selected is broadcast to each other nodes, other node described for determine described first more new data renewal order the described second overall version number received corresponding second more after new data.
10. the device according to any one of claim 6 to 9, it is characterized in that, described data obtaining module, specifically for obtaining the time of reception of the described first more new data from the clock source corresponding with described node, described clock source is arranged in described node, or described clock source is outer and and there is corresponding relation between described node at described node.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410606041.5A CN104394195B (en) | 2014-10-31 | 2014-10-31 | Data-updating method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410606041.5A CN104394195B (en) | 2014-10-31 | 2014-10-31 | Data-updating method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104394195A true CN104394195A (en) | 2015-03-04 |
CN104394195B CN104394195B (en) | 2018-05-11 |
Family
ID=52612030
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410606041.5A Active CN104394195B (en) | 2014-10-31 | 2014-10-31 | Data-updating method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104394195B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106294463A (en) * | 2015-06-01 | 2017-01-04 | 阿里巴巴集团控股有限公司 | The data point update method of a kind of performance graph and equipment |
CN106802939A (en) * | 2016-12-30 | 2017-06-06 | 华为技术有限公司 | A kind of method and system of resolving data conflicts |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090077263A1 (en) * | 2007-06-19 | 2009-03-19 | Koganti Sudheer B | Methods and apparatus for dataset synchronization in a wireless environment |
CN103294675A (en) * | 2012-02-23 | 2013-09-11 | 上海盛霄云计算技术有限公司 | Method and device for updating data in distributed storage system |
CN103428065A (en) * | 2012-05-25 | 2013-12-04 | 控制技术有限公司 | Network communication method and apparatus, and network system containing the same |
-
2014
- 2014-10-31 CN CN201410606041.5A patent/CN104394195B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090077263A1 (en) * | 2007-06-19 | 2009-03-19 | Koganti Sudheer B | Methods and apparatus for dataset synchronization in a wireless environment |
CN103294675A (en) * | 2012-02-23 | 2013-09-11 | 上海盛霄云计算技术有限公司 | Method and device for updating data in distributed storage system |
CN103428065A (en) * | 2012-05-25 | 2013-12-04 | 控制技术有限公司 | Network communication method and apparatus, and network system containing the same |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106294463A (en) * | 2015-06-01 | 2017-01-04 | 阿里巴巴集团控股有限公司 | The data point update method of a kind of performance graph and equipment |
CN106294463B (en) * | 2015-06-01 | 2020-02-21 | 阿里巴巴集团控股有限公司 | Data point updating method and equipment for dynamic curve |
CN106802939A (en) * | 2016-12-30 | 2017-06-06 | 华为技术有限公司 | A kind of method and system of resolving data conflicts |
WO2018120810A1 (en) * | 2016-12-30 | 2018-07-05 | 华为技术有限公司 | Method and system for solving data collision |
CN106802939B (en) * | 2016-12-30 | 2020-04-03 | 华为技术有限公司 | Method and system for solving data conflict |
Also Published As
Publication number | Publication date |
---|---|
CN104394195B (en) | 2018-05-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6325001B2 (en) | Method and system using recursive event listeners in nodes of hierarchical data structures | |
CN111090699A (en) | Service data synchronization method and device, storage medium and electronic device | |
US20170339238A1 (en) | Large message support for a publish-subscribe messaging system | |
CN107391276B (en) | Distributed monitor method, interception control device and system | |
CN110795503A (en) | Multi-cluster data synchronization method and related device of distributed storage system | |
US10656874B2 (en) | Storage device operation control method, and storage device | |
US10103973B2 (en) | Communication device and multi-hop network | |
CN109561151B (en) | Data storage method, device, server and storage medium | |
CN107817950B (en) | Data processing method and device | |
CN111552701B (en) | Method for determining data consistency in distributed cluster and distributed data system | |
US9690576B2 (en) | Selective data collection using a management system | |
US20170277439A1 (en) | Techniques for Path Optimization in Storage Networks | |
CN109857723B (en) | Dynamic data migration method based on expandable database cluster and related equipment | |
CN109150662B (en) | Message transmission method, distributed system, device, medium, and unmanned vehicle | |
CN103152390A (en) | Method and device and nodes and system for node configuration of distributed storage system | |
CN110740145A (en) | Message consumption method, device, storage medium and electronic equipment | |
CN114722092A (en) | Time series data processing method, system, storage medium and electronic equipment | |
CN107547593B (en) | Method, device and distributed system for realizing log synchronization | |
CN104394195A (en) | Data updating method and device | |
US20210397599A1 (en) | Techniques for generating a consistent view of an eventually consistent database | |
CN112835885B (en) | Processing method, device and system for distributed form storage | |
CN106933646B (en) | Method and device for creating virtual machine | |
CN112153146A (en) | Operation notification method and apparatus, storage medium, and electronic apparatus | |
CN110474787B (en) | Node fault detection method and device | |
CN116540938A (en) | Data reading method, device, distributed storage system, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |