Wait and Epidemic routing algorithm
Technical field
The present invention relates to the opportunistic network routing algorithm, effect of the present invention is to make in the opportunistic network node efficiently transmit packet, consumes node energy simultaneously as few as possible.
Background technology
Opportunistic network is a kind ofly need not have fullpath between source node and destination node, the chance of meeting of utilizing node motion to bring realize network service, time delay and the tolerable self-organizing network of division.Opportunistic network is different from traditional multi-hop wireless network, and its node is not by unified plan, and network size and node initial position set in advance, and the path between source node and the destination node can not determine whether exist in advance.Opportunistic network is realized inter-node communication with " storing-carry-transmit " pattern hop-by-hop transmission information, and its architecture is different with multi-hop wireless network, and it inserts a new protocol layer that is called as the bundle layer between application layer and transport layer.
Because opportunistic network can be handled the insoluble problems of conventional wireless network technology such as network division, time delay, can satisfy the network service needs under the mal-condition, it is mainly used in the occasion that lacks the communications infrastructure, network environment is abominable and tackles urgent accident.
After serious natural calamity such as hurricane, earthquake took place, infrastructure such as electric power, communication were destroyed, and the communication system that relies on static infrastructure all can't use usually.At this moment, by being in the disaster scene intelligent wireless mobile device intercommunication that the individual carries, and then be that the communication network that node is formed will become the important means of communication in disaster area with these equipment.Under the disaster scene, the intelligent wireless mobile device is difficult to obtain energy supplement, only can lean on energy intrinsic in the equipment to keep communication, and the energy in the equipment becomes a kind of scarce resource, and low energy consumption means that node has longer life cycle.
Traditional opportunistic network routing algorithm can carry out the lot of data bag usually and transmit for pursuing high transmission success rate, little transmission delay, and a large amount of invalid packets is transmitted becomes the outstanding problem that node energy consumes.The tradition routing algorithm not with energy consumption as important indicator, be difficult to be applicable to that energy becomes the scene of scarce resource, the scene after taking place as disaster.
For contrasting, 3 kinds of traditional typical routing algorithms have been chosen with routing algorithm of the present invention.Direct Delivery algorithm is typical case's representative of single copy routing algorithm, and this algorithm under any circumstance routing cost is 0, is the routing algorithm of transfer amount minimum, but indexs such as the transmission success rate of this algorithm, transmission delay are relatively poor.The Epidemic algorithm is based on typical case's representative of the tactful routing algorithm that floods, and much all can be considered based on the tactful routing algorithm that floods is to be derived by this algorithm.Direct Delivery and Epidemic algorithm have been represented 2 kinds of extreme cases respectively, and a kind of is not flood, and another kind is unconfined flooding.Spray andWait algorithm is to flood according to certain strategy, says it is that the main performance index of this algorithm all has significant advantage under most scenes between Direct Delivery and the middle a kind of algorithm of Epidemic from the degree angle that floods.
Simply introduce the mechanism of 3 kinds of typical routing algorithms of tradition below:
1.Direct Delivery algorithm
Direct Delivery (also claiming Direct Transmission) algorithm is based on forwarding strategy, and this routing algorithm packet is in transmission course, and node can not duplicate it, has only a packet copy in the network in transmission.Source node only consigns to next node with packet when running into destination node.
2.Epidemic algorithm
The Epidemic algorithm is based on the strategy that floods, and algorithm thought is to duplicate and exchange the packet that the other side does not have when 2 nodes meet, and after enough exchanges, each non-isolated node will be received all packets in theory, thereby realizes the transmission of packet.The advantage of this algorithm is the success rate of energy maximum data bag transmission under some scene, reduces transmission delay, and shortcoming is to have lot of data bag copy in the network, can a large amount of consumption of network resources.
3.Spray And Wait algorithm
Spray and Wait algorithm is divided into 2 stages.At first be the Spray stage, the partial data bag in the source node is diffused into neighbor node; Be the Wait stage then, if the Spray stage is not found destination node, the node that comprises packet is sent to destination node in the DirectDelivery mode with packet.
Spray and Wait algorithm has 2 kinds of patterns, Binary pattern and non-Binary pattern.Under the Binary pattern, algorithm mechanism is when source node runs into new via node, and half packet is sent to new via node, oneself stays half packet; Source node and via node repeat said process subsequently, and when having only a packet in all nodes, node changes the Wait stage over to, adopt directly to be transferred to destination node.Spray and Wait algorithm has the L parameter, this parametric description the number of packet.
Spray and Wait algorithm is based on the strategy that floods, but transmission quantity is less than the Epidemic algorithm significantly; Transmission delay is less, approaches optimum.
The metric of estimating opportunistic network routing algorithm performance index mainly contains following 3:
1. transmission success rate
Transmission success rate (Delivery Ratio) is the ratio that successfully arrives the need transmits data packets sum that destination node packet sum and source node send in the regular hour, this index has been portrayed routing algorithm and has correctly been transmitted the ability of packet to destination node, is most important index.
2. routing cost
Routing cost (Overhead) is meant the sum of node for data forwarding bag within a certain period of time, successfully arrives the evaluation recently of the number-of-packet of destination node and the packet sum that all nodes are transmitted usually with all.The routing cost height means that node transmits packet in large quantities, can make to be full of lot of data bag copy in the network, increases the probability that packet bumps, and also can consume node energy in large quantities.
3. transmission delay
Transmission delay (Delivery Delay) is that packet arrives the required time of destination node from source node, adopts average transfer delay evaluation usually.The little meaning routing algorithm of transmission delay transmittability is strong, efficiency of transmission is high, also means in transmission course to take less Internet resources.
Traditional opportunistic network routing algorithm can carry out the lot of data bag usually and transmit for pursuing high transmission success rate, little transmission delay, and a large amount of invalid packets is transmitted becomes the outstanding problem that node energy consumes.The tradition routing algorithm not with energy consumption as important indicator, be difficult to be applicable to that energy becomes the scene of scarce resource.
Summary of the invention
This routing algorithm (Wait and Epidemic routing algorithm) is divided into Wait and two stages of Epidemic with the repeating process of packet.
Packet at first enters the Wait stage, adopt Direct Delivery routing policy in this stage, be that packet is in transmission course, node can not duplicate it, have only a packet copy in the network in transmission, source node only consigns to next node with packet when running into destination node.
Have the partial data bag in the Wait stage and arrive destination node, these packets will be deleted from source node, do not enter the Epidemic stage.
When the W of packet value surpassed threshold values, packet entered the Epidemic stage.Only the packet at Wait stage no show destination node can enter the Epidemic stage, at this stage node packet is adopted the limited strategy that floods, the packet that enters the Epidemic stage can generate K copy (subdata bag), its subdata bag repeats the processing procedure of his father's packet, and just its number of copies is M.
Algorithm specifically describes as follows:
1. each packet has W, K, the M parameter, the W parametric description packet be in the time span in Wait stage, but the K parametric description quantity of Epidemic phase data bag ghost (subdata bag), but the M parametric description quantity of subdata bag ghost.
2. when the node i that comprises source data packet p runs into another node j, if the stand-by period p of source data packet p
wGreater than W, and p
kOr p
mGreater than 0 o'clock, duplicate this packet, and send it to node j, wherein p
k, p
mBut be the quantity of p packet ghost; Otherwise only when being the destination node of source data packet p, node j sends.
3. if node j is the destination node of source data packet p, then the source data packet p in the node i is deleted.
4. along with time increase, the p of packet p
WValue increases, whenever packet p successfully duplicates once, and its p
MOr p
KValue subtracts 1.
5. when the node i that comprises packet p ran into another node j, the destination node of packet p was when having comprised the copy of packet p among node j and the node j, then the packet p among the deletion of node i.
The different of this algorithm and Spray and Wait algorithm mainly are to be embodied in two aspects, the one, and Spray and Wait is at node, will be divided into two stages to node processing, and this algorithm is at packet, will be divided into two stages to the processing of packet; The 2nd, Spray and Wait at first is the Spray stage, be the Wait stage then, and this algorithm is at first to be the Wait stage, is the Epidemic stage then.
By algorithm mechanism as can be known, when W is 0, and K, when M was very big, this algorithm deteriorated to the Epidemic algorithm; When W surpasses the packet life span, and K, when M was very big, this algorithm deteriorated to Direct Delivery algorithm.
Because the Wait stage, existing partial data bag arrived destination node, only had the partial data bag to enter the Epidemic stage, this obviously can fundamentally reduce the total amount of packet copy in the network effectively.
This algorithm has W, K, and M parameter, appropriate parameter are provided with the degree that floods in may command Epidemic stage, significantly improve algorithm performance.This algorithm can significantly reduce routing cost when obtaining the high-transmission success rate, for traditional opportunistic network routing algorithm, be a kind of routing algorithm of using under the rare scene of energy of being adapted at.
Description of drawings
The different W of Fig. 1, K, the transmission success rate under the M parameter
The different W of Fig. 2, K, the routing cost under the M parameter
The different W of Fig. 3, K, the transmission delay under the M parameter
Embodiment
Below principle of the present invention and feature are described, institute gives an actual example and only is used to explain the present invention, is not to be used to limit scope of the present invention.
For more clearly describing Wait and Epidemic (WE) routing algorithm, provided the example of on emulation platform, implementing below.ONE (the Opportunistic Networking Environment) is the emulation platform that generally acknowledge in the opportunistic network field, is various routing algorithm performance comparison, estimates most important instrument.This exemplifying embodiment is node based on true urban environment (Helsinki) scene to carry the pedestrian of intelligent bluetooth equipment walking in simulated scenario, and node can generate packet at random, and duplicates, transmits packet according to routing algorithm.Concrete scene setting is as shown in table 1.
Table 1 simulating scenes
Exemplifying embodiment 1
In table 1 scene, be example with 200 nodes, choose different W, K, the M value is carried out emulation, and this exemplifying embodiment has been explained W, K, the M parameter is to the influence of algorithm performance, and the result is as shown in Figure 1-Figure 3.
By Fig. 1-Fig. 3 as can be known, when W very big, and K, when M was very little, algorithm leveled off to Direct Delivery algorithm; When W very little, and K, when M was very big, the algorithm index leveled off to the Epidemic algorithm, this meets the mechanism of algorithm fully.Work as W, K, the M value is appropriate, and the transmission success rate of algorithm and routing cost can obtain desirable value simultaneously, but transmission delay is higher than the Epidemic algorithm.
In the numerous routing algorithms of opportunistic network, Epidemic and Direct Delivery algorithm every performance index under most scenes are relatively poor, but reason is different fully.The reason of Epidemic algorithm is excessively to flood, a large amount of invalid packets copies have consumed ample resources in the network, the low reason of Direct Delivery algorithm performance then is not have the packet copy to exist in the network, and it is less to cause packet to run into the chance of destination node.
By Fig. 1-Fig. 3 as can be known, it is a kind of by algorithm W being set, K, M parameter that this routing algorithm provides, the means of trading off between transmission success rate, routing cost and three indexs of transmission delay make this algorithm can be applicable to the requirement of different scenes to the route algorithm better.
Exemplifying embodiment 2
Based on table 1 scene, chosen 4 kinds of different network sizes, be respectively 60 to 400 nodes.Compare 4 kinds of algorithms by the performance of routing algorithm under different scenes, and estimate the performance of routing algorithm of the present invention with this.
Concrete manner of comparison is, after determining network size, at first get appropriate L parameter value, make the transmission success rate of Spray and Wait algorithm the highest, select suitable W then, K, the M value makes the transmission success rate of routing algorithm of the present invention suitable with Spray andWait algorithm, as shown in table 2, compare routing cost and transmission delay on this basis, as table 3, shown in the table 4.
Table 2 transmission success rate
Table 3 routing cost
Table 4 transmission delay
By table 2, table 3 as can be known, under the essentially identical situation of transmission success rate, the routing cost of this routing algorithm significantly is lower than Spray and Wait and Epidemic algorithm.Although Direct Delivery algorithm can be obtained optimum routing cost, its transmission success rate is lower, particularly under the bigger situation of network size.
This routing algorithm transmission delay index is relatively poor as shown in Table 4, and it is suitable with Direct Delivery algorithm to be higher than Spray and Wait and Epidemic algorithm as a rule.Reason is because due to the algorithm mechanism, when the W parameter value was big, its transmission delay was bigger.
Above-mentioned exemplifying embodiment shows, the working mechanism and the W of Wait and Epidemic algorithm, K, the M parameter can reduce the existence of invalid copy in the network effectively, the means of trading off between transmission success rate, routing cost and three indexs of transmission delay are provided, make algorithm have greater flexibility, to adapt to the needs of different scenes.W is set rightly, K, the M parameter can significantly reduce routing cost under higher transmission success rate, and this characteristic makes algorithm be highly suitable for the scene that energy becomes scarce resource, and the scene after taking place as disaster is used.