CN102624936A - Method and device for distributing node identity - Google Patents

Method and device for distributing node identity Download PDF

Info

Publication number
CN102624936A
CN102624936A CN2011100299448A CN201110029944A CN102624936A CN 102624936 A CN102624936 A CN 102624936A CN 2011100299448 A CN2011100299448 A CN 2011100299448A CN 201110029944 A CN201110029944 A CN 201110029944A CN 102624936 A CN102624936 A CN 102624936A
Authority
CN
China
Prior art keywords
node
backup
physical machine
confirms
subelement
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
Application number
CN2011100299448A
Other languages
Chinese (zh)
Other versions
CN102624936B (en
Inventor
李刚
彭晋
乐利锋
台璇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
Original Assignee
China Mobile Communications Group 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 China Mobile Communications Group Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201110029944.8A priority Critical patent/CN102624936B/en
Publication of CN102624936A publication Critical patent/CN102624936A/en
Application granted granted Critical
Publication of CN102624936B publication Critical patent/CN102624936B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method and a device for distributing a node identity (ID) to increase the accuracy of node ID assignment and assure that backup nodes of the virtual nodes of a physical machine are not on the same physical machine. The method for assigning a node identity comprises the steps of: selecting a first node ID from the assignable node identities when a first node is required to be assigned a node ID; determining a backup node which corresponds to the first node according to the selected node ID; determining the backup nodes respectively corresponding to the second nodes which are on the same physical machine as the first node; constructing collections of the backup nodes; assigning the selected node ID to the first node if at least one collection of the backup nodes which meets the predetermined requirements is judged to be exist; and if not, selecting the next node ID and returning to continue executing the above operation.

Description

Node identification distribution method and device
Technical field
The present invention relates to moving communicating field, relate in particular to a kind of node identification distribution method and device.
Background technology
The Chord agreement is a kind of structuring point-to-point (P2P, Point to Point) agreement, according to this agreement; Each node is corresponding mutually different node identification (ID respectively; Identity), and the corresponding keyword of each node also identifies with mutually different keyword ID respectively, wherein; General consistency hash algorithm or other P2P algorithms of adopting calculates the characteristic information of each node respectively; Thereby obtain the node ID value of each node, wherein the characteristic information of node can be unique characteristic informations such as Internet protocol (IP, Internet Protocol) address of node.When node ID length was set to m, the span of node ID value was [0~2 m-1].According to the Chord agreement, the node ID value can be formed an ID ring, and is as shown in Figure 1; Be node ID length and be 3 ID ring, the digitized representation node ID value on the ID ring, the node 0 among Fig. 1, node 1 and node 3 are the node that has distributed the ID value; Other nodes are the node of ID value to be allocated; Each node on the ring all has a descendant node (successor node), and forerunner's node is also arranged, to the arbitrary node n that adds on the ID ring; Its descendant node is meant node nearest apart from node n along clockwise direction on the ID ring, and forerunner's node of node n then is meant counterclockwise nearest apart from the node n node in ID ring upper edge.
The Chord agreement is eliminated central administration point, having advantage aspect shake of reply node and the extensive node networking, therefore is applicable to the Internet (Internet) deployed environment.In large-scale distributed system, node possibly add and withdraw from the ID ring at any time, in order to guarantee professional continuity, is necessary for each node and distributes one or more backup node.The Chord agreement is chosen descendant node or forerunner's node of node usually as backup node, perhaps according to the method for Hash (HASH) space five equilibrium, confirms the backup node of node.
In the actual deployment process; Because the performance of physical machine is very powerful, in general can be at a plurality of virtual machines of single physical machine deploy, i.e. dummy node; Therefore; In the node ID assigning process of dummy node,, make the backup node of each dummy node on the same physical machine all on same physical machine because that node ID is distributed is inaccurate.So when the physical machine at each dummy node place breaks down; The a plurality of dummy nodes that are deployed on this physical machine all can't operate as normal, and should start the backup node of each dummy node this moment, but if the backup node of a plurality of dummy nodes all on same physical machine; And fault has also taken place in this physical machine; The backup node of so a plurality of dummy nodes also just can't operate as normal, causes the backup node of a plurality of dummy nodes to lose efficacy simultaneously, makes that reliability of nodes and disaster tolerance property are lower.
Summary of the invention
The invention discloses a kind of node identification distribution method and device,, improve the reliability and the disaster tolerance property of the backup node of each dummy node in order to improve the accuracy that node ID is distributed.
The embodiment of the invention provides a kind of node identification distribution method, comprising:
When needs identify ID for the first node distribution node, in assignable node ID, select first node ID;
According to the node ID of selecting, confirm the backup node that first node is corresponding; And
Confirm to be positioned at the corresponding respectively backup node of each Section Point on the same physical machine with first node;
According to the corresponding backup node of the first node of the confirming backup node corresponding respectively with each Section Point; Construct each backup node set, comprise at least one corresponding backup node of first node at least one backup node corresponding respectively in each backup node set with each Section Point;
Judgement is in each backup node set of structure, and whether exist at least one backup node set to satisfy pre-conditioned, wherein saidly pre-conditionedly all is not positioned on the same physical machine for any two backup nodes;
If judged result is for being that this node ID that then will select is distributed to said first node; Otherwise
In assignable node ID, select next node ID, and return to continue to carry out and confirm the corresponding backup node of first node and each Section Point, construct each backup node set and judge whether to exist at least one backup node set to satisfy pre-conditioned operation.
The embodiment of the invention provides a kind of node distributor, comprising:
First selected cell is used in assignable node ID, selecting first node ID when needs during for first node distribution node sign ID, and in the judged result of judging unit for not the time, select next node ID;
First confirms the unit, is used for the node ID selected according to first selected cell, confirms the backup node that first node is corresponding;
Second confirms the unit, is used for confirming being positioned at the corresponding respectively backup node of each Section Point on the same physical machine with first node;
Structural unit; Be used for according to the corresponding backup node of the first node of the confirming backup node corresponding respectively with each Section Point; Construct each backup node set, comprise at least one corresponding backup node of first node at least one backup node corresponding respectively in each backup node set with each Section Point;
Judging unit is used for judging each backup node set at the structural unit structure, and whether exist at least one node set to satisfy pre-conditioned, saidly pre-conditionedly all is not positioned on the same physical machine for any two backup nodes;
Allocation units are used in the judged result of judging unit the node ID that first selected cell is selected being distributed to said first node when being.
Nodes-distributing method that the embodiment of the invention provides and device in the node identification assigning process, when needs during for first node distribution node ID, are at first selected first node ID; Confirm the backup node of first node according to this node ID of choosing; After definite and first node are positioned at the backup node of each Section Point on the same physical machine; From the backup node of first node, select at least one backup node; And from the backup node of each Section Point, select at least one backup node to form all possible backup node set; Judge respectively whether the set of each backup node satisfies equal pre-conditioned on same physical machine not of any two backup nodes in this backup node set, if having at least a backup node set to satisfy that this is pre-conditioned, the node ID that then will select is distributed to first node; This is pre-conditioned if all node set all do not satisfy; Then selecting next assignable node ID, and repeat said process, is the node ID that needs the node of distribution node ID to determine according to aforesaid way; Reach the purpose of the accuracy that improves the node ID distribution, improved the reliability and the disaster tolerance property of the backup node of each dummy node.
Other features and advantages of the present invention will be set forth in specification subsequently, and, partly from specification, become obvious, perhaps understand through embodiment of the present invention.The object of the invention can be realized through the structure that in the specification of being write, claims and accompanying drawing, is particularly pointed out and obtained with other advantages.
Description of drawings
Fig. 1 is in the prior art, and node ID length is the sketch map of 3 ID ring;
Fig. 2 is in the embodiment of the invention, the implementing procedure sketch map of node identification distribution method;
Fig. 3 is in the embodiment of the invention, a kind of possible structural representation of node identification distributor;
Fig. 4 is in the embodiment of the invention, is the implementing procedure sketch map of dummy node V1 distribution node ID;
Fig. 5 a is in the embodiment of the invention, confirms the sketch map of start node sign i-ID for node V1;
Fig. 5 b is in the embodiment of the invention, in the assignable node ID between neighbors, confirms the sketch map of node ID for node V1.
Embodiment
For in the process that node ID is distributed, reach the purpose that improves the accuracy that node ID distributes, on same physical machine, the embodiment of the invention provides a kind of node ID distribution method and device with the backup node of avoiding each dummy node on the same physical machine.
Below in conjunction with Figure of description the preferred embodiments of the present invention are described; Be to be understood that; Preferred embodiment described herein only is used for explanation and explains the present invention; And be not used in qualification the present invention, and under the situation of not conflicting, embodiment and the characteristic among the embodiment among the present invention can make up each other.
As shown in Figure 2, the implementing procedure sketch map of the node ID distribution method that provides for the embodiment of the invention comprises the steps:
S20, when needs during for first node distribution node ID, in assignable node ID, select first node ID:
The node ID that S21, basis are selected is confirmed the backup node that first node is corresponding;
S22, definite each Section Point that is positioned on the same physical machine with first node are distinguished corresponding backup node;
The backup node that the backup node that the first node that S23, basis are confirmed is corresponding and each Section Point are corresponding respectively; Construct each backup node set, comprise at least one corresponding backup node of first node at least one backup node corresponding respectively in each backup node set with each Section Point;
S24, judgement are in each backup node set of structure; Whether exist at least one backup node set to satisfy pre-conditioned; If judged result then goes to step S25 for being, if judged result is for denying; Then go to step S26, wherein pre-conditioned all is not positioned on the same physical machine for any two backup nodes;
S25, this node ID that will select are distributed to first node;
S26, in assignable node ID, select next node ID, and return and continue execution in step step S21~S24.
In the practical implementation, in step S20, can in assignable node ID, select first node ID at random, and in the judged result of step S24 for not the time, select next node ID at random.
In addition, also can confirm the selecting sequence of assignable node ID earlier, follow-up according to this selecting sequence, select node ID successively, wherein, but can confirm the selecting sequence of distribution node ID according to following steps:
S200, according to the node diagnostic information of first node, confirm the start node ID of first node;
Concrete, the node diagnostic information of first node comprises the information that the IP address of first node, domain name etc. can the unique identification first nodes, according to the node diagnostic information of first node, can utilize the HSAH function to generate the start node ID of this first node;
S201, this start node ID confirmed as first node ID of selection;
S202, according to this start node ID, confirm the node ID of each neighbors of first node;
Concrete, confirm that the node ID of each neighbors of first node comprises:, obtain the corresponding relation between the node ID of each neighbors of node ID and this node of this node to each node; According to said start node ID, in the corresponding relation that obtains, search the node ID of each corresponding neighbors of said start node ID.
Suppose that node ID is V-ID, utilizes the rule that is provided with in advance to confirm the adjacent area of V-ID, this rule that is provided with in advance can be confirmed algorithm for the adjacent area, or specifies the degree of depth of adjacent area in advance.The node of the ID of distribution node that comprises in the adjacent area is the neighbors of V-ID corresponding nodes, the corresponding relation between the node ID of node ID and each neighbors can be expressed as V-ID-N-ID1, V-ID-N-ID2 ... V-ID-N-IDp}; Perhaps; Be no more than the node ID of the node ID of having distributed of the preassigned adjacent area degree of depth with difference as the V-ID neighbors with V-ID; Corresponding relation between the node ID of node ID and each neighbors can be expressed as V-ID-N-ID1, V-ID-N-ID2 ... V-ID-N-IDp}.Thus, can in the corresponding relation between the node ID of node ID and each neighbors, search the node ID of each corresponding neighbors of this start node ID according to start node ID.
That comprised, assignable node ID between the node ID of S203, any two the adjacent neighborss of acquisition;
Wherein, assignable node ID comprise the start node ID that determines and the node ID of the neighbors of the first node determined according to this start node ID between the node ID that is not assigned with.
S204, the preset set pattern really of basis are then confirmed the selecting sequence of each node ID of acquisition.
Concrete; With start node ID is first assignable node ID; In the neighbors of the first node of confirming according to this start node ID; According to the ascending order of start node ID difference, comprised between two successively will be often adjacent neighbors ID, assignable node ID sorts, and confirms the selecting sequence of assignable node ID thus; Preferable; Uniformity for local nodes ID distribution; When confirming the selecting sequence of assignable node ID; Can only select the 1/2 corresponding nodes ID of place of two adjacent neighbors ID to sort, with the assignable node ID of selecting according to confirming selecting sequence with the ascending order of start node ID difference.
In the practical implementation, in step S21,, confirm the backup node that first node is corresponding, comprising according to the node ID of selecting:
According to the node ID of selecting, in preset node ID and the corresponding relation between the backup node ID, search each the corresponding backup node ID of node ID that selects;
Each backup node that the backup node ID that finds is corresponding is confirmed as each corresponding backup node of first node.
Concrete, according to the node ID (comprising the node ID and the unappropriated node ID of having distributed) of each node, utilize P2P backup algorithm to confirm the backup node of each node ID; For example; Node ID be the corresponding backup node of V1-ID can be expressed as V1-B-ID1, V1-B-ID2 ... V1-B-IDm}.Like this, after node ID is confirmed, the node ID that just can search each corresponding backup node of this node ID according to the corresponding relation between the node ID of this node ID and backup node, thereby, also can determine each backup node of this node ID corresponding nodes.
In the practical implementation, among the step S23, confirm to be positioned at the corresponding respectively backup node of each Section Point on the same physical machine, comprising with first node:
Obtain the corresponding relation between physical machine ID and the node ID;
Confirm the physical machine ID of the physical machine at said first node place;
According to the physical machine ID that determines, in said corresponding relation, search each corresponding node ID of physical machine ID of determining;
Each node that each node ID that finds is corresponding is confirmed as with said first node and is positioned at each Section Point on the same physical machine;
Confirm the backup node of each Section Point respectively.
Concrete; Corresponding relation on physical machine ID and this physical machine ID corresponding physical machine between the node ID of dummy node can be expressed as: { W1-V1-ID1; W1-V2-ID2 ... W1-Vn-IDn}, according to this corresponding relation; After the physical machine at first node place that need to have confirmed distribution node ID; Can confirm and the first node node ID of each Section Point on the physical machine that coexists according to this corresponding relation, thereby can confirm each Section Point, also just can confirm the backup node of each Section Point according to the corresponding relation between the node ID of node ID and backup node.
In the practical implementation, the node identification distribution method also comprises:
When the physical machine at said first node place breaks down, in satisfying each pre-conditioned backup node set, select a backup node set; And
Start each backup node in this backup node set of selecting, take over corresponding first node or the Section Point of said each backup node and work on.
In the practical implementation; But after the selecting sequence of having confirmed distribution node ID; According to first assignable node ID (being the start node ID in the embodiment of the invention) that this selecting sequence is confirmed, obtain the corresponding backup node of first node, be assumed to be { V1-B-ID1; V1-B-ID2 ... V1-B-IDm}; With first node be positioned on the same physical machine each Section Point for V2-ID2, V3-ID3 ... Vn-IDn}; Equally, obtain the corresponding backup node of each Section Point, suppose that node ID is that the corresponding backup node of V2-ID2 is { V2-B-ID1; V2-B-ID2 ... V2-B-IDm}, and the like; Node ID be the corresponding backup node of Vn-IDn for Vn-B-ID1, Vn-B-ID2 ... Vn-B-IDm}; After having confirmed the backup node of first node and each Section Point, from the backup node of first node, select a backup node, select a backup node to form the backup node set in the backup node of each Section Point; For example, the backup node set can be { V1-B-ID1, V2-B-ID1; ... Vn-B-ID1}, perhaps { V1-B-ID1, V2-B-ID2; Vn-B-ID2}; And the like, to each backup node set, it is pre-conditioned to judge whether it satisfies: any two backup nodes in this backup node set all are not positioned on the same physical machine; If exist the set of backup node to satisfy that this is pre-conditioned at least, then this first assignable node ID distributed to first node; If the set of all backup nodes does not all satisfy condition; Then according to the selecting sequence of determining; Confirm that successively next assignable node ID is as interim node ID; And to this interim node ID execution said process, until this interim node ID of basis, the backup node of the first node of determining and first node are positioned at least one backup node set of the backup node composition of each Section Point on the same physical machine and satisfy pre-conditioned; Confirm that then this interim node ID is to distribute to the node ID of first node, and should interim node ID distribute to first node.
Based on same technical conceive; A kind of node identification distributor also is provided in the embodiment of the invention; Because the principle of this device solves technical problem is similar with the node identification distribution method, so the enforcement of this device can repeat part and repeat no more referring to the enforcement of method.
As shown in Figure 3, a kind of possible structural representation of node identification distributor for the embodiment of the invention provides comprises:
First selected cell 301 is used in assignable node ID, selecting first node ID when needs during for first node distribution node sign ID, and in the judged result of judging unit 305 for not the time, select next node ID;
First confirms unit 302, is used for the node ID selected according to first selected cell 301, confirms the backup node that first node is corresponding;
Second confirms unit 303, is used for confirming being positioned at the corresponding respectively backup node of each Section Point on the same physical machine with first node;
Structural unit 304; Be used for according to the corresponding backup node of the first node of the confirming backup node corresponding respectively with each Section Point; Construct each backup node set, comprise at least one corresponding backup node of first node at least one backup node corresponding respectively in each backup node set with each Section Point;
Judging unit 305 is used for judging each backup node set at structural unit 304 structures, and whether exist at least one node set to satisfy pre-conditioned, and this is pre-conditioned all not to be positioned on the same physical machine for any two backup nodes;
Allocation units 306 are used for the node ID that first selected cell 301 is selected is distributed to said first node.
In the practical implementation, first selected cell specifically comprises:
First confirms subelement, is used for confirming the selecting sequence of assignable node ID;
The chooser unit is used for confirming the selecting sequence that subelement is determined according to first, selects first node ID, and in the judged result of judging unit 305 for not the time, confirm the selecting sequence that subelement is determined according to first, select next node ID.
In the practical implementation, first confirms that subelement specifically comprises:
First determination module is used for the node diagnostic information according to first node, confirms the start node ID of first node;
Second determination module, the start node ID that is used for that first determination module is determined confirms as first node ID of selection;
The 3rd determination module is used for the start node ID that determines according to first determination module, confirms the node ID of each neighbors of first node;
Obtain module, be used to obtain that comprised, assignable node ID between the node ID of any two neighborss;
The 4th determination module is used for according to preset set pattern really then confirming the selecting sequence of each node ID that the acquisition module obtains.
In the practical implementation, the 3rd determination module specifically comprises:
Obtain submodule, be used for to each node, obtain the corresponding relation between the node ID of each neighbors of node ID and this node of this node;
Search submodule, be used for, in obtaining the corresponding relation that submodule obtains, search the node ID of each corresponding neighbors of start node ID according to said start node ID.
In the practical implementation, first confirms that unit 302 specifically comprises:
First searches subelement, is used for the node ID selected according to first selected cell 301, in preset node ID and the corresponding relation between the backup node ID, searches each the corresponding backup node ID of node ID that selects;
Second confirms subelement, is used for searching each corresponding backup node of backup node ID that subelement finds with first, confirms as each corresponding backup node of first node.
In the practical implementation, second confirms that unit 303 specifically comprises:
Obtain subelement, be used to obtain the corresponding relation between the node ID of physical machine ID and Section Point;
The 3rd confirms subelement, is used for the physical machine ID of the physical machine at definite said first node place;
Second searches subelement, is used for confirming the physical machine ID that subelement is determined according to the 3rd, in obtaining the corresponding relation that subelement gets access to, searches the 3rd and confirms each corresponding node ID of physical machine ID that subelement is determined;
The 4th confirms subelement, is used for searching each corresponding node of each node ID that subelement finds with second, confirms as with first node to be positioned at each Section Point on the same physical machine;
The 5th confirms subelement, is used for confirming respectively the backup node of each Section Point.
In the practical implementation, the node identification distributor can also comprise:
Second selected cell 307 is used for when the physical machine at said first node place breaks down, and in satisfying each pre-conditioned backup node set, selects a backup node set;
Start unit 308 is used for starting each backup node of this backup node set that second selected cell 307 selects.
The execution mode of embodiment for a better understanding of the present invention, the process of thinking dummy node V1 distribution node ID below is that example describes.
As shown in Figure 4, the implementing procedure sketch map for dummy node V1 distribution node ID comprises the steps:
S401, generate the start node ID of V1 based on the HASH algorithm;
Concrete, suppose that the start node ID according to HASH algorithm generation V1 is i-ID;
S402, according to this start node ID, confirm the node ID of the neighbors of V1;
Concrete, suppose that the node ID of the neighbors of V1 is V1-N-ID1, V1-N-ID2 ... V1-N-IDp};
That comprised, assignable node ID between the node ID of S403, any two the adjacent neighborss of acquisition V1;
Concrete; But the distribution node ID to comprise between V1-N-ID1 and the V1-N-ID2 is an example, but supposes that the distribution node that comprises between V1-N-ID1 and the V1-V-ID2 is { V1-N1-ID1, V1-N2-ID2; V1-N3-ID3; ... V1-Nm-IDm}, for the ease of describing, suppose that node ID in this set is according to ascending sequence arrangement; And the like, obtain between V1-N-ID2 and the V1-N-ID3, between V1-N-ID3 and the V1-N-ID4 ..., that comprise, assignable node ID between V1-N-IDp-1 and the V1-N-IDp;
S404, be starting point, the assignable node ID of all acquisitions is arranged according to ascending order, confirm the selecting sequence of assignable node ID with start node ID;
S405, according to the selecting sequence of determining, select first node ID;
S406, according to the node ID of selecting, confirm each backup node that V1 is corresponding;
Concrete, the corresponding relation between node ID and backup node ID, search each corresponding backup node ID of node ID of selection;
S407, definite each Section Point that is positioned on the same physical machine with V1 are distinguished corresponding backup node;
Concrete; Suppose that the dummy node that coexists on the physical machine with V1 has V2, V3; And the physical machine ID of the physical machine that is positioned at of definite V1, according to this physical machine ID, the node ID of searching V2 and V3 the corresponding relation between the node ID of physical machine ID and Section Point; The corresponding relation between node ID and backup node ID, search the backup node ID of V2 and the backup node ID of V3;
S408, construct the set of all backup nodes;
Concrete, the backup node set should be satisfied at least one backup node and at least one backup node of V2 and at least one backup node of V3 that comprises V1 in this backup node set;
Whether S409, to judge whether to exist the set of at least one backup node to satisfy pre-conditioned, if, execution in step S410 then, if not, execution in step S411 then;
Concrete, pre-conditionedly all be not positioned on the same physical machine for any two backup nodes of this backup node in gathering; Shown in Fig. 5 a, for confirming that initial marking i-ID is a sketch map of distributing to the node ID of V1, wherein; V1, V2, V3 are the dummy node that is positioned at same physical machine; V1-N-ID1, V1-N-ID2 ... V1-N-ID5} is the neighbors of the V1 that determines according to initial marking i-ID;
S410, the node ID of selecting is confirmed as the node ID of distributing to V1, and execution in step S412;
S411, according to the selecting sequence of determining, select next assignable node ID, and return execution in step S406;
Concrete, shown in Fig. 5 b, for confirming to distribute to the node ID sketch map of V1 in the assignable node ID between the neighbors of V1; Wherein, V1, V2; V3 is the dummy node that is positioned at same physical machine; V1-N-ID1, V1-N-ID2 ... V1-N-ID5} is the neighbors of the V1 that determines according to initial marking i-ID;
S412, the node ID of the V1 that determines is distributed to V1.
Nodes-distributing method that the embodiment of the invention provides and device in the node identification assigning process, when needs during for first node distribution node ID, are at first selected first node ID; Confirm the backup node of first node according to this node ID of choosing; After definite and first node are positioned at the backup node of each Section Point on the same physical machine; From the backup node of first node, select at least one backup node; And from the backup node of each Section Point, select at least one backup node to form all possible backup node set; Judge respectively whether the set of each backup node satisfies equal pre-conditioned on same physical machine not of any two backup nodes in this backup node set, if having at least a backup node set to satisfy that this is pre-conditioned, the node ID that then will select is distributed to first node; This is pre-conditioned if all node set all do not satisfy; Then selecting next assignable node ID, and repeat said process, is the node ID that needs the node of distribution node ID to determine according to aforesaid way; Reach the purpose of the accuracy that improves the node ID distribution, improved the reliability and the disaster tolerance property of the backup node of each dummy node.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, belong within the scope of claim of the present invention and equivalent technologies thereof if of the present invention these are revised with modification, then the present invention also is intended to comprise these changes and modification interior.

