[go: up one dir, main page]

CN103209207B - A kind of ordinary node of peer-to-peer network system is found and maintenance of neighbor nodal method - Google Patents

A kind of ordinary node of peer-to-peer network system is found and maintenance of neighbor nodal method Download PDF

Info

Publication number
CN103209207B
CN103209207B CN201310042269.1A CN201310042269A CN103209207B CN 103209207 B CN103209207 B CN 103209207B CN 201310042269 A CN201310042269 A CN 201310042269A CN 103209207 B CN103209207 B CN 103209207B
Authority
CN
China
Prior art keywords
node
nodes
resource
neighbor
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310042269.1A
Other languages
Chinese (zh)
Other versions
CN103209207A (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.)
CCCC Fourth Harbor Engineering Institute Co Ltd
Guangzhou Harbor Engineering Quality Inspection Co Ltd
CCCC National Engineering Research Center of Dredging Technology and Equipment Co Ltd
Original Assignee
CCCC FOURTH HARBOR GEOTECHNICAL ENGINEERING Co Ltd
GUANGZHOU SIHANG MATERIAL TECHNOLOGY Co Ltd
CCCC Fourth Harbor Engineering Institute Co Ltd
Guangzhou Harbor Engineering Quality Inspection 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 CCCC FOURTH HARBOR GEOTECHNICAL ENGINEERING Co Ltd, GUANGZHOU SIHANG MATERIAL TECHNOLOGY Co Ltd, CCCC Fourth Harbor Engineering Institute Co Ltd, Guangzhou Harbor Engineering Quality Inspection Co Ltd filed Critical CCCC FOURTH HARBOR GEOTECHNICAL ENGINEERING Co Ltd
Priority to CN201310042269.1A priority Critical patent/CN103209207B/en
Publication of CN103209207A publication Critical patent/CN103209207A/en
Application granted granted Critical
Publication of CN103209207B publication Critical patent/CN103209207B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a kind of peer-to-peer network, comprising: resource network and Local Area Network; Described resource network is made up of the resource node that shared resource quantity all in network are more; Described Local Area Network is made up of the ordinary node being in all resource nodes and shared resource quantity in same geographic area less; In the present invention, ordinary node is safeguarded some with oneself other resource node in the same area network and the connection of ordinary node according to ability, resource node safeguards the connection of some other resource nodes similar to oneself shared resource theme according to ability, also can safeguard the connection of some other resource nodes nearer with oneself geographical position.By node add with leave network method, relationships between nodes sets up and issues and cancelling method with maintaining method, node resource, effectively improve the efficiency of resource searching and decrease the consumption of the network bandwidth.

Description

