CN103561095A - Data synchronous method and node and storage service cluster - Google Patents

Data synchronous method and node and storage service cluster Download PDF

Info

Publication number
CN103561095A
CN103561095A CN201310539112.XA CN201310539112A CN103561095A CN 103561095 A CN103561095 A CN 103561095A CN 201310539112 A CN201310539112 A CN 201310539112A CN 103561095 A CN103561095 A CN 103561095A
Authority
CN
China
Prior art keywords
node
version number
shop
information
host node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201310539112.XA
Other languages
Chinese (zh)
Inventor
张科
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Jindie Youshang E-Business Service Co., Ltd.
Original Assignee
Kingdee Software China 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 Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN201310539112.XA priority Critical patent/CN103561095A/en
Publication of CN103561095A publication Critical patent/CN103561095A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the invention discloses a data synchronous method, a node and a storage service cluster. The method comprises the steps that the node receives a request sent by a client side for obtaining a first object, when the first object and a version number of the first object are stored in the node, the version number of the first object stored in a main node is inquired according to an identifier of the first object of the node, whether the version number of the first object stored in the node is identical with the first version number, inquired from the main node, of the first object is judged from the node, and if not, the first object and the version number of the first object stored in the node are synchronously updated into the first object and the first version number in the main node. Accordingly, when the client terminal needs to read the object, the node determines update of the object by comparing the version number of the object stored in the node with the version number of the object stored in the main node, and synchronously updates the updated object, and therefore times of synchronization of the object can be reduced, and computing resources are saved.

Description

