CN102790804A - Intelligent mobile agent-based unstructured P2P network load balancing method and system - Google Patents

Intelligent mobile agent-based unstructured P2P network load balancing method and system Download PDF

Info

Publication number
CN102790804A
CN102790804A CN2012102656139A CN201210265613A CN102790804A CN 102790804 A CN102790804 A CN 102790804A CN 2012102656139 A CN2012102656139 A CN 2012102656139A CN 201210265613 A CN201210265613 A CN 201210265613A CN 102790804 A CN102790804 A CN 102790804A
Authority
CN
China
Prior art keywords
node
mrow
nodes
msub
network
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
CN2012102656139A
Other languages
Chinese (zh)
Other versions
CN102790804B (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.)
Jiangsu University
Original Assignee
Jiangsu University
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 Jiangsu University filed Critical Jiangsu University
Priority to CN201210265613.9A priority Critical patent/CN102790804B/en
Publication of CN102790804A publication Critical patent/CN102790804A/en
Application granted granted Critical
Publication of CN102790804B publication Critical patent/CN102790804B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides an intelligent mobile agent-based unstructured P2P (peer-to-peer) network load balancing method and corresponding system, which aim to avoid network node congestion and realize load balance, the technical scheme adopted by the invention is that the method comprises the following steps: S1, each node in the network regularly initiates a topology adjustment mechanism and is to be connected with another node with a high processing capacity, so as to form a center type topological structure; and S2, the congestion state of the node is judged according to the congestion degree of the node in a certain moment, so as to further optimize the network topology.

Description