Method for searching and maintaining neighbor node of common node of peer-to-peer network system
Technical Field
The invention relates to a computer network and a communication technology, in particular to a Peer-to-Peer network (P2P network for short) system structure and a resource management implementation method thereof.
Background
With the popularization of the internet and broadband access networks, second generation P2P networks based on Distributed Hash Tables (DHTs) and overlay networks (overlay networks) have been researched and applied in a great deal. However, the existing P2P network has several serious problems, which also prevent it from being applied on a larger scale. These problems include:
(1) the overlay network is a logic virtual network, and the resource positioning performance of the type of network is low due to the mismatch of the overlay network and the underlying physical network;
(2) because the distributed hash table uniformly hashes the user identification and the resource identification to the whole network, the resources obtained by the user are not carried out according to the nearby principle of the physical network, so that excessive flow is generated in the resource transmission process, and the resource transmission performance is lower;
(3) the second generation P2P network does not consider the characteristics of the node to which the target resource belongs in the resource positioning process, and therefore, the heterogeneous characteristics of the nodes in the network are not effectively utilized to preferentially select the node with higher node performance (such as higher network bandwidth, longer online time, etc.) as the resource provider, thereby improving the efficiency of subsequent resource transmission.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a peer-to-peer network system structure with strong scalability and a realization method thereof.
In order to solve the technical problems, the invention is realized by the following technical scheme:
a peer-to-peer network system, comprising: a resource network and a regional network; the resource network is a sub-network formed by all resource nodes; the regional network is a sub-network formed by all resource nodes and common nodes in the same geographic region;
the resource node is a node sharing a large amount of resources in a network, and the type of node generally has longer online time, better processing capacity and higher network bandwidth, and comprises a data server and the like deployed in the network; the type node maintains the connection of a plurality of other resource nodes similar to the shared resource theme of the node, the nodes are called friend nodes of the node, and also maintains the connection of a plurality of other resource nodes which are close to the geographical position of the node (including a local area network and an adjacent area network), the nodes are called neighbor nodes of the node;
the common nodes are other nodes except resource nodes in the network, and the type of nodes generally share less resources, have shorter online time and lower processing performance and network bandwidth; the type node maintains a plurality of connections with other resource nodes and common nodes in the same area network, and the nodes are called neighbor nodes of the node.
The construction method of the peer-to-peer network system structure comprises the following steps:
(1) a method for searching and maintaining neighbor nodes by a common node, wherein,
the steps of searching the neighbor node by the common node are as follows:
step a: the common node A determines the number of resource nodes and the number of common nodes which can be maintained according to the bandwidth and the processing capacity of the common node A;
step b: the common node A constructs a 'Find _ Neighbor' message and sends the TTL of the message1(TTL is the survival Time of the message, Time-to-Live) is set to a smaller numerical value, and then the message is sent to all nodes adjacent to the message in the physical network;
step c: the node receiving the 'Find _ Neighbor' message firstly checks whether the area number of the area network where the node is located is the same as the area number of the initiating node, if so, a response message is sent to the node A, meanwhile, the node can also forward the received 'Find _ Neighbor' message to all nodes adjacent to the node in the physical network, and the step c is repeated by all the adjacent nodes receiving the forwarded 'Find _ Neighbor' message;
step d: when the initiating node A receives the response message, checking the type of the response node, checking whether the number of the neighbor nodes of the corresponding type maintained by the initiating node A meets the requirement, if not, listing the node in a neighbor node list, otherwise, directly ignoring the message;
step e: the initiating node A checks whether the number of the Neighbor nodes reaches the requirement after sending the 'Find _ Neighbor' message for a period of time, if so, the initiating node A finishes searching the Neighbor nodes, and if not, the initiating node A waits for a period of time randomly and then sends a 'Find _ Neighbor' message (the message TTL)2Is set to be specific TTL1Larger value) to make its number of neighbor nodes meet the requirements.
The steps of the ordinary node for maintaining the neighbor node are as follows:
step a: the common node A sends an 'Is _ Live' message to all the neighbor nodes of the common node A at regular time, the neighbor nodes immediately send back an 'I _ am _ Live' message after receiving the message, and if the node A Is in continuous TSurvival of the human bodyIf the I _ am _ Live message returned by the neighbor node is not received within the time, the node A judges that the neighbor node is failed;
step b: the common node A periodically counts the previous continuous time TStatistics ofThe number of times that all neighbor nodes in the network successfully respond to the resource query message is counted, and partial neighbor nodes with the lowest response query frequency are selected, for example, 1/9 neighbor nodes occupying the total number of neighbor nodes of the node with the lowest response query frequency can be selected;
step c: the common node A gives up the connection of the failed neighbor node and the selected neighbor node with lower response query frequency, and re-executes the step of searching the neighbor node to supplement the corresponding number of new neighbor nodes;
(2) a method for searching and maintaining neighbor nodes and friend nodes by a resource node, wherein,
the steps of searching the neighbor node by the resource node are as follows:
step a: the resource node B determines the number of neighbor nodes which can be maintained according to the factors such as the bandwidth and the processing capacity of the resource node B;
step b: resource management systemThe source node B constructs a 'Find _ Neighbor' message and sends the TTL of the message3Setting the message to a proper value, and then sending the message to all nodes adjacent to the message in the physical network;
step c: the node receiving the 'Find _ Neighbor' message firstly checks whether the node is a resource node, if so, a response message is sent to the node B, and meanwhile, the node can forward the received 'Find _ Neighbor' message to all nodes adjacent to the node B in a physical network;
step d: when the initiating node B receives the response message, checking whether the number of the neighbor nodes meets the requirement, if not, listing the node in a neighbor node list, otherwise, directly ignoring the message;
step e: and the initiating node B checks whether the number of the Neighbor nodes of the initiating node B meets the requirement after sending the 'Find _ Neighbor' message for a period of time, if so, the initiating node B finishes searching the Neighbor nodes, and if not, the initiating node B randomly waits for a period of time and then re-executes the steps a to d until the number of the Neighbor nodes meets the requirement.
The step of maintaining the neighbor node by the resource node is as follows:
step a: the resource node B sends an 'Is _ Live' message to all neighbor nodes at regular time, the neighbor nodes immediately send back an 'I _ am _ Live' message after receiving the message, and if the node B Is in continuous TSurvival of the human bodyIf the I _ am _ Live message returned by the neighbor node is not received within the time, the node B judges that the neighbor node is failed;
step b: and the resource node B abandons the connection of the failed neighbor node and re-executes the step of searching the neighbor node so as to ensure that the number of the neighbor nodes reaches the requirement.
The steps of searching friend nodes by the resource nodes are as follows:
step a: the resource node B determines the number of the friend nodes which can be maintained as N friend nodes according to the factors such as the bandwidth and the processing capacity of the resource node B;
step b: the resource node B constructs a 'Find _ Friend' message and sends the TTL of the message4Set to compare TTL3The message is sent to all nodes adjacent to the message in the physical network after the message has a larger value;
step c: the node receiving the Findfriend checks whether the node is a resource node, if so, the similarity of the shared resource theme of the node and the shared resource theme of the node B is calculated, if the similarity is greater than a set threshold, a response message is sent back, otherwise, the node does not send the response message; in addition, the node also forwards the message to all nodes adjacent to the node in the physical network;
step d: when the resource node B receives the response message, checking whether the number of the friend nodes maintained by the resource node B reaches the specified number, if not, adding the node sending the response message into the friend node list, and if so, directly ignoring the response message;
step e: and the resource node B checks whether the number of the Friend nodes meets the requirement after sending the 'Find _ Friend' message for a period of time, if so, the process of searching for the Friend nodes is ended, and if not, the resource node B waits for a random period of time and then repeatedly executes the steps a to d until the number of the Friend nodes meets the requirement.
Fourthly, the steps of maintaining the friend node by the resource node are as follows:
step a: the resource node A sends 'Is _ Live' message to all friend nodes of the resource node A at regular time, when the node receives the 'Is _ Live' message, the node immediately replies the 'I _ am _ Live' message, if the node B Is in the specified continuous TSurvival of the human bodyIf the 'I _ am _ Live' message returned by the friend node is not received within the time, the friend node is judged to be invalid;
step b: the resource node B gives up the connections of the friend nodes that have failed, and at the same time, performs the step of finding friend nodes again to supplement the corresponding number of new friend nodes.
The maintenance method of the peer-to-peer network system structure comprises the following steps:
(1) the node resource issuing and canceling method is characterized in that a common node does not need to issue own resources, so that the node of the type has no resource issuing and canceling process, and only the resource issuing and canceling method of the resource node is introduced, and the specific steps comprise:
step a: the resource node B recalculates the theme of the shared resource after the new resource releases or cancels a plurality of resources;
step b: the resource node B sends the updated theme to all friend nodes, after receiving the new theme, the friend nodes perform similarity calculation on the theme and the theme of the shared resource, if the result is greater than a set threshold, the friendship between the nodes is continuously maintained, otherwise, the node B abandons the connection with the corresponding friend node;
step c: the resource node B again performs the step of finding friend nodes to supplement the corresponding number of new friend nodes.
(2) The method for joining and exiting the network by the node specifically comprises the following steps:
step a: after a new node C joins in a P2P network system, the node can determine that the node belongs to a resource node or a common node according to the quantity of shared resources, and then establishes and maintains a neighbor node and a friend node according to the type of the node to which the node belongs and corresponding steps;
step b: when the node C needs to quit the network system, the node sends an 'Exit _ Net' message to all friend nodes and nodes which list the node C as neighbor nodes;
step c: the node receiving the message abandons the connection with the node C and executes the step of searching for the neighbor node or the friend node so as to supplement the corresponding number of new neighbor nodes and friend nodes;
step d: if the node C Is suddenly paralyzed and does not send the 'Exit _ Net' message to all friend nodes and neighbor nodes in time, the friend nodes and the neighbor nodes can judge that the node C fails within a certain time by using the 'Is _ Live' message sent between the friend nodes and the neighbor nodes at fixed time, and the neighbor nodes and the friend nodes can automatically abandon the connection between the node C and the node C.
The resource inquiry process based on the peer-to-peer network system comprises the following steps:
step a: the inquiry initiating node checks the node type of the inquiry initiating node, if the node is a resource node, the inquiry initiating node executes the step b; if the node is a common node, it sends a resource inquiry message to the common nodes in all its neighbor nodes, the common node receiving the inquiry message executes step c, and at the same time, the inquiry initiating node also sends a resource inquiry message to the resource nodes in all its neighbor nodes, the message contains an attribute value: d, maximum forwarding times, wherein the attribute value is used for controlling the maximum forwarded times of the query message, and the resource node receiving the query message executes the step d;
step b: the resource node firstly constructs a resource inquiry message, and the message contains an attribute value: the node checks whether the resource to be inquired is similar to the theme of the shared resource of the node, if so, the node sends a new inquiry message to all friend nodes of the node, if not, the node sends the inquiry message to all neighbor nodes of the node, and the resource node receiving the inquiry message executes the step d;
step c: when the common node receives a resource query message, the node searches a target resource in the stored resources, and if the target resource is found, a message of query hit is sent back to the resource query initiating node; if not, the node ends the resource positioning process;
step d: when a resource node receives a resource query message, whether a target resource exists in the stored resources of the resource node is checked firstly, if yes, a message hit by the query is sent back to a resource query initiating node, if not, the attribute value of the maximum forwarding times in the message is reduced by one, whether a new numerical value is zero or not is judged, if yes, the node finishes a resource positioning process, if not, whether the theme of the resource to be queried is similar to the theme of the shared resource of the resource node is further judged, if yes, the new query message is sent to all friend nodes of the resource node, otherwise, the query message is sent to all neighbor nodes of the resource node; and d, the resource node receiving the query message repeatedly executes the step d.
The invention has the advantages that the common node in the whole P2P network only establishes the neighbor relation with other resource nodes and common nodes in the same area network, and the resource node can establish the friend-neighbor relation with the resource nodes of other area networks. The structure limits the maintenance of the topological relation among a plurality of unstable (short online time) nodes in the P2P network to a local area, and meanwhile, resource nodes which are stable (long online time) and have more shared resources in each area network are used for establishing the association among different area networks. The resource query process based on the topological structure is as follows: the query initiating node firstly checks whether the target resource exists in the neighbor node in the same area network, and if the target resource does not exist in the neighbor node, the query initiating node forwards the query message to the resource node with the similar theme with the target resource in the resource network for rapid positioning. As can be seen from the above process, the peer-to-peer network system structure is beneficial to querying a target resource nearby and providing a service nearby, and in addition, if the target resource is searched by a node in the non-local area network, the node where the target resource is located is stable and has a higher bandwidth, which provides a guarantee for efficient transmission of subsequent resources.
Drawings
FIG. 1: a peer-to-peer network architecture diagram;
FIG. 2: an example peer-to-peer network;
FIG. 3: node relationships and shared resource information in an example peer-to-peer network;
Detailed Description
The invention is further described with reference to the following figures and specific embodiments.
Referring to fig. 1, fig. 1 is a schematic diagram of a peer-to-peer network structure according to the present invention. The whole P2P network is composed of two types of nodes, one type is a resource node, which is a node sharing a large amount of resources in the network, the type of node generally has longer online time, better processing capability and higher network bandwidth, and the type of node comprises a data server deployed in the network and the like; the other node is a common node, which is a node other than the resource node in the network, and the node of the type generally shares less resources, has shorter online time and lower processing performance and network bandwidth. The resource nodes and the common nodes form the whole P2P network. Each resource node and each common node are randomly allocated with an identifier, and meanwhile, the node is also allocated with an area number according to the physical position. In this way, the following two seed P2P network spaces are partitioned by the definition of the area number and node type of the node. The method comprises the following specific steps:
resource network: a P2P sub-network formed by all resource nodes, which is indicated by a dotted oval in FIG. 1 as a resource network;
area network: a P2P sub-network formed by all resource nodes containing the designated area number and common nodes, each indicated by a solid oval in fig. 1 is an area network;
the resource node maintains a plurality of other resource node connections similar to the shared resource theme of the node, the nodes are called friend nodes of the node, and also maintains a plurality of other resource node connections close to the geographical position of the node, and the nodes are called neighbor nodes of the node. The common node maintains a plurality of connections with other resource nodes in the same area network and the common node, and the nodes are called neighbor nodes of the node.
The P2P network mainly comprises three steps of a construction method of a peer-to-peer network system structure, a maintenance method of the peer-to-peer network system structure and a resource query method based on the same structure of the peer-to-peer network.
The construction method of the peer-to-peer network system structure comprises the following steps: (1) a method for searching and maintaining neighbor nodes by common nodes, and (2) a method for searching and maintaining neighbor nodes and friend nodes by resource nodes.
(1) Method for searching and maintaining neighbor node by common node
Referring to fig. 2, fig. 2 is an example peer-to-peer network. When a node a just joins a regional network I, the node does not have any Neighbor node or friend node, firstly, the node determines that the type of the node a is a common node according to the characteristic that the number of shared resources of the node a is small, then the node a constructs a 'Find _ Neighbor' message and sends the message to all nodes C and d adjacent to the node a in a physical network, after the nodes C and d receive the 'Find _ Neighbor' message, the region number of the regional network where the node a is located is found to be the same as the region number of an initiating node, then a response message is sent to the node a, meanwhile, the nodes C and d also respectively forward the received 'Find _ Neighbor' message to all nodes b, f and G adjacent to the node a in the physical network, and then the nodes b, f and G respectively repeat the previous operations of the nodes C and d, and the process is continued until the TTL value in the 'Find _ Neighbor' message is reduced to zero. After the node a sends the 'Find _ Neighbor' message, the node a waits for response messages sent back by other nodes, and lists the corresponding nodes in a Neighbor node list, after the node a sends the 'Find _ Neighbor' message for a period of time, the node a checks whether the number of the Neighbor nodes of the node a meets the requirement, if the number of the Neighbor nodes meets the requirement, the process of searching for the Neighbor nodes is finished, if the number of the Neighbor nodes does not meet the requirement, the node a waits for a random period of time and then initiates the step of searching for the Neighbor nodes again until the number of the Neighbor nodes meets the requirement, and the Neighbor nodes determined by the node a finally are supposed to comprise: nodes b, d, C and G.
In the process of maintaining the neighbor nodes of the node a, the nodes a and b, d, C and G send messages to each other periodically to declare that the nodes a and b are still in the network, and if the node b does not send back messages within the specified time, the node a considers that the node b has failed. In addition, the node a also counts the times that all neighbor nodes successfully respond to the resource query message in the previous continuous time, and selects a plurality of neighbor nodes with the lowest response query frequency, if the selected node is d, the node a interrupts the connection between the node a and the nodes b and d, and re-searches for new neighbor nodes for supplement, and if the found new neighbor nodes are f and h, the current neighbor node of the node a is updated as: nodes f, h, C and G.
(2) Method for searching and maintaining neighbor node and friend node by resource node
Referring to fig. 2, when node J just joins regional network II, the node does not have any Neighbor node or friend node, first, it determines that its category is resource node according to its characteristic of large amount of shared resources, then node J constructs "Find _ Neighbor" message and sends it to all nodes G, I and m adjacent to itself in the physical network, after node G, I and m receive "Find _ Neighbor" message, it checks whether its type is resource node, since node G and I Find itself to be resource node, they send response message to node J, node m is not resource node and therefore does not send response message to node J, furthermore, node G, I and m also forward the received "Find _ Neighbor" message to all nodes d, h, L and o adjacent to itself in the physical network, after that, node d, h, L and o repeat node G, h, L and o respectively, I and m just before, the above process continues until the TTL value in the "Find _ Neighbor" message is reduced to zero. After node J sends the 'Find _ Neighbor' message, it waits for the response message sent back by other nodes, and lists the corresponding node in its Neighbor node list, after sending the 'Find _ Neighbor' message for a period of time, it checks if the number of its Neighbor nodes reaches the requirement, if it reaches, it ends the process of searching Neighbor nodes, if it does not reach, it waits for a random period of time and initiates a 'Find _ Neighbor' message again, the TTL value in the message is bigger than before until the number of its Neighbor nodes reaches the requirement, it is assumed that the last determined Neighbor nodes of node a include: nodes b, d, C and G.
In the process of maintaining the neighbor nodes of the node a, the nodes a and b, d, C and G send messages to each other periodically to declare that the nodes a and b are still in the network, and if the node b does not send back messages within the specified time, the node a considers that the node b has failed. In addition, the node a also counts the times that all the neighbor nodes successfully respond to the resource query message in the previous continuous time, and selects a plurality of neighbor nodes with the lowest response query frequency, if the selected node is d, the node a interrupts the connection between the node a and the nodes b and d, and re-searches for new neighbor nodes for supplement, and if the found new neighbor nodes are f and h, the neighbor nodes of the node a are updated as follows: nodes f, h, C and G.
When a resource node J searches for Friend nodes, firstly, the node J constructs a 'Find _ Friend' message, the TTL of the message is set to be a larger value, then the message is sent to all nodes G, I and m adjacent to the node J in a physical network, after the node m receives the 'Find _ Friend' message, the node does not respond to the message because the node m is not a resource node, after the nodes G and I receive the 'Find _ Friend' message, the node M firstly confirms that the node is the resource node, then calculates the similarity of the shared resource theme of the node M and the shared resource theme of the initiating node J, and the similarity of the shared resource theme of the node M and the shared resource theme of the initiating node J is larger than a set threshold, and then returns a response message, in addition, the nodes G, I and m respectively forward the message to all nodes d, h, L and o adjacent to the node M in the physical network, and the nodes d, h, L and o repeat the nodes G, G and m, I and m, the above process continues so far until the TTL value in the "Find _ Friend" message is reduced to zero. After node J sends the 'Find _ Friend' message, it waits for the response sent back by other nodes, and lists the corresponding node in its Friend node list, after sending the 'Find _ Friend' message for a period of time, it checks if the number of Friend nodes reaches the requirement, if it reaches, it ends the Friend node searching process, if it does not reach, it waits for a random period of time and sends a 'Find _ Friend' message again, the TTL value in the message is larger than before until the number of Friend nodes reaches the requirement, it is assumed that the last Friend node searched by node J includes: nodes G, I and L.
In the process of maintaining the friend node of the node J, messages are periodically sent between the node J and the friend node to declare that the node J is still in the system, if the node J does not receive the message sent by a friend node (assuming that the node is I) within the specified continuous time, the friend node I is failed, and the node J abandons the connection of the node I. Meanwhile, node J would again perform the step of finding friend nodes to supplement the corresponding number of new friend nodes, assuming that new friend nodes are found as C, so that the updated friend nodes of node J include: nodes C, G and L.
The maintenance method of the peer-to-peer network system structure comprises the following steps: (1) a node resource release and withdrawal method, and (2) a node joining and quitting network method.
(1) Node resource publishing and revoking method
Referring to fig. 2, after releasing or revoking a plurality of new resources, the resource node J recalculates the theme of its own shared resource, and then sends the updated theme to all the friend nodes C, G and L, and after receiving the new theme, the friend node performs semantic similarity calculation on the theme and the theme of its own current shared resource, and if the calculation result is greater than the set threshold, the friend relationship between the nodes is continuously maintained, otherwise, the friend node abandons the connection with the node J. Meanwhile, the resource node J performs the step of searching friend nodes again to supplement a corresponding number of new friend nodes;
(2) method for node joining and exiting network
Referring to fig. 2, after a new node joins the P2P network, the node determines that the node belongs to a resource node (e.g., node J) or a common node (e.g., node a) according to the amount of its shared resources, and then establishes and maintains a neighbor node and a friend node according to the type of the node. When a node a or J needs to Exit the P2P network, the node sends an 'Exit _ Net' message to all its neighbor nodes and friend nodes (if any), the node receiving the message abandons the connection with the node a or J and searches for new neighbor nodes or friend nodes, if the node a or J fails to send the 'Exit _ Net' message to all its neighbor nodes and friend nodes (if any) in time due to sudden paralysis, the nodes can use the 'Is _ Live' message sent between them and the nodes a and J to judge that the node a or J fails in a certain time range, and then the neighbor nodes or friend nodes can automatically abandon the connection with the nodes a and J.
The resource query method based on the same structure of the peer-to-peer network specifically comprises the following steps:
assuming that the relationship between nodes in the area network I and the area network II in the example peer-to-peer network of fig. 2 and the information of shared resources are as shown in fig. 3, when a common node a in the area network I needs to obtain a resource R1_1, it only needs to send a resource query message to all its neighboring nodes, and nodes e and C will return the message hit by the query to the node a. When a common node a in a local area network I needs to search a resource R1_4, firstly, the node a sends a resource query message to all neighbor nodes of the node a, since the neighbor nodes b, e and C do not have target resources, the neighbor nodes do not send query responses to the node a, the resource node C finds that the query resource is similar to the theme R1 of the shared resource of the node C, then the attribute value of the maximum forwarding times in the query message is subtracted by 1 and then forwarded to the friend nodes K and J, when the resource nodes K and J receive the query message, the resource nodes K and J find that the node a has the target resources, and then the two nodes send a query hit message to the node a. When a resource node J in a regional network II needs to search a resource R2_2, the resource node J finds that the theme of the resource to be searched is different from the theme of the shared resource of the resource node J, then sends the query message to neighbor nodes I and L, and when the resource node L receives the query message, finds that the resource node J has the resource, then the node L sends a message of query hit to the node J.