A kind of method of data synchronization, node and stores service cluster
Technical field
The present invention relates to the communications field, relate in particular to a kind of method of data synchronization, node and stores service cluster.
Background technology
In existing stores service cluster, the data method of synchronization of each node is that broadcast type is synchronous, for example, when an object has renewal in node 1, node 1 can inform that other stores the node of this object, this object has renewal, like this other node that stores this object just can with the synchronizeing of node data, but owing to can not guaranteeing that this object in each node can accessedly read, so the waste that has synchronously caused computational resource of broadcast type, wherein computational resource mainly comprises: the resources such as bandwidth, processor and input and output.
Summary of the invention
The invention provides a kind of method of data synchronization, node and stores service cluster, can solve the problem of the waste of computational resource.
The method of data synchronization that the embodiment of the present invention provides, comprise: the request of obtaining the first object sending from node reception client in stores service cluster, the request of wherein obtaining described the first object comprises the identifier of described the first object, when described while storing the version number of described the first object and described the first object from node, the described version number of described the first object of storing host node of inquiring about according to the identifier of described the first object from node, whether the described front page this shop of version number and described the first object inquiring in described host node of described the first object that judges self storage is consistent, if inconsistent, describedly from node, self described first object of storage and the version number of described the first object are synchronously updated to described the first object of storing described host node and described front page this shop, wherein, described from node and described host node a stores service cluster.
The node that the embodiment of the present invention provides, described node is during from node, comprise: memory cell is for the information of storage object and the version number of described object, the request of obtaining the first object that receiving element sends for receiving client, the request of wherein obtaining described the first object comprises the identifier of described the first object, query unit is for when described while storing the version number of described the first object and described the first object from node, according to the version number of described the first object of storing in the identifier inquiry host node of described the first object, whether the first judging unit is also consistent for judging the described front page this shop of version number and described the first object inquiring at described host node of described the first object of described cell stores, synchronous updating block is for when judgment result is that of described the first judging unit is inconsistent, the version number of described first object of described cell stores and described the first object is synchronously updated to described the first object of storing in described host node and described front page this shop, wherein, described host node and described from node a stores service cluster.
The node that the embodiment of the present invention provides, when described node is host node, comprise: memory cell is for the information of storage object and the version number of described object, receiving element is for receiving from the request of the version number of the first object described in querying node, transmitting element is described from node for the front page this shop of described the first object is sent to, make the described front page this shop of the described version number that judge described the first object that self stores from node and described the first object receiving whether consistent, and when inconsistent, describedly from node, the first object of self storage and the version number of described the first object are synchronously updated to described the first object of storing described memory cell and described front page this shop, wherein, described host node and described from node a stores service cluster.
The stores service cluster that the embodiment of the present invention provides, described stores service cluster comprises: host node and from node, described host node is for the information of storage object and the version number of described object, describedly from node, be used for carrying out following flow process: receive the request of obtaining the first object that client sends, the request of wherein obtaining described the first object comprises the identifier of described the first object; When described, while storing the version number of described the first object and described the first object from node, according to the identifier of described the first object, inquire about the version number of described the first object of storing in described host node; Whether the described front page this shop of version number and described the first object inquiring in described host node of described the first object that judges self storage is consistent; When the version number of described the first object is consistent, self described first object of storage and the version number of described the first object are synchronously updated to described the first object of storing in described host node and described front page this shop.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages:
In the embodiment of the present invention, from node, receive the request of obtaining the first object that client sends, when storing the version number of the first object and this first object from node, from node, according to the identifier of the first object, inquire about the version number of this first object of storing host node, whether the described front page this shop of version number and described the first object inquiring described host node of described the first object that judges self storage from node is consistent, if inconsistent, the first object of from node, self being stored and the version number of the first object are synchronously updated to the first object and the front page this shop storing host node, wherein, host node with from node a stores service cluster, like this, only when client needs reading object, from node, by contrasting the version number of the version number of the object of self storing and this object of host node storage, just can determine whether this object has renewal, and when having renewal, from node, the object upgrading is synchronously upgraded, thereby can reduce the synchronization times of object, saved computational resource simultaneously.
Accompanying drawing explanation
Fig. 1 is embodiment schematic diagram of method of data synchronization in the embodiment of the present invention;
Fig. 2 is another embodiment schematic diagram of method of data synchronization in the embodiment of the present invention;
Fig. 3 is embodiment schematic diagram of node in the embodiment of the present invention;
Fig. 4 is another embodiment schematic diagram of node in the embodiment of the present invention;
Fig. 5 is embodiment schematic diagram of node in the embodiment of the present invention;
Fig. 6 is embodiment schematic diagram of stores service cluster in the embodiment of the present invention.
Embodiment
The embodiment of the present invention provides a kind of method of data synchronization, node and stores service cluster, can reduce the synchronization times of object, thereby saves computational resource.
Please refer to Fig. 1, in the embodiment of the present invention, embodiment of method of data synchronization comprises:
101, the request of obtaining the first object sending from node reception client in stores service cluster;
In the present embodiment, from node, can receive the request of obtaining the first object that client sends, the request of wherein obtaining the first object comprises the identifier of the first object, in the prior art, object is one group of data, each object has a unique identifier, and the renewal of object is only for the value of data has renewal, and identifier can not change.
102,, when storing the version number of the first object and this first object from node, from node, according to the identifier of the first object, inquire about the version number of this first object of storing host node;
In the present embodiment, when storing the version number of the first object and this first object from node, can be according to the version number of this first object of storing the identifier inquiry host node of the first object from node, in actual applications, the version number of object can, for numeral, character or array etc., not limit herein.
It should be noted that, host node with from node, belong to a stores service cluster, this stores service cluster comprises a plurality of nodes, and a selected node is as host node in a plurality of nodes, how the node in other stores service cluster, as from node, is selected herein and is not limited, can choose at random, also can select host node according to the performance of each node, for example, can be using the highest node of signal strength signal intensity as host node.
103, from node, judge that whether the version number of the first object that self stores is consistent with the front page this shop of the first object inquiring host node, if inconsistent, perform step 104, if consistent, represent that the first object does not upgrade;
104, the first object of from node, self being stored and the version number of the first object are synchronously updated to the first object and the front page this shop storing host node.
In the present embodiment, whether the described front page this shop of version number and described the first object inquiring described host node of described the first object that can judge self storage from node is consistent, if consistent, represent that the first object does not upgrade, if inconsistent, perform step 104, then the first object that self can be stored from node and the version number of the first object are synchronously updated to the first object and the front page this shop storing host node, for example, the front page this shop storing in host node is 1, from node synchronous renewal, the version number of the first object of storing from node is 1.
It should be noted that, the client in the embodiment of the present invention can obtain for moving, newly-increased or revise the device of the program of object in stores service cluster, and this client can be server, computer, handheld terminal (as, mobile phone) etc.
In the present embodiment, from node, receive the request of obtaining the first object that client sends, when storing the version number of the first object and this first object from node, from node, according to the identifier of the first object, inquire about the version number of this first object of storing host node, whether the version number that judges the first object that self stores from node is consistent with the front page this shop of the first object inquiring host node, if inconsistent, the first object of from node, self being stored and the version number of the first object are synchronously updated to the first object and the front page this shop storing host node, wherein, host node with from node a stores service cluster, like this, only when client needs reading object, from node, by contrasting the version number of the version number of the object of self storing and this object of host node storage, just can determine whether this object has renewal, and when having renewal, from node, the object upgrading is synchronously upgraded, thereby can reduce the synchronization times of object, saved computational resource simultaneously.
For the ease of understanding, below with an instantiation to being described in the method for data synchronization of the embodiment of the present invention, refer to Fig. 2, in the embodiment of the present invention, another embodiment of method of data synchronization comprises:
201, from node by from client to second object information or upgrade the information of the first object be sent to host node;
In the present embodiment, from node can by from client to second object information or upgrade the information of the first object be sent to host node, in actual applications, client is to submitting the information of second object or the information of the first object renewal to from node, wherein the information of object comprises: the identifier of object and this object.
202, host node receives the information of the first object upgrading from client or from node, and is the first object distribution front page this shop after upgrading;
In the present embodiment, when in stores service cluster, the first object has renewal, host node can be from this from node or the information of first object of this client upgrading, and be the first object distribution front page this shop after upgrading, wherein front page this shop from upgrade before the version number of the first object different, in actual applications, the version number of object can be numeral, character or array etc., do not limit herein, for example, the version number of the first object before renewal is 0, and host node is 1 for the first object after upgrading distributes front page this shop.
It should be noted that, the version number before renewal and after upgrading of same target is also different, and the version number of different objects can be identical, also can be different.
203, host node is from client or receive the information of second object from node, and is second object distribution second edition this shop;
In the present embodiment, while having new second object to generate in stores service cluster, host node is from this from node or the information of this client second object, and is second object distribution second edition this shop.
204, from node, receive the request of obtaining the first object that client sends;
In the present embodiment, from node, can receive the request of obtaining the first object that client sends, the request of wherein obtaining the first object comprises the identifier of the first object, in the prior art, object is one group of data, each object has a unique identifier, and the renewal of object is only for the value of data has renewal, and identifier can not change.
205, from node, according to the identifier of the first object, judge whether self stores the version number of the first object and the first object, if there is storage, perform step 206, if not storage performs step 210;
In the present embodiment, from node, can judge whether self stores the version number of the first object and the first object according to the identifier of the first object, if there is storage, perform step 206, if not storage performs step 210.
206, from node, according to the identifier of the first object, inquire about the version number of the first object host node;
207, from node, judge that whether the version number of the first object that self stores is consistent with the front page this shop of the first object inquiring host node, if inconsistent, perform step 208, if consistent, represent that the first object does not upgrade;
In the present embodiment, when judgment result is that of step 205 is, can be according to the version number of the first object the identifier inquiry host node of the first object from node, then from node, judge that whether the version number of the first object that self stores is consistent with the front page this shop of the first object inquiring host node, if inconsistent, perform step 208, for example, the version number of the first object of storing from node is 0, the front page this shop of host node storage is 1, perform step 208, if consistent, represent that the first object does not upgrade, in actual applications, the information of the first object that self can be stored from node is sent to client.
208, the first object of from node, self being stored and the version number of the first object are synchronously updated to the first object and the front page this shop storing host node;
In the present embodiment, in step 207 when the determination result is NO, the first object that self can be stored from node and the version number of the first object are synchronously updated to the first object and the front page this shop storing host node, for example, the front page this shop of host node storage is 1, after synchronous renewal, the Wei1(front page this shop of version number of the first object of storing from node).
209, from node, the information of the first object obtaining synchronously upgrading is sent to client;
In the present embodiment, from node, the information of the first object synchronously upgrading can be sent to the client of acquisition request the first object.
210, from node from host node, obtain information and the front page this shop of the first object.
In the present embodiment, when the determination result is NO in step 205, from node, can directly from host node, obtain information and the front page this shop of the first object.
It should be noted that, host node stores the version number of up-to-date object and this object, so when client-requested is obtained the information of object, host node can directly be sent to client by the information of object, does not have the synchronous process of data.
In the present embodiment, host node receives the information of the first object or the information of second object after upgrading, and distribute front page this shop or be second object distribution second edition this shop for the first object after upgrading, from node, receive the request of obtaining the first object that client sends, when storing the version number of the first object and this first object from node, from node, according to the identifier of the first object, inquire about the version number of this first object of storing host node, whether the version number that judges the first object that self stores from node is consistent with the front page this shop of the first object inquiring host node, if inconsistent, the first object of from node, self being stored and the version number of the first object are synchronously updated to the first object and the front page this shop storing host node, wherein, host node with from node a stores service cluster, like this, host node stores the version number of up-to-date object and this object, when client needs reading object, from node, by contrasting the version number of the version number of the object of self storing and this object of host node storage, just can determine whether this object has renewal, and when having renewal, from node, the object upgrading is synchronously upgraded, thereby can reduce the synchronization times of object, saved computational resource simultaneously.
Below to describing for carrying out the node of the embodiment of the present invention of above-mentioned method of data synchronization, its basic logical structure is with reference to figure 3, and when node is during from node, in the embodiment of the present invention, embodiment of node comprises:
Receiving element 301, query unit 302, the first judging unit 303, synchronous updating block 304 and memory cell 305;
Memory cell 305, for the information of storage object and the version number of this object;
Receiving element 301, the request of obtaining the first object sending for receiving client, the request of wherein obtaining the first object comprises the identifier of the first object;
Query unit 302, for when storing the version number of the first object and the first object, according to the version number of the first object of storing in the identifier inquiry host node of the first object from node;
The first judging unit 303, also whether consistent with the front page this shop of the first object inquiring at host node for judging the version number of the first object that memory cell 305 is stored;
Synchronous updating block 304, for when judgment result is that of the first judging unit 303 is inconsistent, is synchronously updated to by the first object of memory cell 305 storages and the version number of the first object the first object and the front page this shop storing in host node;
Wherein, host node with from node a stores service cluster.
In the present embodiment, receiving element 301 receives the request of obtaining the first object that client sends, when storing the version number of the first object and this first object from node, query unit 302 is according to the version number of this first object of storing in the identifier inquiry host node of the first object, the first judging unit 303 judges that whether the version number of the first object that memory cell 305 is stored is consistent with the front page this shop of the first object inquiring in host node, if inconsistent, synchronous updating block 304 is synchronously updated to by the first object of memory cell 305 storages and the version number of this first object the first object and the front page this shop storing in host node, wherein, host node with from node a stores service cluster, like this, only when client needs reading object, from node, just by the first judging unit 303 contrasts self version number of object of storage and the version number of this object of host node storage, determine whether this object has renewal, and when having renewal, from node, by synchronous updating block 304, the object upgrading is synchronously upgraded, thereby can reduce the synchronization times of object, saved computational resource simultaneously.
In order better to understand the above embodiments, the mutual of the unit below node being comprised and module describes the data interactive mode in node, when node is during from node, refers to Fig. 4, comprising:
Transmitting element 401, receiving element 402, the second judging unit 403, acquiring unit 404, query unit 405, the first judging unit 406, synchronous updating block 407 and memory cell 408.
Transmitting element 401 by from client to renewal the information of the first object or the information of second object, be sent to host node, making host node is that the first object after upgrading distributes front page this shop or is second object distribution second edition this shop, wherein front page this shop from upgrade before the version number of the first object different, in actual applications, client is to submitting the information of second object or the information of the first object renewal to from node, the information of object comprises: the identifier of object and this object.
Receiving element 402 receives the request of obtaining the first object that client sends, and the request of wherein obtaining the first object comprises the identifier of the first object, and then receiving element 402 is sent to the second judging unit 403 by the identifier of the first object.
The version number that the second judging unit 403 judges whether to store the first object and the first object according to the identifier of the first object receiving, if not storage, the second judging unit 403 is informed acquiring unit 404 by judged result, if there is storage, the identifier of the first object is sent to query unit 404.
Acquiring unit 404, when receiving that the determination result is NO, obtains information and the front page this shop of the first object from host node.
Query unit 405 is when judgment result is that of receiving is, the version number according to the first object of storing in the identifier inquiry host node of the first object, is then sent to the first judging unit 406 by the version number of the first object inquiring.
The first judging unit 406 judges that whether the version number of the first object that memory cell 408 is stored is consistent with the front page this shop of the first object inquiring in host node, if inconsistent, judged result is sent to synchronous updating block 407, if consistent, represent that the first object does not upgrade, in actual applications, from node, the information of the first object of memory cell 408 storages can be sent to client, for example, the version number of the first object of memory cell 408 storages is 0, the front page this shop of host node storage is 1, determines inconsistent.
Synchronous updating block 407, for when judgment result is that of the first judging unit 406 receiving is inconsistent, the first object of memory cell 408 storages and the version number of the first object are synchronously updated to the first object and the front page this shop storing in host node, for example, the front page this shop of host node storage is 1, after synchronous renewal, the Wei1(front page this shop of version number of the first object of storing from node), then the information of the first object after upgrading is sent to transmitting element 401.
Transmitting element 401 is sent to client by the information of the first object obtaining after the synchronous renewal receiving.
In the present embodiment, transmitting element 401 by from client to renewal the information of the first object or the information of second object, be sent to host node, making host node is that the first object after upgrading distributes front page this shop or is second object distribution second edition this shop, wherein front page this shop from upgrade before the version number of the first object different, receiving element 402 receives the request of obtaining the first object that client sends, the request of wherein obtaining the first object comprises the identifier of the first object, when the second judging unit 403 judgement memory cell 408 are stored the version number of the first objects and this first object, query unit 405 is according to the version number of this first object of storing in the identifier inquiry host node of the first object, the first judging unit 406 judges that whether the version number of the first object that memory cell 408 is stored is consistent with the front page this shop of the first object inquiring in host node, if inconsistent, synchronous updating block 407 is synchronously updated to by the first object of memory cell 408 storages and the version number of the first object the first object and the front page this shop storing in host node, wherein, host node with from node a stores service cluster, like this, host node stores the version number of up-to-date object and this object, when client needs reading object, from node, by contrasting the version number of the version number of the object of self storing and this object of host node storage, just can determine whether this object has renewal, and when having renewal, from node, the object upgrading is synchronously upgraded, thereby can reduce the synchronization times of object, saved computational resource simultaneously.
To describing for carrying out the node of the embodiment of the present invention of above-mentioned method of data synchronization, its basic logical structure is with reference to figure 5 below, and when node is host node, in the embodiment of the present invention, embodiment of node comprises:
Memory cell 501, receiving element 502 and transmitting element 503;
Memory cell 501, for the information of storage object and the version number of this object;
Receiving element 502, for receiving from the request of the version number of querying node the first object;
Transmitting element 503, for the front page this shop of the first object is sent to from node, make to judge that from node whether the version number of the first object that self stores is consistent with the front page this shop of the first object receiving, and when inconsistent, the first object of self being stored from node and the version number of the first object are synchronously updated to the first object and the front page this shop of storage memory cell 501.
In the present embodiment, the information of memory cell 501 storage objects and the version number of object, receiving element 502 receives from the request of the version number of querying node the first object, transmitting element 503 is sent to the front page this shop of the first object from node, make to judge that from node whether the version number of the first object that self stores is consistent with the front page this shop of the first object receiving, and when inconsistent, the first object of self being stored from node and the version number of the first object are synchronously updated to the first object and the front page this shop of storage memory cell 501, like this, only when client needs reading object, from node, just by contrasting the version number of self version number of object of storage and this object of the memory cell of host node 501 storages, determine whether this object has renewal, make from node when having renewal, object after upgrading is synchronously upgraded, thereby can reduce the synchronization times of object, saved computational resource simultaneously.
In order better to understand the above embodiments, the mutual of the unit below node being comprised and module describes the data interactive mode in node, when node is host node, please consults equally Fig. 5, comprising:
Memory cell 501, receiving element 502 and transmitting element 503.
The information of memory cell 501 storage objects and the version number of this object, wherein, the information of object comprises: the identifier of object and this object.
When in stores service cluster, the first object has renewal, receiving element 502 is from the information of client or the first object from node receives renewal, and for the first object after upgrading distributes front page this shop, wherein front page this shop is different with the version number of the first object before renewal.
While having new second object to generate in stores service cluster, receiving element 502 is from client or from node, receive the information of second object, and is second object distribution second edition this shop.
Receiving element 502 receives from the request of the version number of querying node the first object, and the request of wherein obtaining the first object comprises the identifier of the first object, and then receiving element 502 is sent to transmitting element 503 by the identifier of the first object.
Transmitting element 503 is sent to the front page this shop of the first object from node, make to judge that from node whether the version number of the first object that self stores is consistent with the front page this shop of the first object receiving, and when inconsistent, the first object of self being stored from node and the version number of the first object are synchronously updated to the first object and the front page this shop of storage memory cell 501.
In the present embodiment, when in stores service cluster, the first object has renewal, receiving element 502 is from the information of client or the first object from node receives renewal, and be the first object distribution front page this shop after upgrading, wherein front page this shop from upgrade before the version number of the first object different, while having new second object to generate in stores service cluster, receiving element 502 is from client or from node, receive the information of second object, and be second object distribution second edition this shop, then receiving element 502 receives from the request of the version number of querying node the first object, transmitting element 503 is sent to the front page this shop of the first object from node, make to judge that from node whether the version number of the first object that self stores is consistent with the front page this shop of the first object receiving, and when inconsistent, the first object of self being stored from node and the version number of the first object are synchronously updated to the first object and the front page this shop of storage memory cell 501, like this, host node stores the version number of up-to-date object and this object, when client needs reading object, from node, by contrasting the version number of the version number of the object of self storing and this object of host node storage, just can determine whether this object has renewal, and when having renewal, from node, the object upgrading is synchronously upgraded, thereby can reduce the synchronization times of object, saved computational resource simultaneously.
To describing for carrying out the stores service cluster of the embodiment of the present invention of above-mentioned method of data synchronization, its basic logical structure is with reference to figure 6 below, and in the embodiment of the present invention, embodiment of stores service cluster comprises: host node 601 and from node 602;
Host node 601, for the information of storage object and the version number of object;
From node 602 for carrying out following flow process:
Receive the request of obtaining the first object that client sends, the request of wherein obtaining the first object comprises the identifier of the first object;
When storing the version number of the first objects and the first object from node 602, according to the version number of the first object of storage in the identifier inquiry host node 601 of the first object;
Whether the version number that judges the first object that self stores is consistent with the front page this shop of the first object inquiring in host node 601;
When the version number of the first object is consistent, self the first object of storage and the version number of the first object are synchronously updated to the first object and the front page this shop of storage in host node 601.
In the present embodiment, the information of host node 601 storage objects and the version number of object, from node 602, receive the request of obtaining the first object that client sends, the request of wherein obtaining the first object comprises the identifier of the first object, when storing the version number of the first objects and the first object from node 602, from node 602, according to the identifier of the first object, inquire about the version number of the first object of storage host node 601, whether the version number that judges the first object that self stores from node 602 is consistent with the front page this shop of the first object inquiring host node 601, when the version number of the first object is consistent, the first object that self is stored and the version number of the first object are synchronously updated to the first object and the front page this shop of storage in host node 601, like this, only when client needs reading object, from node 602, by contrasting the version number of the version number of the object of self storing and this object of host node 601 storages, just can determine whether this object has renewal, and when having renewal, from node 602, the object upgrading is synchronously upgraded, thereby can reduce the synchronization times of object, saved computational resource simultaneously.
In order better to understand the above embodiments, the mutual of each node below stores service cluster being comprised describes the data interactive mode in stores service cluster, please consults equally Fig. 6, comprising:
Host node 601 and from node 602.
The information of host node 601 storage objects and the version number of this object, wherein the information of object comprises: the identifier of object and this object.
From node 602 by from client to second object information or upgrade the information of the first object be sent to host node 601, in actual applications, client to from node 602, submit the information of second objects to or upgrade the information of the first object.
When in stores service cluster, the first object has renewal, the information of first object of host node 601 from this from node 602 or the renewal of this client, and be the first object distribution front page this shop after upgrading, wherein, front page this shop from upgrade before the version number of the first object different, in actual applications, the version number of object can be numeral, character or array etc., do not limit herein, for example, the version number of the first object before renewal is 0, and host node is 1 for the first object after upgrading distributes front page this shop.
It should be noted that, the version number before renewal and after upgrading of same target is also different, and the version number of different objects can be identical, also can be different.
While having new second object to generate in stores service cluster, host node 601 is from this from node 602 or the information of this client second object, and distributes the second version for second object.
From node 602, receive the request of obtaining the first object that client sends, wherein, the request of obtaining the first object comprises the identifier of the first object, in the prior art, object is one group of data, each object has a unique identifier, and the renewal of object is only for the value of data has renewal, and identifier can not change.
From node 602, according to the identifier of the first object, judge whether self stores the version number of the first object and this first object, if there is storage, from node 602, according to the identifier of the first object, inquire about the version number of the first object host node 601, if do not store, from node 602 from host node 601, obtain information and the front page this shop of the first object.
Whether the version number that judges the first object that self stores from node 602 is consistent with the front page this shop of the first object inquiring host node 601, if consistent, represent that the first object does not upgrade, for example, the version number of the first object of storing from node 602 is 0, the front page this shop of host node 601 storages is 1, represent from version number and the front page this shop of the first object of node 602 storage inconsistent, in actual applications, if the version number of the first object of storing from node 602 is consistent with front page this shop, the information of the first object that self can be stored from node 602 is sent to client.
If version number and the front page this shop of the first object of storing from node 602 are inconsistent, the first object of from node 602, self being stored and the version number of this first object are synchronously updated to the first object and the front page this shop of storage host node 601, for example, the front page this shop of host node 601 storages is 1, after synchronous renewal, the Wei1(front page this shop of version number of the first object of storing from node 602).
From node 602, the information of the first object obtaining synchronously upgrading is sent to client.
It should be noted that, host node 601 stores the version number of up-to-date object and this object, so when client-requested is obtained the information of object, host node 601 can directly be sent to client by the information of object, does not have the synchronous process of data.
In the present embodiment, the information of the first object or the information of second object that host node 601 receives after upgrading, and distribute front page this shop or be second object distribution second edition this shop for the first object after upgrading, from node 602, receive the request of obtaining the first object that client sends, when storing the version number of the first objects and this first object from node 602, from node 602, according to the identifier of the first object, inquire about the version number of this first object of storage host node 601, whether the version number that judges the first object that self stores from node 602 is consistent with the front page this shop of the first object inquiring host node 601, if inconsistent, the first object of from node 602, self being stored and the version number of the first object are synchronously updated to the first object and the front page this shop of storage host node 601, like this, host node 601 stores the version number of up-to-date object and this object, when client needs reading object, from node 602, by contrasting the version number of the version number of the object of self storing and this object of host node 601 storages, just can determine whether this object has renewal, and when having renewal, from node 602, the object upgrading is synchronously upgraded, thereby can reduce the synchronization times of object, saved computational resource simultaneously.
The above, above embodiment only, in order to technical scheme of the present invention to be described, is not intended to limit; Although the present invention is had been described in detail with reference to previous embodiment, those of ordinary skill in the art is to be understood that: its technical scheme that still can record aforementioned each embodiment is modified, or part technical characterictic is wherein equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (16)