Method and system for balancing load of structureless peer-to-peer network based on mobile agent
Technical Field
The invention relates to the technical field of peer-to-peer networks, in particular to a structureless peer-to-peer network load balancing method and system based on a mobile agent.
Background
In recent years, Peer-to-Peer (P2P) networks have evolved into an important network model. This is because, compared to a conventional Client/Server (C/S) model, the peer-to-peer network has advantages of good fault tolerance, strong scalability, low cost, and full use of distributed resources. Peer-to-peer networks have found widespread application in file sharing, distributed computing, streaming media services, and the like.
Peer-to-peer networks are divided into two categories: structured and unstructured, structured peer-to-peer networks impose strict restrictions on the connectivity of nodes, while unstructured peer-to-peer network nodes have a large degree of freedom of connectivity. Due to the distributed characteristic of the nodes of the unstructured peer-to-peer network, the nodes only know the resources of the neighbor nodes of the nodes, but do not know the distribution condition of the resources on other nodes in the network, so that a great problem in the unstructured peer-to-peer network is the problem of resource positioning in the network. For this reason, many search methods have been proposed to achieve efficient positioning of resources on a structureless peer-to-peer network, such as flooding, random walks, aps (adaptive probabilistic search), etc. However, in the above method, due to the forwarding of the query message in the resource searching process, the number of messages that need to be processed in the searching process of some nodes in the network is too many, and message congestion occurs, which further seriously affects the continuation of the search and causes the decrease of the search performance, so how to implement load balancing in the peer-to-peer network is very important.
Load balancing refers to distributing network load to each node according to the processing capacity of the node. The existing load balancing methods mainly include two types, one is to research a load balancing strategy for realizing a network by dynamically changing a network topological structure, and the method for changing the network topological structure can enable a node with strong processing capacity to have more neighbors, share more network loads, fully utilize the processing capacity of the node, and achieve the purpose of load balancing. Such as Gia, to adjust the network structure based on the level of satisfaction of the node; lunis et al propose DANTE, nodes periodically initiate reconnects and use the attractiveness of the nodes to determine which nodes can be reconnected to. In the methods, the query initiating rate of the nodes is fixed, and after the topological structure is basically stable, if the query load in the network is suddenly increased, congestion is easily caused at the central node. The other type is a method for realizing load balancing on the basis of researching that the topological structure of a network is not changed, the method realizes load balancing by purposefully transferring redundant query messages of a congested node to a node with redundant processing capacity, and the most critical problem in the research is how to find congestion, and the congestion is gradually applied to a congestion sensing method due to the characteristics of high flexibility, high efficiency, low load, low communication delay, high asynchronization and the like of a mobile intelligent agent. Shekhar et al propose a routing protocol of mobile intelligent agent based on congestion perception, the mobile intelligent agent chooses the next access node from the neighbor node at random; li et al propose a peer-to-peer network load balancing method based on a mobile agent that looks for congested nodes by visiting all nodes in turn. However, the existing load balancing method based on the mobile agent is performed on the basis of not changing the topological structure of the network.
In view of the above, it is necessary to provide a new method and system for load balancing of a structureless peer-to-peer network based on mobile agents.
Disclosure of Invention
The invention aims to provide a structureless peer-to-peer network load balancing method and system based on a mobile agent, which avoid network node congestion and realize load balancing.
The invention discloses a structureless peer-to-peer network load balancing method based on a mobile agent, which comprises the following steps:
s1, each node in the network periodically initiates a topology adjustment mechanism, and the topology adjustment mechanism is connected to the nodes with strong processing capacity to form a central topology structure;
and S2, judging the congestion state of the node by calculating the congestion level of the node at a certain moment, and further performing network topology optimization.
As a further improvement of the present invention, the step S1 specifically includes:
s11 and node PiSending a collecting message to collect a candidate node set participating in the node topology adjustment;
s12, forwarding the node collection message to a randomly selected neighbor node, and adding the node to the set Si(ii) a Simultaneously, the survival time TTL is reduced by 1; if the time to live TTL is not equal to 0, repeating step S12, and continuing to collect nodes;
s13, returning the candidate node set Si to the message initiating node Pi
S14, slave node PiIs selected from the current set of neighboring nodesNode P with weakest force and connectivity degree larger than 1min(Ni)
S15, slave candidate node set SiThe node with the strongest processing capacity is taken out and is marked as Pmax(Si)And is driven from SiIf node P deletesmax(Si)Has a processing capacity of not more than Pmin(Ni)Step S17 is executed; if node Pmax(Si)Has a processing capacity greater than Pmin(Ni)Then to the node Pmax(Si)Sending out a connection request if the node Pmax(Si)Refusing the connection request, repeating the step S15, continuing to select the next reconnection node, if the node Pmax(Si)If the reconnect request is accepted, go to step S16;
s16 and node PiNeighboring node P of disconnection and selectionmin(Ni)And is connected with node Pmax(Si)A connection is established. If the number of the reconnected nodes reaches the upper limit number n of the preset number of the reconnected nodes, executing step S17; if not, executing step S14 to select the node to join the reconnection next time;
and S17, finishing the topology adjustment.
As a further improvement of the present invention, the step S2 specifically includes:
s21 calculation node P for collecting information by mobile agentjCongestion level at the current time t
Figure BDA00001946029700021
And use
Figure BDA00001946029700022
The congestion state of the node is judged by the value of (A), the congestion state of the node comprises setting three load states of overload, normal load and overload for each node, setting a load state threshold value, and calculating
Figure BDA00001946029700031
Comparing the value with a set load state threshold value to determine the current load state of the node; if node PjThe load state isIf overload occurs, go to step S22; otherwise, executing step S23, optimizing the topology, and selecting the next access node;
s22, the node PjRandomly selecting a part of nodes to disconnect, and deriving a sub-mobile agent; the child mobile intelligent agent takes the generation node as a father node, searches nodes with redundant processing capacity in the network in a breadth-first traversal mode, judges the load state of the node when reaching one node, randomly selects a node to be reconnected to connect with the node if the node is lightly loaded, and then continuously searches the next node until all the nodes to be reconnected are reconnected, and the child mobile intelligent agent actively exits the network;
s23, the mobile agent according to the node PjOf neighbor node PoSelecting a next access node according to the attraction table of the mobile agent and the accessed node list, and migrating the next access node to the node; the accessed node list is used for recording the nodes accessed by the agent; the neighbor node attraction table is a table of the attractions of the neighbor nodes to the mobile agents, which is used by any node in the network for recording.
As a further improvement of the present invention, in the step S21, the node PjCongestion level at the current time t
Figure BDA00001946029700032
The calculation formula of (2) is as follows:
CL P j ( t ) = 1 + Q P j ( t ) C P j - - - ( 1 )
wherein,
Figure BDA00001946029700034
representing a node PjThe time required to process a query message; if a node is processing a message then all incoming messages at that time are placed in the node's message buffer queue,
Figure BDA00001946029700035
indicating the time t node PjThe number of messages to be processed in the buffer queue.
As a further improvement of the present invention, the step S21 further includes:
step S210 said node PjAnd determining whether to accept the connection request of other nodes according to the load state of the node: if node PjCurrently in an overload state, node PjNot accepting other node connection requests; if node PjIs currently under normal load, and at this time if node PjIs overloaded, node PjNot accepting other node connection requests; if node PjThe last state is not overloaded, but node PjWhen the current state is normal, the node PjReceiving connection requests of other nodes; if node PjNode P when the current state is light loadjAnd accepting connection requests of other nodes.
As a further improvement of the present invention, in the step S21, the node PjCongestion level at the current time t
Figure BDA00001946029700036
The calculation formula of (2) is as follows:
CL P j ( t ) = 1 + Q P j ( t ) C P j - - - ( 1 )
wherein,representing a node PjThe time required to process a query message; if a node is processing a message then all incoming messages at that time are placed in the node's message buffer queue,
Figure BDA00001946029700042
indicating the time t node PjThe number of messages to be processed in the buffer queue.
As a further improvement of the present invention, "will calculate" in said step S21The value is compared with a set load state threshold value to determine the current load state of the node, which is specifically: two set thresholds Uthred、BthredIf, if
Figure BDA00001946029700044
Node PjIs overloaded, the variable flag is 1, ifNode PjIs normally loaded, the flag variable is 0. If it is
Figure BDA00001946029700046
Node PjIs lightly loaded, and the variable flag is-1.
As a further improvement of the present invention, the step S210 specifically includes: the node PjCurrent variable state flag is 1, node PjNot accepting other node connection requests; if node PjCurrent state flag is 0, and if node P is present at this timejIf the last variable state flag of (1) is set, the node P is set to the next node PjNot accepting other node connection requests; if node PjThe last variable state flag is 0 or-1, and node PjNode P when current variable state flag is 0jConnection requests of other nodes can be accepted; if node PjIf the current variable state flag = -1, the node PjConnection requests of other nodes may be accepted.
As a further improvement of the present invention, in the step S23, the node PjNeighbor node P provided with one such nodeoAn attraction meter for recording the node PjProcessing capability of all neighbor nodes
Figure BDA00001946029700047
And connectivity χ (P)oK) neighbor node PoThe attraction to a mobile agent is calculated as follows:
<math> <mrow> <msub> <mi>A</mi> <msub> <mi>P</mi> <mi>o</mi> </msub> </msub> <mo>=</mo> <msub> <mi>C</mi> <msub> <mi>P</mi> <mi>o</mi> </msub> </msub> <mo>&times;</mo> <mi>&chi;</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mi>o</mi> </msub> <mo>,</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>2</mn> <mo>)</mo> </mrow> </mrow> </math>
is a neighbor node PoRepresents the neighboring node PoThe time required to process a query message; x (P)oK) is a node PoThe connectivity of (c); node PoAttractive force
Figure BDA000019460297000410
The larger the mobile agent slave PjMigration to node PoThe higher the probability of (c);
the neighbor node PoThe connectivity calculation formula is as follows:
<math> <mrow> <mi>&chi;</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mi>o</mi> </msub> <mo>,</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>=</mo> <munderover> <mi>&Sigma;</mi> <mrow> <mi>h</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow> <mi>h</mi> <mo>=</mo> <mi>k</mi> </mrow> </munderover> <mfrac> <mrow> <mi>N</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mi>o</mi> </msub> <mo>,</mo> <mi>h</mi> <mo>)</mo> </mrow> </mrow> <msup> <mi>h</mi> <mi>&delta;</mi> </msup> </mfrac> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>3</mn> <mo>)</mo> </mrow> </mrow> </math>
wherein, N (P)oH) represents a neighbor node PoThe number of nodes which are h hops away, k represents the radius of the calculated connectivity, delta is a control coefficient, 1/hδWeight, χ (P), for controlling influence of nodes of different distances on connectivityoK) the larger the node PoThe more query messages that may be received.
Accordingly, a system for unstructured peer-to-peer network load balancing based on mobile agents, the system comprising:
the topology adjusting unit is used for each node in the network to periodically initiate a topology adjusting mechanism and connect the topology adjusting mechanism to the nodes with strong processing capacity to form a unit of a central topology structure;
a topology optimization unit for judging the congestion state of the node by calculating the congestion level of the node at a certain moment, and further performing network topology optimization;
wherein the topology adjusting unit includes:
node PiA unit for sending a collecting message to collect a candidate node set participating in the node topology adjustment;
forwarding the node-collected message to a randomly selected neighbor node and adding the node to the set Si
Set of candidate nodes SiReturned to the message originating node PiA unit of (1);
slave node PiSelecting the node P with the weakest processing capability and the connectivity degree larger than 1 from the current neighbor node setmin(Ni)A unit of (1);
from the set of candidate nodes SiThe node P with the strongest processing capability is taken outmax(Si)Comparing node Pmax(Si)And Pmin(Ni)To the node Pmax(Si)A unit that issues a connection request;
node PiNeighboring node P of disconnection and selectionmin(Ni)And is connected with node Pmax(Si)A unit for establishing a connection;
the topology optimization unit includes:
computing node P for collecting information by mobile agentjCongestion level at the current time t
Figure BDA00001946029700051
Setting three load states of overload, normal load and overload for each node, setting load state threshold value, calculating
Figure BDA00001946029700052
Means for comparing the value with a set load state threshold to determine a current load state of the node;
node PjRandomly selecting a part of nodes to disconnect, and deriving a unit of a sub-mobile agent;
the child mobile intelligent agent takes the generation node as a father node, searches nodes with redundant processing capacity in the network in a breadth-first traversal mode, judges the load state of the node when reaching one node, randomly selects a node to be reconnected to connect with the node if the node is lightly loaded, and then continuously searches the next node until all the nodes to be reconnected are reconnected, and the child mobile intelligent agent actively quits the network unit;
mobile agent according to node PjOf neighbor node PoThe attraction to the mobile agent and the list of visited nodes to select the next visited node and migrate to the unit of that node.
As a further improvement of the system of the invention, said node PjCongestion level at the current time tThe calculation formula of (2) is as follows:
CL P j ( t ) = 1 + Q P j ( t ) C P j - - - ( 1 )
wherein,representing a node PjThe time required to process a query message; if a node is processing a message then all incoming messages at that time are placed in the node's message buffer queue,
Figure BDA00001946029700056
indicating the time t node PjThe number of messages to be processed in the buffer queue;
the neighbor node PoThe attraction to a mobile agent is calculated as follows:
<math> <mrow> <msub> <mi>A</mi> <msub> <mi>P</mi> <mi>o</mi> </msub> </msub> <mo>=</mo> <msub> <mi>C</mi> <msub> <mi>P</mi> <mi>o</mi> </msub> </msub> <mo>&times;</mo> <mi>&chi;</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mi>o</mi> </msub> <mo>,</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>2</mn> <mo>)</mo> </mrow> </mrow> </math>
is a neighbor node PoRepresents the neighboring node PoThe time required to process a query message; x (P)oK) is a node PoThe connectivity of (c); node PoAttractive force
Figure BDA00001946029700063
The larger the mobile agent slave PjMigration to node PoThe higher the probability of (c);
the neighbor node PoThe connectivity calculation formula is as follows:
<math> <mrow> <mi>&chi;</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mi>o</mi> </msub> <mo>,</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>=</mo> <munderover> <mi>&Sigma;</mi> <mrow> <mi>h</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow> <mi>h</mi> <mo>=</mo> <mi>k</mi> </mrow> </munderover> <mfrac> <mrow> <mi>N</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mi>o</mi> </msub> <mo>,</mo> <mi>h</mi> <mo>)</mo> </mrow> </mrow> <msup> <mi>h</mi> <mi>&delta;</mi> </msup> </mfrac> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>3</mn> <mo>)</mo> </mrow> </mrow> </math>
wherein, N (P)oH) represents a neighbor node PoThe number of nodes which are h hops away, k represents the radius of the calculated connectivity, delta is a control coefficient, 1/hδWeight, χ (P), for controlling influence of nodes of different distances on connectivityoK) the larger the node PoThe more query messages that may be received.
The invention has the beneficial effects that: each node in the network regularly starts a topology reconnection mechanism to form a centralized topology structure. Meanwhile, the nodes continuously collect information such as processing capacity and connectivity of neighbor nodes to guide the mobile intelligent agent to continuously migrate in the network and continuously monitor the load condition of important nodes in the network, the topological structure of the network is optimized and adjusted, congestion is avoided, load balance on the structureless peer-to-peer network is achieved, the network topological structure can be timely adjusted according to the load condition of the network, network node congestion can be effectively avoided, and resource searching efficiency is improved.
Drawings
Fig. 1 is a flowchart of a method for load balancing of a structureless peer-to-peer network based on a mobile agent according to the present invention.
Fig. 2 is a specific flowchart of the step S1 of fig. 1 for periodically adjusting the topology of the network node.
Fig. 3 is a specific flowchart of the topology optimization of the mobile agent in step S2 in fig. 1.
Fig. 4 is a network topology simulation diagram according to an embodiment of the present invention.
Fig. 5 is a diagram illustrating an aggregation level of network nodes after topology reconnection according to an embodiment of the present invention.
Fig. 6 is a graph illustrating average connectivity variation of nodes with different capabilities in a network after topology reconnection according to an embodiment of the present invention.
Fig. 7 is a graph illustrating the average number of nodes that need to be queried after topology reconnection in an embodiment of the present invention.
Fig. 8 is a schematic structural diagram of a structureless peer-to-peer network load balancing system based on a mobile agent according to the present invention.
Detailed Description
The present invention will be described in detail below with reference to embodiments shown in the drawings. These embodiments are not intended to limit the present invention, and structural, methodological, or functional changes made by those skilled in the art according to these embodiments are included in the scope of the present invention.
Fig. 1 is a flow chart of a method for load balancing of a structureless peer-to-peer network based on a mobile agent according to the present invention, which includes the following steps:
s1, each node in the network periodically initiates a topology adjustment mechanism, and the topology adjustment mechanism is connected to the nodes with strong processing capacity to form a central topology structure;
and S2, judging the congestion state of the node by calculating the congestion level of the node at a certain moment, and further performing network topology optimization.
Fig. 2 is a specific flowchart of the step S1 of periodically adjusting the topology of the network node in this embodiment, which includes the following steps:
s11 and node PiSending a gather message to gather a set of candidate nodes to participate in the node topology adjustment. Assume the set of candidate nodes is SiAnd initially SiIf the message is empty, the Time To Live (TTL) of the message is K;
s12, forwarding the node collecting message to a randomly selected neighbor node and adding the nodeTo set Si. Subtracting 1 from the TTL of the collected message, judging whether the TTL is equal to 0, if so, finishing the node collecting process, executing the step S13, otherwise, repeating the step S12, and continuously collecting the node;
s13, collecting candidate nodes SiReturned to the message originating node Pi
S14, slave node PiSelecting the node P with the weakest processing capability and the connectivity degree larger than 1 from the current neighbor node setmin(Ni),NiIs a node PiA set of neighbor nodes of (1);
s15, slave candidate node set SiThe node P with the strongest processing capability is taken outmax(Si)And node Pmax(Si)It is from SiIs deleted. Comparison node Pmax(Si)And Pmin(Ni)If the node P has processing capacitymax(Si)Has a processing capacity of not more than Pmin(Ni)Then go to step S17; if node Pmax(Si)Has a processing capacity greater than Pmin(Ni)Then to the node Pmax(Si)A connection request is issued. If node Pmax(Si)Refusing the connection request, repeating the step S15, continuing to select the next reconnection node, if the node Pmax(Si)If the connection request is accepted, go to step S16;
s16 and node PiNeighboring node P of disconnection and selectionmin(Ni)And is connected with node Pmax(Si)A connection is established. If the number of the reconnected nodes reaches the upper limit number n of the preset number of the reconnected nodes, executing step S17; if not, executing step S14 to select the node to join the reconnection next time;
and S17, finishing the topology adjustment.
The method is characterized in that a centralized network which is centered at a plurality of nodes with the strongest processing capacity is finally formed by only depending on the regular topological reconnection of the nodes, the network resource searching efficiency of the structure is the highest under the condition of no congestion, but the central nodes are easy to be congested because the resource searching requests of almost all the nodes are sent, the resource searching efficiency is seriously influenced, and in order to avoid the occurrence of the congestion, a topological optimization method based on a mobile intelligent agent is introduced on the basis.
Fig. 3 is a specific flowchart illustrating topology optimization of the mobile agent in step S2 in this embodiment, which includes the following steps:
s21 calculation node P for collecting information by mobile agentjCongestion level at the current time t
Figure BDA00001946029700081
And use
Figure BDA00001946029700082
Determining the current load state of the node, if the node P is in the set state, judging the congestion state of the node, and if the node P is in the set state, determining the current load state of the nodejIf the load status is overload, step S22 is executed; otherwise, executing step S23, optimizing the topology, and selecting the next access node;
s22 and node PjRandomly selecting a part of nodes to disconnect, and deriving a sub-mobile agent; the child mobile intelligent agent takes the generation node as a father node, searches nodes with redundant processing capacity in the network in a breadth-first traversal mode, judges the load state of the node when reaching one node, randomly selects a node to be reconnected to connect with the node if the node is lightly loaded, and then continuously searches the next node until all the nodes to be reconnected are reconnected, and the child mobile intelligent agent actively exits the network;
s23, the mobile agent according to the node PjThe neighbor's attraction list to it and the list of nodes visited by the mobile agent to select the next visiting node and migrate to that node.
Wherein in step S21, the node PjCongestion level at the current time t
Figure BDA00001946029700083
The calculation formula of (2) is as follows:
CL P j ( t ) = 1 + Q P j ( t ) C P j - - - ( 1 )
Figure BDA00001946029700085
representing a node PjThe time required to process a query message; if a node is processing a message then all incoming messages at that time are placed in the node's message buffer queue,
Figure BDA00001946029700086
indicating the time t node PjThe number of messages to be processed in the buffer queue. The formulation indicates that at time t a query message is forwarded to node PjIt takes time until the completion of the treatment.
The "determining the current load state of the node" in step S21 is specifically:
each node is set with three load states according to
Figure BDA00001946029700087
Value of (2) and setA threshold value Uthred、BthredComparing to determine the current load status of the node:
if it is
Figure BDA00001946029700088
Node PjThe state of (1) is overloaded, and the variable flag is 1, at this time, the node is considered to be congested;
if it is
Figure BDA00001946029700089
Node PjIf the load is normal, the variable flag is 0;
if it is
Figure BDA000019460297000810
Node PjIs lightly loaded, and the variable flag is-1.
Further, node PjAnd determining whether to accept the connection request of other nodes according to the load state of the node. I.e. node PjCurrent variable state flag is 1, node PjNot accepting other node connection requests; if node PjCurrent state flag is 0, and if node P is present at this timejIf the last variable state flag of (1) is set, the node P is set to the next node PjNot accepting other node connection requests; if node PjThe last variable state flag is 0 or-1, and node PjNode P when current variable state flag is 0jConnection requests of other nodes can be accepted; if node PjIf the current variable state flag is equal to-1, the node PjConnection requests of other nodes may be accepted.
In step S23, to determine the node PjAttraction of all neighboring nodes, node PjMaintaining a neighbor node attraction table for the node, the table recording the node PjAnd the processing capacity and the connectivity of all the neighbor nodes. Suppose node PjIs Po,PoThe connectivity calculation formula is as follows:
<math> <mrow> <mi>&chi;</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mi>o</mi> </msub> <mo>,</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>=</mo> <munderover> <mi>&Sigma;</mi> <mrow> <mi>h</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow> <mi>h</mi> <mo>=</mo> <mi>k</mi> </mrow> </munderover> <mfrac> <mrow> <mi>N</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mi>o</mi> </msub> <mo>,</mo> <mi>h</mi> <mo>)</mo> </mrow> </mrow> <msup> <mi>h</mi> <mi>&delta;</mi> </msup> </mfrac> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>2</mn> <mo>)</mo> </mrow> </mrow> </math>
wherein N (P)oH) represents a AND node PoThe number of nodes separated by h hops, k represents the radius of the calculated connectivity, and δ is a control coefficient. 1/hδWeight, χ (P), for controlling influence of nodes of different distances on connectivityoK) the larger the node PoThe more query messages that may be received.
Node PoThe attraction to a mobile agent is calculated as follows:
<math> <mrow> <msub> <mi>A</mi> <msub> <mi>P</mi> <mi>o</mi> </msub> </msub> <mo>=</mo> <msub> <mi>C</mi> <msub> <mi>P</mi> <mi>o</mi> </msub> </msub> <mo>&times;</mo> <mi>&chi;</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mi>o</mi> </msub> <mo>,</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>3</mn> <mo>)</mo> </mrow> </mrow> </math>
Figure BDA00001946029700093
is a node PoThe processing capacity of (C), x (P)oK) is a node PoThe degree of connectivity of (c). Node PoAttractive force
Figure BDA00001946029700094
The larger the mobile agent slave PjMigration to node PoThe higher the probability of (c).
An example of a specific implementation of the present invention is given below, which comprises 10000 network nodes, each with 50 different data, each with 100 copies in the network. The mobile agent is generated by a first node joining the network, and the processing capacity of the node is divided into five levels: 0.1, 1, 10, 100, 1000, the percentage of the network node is: 20. 45, 30, 4.9 and 0.1, resource searching is carried out in a random walk mode, and topology reconnection is carried out in the following two modes to realize load balancing. One is topology reconnection performed periodically by the nodes, so that the nodes with strong processing capacity can have more connections, thereby processing more query messages and fully utilizing the processing capacity of the nodes; the other is topology optimization based on a mobile agent, and the purpose is to prevent nodes with strong processing capacity from having too many neighbors to cause congestion and adversely affecting the performance of the network.
Each node initiates topology reconnection every 30 seconds to connect itself to a node with strong processing capability, fig. 4 is a simulation diagram of network topology, and a node P in the simulation diagram is below1The topology reconnection process comprises the following steps:
s11 and node P1Sending out a gather message to gatherAnd participating in the candidate node set for the node topology adjustment. Assume the set of candidate nodes is S1And initially S1Null, time to live TTL is 5.
S12, forwarding the node collection message to a randomly selected neighbor node, and adding the node to the set S1And the time to live, TTL, is decremented by 1. If the time to live TTL is not equal to 0, repeating step S12, and continuing to collect nodes; otherwise, the node collection process ends and step S13 is executed.
S13, collecting candidate nodes S1Returned to the message originating node P1Suppose S1Is { P, P4,P9,P12,P13And then step S14 is executed.
S14, slave node P1Current set of neighbor nodes according to fig. 4, P1The node current neighbor node set is { P, P3And selecting the node with the weakest processing capacity and the connection degree larger than 1, and marking as Pmin(N1),N1Is a node P1A set of neighbor nodes; step S15 is then performed. E.g. P1Among the neighbor nodes of (1), the node with the weakest current processing capability is P3,Pmin(N1)Is P3Node, then performs step S15.
S15, slave candidate node set S1The node with the strongest processing capacity is taken out and is marked as Pmax(S1)A 1 is to Pmax(S1)From S1If node P deletesmax(S1)Has a processing capacity of not more than Pmin(N1)Then, it means that all the remaining candidate nodes have processing capability higher than that of the node P1The existing neighbor node is weak, step S17 is performed; if node Pmax(S1)Has a processing capacity greater than Pmin(N1)Then to the node Pmax(S1)Sending out a connection request if the node Pmax(S1)Refusing the connection request, repeating the step S15, continuing to select the next reconnection node, if the node Pmax(S1)The reconnect request is accepted, and step S16 is executed. E.g. from a set of candidate nodes S1The node with the strongest processing capacity is selected to be P4And P is4Is greater than the processing capability of P selected in step S143Node, node P1To P4Issue a connection request, and P4Upon accepting the connection request, step S16 is executed.
S16 and node P1Neighboring node P of disconnection and selectionmin(N1)And is connected with node Pmax(S1)Establishing connection, if n candidate nodes participate in reconnection, in this example, n selects 3, then executing step S17; otherwise, step S14 is executed to start selecting the node to join the reconnection next time. E.g. node P1With P selected through step S143Node is disconnected and connected with P4The node establishes a connection, and since there are no 3 candidate nodes participating in the reconnection, step S14 is executed to start selecting the node participating in the reconnection next time.
And S17, finishing the topology adjustment.
Referring to fig. 4, assuming that the node where the mobile agent is currently located is P, the topology optimization process of the mobile agent at the node P is as follows:
s21, the mobile agent collects the congestion level CL of the information calculation node P at the current time TP(T) and use of CLP(T) value to determine the congestion status of the node, and each node is set with three load states, which we will calculate the CLP(T) value and two set threshold values Uthred、BthredThe comparison determines the current load status of the node. Two set thresholds Uthred、Bthred0.1 and 0.05, respectively. If CL isP(T)>UthredIf the state of the node is overloaded, the current variable state flag of the node P at the time T is 1, and the node is considered to be congested. If B isthred<=CLP(T)<=UthredNode P is a normal load, and flag is 0. If CL isP(T)<BthredThe state of node P is lightly loaded, and flag is-1. The node P decides the next execution step according to its load status, that is, if the node P is overloaded, the step S22 is executed to perform topology optimization; otherwise executeStep S23, the next access node is selected.
In addition, the node P determines whether to accept the connection request of other nodes according to the load state of the node P. That is, the current variable state flag of the node P is 1, and the node P does not accept connection requests of other nodes; if the current state flag of the node P is equal to 0, and if the last variable state flag of the node P is equal to 1 at this time, the node P does not accept the connection request of other nodes; if the last variable state flag of the node P is 0 or-1, and the current variable state flag of the node P is 0, the node P may accept connection requests of other nodes; if the current variable state flag of the node P is equal to-1, the node P may accept connection requests of other nodes;
s22, the node P randomly selects a part of nodes to disconnect from the node P, and in this embodiment, disconnects from two nodes at a time. Suppose node P disconnects from both nodes and derives a child mobile agent.
The child mobile intelligent agent is mainly responsible for reconnecting disconnected connections, the child mobile intelligent agent uses a generation node thereof as a father node, and searches for nodes with redundant processing capacity in the network in a breadth-first traversal mode, judges the load state of the nodes when reaching one node, randomly selects a node to be reconnected to connect with the node if the node is lightly loaded, and then continuously searches for the next node until all the nodes to be reconnected are reconnected, and the child mobile intelligent agent actively quits the network at the moment;
s23, the mobile agent selects the next access node according to the attraction of the neighbor of the node P to the node P and the visited node list, and migrates to the node, wherein k and delta are 2 and 1 respectively. Suppose that the neighbor nodes of node P in fig. 4 are ranked from large to small according to the attraction to the mobile agent as: p4、P5、P3、P1、P2And the list of nodes that the mobile agent has visited recently is: p12、P9、P4So the next access node of the mobile agent is P5
Fig. 5 is a variation graph of aggregation degree CC (aggregation coefficient) of network nodes in the topology optimization process, where the calculation formula of CC is as follows:
<math> <mrow> <mi>CC</mi> <mo>=</mo> <mfrac> <mn>1</mn> <mrow> <mo>|</mo> <mi>V</mi> <mo>|</mo> </mrow> </mfrac> <munder> <mi>&Sigma;</mi> <mrow> <mi>p</mi> <mo>&Element;</mo> <mi>V</mi> </mrow> </munder> <msub> <mi>CC</mi> <mi>p</mi> </msub> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>4</mn> <mo>)</mo> </mrow> </mrow> </math>
where V is the set of all nodes in the network, CCpIs the aggregation coefficient of the neighbor node of the node p, and the calculation formula is as follows:
<math> <mrow> <msub> <mi>CC</mi> <mi>p</mi> </msub> <mo>=</mo> <mfrac> <mrow> <mo>|</mo> <mrow> <mo>(</mo> <msub> <mi>N</mi> <mi>p</mi> </msub> <mo>&times;</mo> <msub> <mi>N</mi> <mi>p</mi> </msub> <mo>)</mo> </mrow> <mo>&cap;</mo> <mi>E</mi> <mo>|</mo> </mrow> <mrow> <msub> <mi>k</mi> <mi>p</mi> </msub> <mrow> <mo>(</mo> <msub> <mi>k</mi> <mi>p</mi> </msub> <mo>-</mo> <mn>1</mn> <mo>)</mo> </mrow> </mrow> </mfrac> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>5</mn> <mo>)</mo> </mrow> </mrow> </math>
wherein N ispIs a set of neighbor nodes of node p, kp=|NpI is the number of neighboring nodes to node p, E is the set of connections between nodes in the network. 0<=CC<=1, the smaller the CC value, the more random the network nodes are distributed, the larger the CC value, the more concentrated the nodes are.
As can be seen from fig. 5, as the topology changes, the aggregation degree of the nodes becomes higher and higher, and a substantially stable state is reached, and it can be seen that the topology of the network is changed from completely random to more and more concentrated.
Fig. 6 shows the change of the average node degree (the number of neighboring nodes) of the nodes with the same processing capability in the topology reconnection process, and the change of the node degree is observed in an experiment by taking 100 seconds as a unit, so that a large number of nodes are reconnected to the node with the strongest processing capability, but a stable state is reached quickly, and the higher the connection degree of the node with the stronger processing capability is, the more query loads can be shared by the node with the stronger processing capability, and the processing capability of the network node can be fully utilized.
Fig. 7 is a graph of the change of the average hop count required for successful query, the average value of the hop count required for each 1000 queries in the experiment is obtained as the graph result, the average hop count required for query is gradually reduced along with the optimization of the network topology structure, and it can be seen from the graph that the hop count required after topology optimization is much lower than that required in the beginning, and the less the hop count required for query is, the higher the efficiency of the search algorithm is, thus it can be seen that the network search performance is greatly improved by the topology optimization method based on the mobile agent.
Accordingly, referring to fig. 8, a system 100 for load balancing of a mobile agent-based unstructured peer-to-peer network according to the present invention includes:
a topology adjusting unit 10, configured to periodically initiate a topology adjusting mechanism by each node in the network, and connect the topology adjusting mechanism to a node with strong processing capability to form a unit of a central topology structure;
a topology optimization unit 20, configured to determine a congestion state of a node by calculating a congestion level of the node at a certain time, and further perform network topology optimization;
the topology adjusting unit 10 includes:
node PiA unit for sending a collecting message to collect a candidate node set participating in the node topology adjustment;
forwarding the node-collected message to a randomly selected neighbor node and adding the node to the set Si
Set of candidate nodes SiReturned to the message originating node PiA unit of (1);
slave node PiSelecting the node P with the weakest processing capability and the connectivity degree larger than 1 from the current neighbor node setmin(Ni)A unit of (1);
from the set of candidate nodes SiThe node P with the strongest processing capability is taken outmax(Si)Comparing node Pmax(Si)And Pmin(Ni)To the node Pmax(Si)A unit that issues a connection request;
node PiNeighboring node P of disconnection and selectionmin(Ni)And is connected with node Pmax(Si)A unit for establishing a connection;
the topology optimizing unit 20 includes:
computing node P for collecting information by mobile agentjCongestion level at the current time tSetting three load states of overload, normal load and overload for each node, setting load state threshold value, calculating
Figure BDA00001946029700122
Means for comparing the value with a set load state threshold to determine a current load state of the node; wherein the node PjAt the current momentCongestion level of t
Figure BDA00001946029700123
The calculation formula of (2) is as follows:
CL P j ( t ) = 1 + Q P j ( t ) C P j
wherein,
Figure BDA00001946029700125
representing a node PjThe time required to process a query message; if a node is processing a message then all incoming messages at that time are placed in the node's message buffer queue,indicating the time t node PjThe number of messages to be processed in the buffer queue;
node PjRandomly selecting a part of nodes to disconnect, and deriving a unit of a sub-mobile agent;
the child mobile intelligent agent takes the generation node as a father node, searches nodes with redundant processing capacity in the network in a breadth-first traversal mode, judges the load state of the node when reaching one node, randomly selects a node to be reconnected to connect with the node if the node is lightly loaded, and then continuously searches the next node until all the nodes to be reconnected are reconnected, and the child mobile intelligent agent actively quits the network unit;
mobile agent according to node PjOf neighbor node PoA unit for selecting a next access node according to the attraction of the mobile agent and the accessed node list and migrating the next access node to the node; wherein the neighbor node PoThe attraction to a mobile agent is calculated as follows:
<math> <mrow> <msub> <mi>A</mi> <msub> <mi>P</mi> <mi>o</mi> </msub> </msub> <mo>=</mo> <msub> <mi>C</mi> <msub> <mi>P</mi> <mi>o</mi> </msub> </msub> <mo>&times;</mo> <mi>&chi;</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mi>o</mi> </msub> <mo>,</mo> <mi>k</mi> <mo>)</mo> </mrow> </mrow> </math>
Figure BDA00001946029700132
is a neighbor node PoRepresents the neighboring node PoThe time required to process a query message; x (P)oK) is a node PoThe connectivity of (c); node PoAttractive force
Figure BDA00001946029700133
The larger the mobile agent slave PjMigration to node PoThe higher the probability of (c);
the neighbor node PoThe connectivity calculation formula is as follows:
<math> <mrow> <mi>&chi;</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mi>o</mi> </msub> <mo>,</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>=</mo> <munderover> <mi>&Sigma;</mi> <mrow> <mi>h</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow> <mi>h</mi> <mo>=</mo> <mi>k</mi> </mrow> </munderover> <mfrac> <mrow> <mi>N</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mi>o</mi> </msub> <mo>,</mo> <mi>h</mi> <mo>)</mo> </mrow> </mrow> <msup> <mi>h</mi> <mi>&delta;</mi> </msup> </mfrac> </mrow> </math>
wherein, N (P)oH) represents a neighbor node PoThe number of nodes which are h hops away, k represents the radius of the calculated connectivity, delta is a control coefficient, 1/hδWeight, χ (P), for controlling influence of nodes of different distances on connectivityoK) the larger the node PoThe more query messages that may be received.
Compared with the prior art, each node in the network regularly starts a topology reconnection mechanism to form a centralized topology structure. Meanwhile, the nodes continuously collect information such as processing capacity and connectivity of neighbor nodes to guide the mobile intelligent agent to continuously migrate in the network and continuously monitor the load condition of important nodes in the network, the topological structure of the network is optimized and adjusted, congestion is avoided, load balance on the structureless peer-to-peer network is achieved, the network topological structure can be timely adjusted according to the load condition of the network, network node congestion can be effectively avoided, and resource searching efficiency is improved.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present application.
The above-described embodiments of the apparatus are merely schematic, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
It should be understood that although the description is made in terms of embodiments, not every embodiment includes only a single embodiment, and such description is for clarity only, and those skilled in the art will recognize that the embodiments described herein may be combined as a whole to form other embodiments as would be understood by those skilled in the art.
The above-listed detailed description is only a specific description of a possible embodiment of the present invention, and they are not intended to limit the scope of the present invention, and equivalent embodiments or modifications made without departing from the technical spirit of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for load balancing of a structureless peer-to-peer network based on a mobile agent is characterized by comprising the following steps:
s1, each node in the network periodically initiates a topology adjustment mechanism, and the topology adjustment mechanism is connected to the nodes with strong processing capacity to form a central topology structure;
and S2, judging the congestion state of the node by calculating the congestion level of the node at a certain moment, and further performing network topology optimization.
2. The method according to claim 1, wherein the step S1 specifically includes:
s11 and node PiSending a collecting message to collect a candidate node set participating in the node topology adjustment;
s12, forwarding the node collection message to a randomly selected neighbor node, and adding the node to the set Si(ii) a Simultaneously, the survival time TTL is reduced by 1; if the time to live TTL is not equal to 0, repeating step S12, and continuing to collect nodes;
s13, collecting candidate nodes SiReturned to the message originating node Pi
S14, slave node PiSelecting the node P with the weakest processing capability and the connectivity degree larger than 1 from the current neighbor node setmin(Ni)
S15, slave candidate node set SiThe node with the strongest processing capability is taken out and recorded asAnd slave it to SiIn deletion, if the node
Figure FDA00001946029600012
Has a processing capacity of not more than
Figure FDA00001946029600013
Step S17 is executed; if node
Figure FDA00001946029600014
Has a processing capacity greater thanThen to the node
Figure FDA00001946029600016
Sending out a connection request if the node
Figure FDA00001946029600017
Rejecting a connection requestThen step S15 is repeated to continue selecting the next reconnected node, if the node is not the next reconnected node
Figure FDA00001946029600018
If the reconnect request is accepted, go to step S16;
s16 and node PiNeighboring node P of disconnection and selectionmin(Ni)And is connected with node Pmax(Si)Establishing connection; if the number of the reconnected nodes reaches the upper limit number n of the preset number of the reconnected nodes, executing step S17; if not, executing step S14 to select the node to join the reconnection next time;
and S17, finishing the topology adjustment.
3. The method for load balancing of a structureless peer-to-peer network based on mobile agents according to claim 1, wherein the step S2 specifically comprises:
s21 calculation node P for collecting information by mobile agentjCongestion level at the current time t
Figure FDA00001946029600019
And use
Figure FDA000019460296000110
The congestion state of the node is judged by the value of (A), the congestion state of the node comprises setting three load states of overload, normal load and overload for each node, setting a load state threshold value, and calculating
Figure FDA000019460296000111
Comparing the value with a set load state threshold value to determine the current load state of the node; if node PjIf the load status is overload, go to step S22; otherwise, executing step S23, optimizing the topology, and selecting the next access node;
s22, the node PjRandomly selecting a part of nodes to disconnect, and deriving a sub-mobile agent; the child mobile agent takes its generation node as a parent nodeSearching nodes with redundant processing capacity in the network in a breadth-first traversal mode, judging the load state of the nodes when reaching one node, randomly selecting one node to be reconnected to connect with the node if the node is lightly loaded, then continuously searching the next node until all the nodes to be reconnected are reconnected, and actively quitting the network by the sub-mobile intelligent agent;
s23, the mobile agent according to the node PjOf neighbor node PoSelecting a next access node according to the attraction table of the mobile agent and the accessed node list, and migrating the next access node to the node; the accessed node list is used for recording the nodes accessed by the agent; the neighbor node attraction table is a table of the attractions of the neighbor nodes to the mobile agents, which is used by any node in the network for recording.
4. The method for load balancing of unstructured peer-to-peer networks based on mobile agents according to claim 3, wherein the step S21 further comprises:
step S210 said node PjAnd determining whether to accept the connection request of other nodes according to the load state of the node: if node PjCurrently in an overload state, node PjNot accepting other node connection requests; if node PjIs currently under normal load, and at this time if node PjIs overloaded, node PjNot accepting other node connection requests; if node PjThe last state is not overloaded, but node PjWhen the current state is normal, the node PjReceiving connection requests of other nodes; if node PjNode P when the current state is light loadjAnd accepting connection requests of other nodes.
5. The method according to claim 3, characterized in that in step S21, the node PjCongestion level at the current time t
Figure FDA00001946029600021
The calculation formula of (2) is as follows:
Figure FDA00001946029600022
wherein,
Figure FDA00001946029600023
representing a node PjThe time required to process a query message; if a node is processing a message then all incoming messages at that time are placed in the node's message buffer queue,
Figure FDA00001946029600024
indicating the time t node PjThe number of messages to be processed in the buffer queue.
6. The method for load balancing unstructured peer-to-peer networks based on mobile agents according to claim 3, characterized in that in step S23, the node PjNeighbor node P provided with one such nodeoAn attraction meter for recording the node PjProcessing capability of all neighbor nodesAnd connectivity χ (P)o,k);
Neighbor node PoThe attraction to a mobile agent is calculated as follows:
<math> <mrow> <msub> <mi>A</mi> <msub> <mi>P</mi> <mi>o</mi> </msub> </msub> <mo>=</mo> <msub> <mi>C</mi> <msub> <mi>P</mi> <mi>o</mi> </msub> </msub> <mo>&times;</mo> <mi>&chi;</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mi>o</mi> </msub> <mo>,</mo> <mi>k</mi> <mo>)</mo> </mrow> </mrow> </math>
Figure FDA00001946029600027
is a neighbor node PoRepresents the neighboring node PoThe time required to process a query message;
χ(Pok) is a node PoThe connectivity of (c); node PoAttractive force
Figure FDA00001946029600031
The larger the mobile agent slave PjMigration to node PoThe higher the probability of (c);
the neighbor node PoThe connectivity calculation formula is as follows:
<math> <mrow> <mi>&chi;</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mi>o</mi> </msub> <mo>,</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>=</mo> <munderover> <mi>&Sigma;</mi> <mrow> <mi>h</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow> <mi>h</mi> <mo>=</mo> <mi>k</mi> </mrow> </munderover> <mfrac> <mrow> <mi>N</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mi>o</mi> </msub> <mo>,</mo> <mi>h</mi> <mo>)</mo> </mrow> </mrow> <msup> <mi>h</mi> <mi>&delta;</mi> </msup> </mfrac> <mo>,</mo> </mrow> </math>
wherein, N (P)oH) represents a neighbor node PoThe number of nodes which are h hops away, k represents the radius of the calculated connectivity, delta is a control coefficient, 1/hδWeight, χ (P), for controlling influence of nodes of different distances on connectivityoK) the larger the node PoThe more query messages that may be received.
7. The method for load balancing unstructured peer-to-peer networks based on mobile agents of claim 4, wherein "will be calculated" in step S21
Figure FDA00001946029600033
The value is compared with a set load state threshold value to determine the current load state of the node, which is specifically: two set thresholds Uthred、BthredIf, ifNode PjIs overloaded, the variable flag =1, if
Figure FDA00001946029600035
Node PjIs normally loaded, the variable flag = 0. If it is
Figure FDA00001946029600036
Node PjIs lightly loaded, and the variable flag = -1.
8. The method for load balancing of a structureless peer-to-peer network based on mobile agents according to claim 7, wherein the step S210 specifically comprises: the node PjCurrent variable state flag =1, node PjNot accepting other node connection requests; if node PjCurrent state flag =0, and at this time if node PjThe last variable state of flag =1, then the node PjNot accepting other node connection requests; if node PjLast variable state flag =0 or-1, and node PjNode P with current variable state flag =0jConnection requests of other nodes can be accepted; if node PjIf the current variable state flag = -1, the node PjConnection requests of other nodes may be accepted.
9. A system for load balancing a structureless peer-to-peer network based on mobile agents, the system comprising:
the topology adjusting unit is used for each node in the network to periodically initiate a topology adjusting mechanism and connect the topology adjusting mechanism to the nodes with strong processing capacity to form a unit of a central topology structure;
a topology optimization unit for judging the congestion state of the node by calculating the congestion level of the node at a certain moment, and further performing network topology optimization;
wherein the topology adjusting unit includes:
node PiA unit for sending a collecting message to collect a candidate node set participating in the node topology adjustment; forwarding the node collecting message to a randomly selected neighbor node, and adding the node to a set Si; set of candidate nodes SiReturned to the message originating node PiA unit of (1);
slave node PiSelecting the node P with the weakest processing capability and the connectivity degree larger than 1 from the current neighbor node setmin(Ni)A unit of (1);
from the set of candidate nodes SiThe node P with the strongest processing capability is taken outmax(Si)Comparing node Pmax(Si)And Pmin(Ni)To the node Pmax(Si)A unit that issues a connection request;
node PiNeighboring node P of disconnection and selectionmin(Ni)And is connected with node Pmax(Si)A unit for establishing a connection;
the topology optimization unit includes:
computing node P for collecting information by mobile agentjCongestion level at the current time t
Figure FDA00001946029600041
Setting three load states of overload, normal load and overload for each node, setting load state threshold value, calculatingThe value is compared with a set load state threshold value to determine the current load state of the nodeA unit of a state;
node PjRandomly selecting a part of nodes to disconnect, and deriving a unit of a sub-mobile agent;
the child mobile intelligent agent takes the generation node as a father node, searches nodes with redundant processing capacity in the network in a breadth-first traversal mode, judges the load state of the node when reaching one node, randomly selects a node to be reconnected to connect with the node if the node is lightly loaded, and then continuously searches the next node until all the nodes to be reconnected are reconnected, and the child mobile intelligent agent actively quits the network unit;
mobile agent according to node PjOf neighbor node PoThe attraction to the mobile agent and the list of visited nodes to select the next visited node and migrate to the unit of that node.
10. The system according to claim 9, wherein the node P is configured to perform load balancing for unstructured peer-to-peer networks based on mobile agentsjCongestion level at the current time tThe calculation formula of (2) is as follows:wherein,representing a node PjThe time required to process a query message; if a node is processing a message then all incoming messages at that time are placed in the node's message buffer queue,
Figure FDA00001946029600046
indicating the time t node PjThe number of messages to be processed in the buffer queue;
the neighbor node PoThe attraction to a mobile agent is calculated as follows:
<math> <mrow> <msub> <mi>A</mi> <msub> <mi>P</mi> <mi>o</mi> </msub> </msub> <mo>=</mo> <msub> <mi>C</mi> <msub> <mi>P</mi> <mi>o</mi> </msub> </msub> <mo>&times;</mo> <mi>&chi;</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mi>o</mi> </msub> <mo>,</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>,</mo> </mrow> </math>
Figure FDA00001946029600048
is a neighbor node PoRepresents the neighboring node PoThe time required to process a query message; x (P)oK) is a node PoThe connectivity of (c); node PoAttractive force
Figure FDA00001946029600051
The larger the mobile agent slave PjMigration to node PoThe higher the probability of (c);
the neighbor node PoThe connectivity calculation formula is as follows:
<math> <mrow> <mi>&chi;</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mi>o</mi> </msub> <mo>,</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>=</mo> <munderover> <mi>&Sigma;</mi> <mrow> <mi>h</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow> <mi>h</mi> <mo>=</mo> <mi>k</mi> </mrow> </munderover> <mfrac> <mrow> <mi>N</mi> <mrow> <mo>(</mo> <msub> <mi>P</mi> <mi>o</mi> </msub> <mo>,</mo> <mi>h</mi> <mo>)</mo> </mrow> </mrow> <msup> <mi>h</mi> <mi>&delta;</mi> </msup> </mfrac> <mo>,</mo> </mrow> </math>
wherein, N (P)oH) represents a neighbor node PoThe number of nodes which are h hops away, k represents the radius of the calculated connectivity, delta is a control coefficient, 1/hδWeight, χ (P), for controlling influence of nodes of different distances on connectivityoK) the larger the node PoThe more query messages that may be received.
CN201210265613.9A 2012-07-29 2012-07-29 Intelligent mobile agent-based unstructured P2P network load balancing method and system Expired - Fee Related CN102790804B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210265613.9A CN102790804B (en) 2012-07-29 2012-07-29 Intelligent mobile agent-based unstructured P2P network load balancing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210265613.9A CN102790804B (en) 2012-07-29 2012-07-29 Intelligent mobile agent-based unstructured P2P network load balancing method and system