Claims (1)

1. A method for a general node to find and maintain neighbor nodes of a peer-to-peer network system, the peer-to-peer network system comprising: a resource network and a regional network; the resource network is a sub-network formed by all resource nodes; the regional network is a sub-network formed by all resource nodes and common nodes in the same geographic region;
the resource node is a node sharing a large number of resources in the network; the resource node maintains the connection of a plurality of other resource nodes similar to the shared resource theme of the resource node, and the other resource nodes are called as friend nodes of the resource node; the resource node also maintains a plurality of other resource nodes which are close to the geographical position of the resource node and connected with the other resource nodes, and the other resource nodes are called as neighbor nodes of the resource node;
the common nodes are other nodes except the resource nodes in the network; the common node maintains the connection with other resource nodes and common nodes in the same area network, and the nodes are called as neighbor nodes of the common node;
wherein,
the steps of searching the neighbor node by the common node are as follows:
step a: the common node A determines the number of resource nodes and the number of common nodes which can be maintained according to the bandwidth and the processing capacity of the common node A;
step b: the common node A constructs a 'Find _ Neighbor' message and sets the TTL of the message1The numerical value is sent to all nodes adjacent to the message in the physical network;
step c: the node receiving the 'Find _ Neighbor' message firstly checks whether the area number of the area network where the node is located is the same as the area number of the initiating node, if so, a response message is sent to the node A, meanwhile, the node can also forward the received 'Find _ Neighbor' message to all the nodes adjacent to the node in the physical network, and the step c is repeated by all the adjacent nodes receiving the 'Find _ Neighbor' message;
step d: when the initiating node A receives the response message, checking the type of the response node, checking whether the number of the neighbor nodes of the corresponding type maintained by the initiating node A meets the requirement, if not, listing the node in a neighbor node list, otherwise, directly ignoring the message;
step e: the initiating node A checks whether the number of the Neighbor nodes reaches the requirement after sending the 'Find _ Neighbor' message for a period of time, if so, the initiating node A finishes searching the Neighbor nodes, if not, the initiating node A waits for a period of time randomly and then sends a 'Find _ Neighbor' message again, and sets the TTL of the message2Numerical value>TTL1The numerical value is searched for the neighbor node according to the steps b to dPoint, so that the number of the neighbor nodes reaches the requirement;
the steps of the ordinary node for maintaining the neighbor node are as follows:
step a: the common node A sends an 'Is _ Live' message to all the neighbor nodes of the common node A at regular time, the neighbor nodes immediately send back an 'I _ am _ Live' message after receiving the message, and if the node A Is in continuous TSurvival of the human bodyIf the I _ am _ Live message returned by the neighbor node is not received within the time, the node A judges that the neighbor node is failed;
step b: the common node A periodically counts the previous continuous time TStatistics ofThe times of successfully responding the resource query messages of all the neighbor nodes in the network are counted, and partial neighbor nodes with the lowest response query frequency are selected;
step c: the ordinary node A gives up the connection of the failed neighbor node and the selected part of the neighbor nodes with the lowest response query frequency, and re-executes the step of searching the neighbor nodes so as to supplement the corresponding number of new neighbor nodes.
CN201310042269.1A 2013-02-01 2013-02-01 A kind of ordinary node of peer-to-peer network system is found and maintenance of neighbor nodal method Active CN103209207B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310042269.1A CN103209207B (en) 2013-02-01 2013-02-01 A kind of ordinary node of peer-to-peer network system is found and maintenance of neighbor nodal method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310042269.1A CN103209207B (en) 2013-02-01 2013-02-01 A kind of ordinary node of peer-to-peer network system is found and maintenance of neighbor nodal method