1. a method of data synchronization, is characterized in that, described method comprises:
The request of obtaining the first object sending from node reception client in stores service cluster, the request of wherein obtaining described the first object comprises the identifier of described the first object;
When described while storing the version number of described the first object and described the first object from node, described from node according to the version number of described the first object of storing the identifier inquiry host node of described the first object;
Whether the described front page this shop of version number and described the first object inquiring in described host node of described the first object that judges self storage is consistent;
If inconsistent, describedly from node, self described first object of storage and the version number of described the first object are synchronously updated to described the first object of storing described host node and described front page this shop;
Wherein, described from node and described host node a stores service cluster.
2. method according to claim 1, is characterized in that, described method also comprises:
When described in described stores service cluster, the first object has renewal, described host node is from the information of described described the first object from node or the renewal of described client, and for described the first object after upgrading distributes described front page this shop, wherein said front page this shop is different with the version number of described the first object before renewal;
Or,
While having new second object to generate in stores service cluster, the information of described host node from described from second object described in node or described client, and be that described second object distributes second edition this shop;
Wherein, the information of object comprises: the identifier of object and described object.
3. method according to claim 2, is characterized in that, described host node comprises from described step before node receives the information of described second object or the information of described the first object renewal:
Described from node by from described client to described second object information or upgrade the information of described the first object, be sent to described host node.
4. method according to claim 1, it is characterized in that, when described, while storing the version number of described the first object and described the first object from node, described version number's concrete steps of inquiring about the first object described in described host node according to the identifier of described the first object from node comprise:
Describedly from node, according to the identifier of described the first object, judge the version number that self whether stores described the first object and described the first object;
If not, the described information of obtaining described the first object from node from described host node and described front page this shop;
If so, the described version number of the first object described in described host node of inquiring about according to the identifier of described the first object from node.
5. method according to claim 4, it is characterized in that, described step after node is synchronously updated to described first object of self storage and the version number of described the first object described the first object of storing described host node and described front page this shop comprises:
Describedly from node, the information of described the first object obtaining synchronously upgrading is sent to described client.
6. a node, is characterized in that, described node is during from node, comprising:
Memory cell, for the information of storage object and the version number of described object;
Receiving element, the request of obtaining the first object sending for receiving client, the request of wherein obtaining described the first object comprises the identifier of described the first object;
Query unit, for when described while storing the version number of described the first object and described the first object from node, according to the version number of described the first object of storing in the identifier inquiry host node of described the first object;
The first judging unit, also whether consistent for judging the described front page this shop of version number and described the first object inquiring at described host node of described the first object of described cell stores;
Synchronous updating block, for when judgment result is that of described the first judging unit is inconsistent, the version number of described first object of described cell stores and described the first object is synchronously updated to described the first object of storing in described host node and described front page this shop;
Wherein, described host node and described from node a stores service cluster.
7. node according to claim 6, is characterized in that, described node also comprises:
Transmitting element, for by from described client to renewal the information of described the first object or the information of described second object, be sent to described host node, make described host node distribute described front page this shop or for second object distributes second edition this shop for the first object after upgrading, wherein said front page this shop is different from the version number of described the first object before renewal;
Wherein, the information of described object comprises: the identifier of object and described object.
8. node according to claim 6, is characterized in that, described node also comprises:
The second judging unit, for judging according to the identifier of described the first object whether described memory cell stores the version number of described the first object and described the first object;
Acquiring unit, when the determination result is NO at described the second judging unit, obtains information and the described front page this shop of described the first object from described host node.
9. node according to claim 6, is characterized in that,
Described transmitting element, also for being sent to described client by the information of described the first object obtaining after synchronously upgrading.
10. a node, is characterized in that, when described node is host node, comprising:
Memory cell, for the information of storage object and the version number of described object;
Receiving element, for receiving from the request of the version number of the first object described in querying node;
Transmitting element, it is described from node for the front page this shop of described the first object is sent to, make the described front page this shop of the described version number that judge described the first object that self stores from node and described the first object receiving whether consistent, and when inconsistent, describedly from node, the first object of self storage and the version number of described the first object are synchronously updated to described the first object of storing described memory cell and described front page this shop;
Wherein, described host node and described from node a stores service cluster.
11. nodes according to claim 10, is characterized in that,
Described receiving element, also for when described in described stores service cluster, the first object has renewal, information from described described the first object from node or client renewal, and for described the first object after upgrading distributes front page this shop, wherein said front page this shop is different with the version number of described the first object before renewal;
Or,
Described receiving element, also when having new second object to generate at stores service cluster, the information from described from second object described in node or described client, and be described second object distribution second edition this shop;
The information of described object comprises: the identifier of object and described object.
12. 1 kinds of stores service clusters, is characterized in that, described stores service cluster comprises:
Host node and from node;
Described host node, for the information of storage object and the version number of described object;
Describedly from node, be used for carrying out following flow process:
Receive the request of obtaining the first object that client sends, the request of wherein obtaining described the first object comprises the identifier of described the first object;
When described, while storing the version number of described the first object and described the first object from node, according to the identifier of described the first object, inquire about the version number of described the first object of storing in described host node;
Whether the described front page this shop of version number and described the first object inquiring in described host node of described the first object that judges self storage is consistent;
When the version number of described the first object is consistent, self described first object of storage and the version number of described the first object are synchronously updated to described the first object of storing in described host node and described front page this shop.
13. stores service clusters according to claim 12, is characterized in that,
Described host node, also for when described in described stores service cluster, the first object has renewal, information from described described the first object from node or the renewal of described client, and for described the first object after upgrading distributes described front page this shop, wherein said front page this shop is different with the version number of described the first object before renewal;
Or,
Described host node, also when having new second object to generate at stores service cluster, the information of described host node from described from second object described in node or described client, and be described second object distribution second edition this shop;
The information of described object comprises: the identifier of object and described object.
14. stores service clusters according to claim 13, is characterized in that,
Described from node, also for by from described client to described second object information or upgrade the information of described the first object, be sent to described host node.
15. stores service clusters according to claim 12, is characterized in that,
Described from node, also for described, from node, according to the identifier of described the first object, judge the version number that self whether stores described the first object and described the first object;
Described from node, also when not storing the version number of described the first object and described the first object at self, from described host node, obtain information and the described front page this shop of described the first object;
Described from node, also when storing the version number of described the first object and described the first object at self, according to the identifier of described the first object, inquire about the version number of the first object described in described host node.
16. stores service clusters according to claim 12, is characterized in that, described from node, also for the information of described the first object obtaining after synchronously upgrading is sent to described client.
CN201310539112.XA 2013-11-04 2013-11-04 Data synchronous method and node and storage service cluster Pending CN103561095A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310539112.XA CN103561095A (en) 2013-11-04 2013-11-04 Data synchronous method and node and storage service cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310539112.XA CN103561095A (en) 2013-11-04 2013-11-04 Data synchronous method and node and storage service cluster

