Background technology
Wireless sensor network (Wireless Sensor Network, WSN) be by being deployed in the surveyed area a large amount of cheap microsensor nodes that are integrated with transducer, flush bonding processor and communication module, the network system of the self-organizing of the multi-hop that the mode by radio communication forms.It is by means of various informative transducer built-in in the sensor node, measure heat, infrared ray, sonar, radar and seismic signal in the surrounding enviroment of place, thereby survey the interested material phenomenons of numerous mankind such as size, speed and direction that comprise temperature, humidity, noise, luminous intensity, pressure, soil constituent, mobile physics.
The typical sensor network configuration is made up of sensor node (sensor node), convergence node (sink node), junction network and telemanagement node usually.A large amount of sensor nodes be deployed at random monitored area (sensor field) inner or near, can constitute network by the self-organizing mode.The sensor node data monitored is transmitted along other sensor node hop-by-hop ground, and Monitoring Data may be routed to the convergence node through behind the multi-hop by a plurality of node processing in transmission course, arrives management node by the Internet or satellite at last.The user is configured and manages sensor network by management node, issue monitoring task and collection Monitoring Data.Fig. 1 has provided and has practised the description that sensor network architecture general type is arranged.
As shown in Figure 2, practise the sensor network protocol stack that has and comprise physical layer, data link layer, network layer, transport layer and application layer, corresponding with five layer protocols of Internet protocol stack.In addition, protocol stack also comprises energy management platform, mobile management platform and task management platform.These management platforms make sensor node to transmit data in the sensor network of node motion according to the mode collaborative work of high efficiency of energy, and support multitask and resource-sharing.
Designed a kind of wireless sensor network among the IEEE802.15.4 based on layering bunch tree topology structure, this topological structure be convenient to the expansion and route simple relatively.Adopt bunch tree structure can simplify and being connected of Internet simultaneously, only need in root node, to add a gateway and get final product.Address allocation scheme and Routing Protocol based on layering bunch tree topology structure in the IEEE802.15.4 agreement are briefly described below;
1, the network address is divided
Address assignment agreement regulation in the IEEE802.15.4 agreement based on layering bunch tree topology structure, each node distributes 16bits network address, wherein 8bit be called a bunch ID (clusteridentification, CID), in addition 8bit be called node ID (nodeidentification, NID).Whole network configuration as shown in Figure 3.The root node of the whole network of the numerical value of CID from 0 to 255,0 expression, be also referred to as appointment equipment (DesignatedDevice, DD), CID 255 just represents that broadcast message is used for all bunches, other numerical value are used for distinguishing different bunches.All nodes in bunch head (CH) of the numerical value of NID from 0 to 255,0 expression bunch, 255 expression broadcast messages are used for bunch, other numerical value are used to distinguish the different nodes with under the cluster.
As shown in Figure 3, the CID of root node DD and NID just are defined as 0, as these many bunches of network root DD, and the network node its computing capability (as memory capacity and processor speed) is better than usually.Bunch tree network among the figure is a kind of multihop network, and when node added network, the network node of communicating by letter with it in the association process was defined as the father node of node; Adding ingress itself becomes the child node of father node.Node 3 in bunch 0 is father nodes of node 10 and node 22; Node 10 and node 22 are child nodes of node 3.
2, the address assignment in the networking process
All nodes in the layering bunch tree topology structural network regularly send beacon, comprise node CID and NID etc. in the beacon.Before networking, new node is periodically intercepted these beacons, in case receive a beacon, new node just sends request and connects (CONNECTION REQUEST) control messages application networking.If received beacon from a plurality of nodes, new node just select to send the earliest beacon node make response.This moment, new node just became both candidate nodes, and the request of receiving of the father node of expection connects after the control messages to refer to bunch hair at its place bunch asks node ID (NODE ID REQUEST) message, this message can by bunch in intermediate node be routed to a bunch head.
If can accepting this both candidate nodes, bunch head networks, the node ID that it agrees loopback is relayed to both candidate nodes after responding (NODE ID RESPONSE) message and being converted into connection response (CONNECTIONRESPONSE) message, to the NID in this bunch of both candidate nodes distribution.Network if bunch head can not be accepted this both candidate nodes, it can send request CID request (CLUSTER ID REQUEST) message and give DD, and request is set up one new bunch.Root node DD can send CID response (CLUSTER ID RESPONSE) message response request, and distributing a new CID and one for both candidate nodes is 0 NID number.After receiving this response message, bunch head can send NID response (NODE ID RESPONSE) message to both candidate nodes.After obtaining confirming, just formally become network members begins to send beacon to both candidate nodes.
3, Routing Protocol
Each network node is all preserved a routing table, only preserves the CID and the NID of other nodes that the CID of neighbor node and NID and this node can listen to during beginning in the table, and the relevant information of father node also is stored in this routing table.Root node DD preserves the information of whole network node.
Root node DD regularly all leaf nodes in bunch tree sends hyperlink request state (LINKSTATE REQUEST) message.After receiving this message, a linking status response of leaf node response (LINK STATE RESPONSE) message, it can listen to the CID that wherein comprises self and NID and all and the CID of the node that the CID value is different with self.This message is addressed in the process of bunch head, via node meeting " eavesdropping " message content, with determine outside the node coverage downstream node and bunch, these downstream nodes and bunch be added in their routing table, and the node that the linking status response message is provided classified as first via node in the route.Then, via node adds self information in the node listing of message, continues upstream the direction of bunch head again and transmits this message.Bunch head adds the information in the linking status response message in the routing table of self, carries out fusion treatment, produce a new linking status response message again upstream direction transmit.After receiving the all-links status response message, root node DD will have gained some understanding to network configuration.
In routing procedure, if the CID of destination node is with different with the CID of via node, via node is the routing table of search oneself just, searches corresponding C ID.If found the route table items that contains this CID, it just is routed to this message the via node of this CID correspondence in the table; If can not find, it just is routed to this message the father node of oneself.
If the CID of the CID of destination node and via node is identical, via node is the routing table of search oneself just, the item that table look-up CID and NID mate, if find that destination node is the neighbor node of oneself, it just directly sends to this neighbor node to message.If destination node adds routing table entry when " eavesdropping " Link State response message, it just gives the downstream node that sends link-state message nearest (single-hop) to it with this forwards; If can not find this destination node in routing table, the father node (upstream) that it just gives forwards oneself continues to seek route by its father node.
The address assignment that a key character of above-mentioned 802.15.4 agreement is exactly a network is networking limit, a limit assign logical addresses, and network is a tree.The network of tree has a common weakness, and the robustness that is exactly network is poor, in case via node breaks down, can cause the branches and leaves node to be reconstructed, and then cause network topology to change, and has consumed node energy.At the network of tree, appropriate address distribution and routing mechanism will be accelerated network organizing and reconstruct, save the energy of network node, increase the robustness of network.
Summary of the invention
The present invention proposes a kind of simple efficient, to be suitable for wireless sensor network node energy-conservation, and based on the fast path protocol of realizing the address allocation scheme that node address is related with network topological information.
A kind of fast path protocol of wireless sensor network comprises following content:
(1) during enabling communication between nodes, source node is before route is set up, physical address PhyID by destination node searches corresponding logical address LogID earlier, before not finding corresponding destination node logical address LogID or receiving destination node logical address LogID response message, source node is searched the associated nodes table of oneself successively according to the physical address PhyID of destination node; The information of searching to father node, child node and neighbor node broadcasting destination node logical address LogID, behind the response message of receiving destination node logical address LogID, just stop search procedure, then do not replace source node to repeat above step if also receive corresponding message, till the logical address LogID that finds destination node by its father node; If finding the node of destination node logical address LogID is source node itself, then logical address LogID search procedure finishes, and enters route and sets up process; If its parent node is then passed to oneself child node, up to source node to the next stage level;
(2) when node is received a packet, check whether the destination address of this packet belongs to the address field that self has; If exceed the address field of self, then this packet is transmitted to the father node of self; If destination address belongs to the address field that self has, check the address field that belongs to which branch, continue relaying, up to finding destination address.
(3) on the basis of tree-shaped Route Selection, node can in conjunction with ART table and the associated nodes table that periodically updates carry out the through street by selection and foundation, from each viewpoint of node independently, network still can be considered as tree-shaped, any two nodes that couple together by grid are reciprocally regarded the other side's node as the child node of self, and vice versa.
Also comprise route maintenance and repair mechanism: the reparation state that enters behind the node failure is divided into two parts, a part be father node find own certain child node lost efficacy cause this child node with whole branch road when losing efficacy, the network reparation that father node carries out; Another part is a child node can't communicate by letter with the father node of oneself again the time, network self-healing and reparation that this child node need be carried out;
(1) the route repair mechanism of father node:
Certain child node of finding oneself when father node lost efficacy, cause this child node with whole branch road all can't communicate by letter with father node again the time, initiate route repair by father node, the ART at its all superior nodes of deletion inefficacy branch road, the record in the associated nodes list item;
When a certain node application of inefficacy Zhi Luxiang networked, this node promptly as the target father node of inefficacy branch road, need be repaired this branch road, enables re-accessing network;
Actual reservation number of addresses (Pre_Multiple-1) * Branch_Node according in the whole reservation address field (LogID)~(Pre_Last_ID) of the node number Invalid_Node on this inefficacy branch road, target father node self reservation number of addresses Pre_Multiple-1 and target father node divides different situations to handle.
1) when the node number of target father node self reservation number of addresses greater than the inefficacy branch road, the target father node is directly reserved whole nodes that the address is distributed to the inefficacy branch road successively with self, and the upstream nodes transmission step by step of the branch road information after will repairing, receive this information up to root node, upgrade network topology;
2) when not enough distribution of the reservation address field of destination node self and the total number of addresses of its reservation of whole when enough distributing to whole node of inefficacy branch road, the target father node reports relative address information, adjust network topology table by root node, inefficacy branch road in the list item is added the target father node is with in the former branch road, and recomputate reservation multiple New_Pre_Multiple for the new branch road after merging:
New_Pre_Multiple=Pre_Multiple×Branch_Node÷(Branch_Node+Invalide_Node)
Root node is according to new reservation multiple New_Pre_Multiple, give this new branch road deallocation according to the address allocation scheme in the networking process, upgrading former Pre_Multiple simultaneously is New_Pre_Multiple, the new branch road that the target father node is led receives new network topology table, obtains new address field information;
3) when the target father node with whole reservation address fields of branch road still less than the node number of inefficacy branch road, then the target father node step by step upstream nodes send this information, up to root node; Root node should the inefficacy branch road from the network topology table table section of former branch road place, be changed to new target father node in the network topology table with branch road, and the one-level node branch under the one-level node branch under the comparison object father node is number former with failure node number is divided into two kinds of situations processing:
A., if the two branch number links to each other, then root node root node under the situation that does not change former Pre_Multiple is given this two associated branch deallocations according to the address allocation scheme in the networking process, and the network topology table content after will repairing at last sends to the branch road of renewal respectively.Each interdependent node obtains address information mechanism according to the node in the networking process, upgrades self information.
B, if the two branch number links to each other, root node with the reservation address field of one-level node under the comparison object node whether greater than the total sum of the node of total node number this one-level node under and inefficacy branch road.Distribute inadequately if reserve address field, then root node gives out information and notifies inefficacy branch node access failure.Otherwise, root node recomputate this one-level node with the reservation address multiple New_Pre_Multiple of branch road, computational methods are with situation 2), then according to the address allocation scheme in the networking process, give the branch road deallocation after merging, the network topology table content after will repairing at last sends to the branch road of renewal respectively; Each interdependent node obtains address information mechanism according to the node in the networking process, upgrades self information;
(2) the route repair mechanism of child node:
When node can't be communicated by letter with the father node of oneself again, notify descendants's node to enter network and repair state;
The selection of father node, backup and access; Receive the topology renewal that root node sends over, extract address information;
The renewal of network topology table at this moment, the process that node obtains address information are only limited to the branch road that needs reparation; When all descendants's nodes of repairing on the branch road all are re-assigned to LogID, and all parent nodes of this branch road have upgraded also that own ART shows and during the associated nodes table, the network reparation is finished; If access network is unsuccessful, the temporary transient access network again of this child node then, this node will be notified the next stage child node of oneself, lead the branch road of oneself to enter the repair process of child node respectively by the next stage child node; Enter again after the child node of access network then need wait for a period of time again and go into net state at random.
The present invention is an on-demand routing protocol with route backup, and it can calculate routing iinformation according to business demand from topology information, when being not enough to calculate whole route in the topology information, sets up route more as required.
In the present invention, in order to find route towards destination node, source node is at first checked LogID number that self whether has preserved destination node, if the LogID of known destination node, owing to comprised certain topology information among the LogID, so can be used to calculate route, otherwise, source node will (each coordinator node all may play the effect of topology server to topology server, coordinating its node according to this, to be in position in the tree network different and topology information amount that comprised is different) inquire about the LogID of this destination node, then, source node can (comprise father node in this table according to the LogID of destination node and the associated nodes table of self, descendants's node, neighbor node, the information of node interested) judge whether destination node is on the branch road of certain associated nodes of oneself, if, then directly set up the route of source node, give destination node by this associated nodes relaying to this associated nodes; If destination node is not on the branch road of any associated nodes, source node is issued the father node of oneself with data, is searched the associated nodes table of self by father node and carries out above-mentioned judgement and processing.In addition, the inefficacy of node may cause original route unavailable, and at this situation, Routing Protocol of the present invention has two kinds of processing modes: topology is upgraded and route repair.
Because each node has no idea to know the corresponding situation of the physical address PhyID and the addresses distributed LogID of all nodes of the whole network.Each coordinator node in the wireless sensor network that the present invention relates to all keeps the own information that comprises the PhyID and the LogID of child node, and each node all keeps these information of neighbor node and the information of (once communicating by letter) interested node, then can comparatively fast obtain the LogID of destination node, carry out quick route calculation again.
Embodiment
The network using tree topology structure that present embodiment relates to, the whole network only have a Centroid as root node.256 nodes of network heap(ed) capacity do not limit every grade of maximum node number of network sum of series, and root node is made as 0 grade, and the every of other adds one-level through a branch.All nodes all are sensor nodes in this network, and the root node unique to the whole network sends the data that collect; It between node two-way link; The initial energy value of each node equates, and at the network lifecycle initial stage, each node all has enough energy to communicate by letter with root node or coordinator node; Each node all adopts omnidirectional antenna.
The whole network divides three category nodes: root node, coordinator node, ordinary node.
Root node: being responsible for the initiation work of netinit, is the promoter of networking commands, generally bears network topology server, gateway, webmaster and Applied layer interface services.
Coordinator node: the non-frontier node of tree topology all is called coordinator node, bears work such as address assignment, data relaying.
Ordinary node: the frontier node of tree topology all is called ordinary node, can be exchanged into coordinator node according to actual needs.
The wireless sensor network that the present invention relates to adopts the mechanism of address assignment after the first networking: after a tree network is set up, at first begin upwards to carry out node counts and topology information collection by ordinary node, begin the one-level level by root node again and distribute the address downwards, the network topology table that issue has been set up.
One, the network topology table of sensor network is set up flow process and node counts flow process
In the process of application networking, the node that application networks can be learnt the progression Level of self by the markers frame of father node, and the physical address PhyID of node is pre-set in the cloth network process.
(1), when the tree network group well after, the ordinary node that is in the branch road tip is at first initiated the node counts flow process, ordinary node carries out initialization to the branch node counter, if the initial value of branch node number is 1, be Branch_Node[branch]=1, and physical address PhyID, progression Level and the branch node of self node counted Branch_Node[branch] be saved in the network topology table of oneself, send to father node;
(2), the node of non-branch road tip is a coordinator node, after it waits for all child node network topology table of collecting oneself, at first set up the network topology table of oneself, all branch nodes in the topology table of collecting are counted Branch_Node[branch] count value adds up, add 1 again, final count value is saved in the network topology table of oneself.Meanwhile, coordinator node is compiled top set number with the network topology table of all child nodes and is joined in the self networks topology table, and other unknown values still keep initial value, for example:
Branch_No. |
Level |
PhyID |
?LogID |
Pre_Multiple |
B Branch_Node[branch] |
|
2 |
310 |
|
|
3 |
1 |
3 |
405 |
|
|
1 |
2 |
3 |
407 |
|
|
1 |
Wherein the LogID item need be waited for after each branch road information all is aggregated into root node and being distributed unitedly by root node, and Pre_Multiple is for reserving the address multiple, the maximum son node number that the decision node can insert.
(3), no matter be ordinary node or coordinator node, self network topology table set up finish after, be about to it and send to the father node of oneself, up to root node.
Two, root node distributes addressing mechanism
After root node is received the network topology table of all child nodes,, finish the extraction of full mesh topology information, calculating, the distribution of LogID and the task of complete network topology table of reservation address field according to the information that from network topology table, is obtained.
Step 1: root node improves the branch number and node number in the network topology table
Root node can calculate the whole network node and count Branch_Node[0 according to the network topology table of receiving from child node].First information that information is exactly 1 grade of child node of each network topology table that root node is received, and the number Child_Node[0 of 1 grade of child node] equal the number that root node is received network topology table.Root node is the 1st grade of node distribution branch Branch_No=[1,2,3 ..., Child_Node[0]], and the Branch_No of branch of distributing inserted relevant position in each network topology table.Like this, branch in the all-network topology table number and branch node number are all perfect;
Step 2, extraction network topological information
Root node can obtain the whole network topology information from network topology table after the network topology table of receiving all 1 grade of child nodes.Because during the structure of network topology table, it is nested to carry out one-level level ground, and therefore in network topology table, the nodal information between the identical node of progression is all descendants's nodal informations of previous node.
Root node will carry out the operation of following steps:
Suppose that root node receives the child node PhyID=101 from oneself, 102, No. 103 nodes, these three nodes are 1 grade of node;
Network topology table with the PhyID=101 node is example (seeing the following form), root node the PhyID=101 node with branch number be 1, from this network topology table, obtain its descendants's nodal information then;
Wherein, PhyID=104 node, its progression are 2, and branch number is 1, thereby the PhyID=104 node is the 1-1 branch road in the whole network as can be known;
PhyID=203 node, its progression are 3, and branch number is 1, thereby the PhyID=203 node is the 1-1-1 branch road in the whole network as can be known;
PhyID=204 node, its progression are 3, and branch number is 2, thereby the PhyID=204 node is the 1-1-2 branch road in the whole network as can be known;
By that analogy.According to the nested mode in this network topology table, root node can directly obtain tree topology information.
Branch_No. |
?Level |
PhyID |
?LogID |
Pre _Multiple | Branch_Node |
[branch] |
1 |
?1 |
101 |
|
|
10 |
1 |
?2 |
104 |
|
|
4 |
1 |
?3 |
203 |
|
|
1 |
2 |
3 |
204 |
|
|
1 |
3 |
3 |
301 |
|
|
1 |
2 |
2 |
201 |
|
|
2 |
1 |
3 |
302 |
|
|
1 |
3 |
2 |
202 |
|
|
3 |
1 |
3 |
303 |
|
|
1 |
2 |
3 |
304 |
|
|
1 |
Step 3, root node are finished calculating, the distribution of logical address LogID and the work of complete network topology table of reserving address field
After root node obtains network topological information, it has just had whole understanding to whole network topology, progression Level, each one-level node branch k (k=0,1,2 of comprising each node in the network, Child_Node[0]) and the branch node of leading sum Branch_Node[k], sequence number i (i=0,1,2 of child node under one-level node topology table,, Branch_Node[k]) etc.Root node will be according to as above information and the initial address multiple Pre_Multiple that reserves calculate the logical address LogID of each node of the whole network and the reservation address field of node.
Root node is expressed as the logical address allocation algorithm of all nodes of the whole network:
Pre_Multiple is for reserving the address multiple, the maximum son node number that the decision node can insert.
In the networking process, each node all has been assigned with a continuous address, and the length of address field has promptly been reserved a sector address section greater than the actual node number on the branch road.This has just allowed the back to add new branch again, also can more effectively repair tree simultaneously.
Finally, root node replenishes LogID in the whole network all-network topology table and initial p re_Multiple complete.After root node is distributed the address, with the LogID of distributing to each child node that sends a notice.Be that root node transmits network topology table to the next stage level,
Three, node obtains address field information
After each coordinator node is received the network topology table of passing to oneself, need finish following task successively: the address information LogID that from table, obtains self in first; Calculate the reservation address field of self
(LogID)~(Pre_Last_ID)=(LogID)~(LogID+Pre_Multiple * Branch_Node-1); Information extraction makes up ART table (Adaptive Robust Tree) and associated nodes table (containing father node information, descendants's nodal information, information of neighbor nodes and node interested (node of communicating by letter in the recent period) information); According to next stage child node number n network topology table being splitted into subordinate's child node is the child node network topology table of first n child node, and issue corresponding subordinate's child node by the order of branch number, this process can be considered as the inverse process that network topology table is set up process.
Node on coordinator node and the ordinary node obtains the address field process as shown in Figure 4.
Ordinary node for the branch road tip then only needs to extract the reservation address field of self networks address LogID, computing node and extract the associated nodes table.
Four, Route Selection and creating a mechanism
Because the network address of node has topology information, therefore simplified the network routing mechanism greatly, and routing procedure made full use of grid type tree network structure set up the through street by, thereby shorten the path, further cut down the consumption of energy.
1, network address LogID searches
During enabling communication between nodes, source node need be searched corresponding logical address LogID by the physical address PhyID of destination node before route is set up, and rule is:
Before not finding corresponding destination node logical address LogID or receiving destination node logical address LogID response message, source node is searched the associated nodes table of oneself successively according to the physical address PhyID of destination node; The information of searching to father node, child node and neighbor node broadcasting destination node logical address LogID, behind the response message of receiving destination node logical address LogID, just stop search procedure, then do not replace source node to repeat above step if also receive corresponding message, till the logical address LogID that finds destination node by its father node; If finding the node of destination node logical address LogID is source node itself, then logical address LogID search procedure finishes, and enters route and sets up process; If its parent node is then passed to oneself child node, up to source node to the next stage level.
2, Route Selection and creating a mechanism
Because node address itself just has certain routing iinformation, when node is received a packet, checks whether the destination address of this packet belongs to the address field that self has; If exceed the address field of self, then this packet is transmitted to the father node of self; If destination address belongs to the address field that self has, check the address field that belongs to which branch, continue relaying, up to finding destination address.
The route that Figure 5 shows that an inter-node communication is set up example, sends node F to when node I has packets need, Source=0x0071, and Destination=0x0041, data transfer procedure is as follows:
∈ [0x0071,0x0080], I sends this packet to father node H;
∈ [0x0061,0x0080], H sends this packet to father node B;
Step 3, B receive and find Destination=0x0041 ∈ [0x0001,0x0080] behind the packet, and find this address and belong to C (branch 1), and B sends this packet to C;
Step 4, C receive and find Destination=0x0041 ∈ [0x0011,0x0060] behind the packet, and find this address and belong to E (branch 2), and C passes to E with this packet;
Step 5, E receive and find Destination=0x0041 ∈ [0x0031,0x0050] behind the packet, and find this address and belong to F (branch 1), and E passes to F with this packet;
Step 6, F receive Destination=0x0041 ∈ [0x0041,0x0050] behind the packet, and this moment, F accepted this packet.
3, the through street by selection with create a mechanism
On the basis of tree-shaped Route Selection, node can in conjunction with ART table and the associated nodes table that periodically updates carry out the through street by selection and foundation, thereby shorten communication path, further reduce system power dissipation.As Fig. 6 be in inter-node communication the through street by example, solid line is represented original tree-shaped connection, dotted line connects adjacent node, makes the tree that is connected to become grid type of network.In the grid type tree, from each viewpoint of node independently, network still can be considered as tree-shaped, and any two nodes that couple together by grid are reciprocally regarded the other side's node as the child node of self.For example, the node K among Fig. 6 is considered as oneself child node to H, and vice versa.
Lift a simple example, the packet among Fig. 6 from M to I can directly transmit, and this is the child node that M is considered as I self.Source node M has packet to issue destination node I, and M finds the neighbor node that I is oneself earlier in the associated nodes table of oneself preserving, and just directly sets up the path of M-I.If do not have the through street by, then common path is M-L-K-J-A-B-H-I.
Five, route maintenance and repair mechanism
Network changes communications status over to after finishing the tasks such as distribution that networking is an address information.Under communications status, allow the adding of new node and because of node failure or the link small-scale network topology change that reason causes such as make mistakes.Reserve the address because each node all is assigned, cause small-scale network topology change can not contradict with the logical address LogID allocation rule of the whole network so the present invention can guarantee route maintenance and repair mechanism.
Concrete route maintenance and repair mechanism are as follows: the reparation state that enters behind the node failure is divided into two parts, a part be father node find own certain child node lost efficacy cause this child node with whole branch road when losing efficacy, the network reparation that father node carries out; Another part is a child node can't communicate by letter with the father node of oneself again the time, network self-healing and reparation that this child node need be carried out.
1. the route repair mechanism of father node:
Certain child node of finding oneself when father node lost efficacy, cause this child node with whole branch road all can't communicate by letter with father node again the time, initiate route repair by father node, the task that route repair need be finished mainly is the ART at its all superior nodes of deletion inefficacy branch road, the record in the associated nodes list item, avoids expired or invalid list item to cause Route Selection to make mistakes.Concrete steps as shown in Figure 7.
When a certain node application of inefficacy Zhi Luxiang networked, this node promptly as the target father node of inefficacy branch road, need be repaired this branch road, enables re-accessing network.Actual reservation number of addresses (Pre_Multiple-1) * Branch_Node according in the whole reservation address field (LogID)~(Pre_Last_ID) of the node number Invalid_Node on this inefficacy branch road, target father node self reservation number of addresses Pre_Multiple-1 and target father node divides different situations to handle.
1)Invalid_Node≤Pre_Multiple-1
Promptly when the node number of target father node self reservation number of addresses greater than the inefficacy branch road, the target father node is directly reserved whole nodes that the address is distributed to the inefficacy branch road successively with self, and the upstream nodes transmission step by step of the branch road information after will repairing, receive this information up to root node, upgrade network topology.
2)Pre_Multiple-1<Invalid_Node≤(Pre_Multiple-1)×Branch_Node
Promptly when not enough distribution of the reservation address field of destination node self and the total number of addresses of its reservation of whole when enough distributing to whole node of inefficacy branch road, the target father node reports relative address information, adjust network topology table by root node, inefficacy branch road in the list item is added the target father node be with in the former branch road, and recomputate the reservation multiple for the new branch road after merging
New_Pre_Multiple。
New_Pre_Multiple=Pre_Multiple×Branch_Node÷(Branch_Node+Invalide_Node)
Root node is according to new reservation multiple New_Pre_Multiple, give this new branch road deallocation according to the address allocation scheme in the networking process, upgrading former Pre_Multiple simultaneously is New_Pre_Multiple, the new branch road that the target father node is led receives new network topology table, obtains new address field information according to the method for preamble narration.
3)(Pre_Multiple-1)*Branch_Node<Invalid_Node
Be the target father node with whole reservation address fields of branch road still less than the node number of inefficacy branch road, then the target father node step by step upstream nodes send this information, up to root node; Root node should the inefficacy branch road from the network topology table table section of former branch road place, be changed to new target father node in the network topology table with branch road, and the one-level node branch under the one-level node branch under the comparison object father node is number former with failure node number is divided into two kinds of situations processing:
A., if the two branch number links to each other, then root node root node under the situation that does not change former Pre_Multiple is given this two associated branch deallocations according to the address allocation scheme in the networking process, and the network topology table content after will repairing at last sends to the branch road of renewal respectively.Each interdependent node obtains address information mechanism according to the node in the networking process, upgrades self information.
B, if the two branch number links to each other, root node with the reservation address field of one-level node under the comparison object node whether greater than the total sum of the node of total node number this one-level node under and inefficacy branch road.Distribute inadequately if reserve address field, then root node gives out information and notifies inefficacy branch node access failure.Otherwise, root node recomputate this one-level node with the reservation address multiple New_Pre_Multiple of branch road, computational methods are with situation 2), then according to the address allocation scheme in the networking process, give the branch road deallocation after merging, the network topology table content after will repairing at last sends to the branch road of renewal respectively; Each interdependent node obtains address information mechanism according to the node in the networking process, upgrades self information;
2. the route repair mechanism of child node: when node can't be communicated by letter with the father node of oneself again, this child node need be carried out the self-healing and the reparation of network.
The route repair of child node is corresponding related with the route repair of father node, and the route repair mechanism of father node has solved the assignment problem of the logical address LogID of new access leg, and the route repair mechanism of child node considers mainly that then following task object gets final product:
Notify descendants's node to enter network and repair state;
The selection of father node, backup and access;
Receive the topology renewal that root node sends over, extract address information.
Different with the networking process is, renewal, the process that node obtains address information of network topology table were only limited to and needed the branch road repaired this moment, and other uncorrelated nodes do not carry out.When all descendants's nodes of repairing on the branch road all are re-assigned to LogID, and all parent nodes of this branch road have upgraded also that own ART shows and during the associated nodes table, the network reparation is finished.
If access network is unsuccessful, the temporary transient access network again of this child node then, this node will be notified the next stage child node of oneself, lead the branch road of oneself to enter the repair process of child node respectively by the next stage child node; Enter after the child node of access network then need wait for a period of time again again and go into net state at random, because after waiting for a period of time, after the child node self-healing success of own subordinate, this node is hopeful access network again.
It should be noted that, because the present invention initiatively selects father node in the process of node access network, and in several backup father nodes, repeatedly attempt networking, avoid missing the expection father node that other still have enough access capabilities, thereby avoid carrying out too much bunch division, cause the unbalanced of network topology structure.