Publications (2)

Publication Number Publication Date
CN103209207A CN103209207A (en) 2013-07-17
CN103209207B true CN103209207B (en) 2016-01-20

Family

ID=48756291

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310042269.1A Active CN103209207B (en) 2013-02-01 2013-02-01 A kind of ordinary node of peer-to-peer network system is found and maintenance of neighbor nodal method

Country Status (1)

Country Link
CN (1) CN103209207B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106657360A (en) * 2016-12-30 2017-05-10 曙光信息产业(北京)有限公司 Synchronization method and system for NIS servers under Linux system
CN107612743B (en) * 2017-10-11 2021-01-26 深圳天珑无线科技有限公司 Network topology information collection method and route restoration method
CN110149381B (en) * 2019-05-07 2021-10-15 肇庆学院 A peer-to-peer network architecture and resource location method based on differentiated services
CN110990448B (en) * 2019-10-28 2021-06-25 北京大学 A fault-tolerant distributed query method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010049378A1 (en) * 2008-10-30 2010-05-06 International Business Machines Corporation Resource allocation in peer-to-peer streaming
CN101741750A (en) * 2010-01-15 2010-06-16 中国科学院计算技术研究所 Resource downloading method and system in P2P
CN102325301A (en) * 2011-07-28 2012-01-18 同济大学 Mobile P2P Network Resource Location and Scheduling Method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010049378A1 (en) * 2008-10-30 2010-05-06 International Business Machines Corporation Resource allocation in peer-to-peer streaming
CN101741750A (en) * 2010-01-15 2010-06-16 中国科学院计算技术研究所 Resource downloading method and system in P2P
CN102325301A (en) * 2011-07-28 2012-01-18 同济大学 Mobile P2P Network Resource Location and Scheduling Method