Claims (14)

1. a node identification distribution method is characterized in that, comprising:
When needs identify ID for the first node distribution node, in assignable node ID, select first node ID;
According to the node ID of selecting, confirm the backup node that first node is corresponding; And
Confirm to be positioned at the corresponding respectively backup node of each Section Point on the same physical machine with first node;
According to the corresponding backup node of the first node of the confirming backup node corresponding respectively with each Section Point; Construct each backup node set, comprise at least one corresponding backup node of first node at least one backup node corresponding respectively in each backup node set with each Section Point;
Judgement is in each backup node set of structure, and whether exist at least one backup node set to satisfy pre-conditioned, wherein saidly pre-conditionedly all is not positioned on the same physical machine for any two backup nodes;
If judged result is for being that this node ID that then will select is distributed to said first node; Otherwise
In assignable node ID, select next node ID, and return to continue to carry out and confirm the corresponding backup node of first node and each Section Point, construct each backup node set and judge whether to exist at least one backup node set to satisfy pre-conditioned operation.
2. the method for claim 1 is characterized in that, in assignable node ID, selects first node ID, specifically comprises:
Confirm the selecting sequence of assignable node ID;
According to the selecting sequence of determining, select first node ID;
In assignable node ID, select next node ID, specifically comprise:
According to the said selecting sequence of determining, select next node ID.
3. method as claimed in claim 2 is characterized in that, confirms the selecting sequence of assignable node ID, specifically comprises:
According to the node diagnostic information of said first node, confirm the start node ID of first node;
Said start node ID is confirmed as first node ID of selection;
According to said start node ID, confirm the node ID of each neighbors of said first node;
Obtain that comprised, assignable node ID between the node ID of any two adjacent neighborss;
According to preset set pattern really then, confirm the selecting sequence of each node ID of acquisition.
4. method as claimed in claim 3 is characterized in that, confirms the node ID of each neighbors of said first node, specifically comprises:
To each node, obtain the corresponding relation between the node ID of each neighbors of node ID and this node of this node;
According to said start node ID, in the corresponding relation that obtains, search the node ID of each corresponding neighbors of said start node ID.
5. the method for claim 1 is characterized in that, the node ID that said basis is selected is confirmed the backup node that first node is corresponding, specifically comprises:
According to the node ID of selecting, in preset node ID and the corresponding relation between the backup node ID, search each the corresponding backup node ID of node ID that selects;
Each backup node that the backup node ID that finds is corresponding is confirmed as each corresponding backup node of first node.
6. the method for claim 1 is characterized in that, said definite each Section Point that is positioned on the same physical machine with first node is distinguished corresponding backup node, specifically comprises:
Obtain the corresponding relation between physical machine ID and the node ID;
Confirm the physical machine ID of the physical machine at said first node place;
According to the physical machine ID that determines, in said corresponding relation, search each corresponding node ID of physical machine ID of determining;
Each node that each node ID that finds is corresponding is confirmed as with said first node and is positioned at each Section Point on the same physical machine;
Confirm the backup node of each Section Point respectively.
7. like the described method of the arbitrary claim of claim 1 to 6, it is characterized in that, also comprise:
When the physical machine at said first node place breaks down, in satisfying said each pre-conditioned backup node set, select a backup node set; And
Start each backup node in this backup node set of selecting.
8. a node identification distributor is characterized in that, comprising:
First selected cell is used in assignable node ID, selecting first node ID when needs during for first node distribution node sign ID, and in the judged result of judging unit for not the time, select next node ID;
First confirms the unit, is used for the node ID selected according to first selected cell, confirms the backup node that first node is corresponding;
Second confirms the unit, is used for confirming being positioned at the corresponding respectively backup node of each Section Point on the same physical machine with first node;
Structural unit; Be used for according to the corresponding backup node of the first node of the confirming backup node corresponding respectively with each Section Point; Construct each backup node set, comprise at least one corresponding backup node of first node at least one backup node corresponding respectively in each backup node set with each Section Point;
Judging unit is used for judging each backup node set at the structural unit structure, and whether exist at least one node set to satisfy pre-conditioned, saidly pre-conditionedly all is not positioned on the same physical machine for any two backup nodes;
Allocation units are used in the judged result of judging unit the node ID that first selected cell is selected being distributed to said first node when being.
9. device as claimed in claim 8 is characterized in that, first selected cell specifically comprises:
First confirms subelement, is used for confirming the selecting sequence of assignable node ID;
The chooser unit is used for confirming the selecting sequence that subelement is determined according to first, selects first node ID, and in the judged result of judging unit for not the time, confirm the selecting sequence that subelement is determined according to first, select next node ID.
10. device as claimed in claim 9 is characterized in that, first confirms that subelement specifically comprises:
First determination module is used for the node diagnostic information according to said first node, confirms the start node ID of first node;
Second determination module is used for said start node ID is confirmed as first node ID of selection;
The 3rd determination module is used for confirming the node ID of each neighbors of said first node according to said start node ID;
Obtain module, be used to obtain that comprised, assignable node ID between the node ID of any two neighborss;
The 4th determination module is used for according to preset set pattern really then confirming the selecting sequence of each node ID that the acquisition module obtains.
11. device as claimed in claim 10 is characterized in that, the 3rd determination module specifically comprises:
Obtain submodule, be used for to each node, obtain the corresponding relation between the node ID of each neighbors of node ID and this node of this node;
Search submodule, be used for, obtain in the corresponding relation that submodule obtains, search the node ID of each corresponding neighbors of said start node ID said according to said start node ID.
12. device as claimed in claim 8 is characterized in that, said first confirms that the unit specifically comprises:
First searches subelement, is used for the node ID selected according to said first selected cell, in preset node ID and the corresponding relation between the backup node ID, searches each the corresponding backup node ID of node ID that selects;
Second confirms subelement, is used for searching each corresponding backup node of backup node ID that subelement finds with first, confirms as each corresponding backup node of first node.
13. device as claimed in claim 8 is characterized in that, said second confirms that the unit specifically comprises:
Obtain subelement, be used to obtain the corresponding relation between physical machine ID and the node ID;
The 3rd confirms subelement, is used for the physical machine ID of the physical machine at definite said first node place;
Second searches subelement, is used for confirming the physical machine ID that subelement is determined according to the 3rd, in said corresponding relation, searches the 3rd and confirms each corresponding node ID of physical machine ID that subelement is determined;
The 4th confirms subelement, is used for searching each corresponding node of each node ID that subelement finds with second, confirms as with said first node to be positioned at each Section Point on the same physical machine;
The 5th confirms subelement, is used for confirming respectively the backup node of each Section Point.
14. like the described device of the arbitrary claim of claim 8 to 13, it is characterized in that, also comprise:
Second selected cell is used for when the physical machine at said first node place breaks down, and in satisfying said each pre-conditioned backup node set, selects a backup node set;
Start unit is used for starting each backup node of this backup node set that second selected cell selects.
CN201110029944.8A 2011-01-27 2011-01-27 Method and device for distributing node identity Active CN102624936B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110029944.8A CN102624936B (en) 2011-01-27 2011-01-27 Method and device for distributing node identity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110029944.8A CN102624936B (en) 2011-01-27 2011-01-27 Method and device for distributing node identity