Publications (2)

Publication Number Publication Date
CN102790804A true CN102790804A (en) 2012-11-21
CN102790804B CN102790804B (en) 2015-03-04

Family

ID=47156102

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210265613.9A Expired - Fee Related CN102790804B (en) 2012-07-29 2012-07-29 Intelligent mobile agent-based unstructured P2P network load balancing method and system

Country Status (1)

Country Link
CN (1) CN102790804B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103490413A (en) * 2013-09-27 2014-01-01 华南理工大学 Intelligent electricity generation control method based on intelligent body equalization algorithm
CN103546530A (en) * 2013-06-20 2014-01-29 江苏大学 Method and system for balancing loads on peer-to-peer network nodes on basis of group resource management
CN106685745A (en) * 2017-03-17 2017-05-17 北京邮电大学 Network topology construction method and device
CN107438106A (en) * 2017-08-23 2017-12-05 北京慧点科技有限公司 The method, apparatus and peer-to-peer network system of the load balancing of peer-to-peer network
CN107589992A (en) * 2017-08-02 2018-01-16 北京大学(天津滨海)新代信息技术研究院 A kind of containerization application load dispatching method based on swarm intelligence
CN110351200A (en) * 2019-08-16 2019-10-18 东北大学秦皇岛分校 A kind of opportunistic network jamming control method based on forwarding task immigration

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101119271A (en) * 2007-07-05 2008-02-06 中国科学技术大学 Structured P2P based application service platform and implementing method thereof
US20080148403A1 (en) * 2006-12-13 2008-06-19 Microsoft Corporation Distributed malicious software protection in file sharing environments

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080148403A1 (en) * 2006-12-13 2008-06-19 Microsoft Corporation Distributed malicious software protection in file sharing environments
CN101119271A (en) * 2007-07-05 2008-02-06 中国科学技术大学 Structured P2P based application service platform and implementing method thereof

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103546530A (en) * 2013-06-20 2014-01-29 江苏大学 Method and system for balancing loads on peer-to-peer network nodes on basis of group resource management
CN103490413A (en) * 2013-09-27 2014-01-01 华南理工大学 Intelligent electricity generation control method based on intelligent body equalization algorithm
CN103490413B (en) * 2013-09-27 2015-09-02 华南理工大学 A kind of intelligent power generation control method based on intelligent body equalization algorithm
CN106685745A (en) * 2017-03-17 2017-05-17 北京邮电大学 Network topology construction method and device
CN106685745B (en) * 2017-03-17 2019-10-29 北京邮电大学 A kind of constructing network topology method and device
CN107589992A (en) * 2017-08-02 2018-01-16 北京大学(天津滨海)新代信息技术研究院 A kind of containerization application load dispatching method based on swarm intelligence
CN107438106A (en) * 2017-08-23 2017-12-05 北京慧点科技有限公司 The method, apparatus and peer-to-peer network system of the load balancing of peer-to-peer network
CN110351200A (en) * 2019-08-16 2019-10-18 东北大学秦皇岛分校 A kind of opportunistic network jamming control method based on forwarding task immigration
CN110351200B (en) * 2019-08-16 2022-07-01 东北大学秦皇岛分校 Opportunistic network congestion control method based on forwarding task migration

