Embodiment
Below in conjunction with drawings and Examples, the specific embodiment of the present invention is described in further detail:
The distributed regional search network of the embodiment of the invention can be a class Chord ring, Pastry, CAN, structured P 2 P networks such as Tapestry, in this network the minimum node of node be identified to scope correspondence between the maximum node sign by the maximum magnitude in the zone to be found of traffic performance decision (for example in VOD, its traffic performance is that the length of film is 7200 seconds, then with this film corresponding distributed regional search network in, the node identification of the node of node identification minimum is 0, the node identification of the node of node identification maximum is 7200), and the routing mechanism of described network using structured p2p network.With class Chord loop network is that distributed regional search network is an example, a kind of distributed regional search network of the embodiment of the invention comprises 6 nodes as shown in Figure 1: node identification is that 0 node 0, node identification are that 3 node 3, node identification are that 7 node 7, node identification are that 13 node 13, node identification are that 20 node 20 and node identification are 50 node 50.The upper limit in the distributed regional search interval that node is preserved in this network is less than or equal to the node identification of described node, and greater than the node identification of the preceding continuous node of described node.The interval A[1 of the in store A distribution of resource formula regional search of node 3~35 wherein], the interval A of node 7 in store A distribution of resource formula regional search (3~35], the interval A of node 13 in store A distribution of resource formula regional search (7~35], the interval A of node 20 in store A distribution of resource formula regional search (13~35], the interval A of node 50 in store A distribution of resource formula regional search (20~35].
If there is node to add this distributed regional search network, the distributed regional search that node then to be added is preserved is interval to be between the seek area of the node identification that the upper limit is less than or equal to this node to be added between the seek area that the descendant node of this node to be added was preserved before this node to be added added; The descendant node of this node to be added is limited to the left side of the node identification of this node to be added and opens interval closed at the right on the distributed regional search interval of this node adding back preservation to be added is.With node identification be 5 node 5 to add these distributed regional search networks be example, the descendant node of node 5 is a node 7.After node 5 adds, the interval A of node 5 in store A distribution of resource formula regional search (3~35], the interval A of node 7 in store A distribution of resource formula regional search (5~35].
If there is node to leave this distributed regional search network, wait then to leave that distributed regional search that the descendant node of node preserves is interval waits to leave between the seek area of node preservation for this.Leaving this distributed regional search network with node 7 is example, after node 7 leaves, the interval A of node 13 in store A distribution of resource formula regional search (3~35].
Present embodiment is by on distributed regional search network, distributed regional search interval is preserved on contiguous segmentation ground, make when searching can final route to node in the comparison of the value of searching and interval value, realized preserving under the situation of directory information of shared resource of node need not LIST SERVER, carry out the distributed regional search on distributed regional search network, reduce overhead, improved the reliability and the fail safe of system.
The flow process of the dissemination method in a kind of distributed regional search interval of the embodiment of the invention supposes in the present embodiment that node 50 is published to distributed regional search network shown in Figure 1 with B distribution of resource formula regional search interval B [2,15] as shown in Figure 2.With reference to Fig. 2, present embodiment may further comprise the steps:
Step s201 according to the upper limit in distributed regional search interval and the node identification of node, selects node to be released in distributed regional search network.If the node identification of the node in the described distributed regional search network is more than or equal to the upper limit in described B distribution of resource formula regional search interval, and the node identification of the preceding continuous node of described node is less than the upper limit in described B distribution of resource formula regional search interval, and then described node is a node to be released.Because B distribution of resource formula regional search interval described in the present embodiment is B[2,15], be limited to 2 on it, and node identification 3 is greater than 2, and node identification 0 is less than 2, so selection node 3 is a node to be released.
Step s202 issues distributed regional search interval to node to be released.To be node 50 be published to node identification with described B distribution of resource formula regional search interval B [2,15] is 3 node.
Step s203 judges whether to continue the described distributed regional search of issue interval, if then change step s204, otherwise finish.Its deterministic process is: if the node identification of described node to be released, then continues the described distributed regional search of issue interval less than the lower limit in described distributed regional search interval.Be limited to 15 owing to the following of described B distribution of resource formula regional search interval in the present embodiment, and the node identification 3 of node 3 is less than 15, so continue issue described distributed regional search interval B [2,15].
Step s204 issues described distributed regional search interval to the descendant node of described node to be released, and changes step s203.Its dissemination method is divided into dual mode:
A kind of mode is: at first interval publisher node obtains the address of the descendant node of described node to be released from node to be released, interval then publisher node is according to the address of the descendant node of described node to be released, will be published to the descendant node of described node to be released greater than the value of the node identification of described node to be released.To be issued as example to node 7, node 3 sends to node 50 with the address of node 7, and node 50 will be published to node 7 greater than 3 value according to the address of node 7, be about to B distribution of resource formula regional search interval B (3~15] be published to node 7.Adopt this mode, the process that node 50 is published to this distributed regional search network with interval B [2,15] as shown in Figure 3.After issue is finished, node 3 in store B distribution of resource formula regional search interval B [2~15], node 7 in store B distribution of resource formula regional search interval B (3~15], node 13 in store B distribution of resource formula regional search interval B (7~15], node 20 in store B distribution of resource formula regional search interval B (13~15].
Another kind of mode is: node to be released will be published to the descendant node of described node to be released greater than the value of the node identification of described node to be released.To be issued as example to node 7, node 3 will be published to node 7 greater than 3 value, be about to B distribution of resource formula regional search interval B (3~15] be published to node 7.Adopt this mode, the process that node 50 is published to this distributed regional search network with interval B [2,15] as shown in Figure 4.After issue is finished, node 3 in store B distribution of resource formula regional search interval B [2~15], node 7 in store B distribution of resource formula regional search interval B (3~15], node 13 in store B distribution of resource formula regional search interval B (7~15], node 20 in store B distribution of resource formula regional search interval B (13~15].
If there is node to add distributed regional search network, then the descendant node of node to be added is published to described node to be added with the distributed regional search interval that the interval upper limit of distributed regional search is less than or equal to the node identification of node to be added, and interval closed at the right is opened on the left side that the node identification that is limited to described node to be added is revised as in the distributed regional search interval of described descendant node.When adopting shown in Figure 1 distributed regional search network, with node identification is that to add these distributed regional search networks be example to 5 node 5, node 7 with the interval A of A distribution of resource formula regional search (3~35] be published to node 5, and the A distribution of resource formula regional search interval of node 7 is revised as and is limited to a left side of 5 and opens interval closed at the right, promptly the node 7 A distribution of resource formula regional search interval of preserving become A (5~35].After node 5 added this distributed regional search network, the structure of this network as shown in Figure 5.The interval A[1 of the in store A distribution of resource formula regional search of node 3~35 wherein], the interval A of node 5 in store A distribution of resource formula regional search (3~35], the interval A of node 7 in store A distribution of resource formula regional search (5~35], the interval A of node 13 in store A distribution of resource formula regional search (7~35], the interval A of node 20 in store A distribution of resource formula regional search (13~35], the interval A of node 50 in store A distribution of resource formula regional search (20~35].
If there is node to leave distributed regional search network, the distributed regional search interval that node then to be left will be preserved is published to the described descendant node of waiting to leave node.When adopting shown in Figure 1 distributed regional search network, leaving this distributed regional search network with node 7 is example, node 7 with the interval A of the A distribution of resource formula regional search of preserving (3~35] be published to node 13.After node 7 left this distributed regional search network, the structure of this network as shown in Figure 6.The interval A[1 of the in store A distribution of resource formula regional search of node 3~35 wherein], the interval A of node 13 in store A distribution of resource formula regional search (3~35], the interval A of node 20 in store A distribution of resource formula regional search (13~35], the interval A of node 50 in store A distribution of resource formula regional search (20~35].
Present embodiment is by carrying out distributed regional search interval the distributed post of contiguous segmentation on distributed regional search network, make when searching can final route to node in the comparison of the value of searching and interval value, realized preserving under the situation of directory information of shared resource of node need not LIST SERVER, carry out the distributed regional search on distributed regional search network, reduce overhead, improved the reliability and the fail safe of system.
The lookup method in a kind of distributed zone of the embodiment of the invention as shown in Figure 7, hypothesis node 0 need be searched the value 5 of A resource in the present embodiment in distributed regional search network shown in Figure 1.With reference to Fig. 7, the search procedure of present embodiment is: at first according to the node identification of the value of searching and node, in distributed regional search network, obtain node to be found, if the described value of searching is less than or equal to the node identification of node, and arrive the distance minimum of the node identification of described node, then described node is a node to be found; Then according to the upper limit of the described value of searching with the distributed regional search interval of described node preservation to be found, obtain the interval that covers the described value of searching, if the described value of searching is the interval of described covering value of searching greater than the upper limit in the distributed regional search interval of described node preservation to be found between then described seek area.In the present embodiment, route according to Chord, the value of searching 5 is routed to node 7, because the value of searching 5 is less than node identification 7, and the value of searching 5 is minimum to the distance of node identification 7, further the interval A that preserves greater than this node of the value of searching 5 (3~35] the upper limit 3, therefore interval (3~35] covered the value of searching 5, issue this interval node 50 and can provide service for node 0.
The route of this distributed regional search network adopts the routing mechanism of Chord in the present embodiment, its routing procedure can be the successor (descendant node of in store this node of node in this distributed regional search network, the adjacent node of this node back on the clockwise direction) and predecessor (preceding continuous node, the adjacent node of this node front on the clockwise direction) information, when certain node will be searched the information of value 5 of A resource such as node 0, node 0 at first will find the node of the value 5 of being in charge of the A resource.At first node 0 is inquired the successor of node 0, and promptly node 3; If the value 5 of node 3 not responsible management A resources, then node 3 is inquired the successor of oneself, and promptly node 7.This operation is carried out repeatedly, until the node that finds the value 5 of being in charge of the A resource.
Present embodiment is by on the distributed regional search network in store distributed regional search interval, contiguous segmentation ground, carry out searching of distributed zone, make when searching can final route to node in the comparison of the value of searching and interval value, realized preserving under the situation of directory information of shared resource of node need not LIST SERVER, carry out the distributed regional search on distributed regional search network, reduce overhead, improved the reliability and the fail safe of system.
The structural representation of a kind of node of the embodiment of the invention comprises node selected cell 81 to be released, judging unit 82 and release unit 83 as shown in Figure 8; Wherein release unit 83 is connected with judging unit 82 with node selected cell 81 to be released respectively.Node selected cell 81 to be released is used for according to the upper limit in distributed regional search interval and the node identification of node, selects node to be released in distributed regional search network, and selection result is sent to release unit 83; Judging unit 82 is used to judge whether continue the distributed regional search of issue interval, and judged result is sent to release unit 83; Release unit 83 is used for issuing distributed regional search interval to the node of distributed regional search network.
Present embodiment by with the interval contiguous segmentation of distributed regional search be published on the node in the distributed regional search network, make when searching can final route to node in the comparison of the value of searching and interval value, realized preserving under the situation of directory information of shared resource of node need not LIST SERVER, carry out the distributed regional search on distributed regional search network, reduce overhead, improved the reliability and the fail safe of system.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware, but the former is better execution mode under a lot of situation.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product is stored in the storage medium, comprise that some instructions are with so that a computer equipment (can be a personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
The above only is embodiments of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.