Also Published As

Publication number Publication date
CN103209207A (en) 2013-07-17

Similar Documents

Publication Publication Date Title
Jiang et al. Lightflood: an efficient flooding scheme for file search in unstructured peer-to-peer systems
CN103209207B (en) A kind of ordinary node of peer-to-peer network system is found and maintenance of neighbor nodal method
CN103107944B (en) A kind of content positioning method and routing device
Deokate et al. Mobility-aware cross-layer routing for peer-to-peer networks
CN101605094B (en) Ring Model and Routing Algorithm Based on Point-to-Point Network
CN102377826A (en) Method for optimal placement of unpopular resource indexes in peer-to-peer network
CN102624893B (en) Spiral curve based wireless Mesh network P2P (peer-to-peer) resource sharing method
CN105447188B (en) A kind of reciprocity social networks document retrieval method of knowledge based study
CN103118113B (en) A kind of peer-to-peer network and network consultancy service method thereof
CN101087305A (en) Resource search method in large-scale non-structural P2P network
Jiang et al. Resource discovery and share mechanism in disconnected ubiquitous stub network
KR101613688B1 (en) Method for providing peer to peer social networking service (sns) using triangle relationship among nodes
CN105873163B (en) A kind of energy-optimised wireless sensor network routing method
CN110149381B (en) A peer-to-peer network architecture and resource location method based on differentiated services
Rahmani et al. Cross-layer design of clustering scheme for peer to peer over manet
He et al. Gossip-based Appropriate Degree Search Strategy by Two-hop Index Replication for Rare Resources
Hieungmany et al. Characteristics of random walk search on embedded tree structure for unstructured p2ps
Khatibi et al. Dynamic multilevel feedback-based searching strategy in unstructured peer-to-peer systems
Li et al. SDC: A distributed clustering protocol
Zheng et al. Semanticcast: Content-based data distribution over self-organizing semantic overlay networks
Sendil et al. A novel message routing in unstructured P2P using CIS and ant search algorithm
Dewi et al. A new approach to modeling of bio-inspired information diffusion with ant colony optimization in complex networks
Soelistijanto A Publish/Subscribe Forwarding Scheme Based on Mobility Information for Opportunistic Networks
Wang et al. A new strategy of resource searching in unstructured p2p network
Gaur et al. Different search Algorithms in Unstructured P2P Systems

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
TR01 Transfer of patent right

Effective date of registration: 20210929

Address after: No. 157, Guangzhou City, Guangdong, Guangdong

Patentee after: CCCC FOURTH HARBOR ENGINEERING INSTITUTE Co.,Ltd.

Patentee after: GUANGZHOU HARBOR ENGINEERING QUALITY EXAMINATION Co.,Ltd.

Patentee after: NATIONAL ENGINEERING RESEARCH CENTER OF DREDGING TECHNOLOGY AND EQUIPMENT

Address before: 510230 No. 157, Qianjin Road, Guangdong, Guangzhou 504

Patentee before: CCCC FOURTH HARBOR ENGINEERING INSTITUTE Co.,Ltd.

Patentee before: CCCC FOURTH HARBOR GEOTECHNICAL ENGINEERING Co.,Ltd.

Patentee before: GUANGZHOU HARBOR ENGINEERING QUALITY EXAMINATION Co.,Ltd.

Patentee before: GUANGZHOU SIHANG MATERIAL TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right