Also Published As

Publication number Publication date
CN102790804B (en) 2015-03-04

Similar Documents

Publication Publication Date Title
CN102790804B (en) Intelligent mobile agent-based unstructured P2P network load balancing method and system
CN100574219C (en) Introducing the peer-to-peer network super node of node importance selects and resource search method
Xu et al. Distributed topology control with lifetime extension based on non-cooperative game for wireless sensor networks
Radenkovic et al. Congestion aware forwarding in delay tolerant and social opportunistic networks
Li et al. A multipath routing protocol with load balancing and energy constraining based on AOMDV in ad hoc network
CN103546530A (en) Method and system for balancing loads on peer-to-peer network nodes on basis of group resource management
Thandapani et al. An energy‐efficient clustering and multipath routing for mobile wireless sensor network using game theory
Nallusamy et al. Mobile agents based reliable and energy efficient routing protocol for MANET
Radenkovic et al. Framework for utility driven congestion control in delay tolerant opportunistic networks
Shah et al. An efficient unstructured p2p overlay over manet using underlying proactive routing
CN102006238B (en) Balanced quick searching method in structureless P2P (Peer-to-Peer) network
Schmieg et al. pSense-Maintaining a dynamic localized peer-to-peer structure for position based multicast in games
Mallapur et al. Multipath load balancing technique for congestion control in mobile ad hoc networks
Boukerche et al. A cross-layer approach-based gnutella for collaborative virtual environments over mobile ad hoc networks
CN107864092A (en) A kind of cloud content distribution method, device based on multicasting technology
CN109874162A (en) The hybrid Design of Routing Protocol optimization method of high-altitude high-speed mobile node ad hoc network
CN108881016B (en) Method for constructing self-organizing network community of Internet of vehicles and balancing communication load of community nodes
CN101895474B (en) Information diffusion-based P2P network route control method
Pratheema et al. Minimizing end-to-end delay using multipath routing in wireless sensor networks
Yeferny et al. CDP: A content discovery protocol for mobile p2p systems
Radhamani Clustering schemes for mobile adhoc networks: A review
Bandgar et al. An improved location-aware ant colony optimization based routing algorithm for MANETs
Soni et al. An investigation on energy efficient routing protocol for wireless sensor network
Hamad et al. Routing approach for p2p systems over manet network
El-Bazzal et al. An efficient management algorithm for clustering in mobile ad hoc network

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150304

Termination date: 20150729

EXPY Termination of patent right or utility model