Background technique
DTN is a kind of new network, represents one of future mobile communications field developing direction, is mainly used in interspace net
Network, rural network, battlefield network etc..There is DTN link to be interrupted connection performance, and when message can undergo long in transmittance process
Between or uncertain time delay.There is usually no connecting end to end in DTN, so that connection-oriented end-to-end transmission association
View is not suitable for such network.Since DTN has the spies such as high latency, interruption connectivity, topological mutability, node resource be limited
Point.In order to overcome these networks to limit, it can guarantee the arrival rate of message transmission, the service that DTN uses transport layer to provide, to jump
To the trustship mechanism of jump, message is transmitted using " storage-carrying-forwarding " this mode.However DTN has high latency
Property, interruption connectivity, topological mutability, the features such as node resource is limited, when being likely to require long which results in trustship node
Between save the message received, to cope with the network delay being likely to occur and interruption, until receiving next-hop trustship node really
Recognize information or message is successfully delivered to destination node.If trustship node cannot forward the message that it is received, network in time
There is a large amount of message to need forwarding in time again, then network will finally exhaust the storage resource of trustship node, network is caused to gather around
Plug.
Epidemic routing algorithm is one of most important routing algorithm in DTN network, and many routing algorithms can regard
To be a kind of improvement on the basis of this algorithm.Epidemic routing algorithm is that Vahdat et al. is proposed, main thought is
The no message of other side is exchanged in network when 2 nodes meet, after enough message exchanges, theoretically each non-orphan
Vertical node will all receive all message, to realize the transmission of message.In Epidemic algorithm, each message has one
A globally unique mark saves a summary vector in each node, for recording the message carried in node.It is saved when 2
When point meets, summary vector is exchanged first each other, to know message scenario entrained by other side, then both sides only transmit other side
No message.Mainly there are 3 targets when designing Epidemic routing algorithm, is the largest transmission success rate, minimum respectively
Transmission delay and the smallest network resource consumption.Epidemic routing algorithm is substantially that a kind of no limitation floods algorithm, from
The algorithm can maximize the success rate of message transmission theoretically, minimize transmission delay.But in many number scenes, due to mistake
Degree, which floods, will lead to the performance of routing algorithm and is remarkably decreased.
Duplication forwarding message makes the number of copies of message in DTN excessive between congestion in DTN refers to DTN interior joint, thus
Result in the reduction of DTN performance.And the occupancy of Internet resources is the main of generation network congestion with the network flow being unevenly distributed
Reason.If the limited resource of reasonable distribution network, control network flow can effectively guarantee unimpeded network flow and maintain net
The smooth performance of network, and DTN Congestion Avoidance requires that DTN performance can be made centainly to be ensured, can maximize DTN handling capacity.
But influence of the Congestion Avoidance to network performances such as the delivery ratio of delay-tolerant network and delays is great, therefore, studies DTN congestion
Avoid for DTN in practice using particularly important.
For the above analysis, the present invention for Epidemic routing algorithm in DTN network, propose it is a kind of towards
The delay-tolerant network congestion-preventing approach of the nodal cache release of Epidemic routing algorithm.The main thought of this method is:
To the spatial cache setting storage threshold value of nodes, and hop count threshold value is forwarded to the message setting message in node and is disappeared
Breath forwarding number of copies threshold value, when the used spatial cache of node reaches storage threshold value, by forwarding hop count in deletion of node
The message for having reached message forwarding hop count threshold value, number of copies being forwarded to reach message copy number threshold value, to discharge nodal cache sky
Between.Further Congestion Avoidance operation is not done if it can effectively discharge node space at this time.Otherwise, to the message in node
The division for carrying out priority is adopted, the TTL of the minimum message of priority is halved, is released the spatial cache of node as early as possible, from
And realize avoiding for congestion phenomenon in network.
Summary of the invention
The delay-tolerant net for the nodal cache release towards Epidemic routing algorithm that the purpose of the present invention is to propose to a kind of
Network congestion-preventing approach.
The object of the present invention is achieved like this:
(1) threshold value is stored using buffer setting of the DTN nodal cache threshold setting method to nodes;
(2) hop count threshold value is forwarded to the message setting message in nodal cache using DTN message threshold setting method and disappeared
Breath forwarding number of copies threshold value;
(3) judge whether any two node in network is meeting;
(4) it is meeting if there is two nodes, if two nodes contain identical message, the jump of common message
Several and message forwarding number of copies is updated to the maximum value of the hop count of message and forwarding number of copies in two nodes, otherwise executes step
Suddenly (6);
(5) message forwarding is carried out using DTNE routing algorithm;
(6) judge whether nodal cache reaches storage threshold value;If so, thening follow the steps (7);Otherwise, return step
(3);
(7) judge whether there is the forwarding hop count of message or forwarding number of copies to reach message forwarding hop count threshold value in nodal cache
Or message forwards number of copies threshold value;If so, thening follow the steps (8);Otherwise, step (9) are executed;
(8) the forwarding number of copies for the message and message that the forwarding hop count of knot removal message reaches forwarding hop count threshold value reaches
To the message of message forwarding number of copies threshold value;
(9) judge whether the input size of message of node at this time is greater than output size of message;If so, thening follow the steps (10);
Otherwise, step (12) are executed;
(10) drawing for priority is carried out using message of the DTN message priority division methods to each node in network
Point;
(11) TTL of three-level message is halved;
(12) terminate;
The DTN nodal cache threshold setting method described in the step (1) includes: the arbitrary node I for network, section
The storage threshold value of point I is α=0.8 × M, and wherein M is the cache size of node I;
The DTN message threshold setting method described in step (2) includes: for its forwarding of any message q in network
Hop count threshold value is set as 16, and the forwarding number of copies threshold value of message q is set as 5;
The DTNE routing algorithm described in step (6) includes: to meet for any two node U and V in network, will be saved
The forwarding hop count and forwarding number of copies of the message possessed in point U and the message p (i) not having in node V, p (i) are respectively J (i)
With C (i), and J (i) and C (i) are respectively less than its threshold value, are transmitted to node V, and the forwarding hop count J (i) of the message p (i) in node U+
1, forwarding number of copies is C (i)+1, and the forwarding hop count of message p (i) is J (i)+1 in node V, is forwarded number of copies C (i);If node U
The forwarding hop count or forwarding number of copies of middle message p (i) reach threshold value, when node V is not the destination node of message p (i), then will not
Message p (i) is copied to node V;
The DTN message priority division methods described in step (10) further include: for any message q, by judging q
The size of Pr priority is set, whereinSi is the length of message q, and Max is represented
The length of maximum message, Ju are the hop count that message q has been subjected in network;Wherein, 0≤Ju≤16;Co is having answered for message q
The number of copies of system;Wherein, 0≤Co≤5;And alpha+beta+γ=1;WhenWhen, this message is first-level message;WhenWhen, this message is second level message;WhenWhen, this message is three-level message;Wherein level-one priority is most
Height, three-level priority are minimum.
The beneficial effects of the present invention are:
Main advantages of the present invention: (1) by storing threshold value to the node setting in network, so that node is gathered around not up to
Caching release is just carried out when plug, to realize avoiding for node congestion phenomenon.(2) it is forwarded by the way that message is arranged to message in network
Hop count threshold value and message forward number of copies threshold value, so that when nodal cache reaches storage threshold value, by the hop count for deleting message
Reach the message of threshold value with the number of copies of message, so as to effectively control message copy number in network, realizes network congestion
It avoids.(3) when the service condition in nodal cache space reaches storage threshold value, by deleting the hop count of message and the copy of message
Number reaches the message of threshold value to discharge spatial cache.Then judge the input size of message of node at this time and export the big of size of message
It is small, it is by carrying out the division of priority to message in node, priority is minimum when inputting size of message greater than output size of message
The TTL of message halve, so as to discharge nodal cache space as early as possible, achieve the purpose that congestion phenomenon avoids in network.
Specific embodiment
The present invention is described further with reference to the accompanying drawing:
The main thought of this method is: first to the spatial cache setting storage threshold value of nodes, and to node
In message setting message forward hop count threshold value and message to forward number of copies threshold value, when the used spatial cache of node reaches section
When the storage threshold value in point cache space, forward hop count threshold value, forwarding secondary by forwarding hop count to have arrived at message in deletion of node
This number reaches the message of message copy number threshold value, to discharge nodal cache space.Then pass through the input size of message of node at this time
With output size of message to determine whether carrying out further Congestion Avoidance operation, if exporting size of message in node at this time is greater than input
Size of message does not do further Congestion Avoidance operation then, and (input size of message here refers to the length for the message that node is receiving
Degree;Output size of message refers to that the size for the message deleted, the message deleted include: to reach message forwarding hop count threshold
The message of value, the message for reaching message forwarding number of copies threshold value, TTL are equal to 0 message).Otherwise, the message in node is used
DTN message priority division methods carry out the division of priority, and the TTL of the minimum message of priority is halved, and make the slow of node
It deposits space to be released as early as possible, to realize avoiding for congestion phenomenon in network.
The present invention is implemented as follows:
Step 1: threshold value is stored using buffer setting of the DTN nodal cache threshold setting method to nodes.
Step 2: hop count threshold value is forwarded to the message setting message in nodal cache using DTN message threshold setting method
Number of copies threshold value is forwarded with message.
Step 3: judge whether any two node in network is meeting.
Step 4: meeting if there is two nodes, if two nodes contain identical message, common message
Hop count and the forwarding number of copies of message be updated to the maximum value of the hop count of message in two nodes and forwarding number of copies, otherwise hold
Row step 6.
Step 5: message forwarding is carried out using DTNE routing algorithm.
Step 6: judge whether nodal cache reaches storage threshold value.If it is, executing step 7;Otherwise, return step
Three.
Step 7: judge whether there is the forwarding hop count of message or forwarding number of copies to reach message forwarding hop count in nodal cache
Threshold value or message forward number of copies threshold value.If it is, executing step 8;Otherwise, step 9 is executed.
Step 8: the forwarding hop count of knot removal message reaches the message of forwarding hop count threshold value and the forwarding copy of message
Number reaches the message of message forwarding number of copies threshold value.
Step 9: judge whether the input size of message of node at this time is greater than output size of message.If so, thening follow the steps
Ten;Otherwise, step 12 is executed.
Step 10: priority is carried out using message of the DTN message priority division methods to each node in network
It divides.
Step 11: the TTL of three-level message is halved.
Step 12: terminate.
In a kind of DTN nodal cache threshold setting method being previously mentioned of step further include: for the arbitrary node I of network,
The storage threshold value of node I is α=0.8 × M, and wherein M is the cache size of node I.
The DTN message threshold setting method being previously mentioned in step 2 further include: for any message q its turn in network
Hair hop count threshold value is set as 16, and the forwarding number of copies threshold value of message q is set as 5.
The DTNE routing algorithm being previously mentioned in step 6 further include: it meets for any two node U and V in network,
(the forwarding hop count of p (i) and forwarding number of copies are respectively the message p (i) that the message possessed in node U is not had in node V
J (i) and C (i), and J (i) and C (i) are respectively less than its threshold value) it is transmitted to node V, the forwarding of the message p (i) in node U is jumped at this time
Number J (i)+1, forwarding number of copies are C (i)+1, and the forwarding hop count of message p (i) is J (i)+1 in node V, are forwarded number of copies C (i).
If the forwarding hop count of message p (i) or forwarding number of copies reach threshold value in node U, node V is not the destination node of message p (i)
When, then message p (i) is not copied to node V.
The DTN message priority division methods being previously mentioned in step 10 further include: for any message q, by judging q
The size of Pr priority is set, wherein(Si is the length of message q, Max generation
The length of maximum message, Ju are the hop count that message q has been subjected in table network.Wherein, 0≤Ju≤16.Co be message q
The number of copies of duplication.Wherein, 0≤Co≤5.And alpha+beta+γ=1).WhenWhen, this message is first-level message;WhenWhen, this message is second level message;WhenWhen, this message is three-level message.Wherein level-one priority is most
Height, three-level priority are minimum.
Main advantages of the present invention: (1) by storing threshold value to the node setting in network, so that node is gathered around not up to
Caching release is just carried out when plug, to realize avoiding for node congestion phenomenon.(2) it is forwarded by the way that message is arranged to message in network
Hop count threshold value and message forward number of copies threshold value, so that when nodal cache reaches storage threshold value, by the hop count for deleting message
Reach the message of threshold value with the number of copies of message, so as to effectively control message copy number in network, realizes network congestion
It avoids.(3) when the service condition in nodal cache space reaches storage threshold value, by deleting the hop count of message and the copy of message
Number reaches the message of threshold value to discharge spatial cache.Then judge the input size of message of node at this time and export the big of size of message
It is small, it is by carrying out the division of priority to message in node, priority is minimum when inputting size of message greater than output size of message
The TTL of message halve, so as to discharge nodal cache space as early as possible, achieve the purpose that congestion phenomenon avoids in network.
For shown in Fig. 2, it is assumed that have 30 nodes in network.The number of its interior joint is 1-30, nodes institute
For the message of carrying as shown, by taking No. 1 node as an example, message entrained by No. 1 node is p1, p2, p3.First by DTN node
The storage threshold value of all nodes in network is arranged in cache threshold setting method, by taking No. 1 node as an example, it is assumed that the caching of No. 1 node
Space size is 100M, then the storage threshold value of No.1 node is 80M.Then message forwarding hop count and forwarding copy in network are set
Number threshold value sets 16 for message forwarding hop count threshold value, sets 5 for the number of copies threshold value that message forwards in this example.
Judge whether any two node meets in network, in this example it is assumed that No. 15 nodes and No. 16 nodes meet (such as
Fig. 3), it is p10, p11, p12 that No. 15 nodes, which carry message, at this time, and the message that No. 16 nodes carry is p8, p9, p10.Two are saved
The forwarding hop count of identical message and forwarding number of copies are updated to the maximum number in the two in point, it is assumed that the message of No. 15 nodes
The forwarding hop count and forwarding number of copies that the forwarding hop count and forwarding number of copies of p10 are the message p10 of 7 and No. 3,16 nodes are 6 Hes
2, the forwarding hop count of the message p10 of No. 16 nodes and forwarding number of copies are then updated to 7 and 3 at this time.
Data forwarding is carried out between two nodes to meet by DTNE routing algorithm.No. 15 nodes are assumed in this instance
Meet with No. 16 nodes, due to No. 15 nodes without in No. 16 nodes message p8, p9 (assuming that the forwarding hop count of message p8 be 4,
Forwarding number of copies is 3, and the forwarding hop count of message p9 is 7,3) forwarding number of copies is.When message p8 and p9 are transmitted to No. 15 nodes
Afterwards, the forwarding hop count that the forwarding hop count of message p8 is 5 in No. 16 nodes, forwarding number of copies is 4, p9 is 8, forwarding number of copies is 4,
The forwarding hop count that the forwarding hop count of message p8 is 5 in No. 15 nodes at this time, forwarding number of copies is 3, p9 is 8, forwarding number of copies is
3, similarly, message p11 and p12 are transmitted to No. 16 nodes by No. 15 nodes.
Judge whether the spatial cache for carrying out the node after message forwarding has reached it and stored threshold value, in this example, needs
Judge whether the spatial cache of No. 15 nodes and No. 16 nodes has reached its storage threshold value, by taking No. 15 nodes as an example, it is assumed that 15
The spatial cache of number node is 200M, then it is 160M that it, which stores threshold value, if spatial cache used in No. 15 nodes at this time
Size has reached 160M, then judges the forwarding for whether having the forwarding hop count of message to reach forwarding hop count threshold value or message in node
Number of copies has reached forwarding number of copies threshold value, if so, then deleting corresponding message, then judges the input message of node at this time
Amount and output size of message are to determine whether carry out further Congestion Avoidance operation;Otherwise directly judge that the input of node at this time disappears
Breath amount and output size of message are to determine whether carry out further Congestion Avoidance operation.In this example, since No. 15 nodes do not have
There is forwarding hop count to reach the message for forwarding the forwarding number of copies of hop count threshold value or message to reach forwarding number of copies threshold value, then directly
It connects and judges the input size of message of node at this time and output size of message to determine whether carrying out further Congestion Avoidance operation, it is assumed that
The output quantity of message is 50M in No. 15 nodes at this time, and input quantity 30 does not do further Congestion Avoidance operation then.Otherwise, it uses
DTN message priority division methods carry out the division of priority to the message in each node, at this time the message in each node
It is divided into first-level message, second level message, three-level message.The wherein highest priority of first-level message, the priority of three-level message
It is minimum, then the TTL of the three-level message in node is halved, it is assumed that the message of message p8 and message p9 are one in No. 15 nodes
Grade message, message p10 and message p11 are second level message, and message p12 is three-level message, then halve the TTL of message p12.
Main advantages of the present invention: (1) by storing threshold value to the node setting in network, so that node is gathered around not up to
Caching release is just carried out when plug, to realize avoiding for node congestion phenomenon.(2) it is forwarded by the way that message is arranged to message in network
Hop count threshold value and message forward number of copies threshold value, so that when nodal cache reaches storage threshold value, by the hop count for deleting message
Reach the message of threshold value with the number of copies of message, so as to effectively control message copy number in network, realizes network congestion
It avoids.(3) when the service condition in nodal cache space reaches storage threshold value, by deleting the hop count of message and the copy of message
Number reaches the message of threshold value to discharge spatial cache.Then judge the input size of message of node at this time and export the big of size of message
It is small, it is by carrying out the division of priority to message in node, priority is minimum when inputting size of message greater than output size of message
The TTL of message halve, so as to discharge nodal cache space as early as possible, achieve the purpose that congestion phenomenon avoids in network.