Publications (1)

Publication Number Publication Date
CN103561095A true CN103561095A (en) 2014-02-05

Family

ID=50015245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310539112.XA Pending CN103561095A (en) 2013-11-04 2013-11-04 Data synchronous method and node and storage service cluster

Country Status (1)

Country Link
CN (1) CN103561095A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484428A (en) * 2014-12-18 2015-04-01 深圳市科漫达智能管理科技有限公司 Data synchronization method, data synchronization device and data synchronization system
CN104539655A (en) * 2014-12-05 2015-04-22 蓝信工场(北京)科技有限公司 Method and system for synchronizing and displaying address book in batches
CN106484321A (en) * 2016-09-08 2017-03-08 华为数字技术(成都)有限公司 A kind of date storage method and data center
CN106708842A (en) * 2015-11-12 2017-05-24 阿里巴巴集团控股有限公司 Data loading method for application system, database and application system
CN106779936A (en) * 2016-12-08 2017-05-31 上海携程国际旅行社有限公司 Firm Order system and Firm Order method
CN107357536A (en) * 2017-07-28 2017-11-17 郑州云海信息技术有限公司 Distributed memory system data modification write method and system
CN108093033A (en) * 2017-12-06 2018-05-29 北京像素软件科技股份有限公司 Method of data synchronization and data synchronous system
CN110753005A (en) * 2019-10-17 2020-02-04 腾讯科技(深圳)有限公司 Speed limiting method, device and system, electronic equipment and computer readable storage medium
CN111078798A (en) * 2019-12-27 2020-04-28 上海莉莉丝科技股份有限公司 Distributed data processing system, method, server, and computer-readable storage medium
CN112597243A (en) * 2020-12-22 2021-04-02 新华三大数据技术有限公司 Method and device for accelerating synchronous state in Ceph cluster
CN112925558A (en) * 2019-12-09 2021-06-08 支付宝(杭州)信息技术有限公司 Model joint training method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1489052A (en) * 2002-10-11 2004-04-14 鸿富锦精密工业(深圳)有限公司 Multi-node file syn chronizing system and method
CN1664805A (en) * 2004-03-01 2005-09-07 联想(北京)有限公司 Method for realizing data validity in cluster environment
CN101771723A (en) * 2010-01-05 2010-07-07 深圳中兴网信科技有限公司 Data synchronization method
CN102088489A (en) * 2010-12-31 2011-06-08 北京理工大学 Distributed data synchronizing system and method
CN102857570A (en) * 2012-09-13 2013-01-02 清华大学 Cloud synchronized method of files and cloud storage server
CN103281798A (en) * 2013-05-30 2013-09-04 腾讯科技(深圳)有限公司 Method, device and system for achieving modification synchronization

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1489052A (en) * 2002-10-11 2004-04-14 鸿富锦精密工业(深圳)有限公司 Multi-node file syn chronizing system and method
CN1664805A (en) * 2004-03-01 2005-09-07 联想(北京)有限公司 Method for realizing data validity in cluster environment
CN101771723A (en) * 2010-01-05 2010-07-07 深圳中兴网信科技有限公司 Data synchronization method
CN102088489A (en) * 2010-12-31 2011-06-08 北京理工大学 Distributed data synchronizing system and method
CN102857570A (en) * 2012-09-13 2013-01-02 清华大学 Cloud synchronized method of files and cloud storage server
CN103281798A (en) * 2013-05-30 2013-09-04 腾讯科技(深圳)有限公司 Method, device and system for achieving modification synchronization

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104539655A (en) * 2014-12-05 2015-04-22 蓝信工场(北京)科技有限公司 Method and system for synchronizing and displaying address book in batches
CN104484428B (en) * 2014-12-18 2018-11-20 深圳市科漫达智能管理科技有限公司 A kind of method, apparatus and system that data are synchronous
CN104484428A (en) * 2014-12-18 2015-04-01 深圳市科漫达智能管理科技有限公司 Data synchronization method, data synchronization device and data synchronization system
CN106708842A (en) * 2015-11-12 2017-05-24 阿里巴巴集团控股有限公司 Data loading method for application system, database and application system
CN106708842B (en) * 2015-11-12 2021-02-09 创新先进技术有限公司 Method for loading data by application system, database and application system
CN106484321A (en) * 2016-09-08 2017-03-08 华为数字技术(成都)有限公司 A kind of date storage method and data center
CN106779936A (en) * 2016-12-08 2017-05-31 上海携程国际旅行社有限公司 Firm Order system and Firm Order method
CN106779936B (en) * 2016-12-08 2020-09-22 上海携程国际旅行社有限公司 Order verification system and order verification method
CN107357536B (en) * 2017-07-28 2020-07-07 郑州云海信息技术有限公司 Data modification and writing method and system for distributed storage system
CN107357536A (en) * 2017-07-28 2017-11-17 郑州云海信息技术有限公司 Distributed memory system data modification write method and system
CN108093033A (en) * 2017-12-06 2018-05-29 北京像素软件科技股份有限公司 Method of data synchronization and data synchronous system
CN110753005A (en) * 2019-10-17 2020-02-04 腾讯科技(深圳)有限公司 Speed limiting method, device and system, electronic equipment and computer readable storage medium
CN112925558A (en) * 2019-12-09 2021-06-08 支付宝(杭州)信息技术有限公司 Model joint training method and device
CN112925558B (en) * 2019-12-09 2022-05-17 支付宝(杭州)信息技术有限公司 Model joint training method and device
CN111078798A (en) * 2019-12-27 2020-04-28 上海莉莉丝科技股份有限公司 Distributed data processing system, method, server, and computer-readable storage medium
CN111078798B (en) * 2019-12-27 2024-01-30 上海莉莉丝科技股份有限公司 Distributed data processing system, method, server, and computer readable storage medium
CN112597243A (en) * 2020-12-22 2021-04-02 新华三大数据技术有限公司 Method and device for accelerating synchronous state in Ceph cluster
CN112597243B (en) * 2020-12-22 2022-05-27 新华三大数据技术有限公司 Method and device for accelerating synchronous state in Ceph cluster

