There is the Epidemic method for routing of avoidance mechanism
Technical field
The present invention relates to opportunistic network routing algorithm, effect is to make the efficient forwarding data bag of node in opportunistic network, reduces as far as possible network resource consumption simultaneously.
Background technology
Opportunistic network is that one need to not exist fullpath between source node and destination node, utilize the chance of meeting that node motion is brought 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 destination node can not determine whether exist in advance. Opportunistic network is realized inter-node communication with " store-carry-forward " 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 bundle layer between application layer and transport layer.
Can process the insoluble problems of conventional wireless network technology such as network division, time delay due to opportunistic network, can meet the network service needs under mal-condition, it is mainly used in the occasion that lacks the communications infrastructure, network environment badly and tackle urgent accident.
1. contrast routing algorithm
For contrasting with routing algorithm of the present invention, 2 kinds of typical routing algorithms are chosen as comparator algorithm. Epidemic algorithm is the Typical Representative based on the tactful routing algorithm that floods, and much all can be considered it is to be derived by this algorithm based on the tactful routing algorithm that floods. SprayandWait 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 in the time that 2 nodes meet, to exchange the packet that the other side does not have, and after enough exchanges, each non-isolated node will be received all packets in theory, thereby realizes the transmission of packet.
In Epidemic algorithm, each data are surrounded by a mark that the overall situation is unique, preserve a summary vector and be used for recording the packet carrying in node in each node. In the time that 2 nodes meet, first both sides exchange summary vector, know that the other side carries after packet situation, and both sides only transmit the packet that the other side does not have.
Epidemic algorithm is the one algorithm that floods in essence, and the success rate of this algorithm energy maximum data bag transmission, minimizes transmission delay, but also can make to have a large amount of packet copies in network theoretically, consumes a large amount of Internet resources.
Epidemic algorithm has 3 targets, is respectively maximum transmission success rate, minimum transmission delay and minimum network resource consumption. Realizing above-mentioned target needs specific scene, under most scenes, causes the performance of routing algorithm significantly to decline owing to excessively flooding.
(2) SprayAndWait algorithm
SprayandWait algorithm is divided into 2 stages. First be the Spray stage, the coated neighbor node that is diffused into of partial data in 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 DirectDelivery mode by packet, only in the time running into destination node, sends packet. This algorithm transmission quantity is less than Epidemic algorithm significantly, and transmission success rate is high, and transmission delay is less, and algorithm applicability is strong.
2. metric
The metric of evaluating opportunistic network routing algorithm performance indications mainly contains:
(1) transmission success rate
Transmission success rate (DeliveryRatio) is the ratio that successfully arrives the need transmission packet sum that destination node packet is total and source node sends 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 (DeliveryDelay) is that packet arrives the required time of destination node from source node, conventionally adopts average transfer delay evaluation. The little meaning routing algorithm of transmission delay transmittability is strong, efficiency of transmission is high, also means in transmitting procedure and will take less Internet resources.
(3) routing cost
Routing cost (Overhead) refers to the sum of node for data forwarding bag within a certain period of time, conventionally with all recently evaluations that successfully arrive the number-of-packet of destination node and the packet sum that all nodes forward. Routing cost is high, means node forwarding data bag in large quantities, can make to be full of a large amount of packet copies in network, increases the probability that packet bumps, and also can consume in large quantities node energy.
3.Epidemic algorithm performance is analyzed
Taking table 1 scene as basis, respectively to packet add up to 50 and every node generate 10 packets 2 kinds of situations and carry out emulation, obtain result shown in Fig. 1, Fig. 2.
In Fig. 1, Fig. 2, with SprayAndWait algorithm in contrast, this algorithm can obtain and approach optimum transmission success rate and routing cost under most scenes, and no matter the scale of network can keep good performance, has good extensibility.
Can be obtained as drawn 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 greatly better than contrast algorithm in these two indexs;
(2) in data packet number one timing, 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 performance of Epidemic algorithm significantly to decline.
Fig. 3, taking table 1 scene as basis, has described in the total certain situation of node the relation between data packet number and transmission success rate. When packet increases as shown in Figure 3, transmission success rate declines thereupon. The reason that produces this phenomenon is referred to as crowding-out effect by the present invention, in the time needing to transmit packet sum in network and exceed the storable packet total amount of node, can there is nodal cache saturated phenomenon, when now node receives new data packets, have to abandon old packet according to certain rule, the existence of this effect causes Epidemic algorithm performance significantly to decline.
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 in the time that node buffering area is filled, the node meeting with it, is 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 be on the original manufacturing basis of Epidemic algorithm increase below (1)-(4) mechanism, the present invention is referred to as avoidance mechanism, and the Epidemic algorithm with avoidance mechanism is called to BackoffEpidemic 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 is random generation, and obedience is uniformly distributed, 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, within the threshold values moment, makes the packet of other nodes keep out of the way;
(4) when back off time exceedes after threshold values t, no matter nodal cache state all receives packet, now still may extrude event. Receive after packet, it is 0 that back off time is reset.
Brief description of the drawings
The comparison of Fig. 1 transmission success rate
The comparison of Fig. 2 transmission delay
Fig. 3 data packet number affects transmission success rate
Under the different scenes of Fig. 4, improve the transmission success rate of algorithm
Under the different scenes of Fig. 5, improve the transmission delay of algorithm
Under the different scenes of Fig. 6, improve the routing cost of algorithm
Detailed description of the invention
Below principle of the present invention and feature are described, example, only for explaining the present invention, is not intended to limit scope of the present invention.
Use ONE (theOpportunisticNetworkingEnvironment) emulation platform to implement the routing algorithm the present invention relates to. In emulation below, simulate the pedestrian's walking that carries intelligent bluetooth equipment in the scene of real city, and implemented, analyzed 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 parameter x value is 100 seconds; Taking table 1 scene as basis, every node generates 10 packets, generates in the mode of constant duration, taking 5 nodes as example, has 50 packets in network, and simulation time is 12 hours, within every 864 seconds, generates a packet, and result as shown in Figures 4 to 6.
In this emulation, number of nodes and packet synchronously increase, and number of nodes increases can improve transmission success rate, and data packet number exceedes the generation that can cause crowding-out effect after threshold values, and Fig. 4 to Fig. 6 is the results of two kinds of effect stacks.
As seen from Figure 4, in the time that number of nodes is less, taking 10 nodes as example, although buffer memory ratio is less than 1, but because being generates a packet for every 432 seconds, and packet is diffused into other nodes also needs certain hour, can there is not crowding-out effect in the early stage of emulation, the algorithm advantage after now improving is also not obvious.
When node and data packet number are when more, during as 160 nodes, buffer memory ratio reaches 0.018, now can there is significant crowding-out effect, the effect that improves avoidance mechanism in algorithm is remarkable, and BackoffEpidemic algorithm is significantly increased compared with Epidemic algorithm transmission success rate, reaches 79.5%.
From above, about avoidance mechanism narration, it has a negative impact to meeting transmission delay, but Fig. 5 experimental result shows, this impact is little.
BackoffEpidemic algorithm, in the time that node is more, has certain influence to the routing cost of algorithm as seen from Figure 6, and as when 160 node, BackoffEpidemic algorithm is decreased significantly compared with the routing cost of Epidemic algorithm, reaches 36.7%.
From the present embodiment, the Epidemic algorithm with avoidance mechanism that the present invention proposes, can reduce the quantity of packet in network effectively, suppresses crowding-out effect, improves the performance of routing algorithm, has expanded the scope of application of Epidemic routing algorithm.