Epidemic routing algorithm with avoidance mechanism
Technical field
The present invention relates to the opportunistic network routing algorithm, effect is to make the efficient forwarding data bag of node in the opportunistic network, reduces as far as possible network resource consumption simultaneously.
Background technology
Opportunistic network is a kind ofly need to 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 unified deployment, 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 from 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 processed 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.
1. contrast routing algorithm
For contrasting with routing algorithm of the present invention, 2 kinds of typical routing algorithms have been chosen as comparator algorithm.The Epidemic algorithm is based on the Typical 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.Spray and Wait algorithm is to flood according to certain strategy, is based on the limited strategy that floods, and the main performance index of this algorithm all has significant advantage under most scenes.
(1) Epidemic algorithm
The basic thought of Epidemic algorithm is the packet that exchange the other side does not have when 2 nodes meet, and through after enough exchanges, each non-isolated node will be received all packets in theory, thereby realizes the transmission of packet.
In the Epidemic algorithm, each data is surrounded by a sign that the overall situation is unique, preserves a summary vector in each node and is used for recording the packet that carries in the node.When 2 nodes met, both sides at first exchanged the summary vector, know that the other side carries the packet situation after, both sides only transmit the packet that the other side does not have.
The Epidemic algorithm is a kind of algorithm that floods in essence, and the success rate of this algorithm energy maximum data bag transmission minimizes transmission delay theoretically, has a large amount of packet copies in the network but also can make, and consumes a large amount of Internet resources.
The Epidemic algorithm has 3 targets, is respectively maximum transmission success rate, minimum transmission delay and minimum network resource consumption.Realize that above-mentioned target needs specific scene, under most scenes, cause the performance of routing algorithm significantly to descend owing to excessively flood.
(2) Spray And Wait algorithm
Spray and Wait algorithm is divided into 2 stages.At first be the Spray stage, the coated neighbor node that is diffused into of the partial data in the source node; Then enter into the Wait stage, if the Spray stage is not found destination node, the node that comprises packet is sent to destination node in Direct Delivery mode with packet, namely only when running into destination node, sends packet.This algorithm transmission quantity is less than the Epidemic algorithm significantly, and the transmission success rate is high, and transmission delay is less, and the algorithm applicability is strong.
2. metric
The metric of estimating opportunistic network routing algorithm performance index mainly contains:
(1) transmission success rate
Transmission success rate (Delivery Ratio) is the ratio that successfully arrives the need the transmission of data bag sum that destination node packet sum and source node send within the regular hour, this index has been portrayed the ability of the correct forwarding data bag of routing algorithm to destination node, is most important index.
(2) transmission delay
Transmission delay (Delivery Delay) is that packet arrives the required time of destination node from source node, usually adopts average transfer delay evaluation.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.
(3) routing cost
Routing cost (Overhead) refers to the within a certain period of time sum of node for data forwarding bag, usually successfully arrives the recently evaluation of the number-of-packet of destination node and the packet sum that all nodes are transmitted with all.Routing cost is high, means in large quantities forwarding data bag of node, can make a large amount of packet copy of injection in the network, increases the probability that packet bumps, and also can consume in large quantities node energy.
3.Epidemic algorithm performance analysis
Take table 1 scene as the basis, respectively to packet add up to 50 and every node generate 2 kinds of situations of 10 packets and carry out emulation, obtain Fig. 1, result shown in Figure 2.
With Spray And Wait algorithm in contrast, this algorithm can obtain to approach optimum transmission success rate and routing cost under most scenes among Fig. 1, Fig. 2, and no matter the scale of network can both keep preferably performance, and good extensibility is arranged.
Can be obtained as drawing a conclusion by Fig. 1, Fig. 2:
(1) very high transmission success rate and the low-down transmission delay of Epidemic algorithm under some specific scenes are better than the contrast algorithm greatly on these two indexs;
(2) at data packet number one regularly, the increase of nodes quantity can improve the performance of routing algorithm;
(3) under some scene, the factor that exists some and network application environment to be closely related can cause the Epidemic Algorithm Performance significantly to descend.
Fig. 3 has described in the total certain situation of node the relation between data packet number and the transmission success rate take table 1 scene as the basis.When packet increased as shown in Figure 3, the transmission success rate descended thereupon.The reason that the present invention will produce this phenomenon is referred to as crowding-out effect, namely when needing the transmission of data bag sum to surpass the storable packet total amount of node in the network, the nodal cache saturated phenomenon can occur, when this moment, node received new data packets, have to abandon old packet according to certain rule, the existence of this effect causes the Epidemic algorithm performance significantly to descend.
Summary of the invention
The present invention relates to a kind of new opportunistic network routing algorithm, this algorithm has been introduced avoidance mechanism on Epidemic routing algorithm basis, and when the node buffering area was filled, the node that meets with it, was namely kept out of the way no longer to its forwarding data bag according to certain rule.Algorithm of the present invention can suppress crowding-out effect effectively, obtains higher transmission success rate and lower network resource consumption.
The concrete scheme of algorithm of the present invention is (1)-(4) mechanism below the original manufacturing basis of Epidemic algorithm increases, and the present invention is referred to as avoidance mechanism with it, and the Epidemic algorithm that will have avoidance mechanism is called Backoff Epidemic algorithm.
The specific descriptions of mechanism are as follows:
(1) field of node maintenance, this field is used for depositing threshold values t;
(2) threshold values t produces at random, obeys evenly to distribute, and its value scope is that (0, x), x is parameter, determines according to network condition;
(3) after a certain nodal cache is full of, in time t, this node rejection destination node is not the packet of this node, namely makes the packet of other nodes keep out of the way at threshold values constantly;
(4) after back off time surpasses threshold values t, the equal receive data bag of nodal cache state no matter, still may extrude event this moment.After receiving packet, it is 0 that back off time is reset.
Description of drawings
Fig. 1 transmission success rate relatively
Fig. 2 transmission delay relatively
Fig. 3 data packet number affects the transmission success rate
Improve the transmission success rate of algorithm under the different scenes of Fig. 4
Improve the transmission delay of algorithm under the different scenes of Fig. 5
Improve the routing cost of algorithm under the different scenes of Fig. 6
Embodiment
Below principle of the present invention and feature are described, institute only gives an actual example and to be used for explanation the present invention, is not be used to limiting scope of the present invention.
Use ONE (the Opportunistic Networking Environment) emulation platform to implement the routing algorithm that the present invention relates to.In the emulation below, simulated carry intelligent bluetooth equipment pedestrian's walking in the scene of real city, and implement, analyze the performance of routing algorithm with this.Concrete scene setting is as shown in table 1.
The setting of table 1 simulating scenes
In this emulation experiment, getting the parameter x value is 100 seconds; Take table 1 scene as the basis, every node generates 10 packets, generates in the mode of constant duration, take 5 nodes as example, has 50 packets in the network, and simulation time is 12 hours, generates a packet in namely per 864 seconds, and result such as Fig. 4 are to shown in Figure 6.
In this emulation, number of nodes and packet increase synchronously, and number of nodes increases can improve the transmission success rate, and data packet number surpasses the generation that can cause crowding-out effect behind the threshold values, and Fig. 4 to Fig. 6 is the results of two kinds of effect stacks.
As seen from Figure 4, when number of nodes is less, take 10 nodes as example, although the buffer memory ratio is less than 1, but owing to be packet of generation in per 432 seconds, and packet is diffused into other nodes also needs certain hour, crowding-out effect can not occur in the early stage of emulation, and the algorithm advantage after improve this moment is also not obvious.
When node and data packet number were more, during such as 160 nodes, the buffer memory ratio reached 0.018, significant crowding-out effect can occur in this moment, the effect that improves avoidance mechanism in the algorithm is remarkable, and Backoff Epidemic algorithm is significantly increased than Epidemic algorithm transmission success rate, reaches 79.5%.
By the front about the avoidance mechanism narration as can be known, it has a negative impact to the meeting transmission delay, but Fig. 5 experimental result shows that this impact is little.
Backoff Epidemic algorithm is when node is more as seen from Figure 6, and the routing cost of algorithm is had certain influence, and as when 160 node, Backoff Epidemic algorithm is decreased significantly than the routing cost of Epidemic algorithm, reaches 36.7%.
By present embodiment as can be known, the Epidemic algorithm with avoidance mechanism that the present invention proposes can reduce the quantity of packet in the network effectively, suppresses crowding-out effect, improves the performance of routing algorithm, has expanded the scope of application of Epidemic routing algorithm.