Similar Documents

Publication Publication Date Title
CN103561095A (en) Data synchronous method and node and storage service cluster
CN107943594B (en) Data acquisition method and device
CN104954468A (en) Resource allocation method and resource allocation device
KR102513998B1 (en) Communication methods and devices, entities and computer readable storage media
CN103237060B (en) A kind of data object acquisition, Apparatus and system
CN110427386B (en) Data processing method, device and computer storage medium
CN105335170A (en) Distributed system and incremental data updating method
CN110830581B (en) Method for improving block chain response speed, block chain application system and related equipment
CN111566620A (en) Distributed processing system and method for providing location-based services
CN111399764B (en) Data storage method, data reading device, data storage equipment and data storage medium
CN102790784A (en) Distributed cache method and system and cache analyzing method and analyzing system
CN103607424A (en) Server connection method and server system
CN108563776B (en) Offline data acquisition method and system, server and storage medium
CN104618136A (en) Configuration management method and device for blade server
CN110909978A (en) Resource processing method, device, server and computer readable storage medium
CN112395337A (en) Data export method and device
CN108833532B (en) Service processing method, device and system based on Internet of things
CN111190625A (en) APP version upgrading method, server, client and computer readable storage medium
CN111694848A (en) Method and apparatus for updating data buffer using reference count
CN111222972A (en) Account checking and clearing method and device
CN116244383A (en) BOM synchronous processing method, equipment and medium based on BOM middle station
CN115203210A (en) Hash table processing method, device and equipment and computer readable storage medium
CN110750602A (en) Method and device for determining site to which order address belongs
CN110389966B (en) Information processing method and device
CN110362575B (en) Method and device for generating global index of data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
ASS Succession or assignment of patent right