Publications (2)

Publication Number Publication Date
CN102624936A true CN102624936A (en) 2012-08-01
CN102624936B CN102624936B (en) 2015-04-22

Family

ID=46564618

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110029944.8A Active CN102624936B (en) 2011-01-27 2011-01-27 Method and device for distributing node identity

Country Status (1)

Country Link
CN (1) CN102624936B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103036949A (en) * 2012-11-27 2013-04-10 华中科技大学 Optimization method and system of Cassandra system in virtual environment
CN106850282A (en) * 2017-01-19 2017-06-13 郑州云海信息技术有限公司 Host Administration method and system in a kind of cluster file system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1256567A (en) * 1998-11-26 2000-06-14 三星电子株式会社 Home network system and method of distributing node-identifying code
US20070233832A1 (en) * 2006-03-30 2007-10-04 Matsushita Electric Industrial Co., Ltd. Method of distributed hash table node ID collision detection
WO2009010093A1 (en) * 2007-07-17 2009-01-22 Telefonaktiebolaget Lm Ericsson (Publ) Operation of p2p telecommunications networks
CN101771715A (en) * 2008-12-26 2010-07-07 华为技术有限公司 Method, device and system for establishing distribution type network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1256567A (en) * 1998-11-26 2000-06-14 三星电子株式会社 Home network system and method of distributing node-identifying code
US20070233832A1 (en) * 2006-03-30 2007-10-04 Matsushita Electric Industrial Co., Ltd. Method of distributed hash table node ID collision detection
WO2009010093A1 (en) * 2007-07-17 2009-01-22 Telefonaktiebolaget Lm Ericsson (Publ) Operation of p2p telecommunications networks
CN101771715A (en) * 2008-12-26 2010-07-07 华为技术有限公司 Method, device and system for establishing distribution type network

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103036949A (en) * 2012-11-27 2013-04-10 华中科技大学 Optimization method and system of Cassandra system in virtual environment
CN103036949B (en) * 2012-11-27 2015-06-17 华中科技大学 Optimization method and system of Cassandra system in virtual environment
CN106850282A (en) * 2017-01-19 2017-06-13 郑州云海信息技术有限公司 Host Administration method and system in a kind of cluster file system

