Summary of the invention
Technical problem: wireless mobile sensor network is the network of a kind of foundation-free facility, multi-hop, self-organizing. When network is bigger, in order to reduce control and routing cost, improve the expandability of network and the service efficiency of resource, wireless mobile sensor network usually adopt based on bunch hierarchy, and the formation and maintenance of this sub-clustering hierarchy depends on certain cluster algorithm, the present invention is directed to wireless mobile sensor network and propose a kind of cluster algorithm, and consider the mobility of node, node degree, the series of factors such as dump energy and the repeatability between bunch head.
Technical scheme: first provide several definition:
Magnetic node: use the node that magnetic material is made, when certain node is elected as bunch head in network, then opens magnetic function;If namely two magnetic nodes together time; can mutual exclusion, and magnetic can be turned off and on.
Connected degree: the i.e. number of all neighbours of node.
The comprehensive weights of node: set in network certain node i synthetic weights value expression as Ei=aNi+bVi+cDi, wherein a, b, c are the weighted value of three aspect factors, and a+b+c=1; Ni, Vi, DiThe respectively Connected degree of corresponding node i, the speed of movement and and all neighbours of surrounding distance and. Node IDi, the comprehensive weights E of nodei��
Leader cluster node: by seeking max (Ei) node i determined is a bunch head.
Bunch head number: node i neighbor node number is n, then leader cluster node number num (n) of this bunch meets below equation:
Hello packet: the form of Hello packet is Hello (IDi,ClusterIDi,RClusterIDi, Ei), wherein IDiFor certain node i No. ID; ClusterIDiFor No. ID of node i place bunch, if not adding any bunch, then it is Null; RClusterIDiStandby bunch head ID for node i place bunch; EiComprehensive weights for node. Hello packet is divided three classes: 1. neighbor discovery messages: IDi�� Null and ClusterIDi=Null; 2. bunch head message: IDi=ClusterIDi�� Null; 3. sub-clustering message: ID is addedi�� Null, ClusterIDi�� Null and IDi��ClusterIDi. Wherein ClusterIDiAnd RClusterIDiIt is the array of dynamically definition, its size respectively num.
Election of cluster head scheme: node i sends Hello packet traversal neighbor list, by the comprehensive weights descending of node, and choose position of ranking the first for leader cluster node, position of being number two for standby leader cluster node. If bunch head is more than one, then before choosing ranking, num is leader cluster node, and num afterwards is standby leader cluster node.
Standby leader cluster node: be gateway node, is responsible for the communication between two adjacent cluster and a corresponding backup node of leader cluster node.
Anchor node: be deployed in some nodes of fixed area in advance, and the geographical position of these nodes is it is known that be used for the location of death nodes.
Method flow
The flow process of this cluster-dividing method is as it is shown in figure 1, complete procedure will be specifically described below:
Step 1) fixing anchor node is disposed in the form of a grid in target area, and record respective geographic coordinate information;
Step 2) initialize time each node ClusterID and RClusterID be sky, from base-station node, the Hello packet of each neighbor node also broadcast transmission of base station oneself, namely finds neighbor node by the neighbor discovery messages in Hello packet;
Step 3) after T after a while, after the neighbor node table that each node acquisition of base station and base station neighbors is complete, leader cluster node and standby leader cluster node is selected according to election of cluster head scheme, and open the magnetic function of bunch head, then a broadcast bunch head sets up information to neighbor node, and its geographical location information is sent to anchor node by leader cluster node and standby leader cluster node simultaneously;
Step 4) if receiving node is general type node, neighbor node table is first updated when receiving Hello packet, then the type of message content is judged, when this message is for bunch head message and when this node does not add any bunch or ClusterID element number less than num, then write into ClusterID leader cluster node No. ID immediately, representing and add this bunch, then broadcast one adds the information of this bunch. When this message is standby leader cluster node and the RClusterID of this node for empty or element number less than num time, standby leader cluster node ID is write into RClusterID;
Step 5) standby leader cluster node becomes gateway and the neighbor discovery messages that continues to send in Hello packet sets up neighbor node table to find neighbor node, then proceed to choose leader cluster node and standby leader cluster node, continue successively until all of mobile sensor network node all has been added to bunch
Step 6) when the leader cluster nodes of two bunches meet at certain time point, owing to magnetic is repelled each other, so the leader cluster node of two bunches will not move together;
Step 7) when the leader cluster node of certain bunch suddenly becomes death nodes, standby leader cluster node replaces the position of bunch head immediately becomes leader cluster node, and bunch head of all members of this bunch of broadcast announcement and its upper level, then again selects a leader cluster node leader cluster node in support by election of cluster head scheme (see definition);
Step 8) leader cluster node and the standby leader cluster node estimation position using the geometry barycenter of all anchor nodes in its communication range as oneself. Detailed process is as follows: anchor node broadcasts a beacon signal to neighbor node at set intervals, includes ID and the positional information of anchor node self in signal. When unknown node receives after the beacon signal quantity from anchor node exceedes some thresholding preset in one section of time of intercept, this node is thought and is connected with this anchor node, and self-position is defined as the polygonal barycenter that all anchor nodes in communication form. When producing dead leader cluster node, can the checkmate geographical location information of leader cluster node of anchor node is sent to base station, and base station can be died for the sake of honour a little according to the replacing that geographical position is in good time;
Step 9) base station re-elects leader cluster node and standby leader cluster node every set time t with regard to transmission neighbor discovery messages until the complete individual network of covering is to adapt to the mobility of node. When the energy of certain bunch of head i is less than certain value, this bunch of hair send a message to base station, and a message is then broadcasted to the whole network in base station, inspires clustering into of next cycle;
Step 10) when a node receives the message of sub-clustering again, then ClusterID and the RClusterID of this node and all of neighbor node is all set to Null;
Step 11) when the node i in network enters resting state owing to not working for a long time, node i sends a message before going to sleep to the leader cluster node at its place bunch, bunch head messaging again to higher level bunch head until passing to base station to preserve and recorded the relation that forerunner is follow-up, when the resting state of this node has influence on network connectivty, base station sends activate message by original path and activates it to this dormancy node, removes the content of these preservations as elapsed time k;
Step 12) new node adds this network through legitimate authentication, and it will actively send neighbor uni-cast information to find its neighborhood:
�� without neighbor node, then this node failure;
�� if having leader cluster node in neighbor node, then add this bunch, send request message to a bunch hair, bunch head updates the neighbor list of this node while being added into oneself neighbor list;
If �� neighborhood non-NULL and without leader cluster node, then judge whether oneself can become a bunch head according to election of cluster head scheme;
Step 13) when having node to exit, if this node is non-leader cluster node, then sub-clustering be there is no any impact, as long as it being deleted from neighbor node table. When exit be leader cluster node time, then the neighbor node of this bunch will not receive a bunch head message again, there is time-out during overtime s, then ClusterID or RClusterID of all neighbor nodes using this point as bunch head is set to Null, again carries out election of cluster head according to election of cluster head scheme.
Beneficial effect: the present invention proposes the cluster-dividing method of mobile node in a kind of wireless sensor network, and the method has the advantage that
(1) gusset material in this method have employed the magnetic material of tool, owing to node is constantly mobile, bunch head of different bunches likely can move together, so can cause bunch and bunch between communication confusion, utilize and mutually exclusive between magnetic material bunch head and a bunch head can be avoided to move together;
(2) when occurring dying for the sake of honour a little with node dormancy, it is possible to quickly found the node dying for the sake of honour a little or arousing dormancy by the communication between the location of anchor node and bunch head;
(3) by set time t just again sub-clustering to adapt to the characteristic that node constantly moves;
(4) Connected degree of node has been considered during election bunch head, the speed of movement and the distance sum with neighbours so that the election of bunch head is more reasonable;
(5) multiple leader cluster node can be chosen when the member of bunch is too much, it is possible to increase the high efficiency of network, and choose multiple standby leader cluster node simultaneously, leader cluster node can be rapidly gone to when leader cluster node catastrophic failure and improve the stability of network;
Detailed description of the invention
Below for Fig. 2, further describe technical scheme and method flow by a specific example.
Step 1) fixing anchor node, i.e. triangular nodes in figure is disposed in the form of a grid in target area, and record respective geographic coordinate information;
Step 2) neighbor discovery messages in base-station node and surroundings nodes broadcast transmission Hello packet, finds neighbor node and adds respective neighbor node table;
Step 3) after elapsed time T, all nodes in the circle of base station in the neighbours of base station and figure, leader cluster node 1,2 and backup node 3,4 is selected according to election of cluster head scheme, and open the magnetic function of bunch head, then a broadcast bunch head sets up information to all of node in this region, and the geographical location information of leader cluster node and standby leader cluster node is sent to anchor node A simultaneously;
Step 4) if recipient node is general type node, it is assumed to be when node 5 receives the Hello packet of node 1 and first updates its neighbor node table, then the type of message content is judged, this message does not add any bunch for bunch head message and this node, then write into ClusterID No. ID of node 1 immediately, represent and add this bunch and broadcast the information adding this bunch. Neighbor node table is again updated when node 5 receives the Hello packet of node 4, then type of message is judged, the standby leader cluster node that this message is standby leader cluster node and the Hello message of self is sky, and now node writes into RClusterID standby leader cluster node ID;
Step 5) standby leader cluster node 3 and 4 becomes gateway and the neighbor discovery messages that continues to send in Hello packet sets up neighbor node table to find neighbor node, then proceed to choose leader cluster node and standby leader cluster node, continue until all of mobile sensor network node all has been added to bunch successively, as shown in Figure 2;
Step 6) when leader cluster node 1 and 2 moves together at certain time point, owing to magnetic is repelled each other, so the leader cluster node of two bunches will not move together;
Step 7) when leader cluster node 2 suddenly becomes and dies for the sake of honour, standby leader cluster node 4 replaces the position of bunch head immediately becomes leader cluster node, and bunch head of all members of this bunch of broadcast announcement and its upper level and base station, then again select a leader cluster node leader cluster node in support by election of cluster head scheme (see definition);
Step 8) standby leader cluster node 3,4 continues the neighbor discovery messages sent in Hello packet and finds neighbor node and set up neighbor node table, node 3 chooses leader cluster node 5,6 and standby bunch 7,8, node 4 chooses leader cluster node 9 and standby leader cluster node 10, continue until all of mobile sensor network node all has been added to bunch successively, as shown in Figure 2;
Step 8) leader cluster node 9 and the standby leader cluster node 10 estimation position using the geometry barycenter of all anchor node B, C, D, F in its communication range as oneself. Detailed process is as follows: anchor node B, C, D, F broadcast a beacon signal to neighbor node at set intervals, include ID and the positional information of anchor node self in signal. When node 11 receives after the beacon signal quantity from anchor node exceedes some thresholding preset in one section of time of intercept, this node is thought and is connected with this anchor node, and self-position is defined as the polygonal barycenter that all anchor nodes in communication form. When node 11 becomes dying for the sake of honour, the geographical location information of node 11 can be sent to base station by anchor node, and base station can be died for the sake of honour a little according to the replacing that geographical position is in good time;
Step 9) base station re-elects leader cluster node and standby leader cluster node every set time t with regard to transmission neighbor discovery messages until the complete individual network of covering is to adapt to the mobility of node. When energy when bunch 1 is less than certain value, this bunch of hair send a message to base station, and a message is then broadcasted to the whole network in base station, inspires clustering into of next cycle;
Step 10) when node 2 receives the message of sub-clustering again, then ClusterID and the RClusterID of this node and all of neighbor node is all set to Null;
Step 11) when entering resting state when the node 5 in network is not owing to working for a long time, node 5 sends a message before going to sleep to the leader cluster node 2 at its place bunch, bunch head messaging again preserves to higher level bunch head base station and has recorded the relation of forerunner's rear-guard, when the resting state of this node has influence on network connectivty, base station sends activate message by original path and activates it to this dormancy node, removes the content of these preservations as elapsed time k;
Step 12) new node 12 adds this network through legitimate authentication, and it will actively send neighbor uni-cast information to find its neighborhood:
�� without neighbor node, then this node failure;
�� if having leader cluster node 9 in neighbor node, then add this bunch, send request message to a bunch hair, bunch head updates the neighbor list of this node while being added into oneself neighbor list;
If �� neighborhood non-NULL and without leader cluster node, then judge whether oneself can become a bunch head according to election of cluster head scheme;
Step 13) when node 12 exits, owing to this node is non-leader cluster node, so sub-clustering be there is no any impact, as long as it is deleted from neighbor node table. When exit be leader cluster node 9 time, then the neighbor node of this bunch will not receive a bunch head message again, time-out is there is during overtime s, then ClusterID or RClusterID of all neighbor nodes using this point as bunch head is set to Null, again carries out election of cluster head according to election of cluster head scheme (see definition).