Owner name: SHENZHEN JINDIE YOUSHANG ELECTRONIC COMMERCE SERVI

Free format text: FORMER OWNER: KINGDEE SOFTWARE (CHINA) COMPANY LTD.

Effective date: 20150629

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20150629

Address after: 518057, Shenzhen, Guangdong science and Technology Park, Nanshan District science and technology twelve South Road 2 Kingdee Software Park, A, 3 South Zone

Applicant after: Shenzhen Jindie Youshang E-Business Service Co., Ltd.

Address before: 518057 Guangdong city of Shenzhen province science and technology science and Technology Park of Nanshan District twelve South Road No. 2, Kingdee Software Park A block 1-8

Applicant before: Kingdee Software (China) Co., Ltd.

C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 518057, Shenzhen, Guangdong science and Technology Park, Nanshan District science and technology twelve South Road 2 Kingdee Software Park, A, 3 South Zone

Applicant after: Shenzhen Kingdee fine fighting cloud Network Technology Co., Ltd.

Address before: 518057, Shenzhen, Guangdong science and Technology Park, Nanshan District science and technology twelve South Road 2 Kingdee Software Park, A, 3 South Zone

Applicant before: Shenzhen Jindie Youshang E-Business Service Co., Ltd.

CB02 Change of applicant information
RJ01 Rejection of invention patent application after publication

Application publication date: 20140205

RJ01 Rejection of invention patent application after publication