Summary of the invention
Technical problem: the present invention is directed to the problems referred to above, proposes during calculating communicating predicted value, utilizes node to enliven
The weighted mean of the predictor of the degree factor and original transmitted probability is as new communicating predicted value.Based on this, it is proposed that one
Plant modified model probability routing algorithm NAPR(Node Activity-based Probabilistic based on node liveness
Routing Algorithm), the node liveness factor is joined among the prediction of transmission probability.
Technical scheme: a kind of of the present invention holds improvement probabilistic routing method based on node liveness in slow mobile sensor network
It is that the node liveness factor is joined among the prediction of transmission probability, proposes the computing formula of the liveness NA of node itself,
By weights α, NA and the original communicating predicted probit of PROPHET algorithm are weighted, meet historical information according to node,
And node active degree in a network, calculate new communicating predicted probit, by relatively communicating predicted probability between node
Whether the forwarding of the size decision message of value to be, utilizes life span TTL drop policy to be managed caching, and its step is as follows:
1) initialize: the transmission probability information table of node initializing oneself, the transmission probability of all nodes is initialized as
Initial transmission probability constant Pinit, PinitValue between [0,1],
2) the node liveness of each node is calculated: the nodes crossed according to node contact and and during a upper node contact
Between, calculate the liveness of each node itself,
3) combine node liveness and the record that meets, update each node-node transmission prediction probability value,
4) life span TTL drop policy is utilized to carry out queue management, when TTL is less than or equal to 0, by message from queue
Abandon;When TTL is more than 0, carry out message forwarding according to transmission probability.
Described joins among the prediction of transmission probability by the node liveness factor, proposes the liveness NA of node itself
Computing formula, the computing formula of the liveness NA of node itself is defined as follows:
NAiRepresent the liveness of node i, NAiThe quantity of other nodes that contacted with this node of size be directly proportional,
And and the length of this node and a upper node contact time be inversely proportional to, it may be assumed that
Wherein, niThe quantity of other nodes that expression node i was contacted, tiExpression node i contacts with a upper node
Time, λ is constant, and in order to realize normalization, λ is set to 10, i.e. 0≤NAi≤1;For different nodes, NA is the biggest, represents this
Individual node is the most active, and the probability that the message entrained by this node is delivered to convergent point is the biggest.
By weights α, NA and the original communicating predicted probit of PROPHET algorithm are weighted, are described in detail below:
Communicating predicted probit P (a, b): message is transferred to the transmission probability parameter of node B from node A, often P (a, b)
As probability route metric standard;The probit all increasing between them of every time meeting between node, meet joint often
Probit between point is just high, and this probit is called transfer probability, communicating predicted P (a, value b) has a following two situation:
Situation 1: when node A and node B meets:
P (a, b)=α × [and P (a, b)old+(1-P(a,b)old)×Pinit]+(1-α)×(NAb-NAa) (2)
Wherein, α is weights, adjust weights α can with the concept transfer liveness factor for the impact of transmission probability predictive value,
P(a,b)oldIt is the communicating predicted of the last time of node A, B of acquisition from node meets historical record, Pinit∈ (0,1] it is just
Beginning constant, (a, b) initialization is both configured to P to all of Pinit;
Situation 2, when node A and node B does not meets:
P (a, b)=α × P (a, b)old×γk(3)
Wherein, γ ∈ [0,1] represents decay factor, k represent node A contact with the node B last time after process time
Between, the transmission predictability of node stores in the form of vectors, and can swap between node, as time goes by, and two
The collision probability numerical value of node can minimizing progressively, this process can be called again attenuation process.
Utilize life span TTL drop policy that caching is managed, be described in detail below:
Life span TTL drop policy based on message considers the remaining life span of message, and each message is in generation
Time, there is the TTL of an initial value, the message in nodal cache is according to its residue life span sequence, and life span is short
Before message comes and obtain preferential transmission route, when this message is forwarded every time, ttl value constantly reduces, until TTL is equal to
Or during less than 0, this message can be automatically dropped, it is to avoid unrestricted must take Internet resources.
The probit all increasing between them of every time meeting between node, the probit between node often of meeting
The highest, namely transfer probability, it is described in detail below:
If node A is often connected with node B, and node B is often connected with node C, this mean that it is believed that node C with
Node A can forward message with high success rate, and probability transitivity is represented by:
P (a, c)=α × [and P (a, c)old+(1-P(a,c)old)×P(a,b)×P(b,c)×β]+(1-α)×[(NAb-
NAa)+(NAc-NAb)] obtain after abbreviation:
P (a, c)=α × [and P (a, c)old+(1-P(a,c)old)×P(a,b)×P(b,c)×β]+(1-α)×(NAc-NAa) (4)
Wherein, β ∈ [0,1] is constant, is transmission factor of influence, and (a b) is communicating predicted between node A and node B to P
Probit, similarly, (b, c) is the communicating predicted probit between node B and node C to P, and (a, c) between node A and node C for P
Communicating predicted probit.
Beneficial effect: the present invention to DTMSN meets based on node or deliver transfer history information probability route
PROPHET algorithm is studied, and proposes a kind of modified model probabilistic routing method based on node liveness, i.e. NAPR calculates
Method.The node liveness factor is joined among the prediction of transmission probability, the estimation of the transmission probability of perfect node.Emulation knot
Fruit shows, more fully, the number of copies of generation is less, although cause for the Probabilistic estimation of NAPR algorithm relatively PROPHET algorithm
The average delay of message increased, but NAPR algorithm reduces node overheads rate, and improve message submits rate.In future
Work will be studied congestion problems further how to tackle in network.
Detailed description of the invention
Basic thought: the present invention is directed to the routing algorithm PROPHET in DTMSN E-Packet transmission probability estimate blindness
Sex chromosome mosaicism, defines node liveness NA(node active own) computing formula, introduce weights α to NA and original
PROPHET algorithm predicts transmission probability is weighted, and the weighted mean obtained is as communicating predicted DP(Delivery
Predictability).Meet according to node or deliver transfer history information, and node active degree in a network, calculating
Each node successful delivery data are to the new communicating predicted probit of destination node.When node meets, by according to new biography
Defeated predictive value judges whether to data and forwards.When node does not meets, according to the attenuation process decay in PROPHET algorithm.
Caching is managed by last utilize TTL drop policy the same with PROPHET algorithm, carries out message forwarding according to transmission probability.
Variable-definition:
Definition 1: liveness (NA): NAiRepresent the liveness of node i.NAiSize contacted with this node other
The quantity of node is directly proportional, and and the length of this node and a upper node contact time be inversely proportional to, it may be assumed that
Wherein, niThe quantity of other nodes that expression node i was contacted, tiExpression node i contacts with a upper node
Time.λ is that constant (in order to realize normalization, is set to 10, i.e. 0≤NAi≤ 1).For different nodes, NA is the biggest, represents this
Individual node is the most active, and the probability that the message entrained by this node is delivered to convergent point is the biggest.
Definition 2: communicating predicted probit P (a, b): message is transferred to the transmission probability parameter of node B from node A, often P
(a, b) as probability route metric standard.The probit all increasing between them of every time meeting between node, meets often
Node between probit just high.Communicating predicted P (a, value b) has a following two situation:
Situation 1: when node A and node B meets:
P (a, b)=α × [and P (a, b)old+(1-P(a,b)old)×Pinit]+(1-α)×(NAb-NAa) (2)
Wherein, α is weights.Adjusting weights α can be with the concept transfer liveness factor for the impact of transmission probability predictive value.
P(a,b)oldIt is the communicating predicted of the last time of node A, B of acquisition from node meets historical record, Pinit∈ (0,1] it is just
Beginning transmission probability constant, (a, b) initialization is both configured to P to all of Pinit。
Situation 2, when node A and node B does not meets:
P (a, b)=α × P (a, b)old×γk(3)
Wherein, γ ∈ [0,1] represents decay factor, k represent node A contact with the node B last time after process time
Between.The transmission predictability of node stores in the form of vectors, and can swap between node.As time goes by, two
The collision probability numerical value of node can minimizing progressively, this process can be called again attenuation process.
Definition 3: probability transmits: if node A is often connected with node B, and node B is often connected with node C, and this means that
It is believed that node C and node A can forward message with high success rate, probability transitivity is represented by:
P (a, c)=α × [and P (a, c)old+(1-P(a,c)old)×P(a,b)×P(b,c)×β]+(1-α)×[(NAb-
NAa)+(NAc-NAb)] obtain after abbreviation:
P (a, c)=α × [and P (a, c)old+(1-P(a,c)old)×P(a,b)×P(b,c)×β]+(1-α)×(NAc-NAa) (4)
Wherein, β ∈ [0,1] is constant, is transmission factor of influence.
Algorithm steps can be obtained as follows according to algorithm idea.
1) initialize.The transmission probability information table of node initializing oneself, is initialized as the transmission probability of all nodes
Pinit, PinitValue between [0,1].
2) the node liveness of each node is calculated.The nodes crossed according to node contact and and during a upper node contact
Between, the liveness of each node itself it is calculated according to formula (1).
3) combine node liveness and the record that meets, update each node-node transmission prediction probability value according to formula (2), (3).
4) TTL is utilized to carry out queue management.When TTL is less than or equal to 0, message is abandoned from queue;When TTL is more than 0
Time, carry out message forwarding according to transmission probability.
Operation principle:
Operation principle described by this algorithm refers to join among the prediction of transmission probability by the node liveness factor, tool
Body refers to meet historical information, and node active degree in a network according to node, calculates new communicating predicted probit, joint
Between point by the forwarding of the size decision message of relatively communicating predicted probit whether, utilize TTL drop policy to cache into
Line pipe is managed.
At ONE(Opportunistic Networking Environment) NAPR algorithm is imitated on emulation platform
True analysis, and carry out contrast experiment with Epidemic algorithm and PROPHET algorithm.
Simulated environment configuration is as shown in table 1: simulating scenes uses Helsinki city city map as moving area, size
For 4500m*3400m, number of nodes is respectively 3*10,3*20,3*30,3*40,3*50,3*60,3*70,3*80,3*90,3*
100, being divided into walking, drive and cycle three kinds of nodes, 100 every kind, the range for wireless communication (transmission radius) of node is
10m, carries a width of 250kbps, and cache size is respectively 2M, 4M ..., 30M, mobility model uses the city, Helsinki of ONE acquiescence
City's cartographic model, the translational speed of node is respectively 1.34m/s, 8.94m/s, 4.0m/s, represents walking respectively, drives and cycle
Three kinds of different movable average speeds.Data package size is 50KB, and generation time interval is 50s.The simulation run time is 2,
4 ..., 30ks.
Table 3ONE simulated environment
During NAPR algorithm simulating, use following 4 performance indications:
1) transport: the ratio of the message count being delivered successfully and message sum.
Delivery probability=delivered messages/created messages
2) overhead rate: be forwarded but the ratio of the message number being not successfully delivered and the message number being delivered successfully.
Overhead ratio=(relayed messages-delivered messages)/delivered
messages
3) average number of copies: the total ratio with message sum of the copy that message produces.The number of copies that message i produces is designated as
ci, message sum is designated as n.
4) average retardation: submit successful all packets time sum from source to destination and total packet
The ratio of number.The message i reception time is designated as tir, message i send the time be designated as tis, message sum is designated as n.
Simulation process carries out four groups of experiments, tests respectively in different weights α, cache size, number of nodes and emulation
In the case of the operation time, the situation of change of the routing performance of three kinds of algorithms.In emulation experiment, first pass around experiment and determine α's
Value, then utilizes NAPR algorithm in this paper and Epidemic algorithm, PROPHET algorithm to carry out contrast experiment, obtains
Whole experimental result.
(1), in testing at first group, by adjusting weights α, the concept transfer liveness factor is in communicating predicted middle institute accounting
Weight, that observes weights α changes the impact that the performance indications on NAPR algorithm produce.When α value is 0.1,0.3,0.5,0.7,0.9
Time, the result of variations of the performance indications of NAPR algorithm is as shown in Figure 2-5.
A () message generates time interval and is set to 50s, nodal cache space is for being set to 2M, and simulation time is set to
30ks, it is 300 that number of nodes is gradually increased from 30, represents that nodes dense degree is gradually increased, tests NAPR algorithm
In α=0.1, α=0.3, α=0.5, α=0.7, α=0.9 time performance situation of change.Result is as shown in Figure 2,3.
As seen from Figure 2, it is gradually increased along with number of nodes, it is possible to the message successfully arriving at convergent point gradually decreases,
The transport of NAPR algorithm is gradually lowered.When number of nodes is fixed, along with the increase of α value, the historical record that meets is calculated at NAPR
Impact in method is gradually increased, it is possible to the message successfully arriving at convergent point gradually decreases, thus the transport of algorithm is gradually lowered.
As seen from Figure 3, along with number of nodes is gradually increased, the node density in network is gradually increased, NAPR algorithm
Average retardation be also gradually increased.When number of nodes is fixed, along with α value increases, meet historical record in NAPR algorithm
Impact is gradually increased, and message arrives the speed of convergent point and accelerates, and the average retardation of NAPR algorithm is gradually reduced.
B () message generates time interval and is set to 50s, nodal cache space is for being set to 2M, and simulation time is set to
30ks, number of nodes is set to 150, and simulation time progressively increases to 30ks from 2ks, test NAPR algorithm in α=0.1, α=
0.3, performance situation of change when α=0.5, α=0.7, α=0.9.Result is as shown in Figure 4,5.
From fig. 4, it can be seen that being gradually increased along with simulation time, it is possible to the message number arriving convergent point gradually increases
Add, so, the rate of submitting of NAPR algorithm is being gradually increased.When simulation time be fixed as some determine value time, along with α value increase
Greatly, historical record impact in NAPR algorithm of meeting is gradually increased, it is possible to the message successfully arriving at convergent point gradually decreases, because of
And the transport of algorithm is gradually lowered.
From fig. 5, it can be seen that being gradually increased along with simulation time, it is possible to arrive message institute's time spent of convergent point by
Cumulative add, so, the message average retardation of NAPR algorithm is being gradually increased.When simulation time be fixed as some determine value time,
Along with α value increases, historical record impact in NAPR algorithm of meeting is gradually increased, and message arrives the speed of convergent point and accelerates,
The average retardation of NAPR algorithm is gradually reduced.
By first group of experiment, we it appeared that: along with α value increase, historical record impact in NAPR algorithm of meeting
It is gradually increased, it is possible to the message successfully arriving at convergent point gradually decreases, thus the transport of algorithm is gradually lowered;But, message
The speed arriving convergent point is accelerated, and the average retardation of NAPR algorithm is gradually reduced.Weigh the advantages and disadvantages, consider transport peace
All postponing two factors, weights α value is 0.5.
(2), in testing at second group, message generates time interval and is set to 50s, and number of nodes is set to 3*50=150,
It is 0.5 that simulation time is set to 30ks, α value.Observing when nodal cache space increases to 30M from 2M, that successfully submits disappears
Breath number and the situation of change of message average retardation.Simulation result is as shown in Figure 6,7.
Fig. 6 is for when nodal cache space is reduced to 2M from 30M, and NAPR, Epidemic become with tri-kinds of algorithms of PROPHET
The situation of change of the message count that merit is submitted.The information that Epidemic algorithm is successfully submitted is minimum, this is because flooding mechanism can produce
Raw bulk redundancy copy takies spatial cache.NAPR algorithm and PROPHET algorithm all decrease copy amount, the most successfully submit
Information Number more than Epidemic algorithm.Along with spatial cache constantly reduces, can produce congestion situation, node needs to pass through packet loss
Release spatial cache, therefore the transport of three kinds of algorithms is all gradually reduced.Epidemic and PROPHET algorithm uses random loss
Strategy, it is thus possible to the situation that the message being most possibly successfully delivered is abandoned occurs.And NAPR algorithm uses based on TTL
Packet loss strategy, abandons the message that transfer probability is minimum, therefore can keep higher transport in the case of caching is the least.
Fig. 7 be nodal cache space when 2M increases to 30M, the message of tri-kinds of algorithms of NAPR, Epidemic and PROPHET
The situation of change of average delay.Along with spatial cache is gradually increased, message has longer storage time wait to be turned in the buffer
Sending out, therefore the time delay of three kinds of algorithms is gradually increased.The time delay of Epidemic algorithm is minimum, because message copy quantity is most, disappears
Breath is successfully delivered to the fastest of convergent point.PROPHET algorithm copy amount has reduced, and therefore time delay also increased.
The node liveness factor is joined among the prediction of transmission probability by NAPR algorithm in this paper, and the transmission of perfect node is general
The estimation of rate, thus the message copy minimum number forwarded, therefore message average delay is more than PROPHET algorithm.
(3) in testing at the 3rd group, message generates time interval and is set to 50s, and nodal cache space is for being set to 2M, imitative
Being set to 30ks, α value between true time is 0.5, and it is 300 that number of nodes is gradually increased from 30, represents the intensive journey of nodes
Degree is gradually increased, the performance situation of change of three kinds of routing algorithms of test.Simulation result is as seen in figs. 8-10.
Fig. 8 show the transport situation of change with number of nodes of three kinds of algorithms.When number of nodes is gradually increased from 30
Being 300, the node density in network is continuously increased, in the case of the spatial cache of node is only 2M, along with congestion situation
Generation, transport will constantly reduce.Epidemic algorithm exists bulk redundancy copy and takies spatial cache, therefore transport
Minimum.The situation of PROPHET algorithm is similar with Epidemic algorithm, and transport is the highest.The message forwarded in NAPR algorithm is secondary
This minimum number, can avoid producing too much redundant copy, and not use random loss strategy, and therefore transport is obvious
Higher than other two kinds of algorithms.
Fig. 9 is for being 300 when number of nodes is gradually increased from 30, when the node density in network is continuously increased, and three kinds of calculations
The situation of change of the average number of copies of method.Epidemic algorithm is a kind of evolution of flooding algorithm, the average copy of generation
Number is at most;PROPHET algorithm is similar to Epidemic, is also the transmission of many copy replications, and the average number of copies of generation is only second to
Epidemic algorithm;And the transmission probability of NAPR algorithm consummation PROPHET algorithm is estimated, decrease the quantity of copy, save
Cost overhead.
Such as Fig. 9, shown in 10, being 300 when number of nodes is gradually increased from 30, the node density in network is continuously increased,
The time delay of three kinds of algorithms is increased slightly.The time delay of Epidemic is the shortest because message copy number most, and transmission speed is the fastest,
PROPHET algorithm is similar with Epidemic, and number of copies is many compared with NAPR algorithm, and time delay is less, and the copy that NAPR algorithm produces
Number is minimum, so the average delay of NAPR algorithm is the longest.
(4), in testing at the 4th group, message generates time interval and is set to 50s, and number of nodes is set to 3*50=150,
Nodal cache space is for being set to 2M, and α value is 0.5, and simulation time increases to 30ks from 2ks, three kinds of routing algorithms of test
Performance situation of change.Simulation result is as figs 11-13.
It can be seen from figure 11 that along with the increase of simulation time, message forwards through replicating, is successfully delivered to convergent point
Quantity is gradually increased, and the transport of three kinds of algorithms all increased.The amplification of NAPR algorithm is relatively big, and Epidemic algorithm takes second place,
PROPHET algorithm amplification is minimum.NAPR algorithm considers the factor of the liveness of node own, and transmission probability is estimated more comprehensive,
The message number being successfully delivered to convergent point is more, so the transport of NAPR algorithm is the highest.
As shown in figure 12, when simulation time increases to 30ks, tri-kinds of algorithms of Epidemic, PROPHET and NAPR from 2ks
In, Epidemic message copy number is most, is delivered to the fastest of convergent point, and required time delay is the shortest, during PROPHET algorithm
Prolong and take second place;Along with the increase of simulation time, more fully, NAPR calculates the Probabilistic estimation of NAPR algorithm relatively PROPHET algorithm
The number of copies that method produces is less than PROPHET algorithm, so the average delay needed for being delivered to convergent point is more than PROPHET algorithm.
As seen from Figure 13, along with the increase of simulation time, message forwards through replicating, and required number of copies gradually increases
Adding, the overhead rate of three kinds of algorithms is continuously increased.Epidemic message produces many no-good copies, brings transmission cost
Increase.PROPHET algorithm is similar with Epidemic, and number of copies is many compared with NAPR algorithm, so, opening needed for PROPHET algorithm
Pin is only second to Epidemic algorithm.And the number of copies of NAPR algorithm generation is minimum, so, the expense needed for NAPR algorithm is minimum.