The content of the invention
The purpose of the present invention is, when the node in wireless sensor network carries out credit evaluating, to increase node itself hair
Yan Quan, shows that node itself participates in the wish of communication behavior with self recommendation value, when node occurs bad leading to because of low wish
During letter behavior, severe punishment can be exempted from and be excluded outside network service, while with respect to low energy when solving credit evaluating
Amount node is difficult the problem of existence, so that for data transfer selection next-hop node provides measurement, it is balanced between each node of network
Traffic load, finally realizes each node energy of synchronous consumption, extends the purpose of whole network life cycle.
The wireless sensor network route side based on self recommendation credit evaluating that one side according to the application is provided
Method, comprises the following steps:
Multiple neighbor nodes receive the self recommendation value of adjacent node by answering the broadcast of adjacent node;
The residual energy value that the self recommendation value passes through adjacent node, and the residue energy of node neighbouring with adjacent node
Value is obtained;
Present node receives the self recommendation value of multiple neighbor nodes;
Self recommendation value according to the neighbor node, determines node to be redirected from multiple neighbor nodes;
Route is carried out according to the node to be redirected to redirect;
Self recommendation value is obtained according to the residual energy value of adjacent node, and the residue energy of node value neighbouring with adjacent node
The step of taking includes:
Adjacent node obtains self rest energy value Eleft;
Adjacent node obtains its all neighbouring residue energy of node value, and calculates its all neighbouring residue energy of node
The arithmetic mean of instantaneous value E of valueneighbors;
Adjacent node calculates oneself probable value P as key nodek-node;
Adjacent node is according to self rest energy value Eleft, all neighbouring residue energy of node values arithmetic mean of instantaneous value
Eneighbors, the probable value P as key nodek-nodeCalculate the self recommendation value of itself.
In the present invention, if two nodes can directly carry out data is activation and receive and need not move through third party's node and enter
Row forwarding, then claim the two nodes neighbor node each other.
Its advantage is:
1. this method is changed in existing credit evaluating method, and node must participate in communication activity to safeguard itself prestige
State.By using this method, node can express the wish for oneself participating in communication by self recommendation value to neighbor node.
This give the flexibility that node more saves self rest energy value.
2. this method can enable that a certain regional nodes balancedly undertake communication task, so as to reach synchronous energy
Consume, be finally reached the purpose in extension network overall work life-span.When certain node causes it to remain because undertaking excessive communication task
When complementary energy is significantly lower than surroundings nodes energy, you can be reluctant the wish for undertaking communication task to be expressed by self recommendation value
And communication task is handed into other nodes.Synchronously decline each node energy in region is macroscopically shown as, it is basic while dead
Die.Avoid and force other nodes to need to improve transmission power to increase communication distance because some nodes are first dead, so that plus
Fast energy ezpenditure promotes the generation of the dead vicious circle phenomenon of node.
In some embodiments, multiple neighbor nodes are by answering the broadcast of adjacent node, receive adjacent node from
The step of my recommendation, includes:
Adjacent node broadcasts local link advertised information to neighbor node, the link advertised information include node ID,
Residual energy value and self recommendation value.Its advantage is that the information of node ID, Ke Yitong are added in the middle of link advertised information
Cross the different neighbor node of the convenient identification of node ID.
In some embodiments, adjacent node is received by answering the broadcast of adjacent node in multiple neighbor nodes
Also include after the step of self recommendation value:
Link advertised information according to the adjacent node is updated to present node record.Its advantage is,
When node being newly increased in the middle of wireless network, it is possible to which the record to node is updated.
In some embodiments, the value for setting self recommendation value is the first setting value or the second setting value, and first sets
Definite value represents the node without the wish for participating in communication, and the second setting value represents that the node has the wish for participating in communicating,
Self recommendation value according to the neighbor node, wraps the step of determine node to be redirected from multiple neighbor nodes
Include:
Present node selects node to be redirected in the neighbor node that self recommendation value is the second setting value;
If all neighbor node self recommendation values are the first setting value, further according to the Routing Protocol that network is used, choosing
Select node to be redirected.Its advantage, distinguished by two setting values the node whether there is participate in communication wish, generally this two
Individual arranges value can use 0 and 1, so as to conveniently realize binary calculating.
In some embodiments, carry out also including step after route is redirected wait redirecting node according to described:
Present node is monitored to the communication behavior of the node to be redirected;
Often monitor that the node to be redirected occurs a communication behavior, reacquire the self recommendation of the node to be redirected
Value., often there is a communication behavior in its advantage, the residual energy value of the node to be redirected will be reduced, now, entered again
Row obtains its self recommendation value, can timely obtain the newest self recommendation value of node.
In some implementation methods, this is being reacquired wait also including step after the self recommendation value for redirecting node:
If the numerical value of self recommendation value changes, its new self recommendation value is broadcasted to its all neighbor node.Its is beneficial
Effect, timely can be broadcast to neighbor node by the self recommendation value after renewal.
Specific embodiment
The invention will now be described in further detail with reference to the accompanying drawings.
Fig. 1 to Fig. 5 schematically show a kind of implementation method of the invention based on self recommendation credit evaluating
Wireless sensor network routing method.
It was defined as follows noun first before detailed description:
Credit value is predict present node future behaviour one based on being evaluated present node behavior over
Value, credit value is to assign present node by another node.The credit value of node includes:It is direct credit value, indirect credit value, comprehensive
Close credit value.Its is respective to be defined as follows:
Direct credit value:Node A observes the communication behavior of its neighbor node B according to certain rule, and according to node B previously
Communication history, is assigned to the prestige of node B.
Indirect credit value:The neighbor node that node A is obtained from its neighbor node is assigned to the prestige of node B.
Comprehensive credit value:Node A is assigned to certain value according to certain rule to its neighbor node B, and the value has reacted node A pairs
There is the anticipation and decision of good communication behavior in a short time in node B.
Node credit value:The degree of reliability of the indirect prestige that its neighbor node that node A judges is given.
As shown in figure 1, the wireless sensor network routing method based on self recommendation credit evaluating its comprise the following steps:
Step S11:Adjacent node transmits self recommendation value by broadcasting local link advertised information to neighbor node.
Self recommendation value can be obtained by the residual energy value of adjacent node, and the residue energy of node value neighbouring with adjacent node.
Link advertised information includes node ID, residual energy value and self recommendation value.
If in the link advertised information of the adjacent node that certain present node is received, it is to work as to have an adjacent node
Front nodal point does not have respective record, then the link advertised information according to the adjacent node is carried out more to the record of present node
Newly, this new node is increased.
Wherein, in wireless sensor network, the node particularly in planar topologies, typically all nodes hold simultaneously
Load data acquisition and the function of data forwarding, that is to say that general ordinary node also can all have certain routing function, Lin Jujie
Point refers to that can be carried out data forwarding without third party's node and completed two nodes of communication neighbours each other with direct communication
Node.
Step S12:Present node receives the self recommendation value of multiple neighbor nodes;
Step S13:Self recommendation value according to the neighbor node, determines node to be redirected from multiple neighbor nodes;
The value for setting self recommendation value is " the first setting value " or " the second setting value ", and " the first setting value " represents the node without participation
The wish of communication, " the second setting value " represents that the node has the wish for participating in communicating, and present node is " second in self recommendation value
Node to be redirected is selected in the neighbor node of setting value ";If all neighbor node self recommendation values are " the first setting value ", then
According to the Routing Protocol that network is used, node to be redirected is selected.Its advantage, the node is distinguished by two setting values
The wish for participating in communication is whether there is, in the present embodiment, " the first setting value " is 0, and " the second setting value " is 1, so as to conveniently realize two
The calculating of system, i.e. self recommendation value are wish of the 0 expression node without participation communication, and self recommendation value represents the node for 1
There is the wish for participating in communicating.
Step S14:Route is carried out according to the node to be redirected to redirect.So as to complete a process for routing forwarding.
Step S15:Often monitor that the node to be redirected occurs a communication behavior, reacquire the node to be redirected oneself
My recommendation.Because with the increase of number of communications, the wish that node to be redirected participates in communication will be reduced, self recommendation value meeting
Variation is produced, so needing to reacquire self recommendation value.Whether complete the process of monitoring, mainly monitor selected next-hop node
Cost node consigns to its data communications task, and only monitoring just can know that and there occurs once successful communication behavior or one
The communication behavior of secondary failure.The statistics of the communication behavior number of times of success and failure is the basis that the direct credit value of node is calculated.
Step S16:If the numerical value of the self recommendation value of the node to be redirected changes, it is broadcasted to its all neighbor node
New self recommendation value.Ensure that all neighbor nodes can timely obtain the newest self recommendation value of the node, know the section
Wish of the point with reference to communication.
As shown in Fig. 2 the computational methods of the self recommendation value of each node are specially:
Step S21, node obtain self rest energy value, and self rest energy value can be given by following estimation equations
Estimation:
Eleft=Einit-aEsent-bEreceived-timeEwork ①
Formula 1. in, EinitIt is node primary power, a is that node sends how many number of bits altogether to current time
According to EsentTo send 1 number of bits average energy needed for, b is that node receives how many number of bits altogether to current time
According to EreceivedIt is that node receives how many number of bits evidences altogether to current time, time is played for network self-starting and is currently
Only how long work altogether, EworkIt is node gathered data and holding state lower unit interval average energy consumption, Einit、EreceivedWith
EworkThe energy model used according to network is determined.
In order to mitigate the amount of calculation of whole estimation process, EinitWhen calculating for second, one can be changed to
The secondary node self rest energy value being calculated, the now certainly last calculating of the value of a, b and time resets after finishing lays equal stress on
It is new to start statistics.
Wherein, under primary power value is original state, node can be used for the energy sizes values of work, primary power value
Setting can be by that the power supply (such as dry cell) of present node is measured and is calculated.Different power supplys is initial
Energy value is different.Residual energy value refers to that present node is remaining can be used for the energy size of work, and residual energy value is to estimate
Obtain, estimation equation is:The consumed energy value of original energy value-.In estimation, consumed energy mainly considers to have sent data
Amount and data accepted amount, node are not considered the energy consumption of data processing locally.
Step S22, node obtain its all neighbor node residual energy value, and calculate its all neighbor node dump energy
The arithmetic mean of instantaneous value of value;The value is carried by the link advertisement messages of neighbor node or carried by proper communication data message,
The value is stored in local prestige list respective field after the acquisition, and it is remaining that node calculates its all neighbor node on this basis
The arithmetic mean of instantaneous value of energy value, computing formula is:
Formula 2. in, Ei-leftIt is the dump energy of its own that i-th neighbor node of the node is noticed, n is the node
The quantity of total neighbor node.
Step S23, node calculate oneself probable value as key node in a short time;Probable value computing formula is:
Pk-node=1/n is 3.
Formula 3. in, n is that, according to related voting protocol, the node owned before last being excluded as key node
It is likely to become the both candidate nodes sum of the key node.
Wherein, key node, in different operation protocol families, has different concepts.For example, being assisted for election of cluster head
View, what is referred to is exactly the leader cluster node in candidate, and for data convergence protocol, what is referred to is exactly data gathering node.These nodes, all
It is the node that will in a network play the even more important task of more general node, namely they i.e. will more consumed energy
To complete network data transmission task.
Step S24, node according to self rest energy value, the arithmetic mean of instantaneous value of all neighbor node residual energy values, into
The self recommendation value of oneself is calculated for the probable value of key node, computing formula is:
Formula 4. in, max is represented and is chosen that larger with two values of expression formula of CSV in bracket
Value result the most, min takes smaller value for result in representing two expression formulas,
Formula 5. in, α, β are weight coefficient, and its span is [0,1], and they and be 1;If network
Without key node when being the non-Cluster Networks of plane or network work, then α values are set to 1, and β value is set to 0;Other situations, α, β
Value can respectively be taken as 0.5;
Formula 6. in, P be variable of the span between (0,1), P needed during the network operation constantly tune
Whole, it calculates function need to meet that the network working time is more long, be worth lower condition, and the calculating function of such as P can select P=1/
How long time, time work altogether untill being played currently for network self-starting.R is the final node self recommendation being calculated
Value, its value non-" 0 " is " 1 ", and " 0 " represents the node at present without the wish for participating in communication, that is, the wish for participating in communication is relatively low.
" 1 " represents that the node has the wish for participating in communicating at present, that is, the wish for participating in communication is higher.
Now with a kind of more typical orientation diffusion route (DD, Directed Diffusion) in wireless sensor network
Illustrated as a example by agreement.There is a working stage for " path reinforcement stage " in DD agreements, i.e., present node has been successfully transmitted
Data are to after destination node (Sink node), and destination node can start the reinforcement path set up to present node, i.e., anti-to path
To once being confirmed and optimum choice, the data that present node is subsequently sent to destination node will be along this path with higher
Speed sends.As shown in figure 5, in the path reinforcement stage, it is assumed that using message transmission rate as path reinforcement standard, the neighbours of A
The data transfer transmission rate of node B is RateB, the data transfer transmission rate of neighbor node C is RateC, and strengthen number of path
It is Rate according to transmission rate request, if assuming RateB>RateC>Rate, specifies that node B will be as node according to DD agreements
The node to be redirected of A.But, in the method in the middle of the present invention, in addition it is also necessary to which the comprehensive credit value with present node carries out synthesis
Judge selection, node selection strategy to be redirected is revised as in the present invention:
MetricB=Comp (RateB,RepAB)
Comp is represented Rate in formulaBWith comprehensive credit value RepABMerged by certain rule, specific fusion rule can
It is determined as needed with when realizing.
The regulation of the credit evaluating method used according to network, uses the direct credit value on node B after renewal
Recalculated with indirect credit value and obtain its comprehensive credit value RepAB:General, for direct prestige and indirect prestige using not
It is subject to synthesis with weight coefficient.The direct prestige on node B that such as node A observations are obtained is RepB-Direc, it is adjacent from other
Occupy and the indirect prestige on node B is obtained at node for RepB-Indirec, then the comprehensive prestige that A gives B is:
RepAB=α RepB-Direc+βRepB-Indirec
α and β sums are 1 in formula, and their specific value is determined by practical application.
The neighbor node that node A meets multiple path data rate requirement calculates Metric values respectively by this rule, choosing
The maximum node of value is selected as node to be redirected.Now message transmission rate the maximum may not necessarily be selected in neighbor node.
In the present invention, the neighbor node present node low for self recommendation value can take corresponding prestige protection to arrange
Apply, so as to the present node for avoiding low self recommendation value is mistaken for malicious node because failing to complete proper communication task, from
And be excluded outside whole network, cause it again to participate in network service from now on.
If in the link advertised information of the adjacent node that certain present node is received, it is to work as to have an adjacent node
Front nodal point does not have respective record, then the link advertised information according to the adjacent node is carried out more to the record of present node
Newly, as shown in figure 3, the processing method that the record of present node is updated is:
After the link notice message that the broadcast of its neighbor node comes is received, the node is at this for step S31, each node
Ground prestige list is that the neighbor node is increased newly or one list item of modification;The field stored in local prestige list has:It is node ID, surplus
Complementary energy value, direct credit value, indirect credit value, comprehensive credit value, node credit value, self recommendation value;
Step S32, when being recorded without the neighbor node in prestige list, that is, increase newly a list item when, node ID, residual energy
Value and self recommendation value field are filled according to corresponding field in link notice message, direct credit value, indirect credit value, synthesis
Credit value, node credit value are filled according to the initialization value that credit evaluating method used in network specifies;
Step S33, when the existing neighbor node is recorded in prestige list, that is, change corresponding list item, connected according to chain
Accuse the corresponding field that residual energy value and self recommendation value in message are changed in corresponding list item.
In this process, if node A receives the self recommendation value that its certain neighbor node B sends, if
Neighbor node B existing corresponding records in the local prestige lists of node A are then right by being put into of not making an amendment of the self recommendation value
In should recording respective field;If without corresponding record, ignoring the self recommendation value.
If node A monitors that its certain neighbor node B occurs communication behavior, according to the credit evaluating side that network is used
Method, calculates the direct credit values of neighbor node B and updates the corresponding record respective field in local prestige list;
If node receive from neighbor node C on the indirect credit value to another node B, according to network institute
The credit evaluating method for using, the indirect credit value of calculate node B, the node credit value of calculate node C, and result of calculation is deposited
Store up the corresponding record respective field into local prestige list.
If the comprehensive credit value Rep of result of calculationABLess than the lowest threshold that credit evaluating method specifies, and node B
Self recommendation value be " 1 ", predicate node B be malicious node, result of calculation is stored into the corresponding record of local prestige list
Respective field, locks the field, and carry out exclusion treatment according to credit evaluating method regulation.
If the comprehensive credit value Rep of result of calculationABLess than the lowest threshold that credit evaluating method specifies, and node B
Self recommendation value be " 0 ", predicate node B be low purpose communication node, ignore result of calculation, by the correspondence of local prestige list
Record respective field is revised as 1.1 times of lowest threshold.
If the comprehensive credit value Rep of result of calculationABHigher than the lowest threshold that credit evaluating method specifies, ignore node B
Self recommendation value, result of calculation is inserted the corresponding record respective field of local prestige list.
Self recommendation value for " 0 " node, receive its neighbor node send over require its forwarding data when, according to
Agreement regulation forwarding data, then triggering calculates self recommendation value, if the result of calculation of self recommendation value occurs compared with initial value
Change, then circulate a notice of new self recommendation value to all neighbor nodes.
As shown in figure 4, for step S13:Self recommendation value according to the neighbor node, from multiple neighbor nodes really
The specific method of node surely to be redirected is:
Step S41, the road used according to its comprehensive credit value and network in neighbor node of the self recommendation value for " 1 "
By agreement, node to be redirected is selected, after the completion of selection, the communication behavior into node to be redirected to being chosen is monitored
Process;.
If step S42, all neighbor node self recommendation values are " 0 ", ignore self recommendation value, according to node synthesis
The Routing Protocol that credit value and network are used, selects node to be redirected, and after the completion of selection, section is redirected into waiting of being chosen
The process that the communication behavior of point is monitored.
Node selection to be redirected depends on route Metric values, wherein, Metric values are that Routing Protocol algorithm completes to calculate
The variate-value for obtaining afterwards.The different Routing Protocols of calculating of Metric values have different methods, have by distance objective section
Point hop count as Metric values, have using message transmission rate as Metric values, have using time delay as Metric values, also have
Be several persons synthesis.In the scheme of the present embodiment, used by the both candidate nodes synthesis prestige and network that will be calculated first
The both candidate nodes Metric values that Routing Protocol is calculated are carried out once comprehensively, and comprehensive method is not made to specify, because not of the same race
Unit differs class Metric values in itself, and span also differs, further need exist for depending on it is different be particularly applicable in prestige and
A weight distribution is done between Metric values.Generally, normalized is done respectively to prestige and Metric values, that is, distinguishes
The maximum prestige value of both candidate nodes synthesis credit value/credit evaluating method is calculated, in both candidate nodes Metric values/Routing Protocol
The maximum occurrences of Metric values, then result of calculation are multiplied by a coefficient summation respectively and obtain comprehensive credit value and Metric values
Comprehensive Metric after synthesis, two coefficient sums are 1.So, in step S41 and S42 first in all neighbor nodes certainly
During my recommendation is 1 node, the node node to be redirected of selection synthesis Metric value maximums, if in all neighbor nodes
Self recommendation value is 0, then do not consider further that self-recommendation value, and the maximum section of synthesis Metric values is directly selected in all neighbor nodes
Point node to be redirected.
Above-described is only some embodiments of the present invention.For the person of ordinary skill of the art, not
On the premise of departing from the invention design, various modifications and improvements can be made, these belong to protection model of the invention
Enclose.