Also Published As

Publication number Publication date
CN102624936B (en) 2015-04-22

Similar Documents

Publication Publication Date Title
US20090070773A1 (en) Method for efficient thread usage for hierarchically structured tasks
CN103714097A (en) Method and device for accessing database
JP2006174417A5 (en)
CN104486452A (en) Address processing method and related equipment and system
US9866362B2 (en) Method and system for searching network in long term evolution slave mode
CN110519406B (en) Virtual address allocation method and device, CTDB cluster and storage medium
CN103257898A (en) Resource allocation method and system in embedded system
JP2002305524A (en) Methods and devices for relevancy testing of identifier
KR20090005555A (en) Method for avoiding and overcoming indirect collision in beacon-mode wireless sensor network
CN102624936B (en) Method and device for distributing node identity
WO2005094017A1 (en) Distribution of identifiers in serverless networks
CN104202834A (en) Control method, controller and electronic equipment
CN103078843A (en) Method and device for mass data sharing of multistage deployment system
CN104301990A (en) Data synchronizing method and device
CN106550006A (en) Cloud Server resource allocation methods and device
CN106254515A (en) A kind of load-balancing method storing system and equipment
CN105389266A (en) Data management method and apparatus
CN102855328A (en) Parallel variable neighborhood search method
CN113037561A (en) Networking equipment mode switching method and device based on distributed networking system
CN101729362A (en) Method, equipment and system for realizing topology optimization of structural P2P network
CN114422526B (en) Block synchronization method and device, electronic equipment and storage medium
CN109327520B (en) Method and device for establishing connection between terminal and server node
Toda et al. Autonomous and distributed construction of locality aware skip graph
CN114710350A (en) Allocation method and device for callable resources
CN114338714A (en) Block synchronization method and device, electronic 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
C14 Grant of patent or utility model
GR01 Patent grant