Disclosure of Invention
The technical problem to be solved by the invention is as follows: the method has the advantages of low protocol complexity, no need of nodes to know the information of the whole network, execution and the like, and is particularly suitable for a low-orbit information network system with dynamic topology and limited on-satellite processing capacity.
The technical solution of the invention is as follows: a satellite distributed dynamic multipath routing method based on network coding is characterized in that after each node i receives a data packet, the following steps are executed:
(1) judging whether a destination node d in the received data packet is a packet which is sent to the destination node d and is received by the node i for the first time, if so, turning to the step (2), and if not, turning to the step (3);
(2) generating a downstream forwarding node information table facing the destination node d, and entering the step (3); the downstream forwarding node information table comprises the maximum sending queue length Q sent by the node i to the neighbor node j' by taking the destination node d as the destination nodemax(j'), average transmit queue length Qavg(j'), shortest path transmission time delay D for the node i to reach the destination node D through the neighbor node jmin(j ', d) and a forwarding probability P from node i to each neighbor node j' in the list of downstream forwarding nodesj'And j' belongs to CT, wherein CT is the condition which is satisfied in the neighbor nodes of the node i: dmin(j',d)<D, the D is a preset maximum time delay threshold, and the downstream forwarding node information table is according to the Dmin(j ', d) are arranged in a sequence from small to large, and after the forwarding node information table is self-established, the nodes contained in the set CT in the downstream forwarding node information table, the arrangement sequence in the downstream forwarding node table and the forwarding probability P from the node i to each neighbor node j' in the downstream forwarding node list are adjusted in real time according to a fixed period delta tj';
(3) Extracting a source node identifier and a destination node identifier in the data packet, comparing the source node identifier and the destination node identifier with the identifier of the node, and if the node identifier is the source node identifier in the data packet, entering the step (4); if the node identifier is equal to the destination node identifier in the data packet, the step (10) is carried out; otherwise, entering the step (5);
(4) splitting the received data packet into a group of M sub-data packets X with equal sizemWhen a data packet cannot be divided by M, zero padding is carried out on the last sub-packet to obtain a length, and the step (6) is carried out after N is equal to M;
(5) receiving the encoded sub-packets andcaching, when receiving at least N 'coded sub data frames with the same group identification, discarding a header of each coded sub data packet to obtain N' sub data packets: xnN ═ 1, 2., N ', where M/3 ≦ N ' ≦ M, and let N ═ N ' proceed to step (6);
(6) adopting a random linear network coding mode to carry out grouping on N sub-data packets XnN is coded to generate N coded sub-data packets Y of equal sizen,n=1,2,...N;
(7) Adding the group mark and the coding coefficient as frame head to the front of the coding sub data packet to form a coding sub data frame Yn1,2, N and storing;
(8) according to the forwarding probability P from the node i to each neighbor node j' in the downstream forwarding node listj'Respectively forwarding the N encoded sub data packets to corresponding neighbor nodes j';
(9) calculating failure probability P ' from node i to each neighbor node j ' in downstream forwarding node list 'j'And by failure probability P'j'Based on this, a compensatory forwarding probability P ″, is generatedj'And forwards the probability P' with the compensationj'Data packet Yn'retransmit to neighbor node j';
(10) and receiving and storing the coded sub-data packets sent by each node, recovering the original M sub-data packets by a Gaussian elimination method when M coded sub-data packets with the same group identifier are received, and continuing to store and wait when M coded sub-data packets with the same group identifier are not received.
The downstream forwarding node information table is generated according to the transmission delay information table of each node, the nodes contained in the set CT in the downstream forwarding node information table and the arrangement sequence in the downstream forwarding node table are updated along with the change of the transmission delay information table, the transmission delay information table of each node i maintains the transmission delay information table of the node according to a fixed period delta t, i belongs to CS, CS is a set of all node numbers in the network, the transmission delay information table comprises the maximum sending queue length sent by the node i to each neighbor node j by taking each other node t in the network as a destination nodeDegree Qmax(j) Average transmit queue length Qavg(j) And shortest path transmission time delay D of the node to the destination node t through each neighbor node jmin(j, t), j belongs to CL, CL is the set of all neighbor node numbers of the node i, and CL belongs to CS.
Shortest path transmission time delay D from node i to destination node t via each neighbor node jmiThe calculation method of n (j, t), j epsilon CL is as follows:
Dmin(j,t)=D(e(j,t))+D(e(i,j))+dq,
in the formula, D (e (j, t)) and D (e (i, j)) are respectively the shortest link transmission time delay between a neighbor node j and a destination node t and the link transmission time delay between each neighbor node j and a node i, the link transmission time delay is obtained by dividing the length of the shortest path of the geometric topology of the satellite at the time t calculated by ephemeris by the speed of light, and D
qFor the transmit queue delay for node i to each neighbor node j,
q (j) is the real-time queue length on node i to each neighbor node j, i.e., the number of packets in a queue, L
avIs the average packet length, and the unit bit, C is the link bandwidth.
When the serial number of the downstream neighbor node j' in the downstream forwarding node table is S, S belongs to [1, S ∈]S is the total number of neighbor nodes in the downstream forwarding node list, and the forwarding probability P from the node i to each neighbor node j' in the downstream forwarding node listj'The following method was used for calculation:
(2.1) initializing the normalized forwarding probability p corresponding to each downstream neighbor node jsThe specific calculation is as follows: firstly, a random number between 0 and 1 is generated for all nodes j' in a downstream forwarding node table as an initial probability pint(s) then calculating a normalized forwarding probability p for each node js:
(2.2) according to each node j' normalized Forwarding probability psCalculating the relative weight r of the node jj'The specific calculation is as follows:
(2.3) relative weight r according to node j
j'And queue status of node j 'calculate normalized relative weight of node j' as
When the downstream node j' transmission queue is full, the normalized relative weight is set as
When the sending queue of the downstream node j ' is not full, namely j ' belongs to BQ, wherein BQ is a non-full queue set, the normalized relative weight of the non-full downstream node j ' in the downstream node list is calculated as follows:
when in the above formulak∈BQrkWhen the value is 0, setting the standardized relative weight of the downstream node of which the last sending queue in the downstream forwarding table is not full as 1, and setting the standardized relative weight of other nodes as 0;
(2.4) normalized relative weight according to compute node j' of
Calculating a forwarding probability P from node i to each neighbor node j' in the downstream forwarding node list
j':
A is the set of all node numbers with sequence numbers before the j' node in the node downstream forwarding node table.
Step (2) according to the fixationIs adjusted in real time from node i to the forwarding probability P of each neighbor node j' in the downstream forwarding node listj'The method comprises the following specific steps:
first, an average transmission queue threshold min is setthAnd maxth;
Then, the average transmission queue length Q is judgedavg(j'), when the average transmission queue length Q isavg(j') is less than minthWhen it is, let Pj'The change is not changed; when average transmission queue length Qavg(j') is greater than maxthWhen it is, let Pj'Is 0; when average queue length Qavg(j')∈[minth,maxth]When is, Pj'Linear decrease, i.e.: pj' (the cycle)=Pj' (last cycle)Δ P, up to Pj' (the cycle)Less than or equal to 0, when Pj' (the cycle)When less than 0, let Pj'0, said Pj'The variation Δ p is:
Δp=pj'(minth-Qavg(j'))/(maxth-minth)。
the failure probability P 'in the step (9)'j'The calculation method comprises the following steps:
when in use
Of (m), P'
j'=0;
When Q isavg(j')∈[minth,maxth]The method comprises the following steps:
P′j'=1-(1-P)(1-Pa)
in the formula, PaIs the average link loss, P is the transmission queue packet loss probability, P is the current average queue length Qavg(j') function:
the compensatory forwarding probability is P'j'~5P′j'A random number in between.
Compared with the prior art, the invention has the beneficial effects that:
(1) the network node of the invention can judge the conditions of link failure, congestion and the like without acquiring the topology information of the whole network to calculate and maintain fixed multipath, and the node only needs the information provided by the neighbor node, so that the proper next path is selected, the protocol complexity and the algorithm overhead are reduced, and the invention can be well applied to the low-orbit information network which has dynamic topology and is difficult to accurately acquire the network state information.
(2) In the data packet forwarding process, the protocol can dynamically distribute the forwarding probability according to the state of the downstream node, reduce network congestion, perform redundancy compensation on the forwarding failure probability, improve the successful delivery rate of the data packet and effectively reduce packet loss caused by inter-satellite switching and inter-satellite link error codes.
(3) The protocol of the invention reduces the correlation between the redundant packet and the original data packet through the network coding in the stream, thereby improving the successful delivery rate of the data packet under the same redundancy.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and examples.
As shown in fig. 1, the present invention provides a network coding based satellite distributed dynamic multipath routing method, which has at its core 3 links of initialization, network coding, and probability compensation forwarding. At the beginning of time interval Δ t, i.e. at time t0,t1,...,tnWithin the time interval delta t, the topology of the satellite network is unchanged, and each node updates the transmission delay information from the node to all other nodes according to the ephemeris; when the data packet is transmitted, the method does not need to establish and maintain a plurality of paths in advance, and the data packet is directly delivered according to the information of the neighbor nodes. The method can utilize the feedback information of the neighbor node to detect the conditions of link failure, area congestion and the like in time, change the forwarding strategy of the downstream node in time without any response of the source node, and simultaneously, in order to reduce the packet loss rate, the algorithm introduces network coding and adopts a dynamic probability forwarding party in the coding packet forwarding strategyThe method is carried out. The distributed forwarding process enables data to well avoid a congestion area, reduces time delay, and realizes the adaptability of the algorithm to a dynamic network with minimum time delay and packet loss cost.
The method for distributed dynamic multipath routing of satellite based on network coding will be described in detail below.
Each node i, i belongs to CS, CS is a set of node numbers in the network, a transmission delay information table from the node to other nodes t is updated according to a fixed period delta t, t belongs to CS, t is not equal to i, the transmission delay information table comprises all other nodes t as target nodes, t belongs to CS, t is not equal to i, and the maximum sending queue length Q sent to a neighbor node j by the node imax(j) Average transmit queue length Qavg(j) And shortest path transmission time delay D of the node i to the destination node through the neighbor node jmin(j, t), j belongs to CL, CL is the set of all the neighbor node numbers of the node i, and CL belongs to CS. The transmission delay information table is shown in table 1.
Table 1 transmission delay information table
And each node i updates the transmission delay information according to the distance from the current node to all other nodes by ephemeris update according to a fixed time interval delta t. Qmax(j) And Qavg(j) Can be read directly from the node i router hardware register.
Shortest path transmission time delay D from node i to destination node t via each neighbor node jminThe calculation method of (j, t), j ∈ CL is as follows:
Dmin(j,t)=D(e(j,t))+D(e(i,j))+dq,
in the formula, D (e (j, t)) and D (e (i, j)) are respectively the shortest link transmission time delay between a neighbor node j and a destination node t and the link transmission time delay between each neighbor node j and a node i, the link transmission time delay is obtained by dividing the length of the shortest path of the geometric topology of the satellite at the time t calculated by ephemeris by the speed of light, and D
qTo each neighbor node for node iThe transmit queue delay of point j,
q (j) is the real-time queue length on node i to each neighbor node j, i.e., the number of packets in a queue, L
avIs the average packet length, and the unit bit, C is the link bandwidth.
After receiving the data packet, the node i executes the following steps:
(1) and judging whether a destination node d in the received data packet is a packet which is sent to the destination node d and received by the node i for the first time, if the destination node of the packet is the packet which is sent to the destination node and received by the node i for the first time, turning to the step (2), and if not, turning to the step (3).
(2) Extracting a destination node d in the data packet, generating a downstream forwarding node list facing the destination node d according to the transmission delay information from the node to the destination node d, and entering the step (3); as shown in table 2, the information table of the downstream forwarding node includes the maximum transmission queue length Q from the destination node d to the neighboring node j' and from the node imax(j'), average transmit queue length Qavg(j'), shortest path transmission time delay D for the node i to reach the destination node D through the neighbor node jmin(j ', d) and a forwarding probability P from node i to each neighbor node j' in the list of downstream forwarding nodesj'And j' belongs to CT, wherein CT is the condition which is satisfied in the neighbor nodes of the node i: dmin(j',d)<D, the D is a preset maximum time delay threshold, and the D is generally a set { D }min(j ', D), j' e CL } and downstream forwarding node information table according to Dmin(j ', d) are arranged in a sequence from small to large, and after the forwarding node information table is self-established, the nodes contained in the set CT in the downstream forwarding node information table, the arrangement sequence in the downstream forwarding node table and the forwarding probability P from the node i to each neighbor node j' in the downstream forwarding node list are adjusted in real time according to a fixed period delta tj';
Table 2 downstream forwarding node list
In this table, the destination node contains only D, all Dmin(j',d)<D and sorting according to size. This table in fact constitutes a sub-graph of the network. At each subsequent time interval, table 2 will be updated synchronously with table 1.
When the downstream neighbor node j' forwards the sequence number S in the node table downstream, S ═ 1, S]S is the total number of neighbor nodes in the downstream forwarding node list, and the following method is adopted to calculate the forwarding probability P from the node i to each neighbor node j' in the downstream forwarding node listj':
(2.1) initializing the normalized forwarding probability p corresponding to each downstream neighbor node jsThe specific calculation is as follows: firstly, a random number between 0 and 1 is generated for all nodes j' in a downstream forwarding node table as an initial probability pint(s) then calculating a normalized forwarding probability p for each node js:
(2.2) normalizing the forwarding probability p according to each node jsCalculating the relative weight r of the node jj'The specific calculation is as follows:
(2.3) relative weight r according to node j
j'And queue status of node j 'calculate normalized relative weight of node j' as
When the downstream node j' transmission queue is full, the normalized relative weight is set as
When the sending queue of the downstream node j ' is not full, namely j ' belongs to BQ, wherein BQ is a non-full queue set, the normalized relative weight of the non-full downstream node j ' in the downstream node list is calculated as follows:
when in the above formulak∈BQrkWhen the value is 0, setting the standardized relative weight of the downstream node of which the last sending queue in the downstream forwarding table is not full as 1, and setting the standardized relative weight of other nodes as 0;
(2.4) normalized relative weight according to compute node j' of
Calculating a forwarding probability P from node i to each neighbor node j' in the downstream forwarding node list
j':
A is the set of all node numbers with sequence numbers before the j' node in the node downstream forwarding node table.
Setting the forwarding probability P from the node i to each neighbor node j' in the downstream forwarding node listj'Then, the forwarding probability P from the node i to each neighbor node j' in the downstream forwarding node list is adjusted in real time according to a fixed period delta tj'The method comprises the following specific steps:
first, an average transmission queue threshold min is setthAnd maxth;
Then, the average transmission queue length Q is judgedavg(j'), when the average transmission queue length Q isavg(j') is less than minthWhen it is, let Pj'The change is not changed; when average transmission queue length Qavg(j') is greater than maxthWhen it is, let Pj'Is 0; when average queue length Qavg(j')∈[minth,maxth]When is, Pj'Linear decrease, i.e.: pj' (the cycle)=Pj' (last cycle)Δ P, up to Pj' (the cycle)Less than or equal to 0, when Pj' (the cycle)When less than 0, let Pj'=0。
The P isj'The variation Δ p is:
Δp=pj'(minth-Qavg(j'))/(maxth-minth)
(3) extracting a source node identifier and a destination node identifier in the data packet, comparing the source node identifier and the destination node identifier with the identifier of the node, and if the node identifier is equal to the source node identifier, entering the step (4); if the node identifier is equal to the destination node identifier, the step (10) is carried out; otherwise, entering the step (5);
(4) splitting the received data packet into a group of M sub-data packets with equal size as a coding source data packet XmM is 1,2, said, M is a fixed value, when the data packet cannot be divided by M, the last sub-packet is zero-padded to a sufficient length, usually M is a power of 2, such as 32 bytes, 64 bytes, etc., so that N is M, and step (6) is performed;
(5) receiving the encoded sub-data packets and caching, and when receiving at least N 'encoded sub-data frames with the same group identification, discarding a frame header of each encoded sub-data packet to obtain N' sub-data packets: xnN ═ 1, 2., N ', where M/3 ≦ N ' ≦ M, and let N ═ N ' proceed to step (6);
(6) adopting a random linear network coding mode to carry out grouping on N sub-data packets XnN is coded to generate N coded sub-data packets Y of equal sizen,n=1,2,...N;
Generating N equal-sized coded data packets YnThe specific coding formula of (2) is:
coding coefficient g
nmN is 1,2, N, theoretically in a finite field
Randomly selected in a completely independent and uniform manner, i.e. code seriesThe random numbers are generated according to uniform distribution, and the random generation process of different coding coefficients is independent, wherein s represents the range of a finite field Fq, and in the scheme, s is 8. S generally takes the power of 2.
For the intermediate node, the group of N coding sub-data packets is coded in a random linear network coding mode, and the coding coefficients are randomly selected to obtain N forwarding coding sub-data packets YnN is 1,2, 3.. N, with the advantage that: further reducing the correlation between the coded packets, improving the decoding success rate, the linear recoding of the coded packets is still the linear combination of the corresponding original packets:
in the formula, N1The number of the last coded data packet.
(7) Adding the group mark and the coding coefficient as frame headers to the front of the sub-data packet to form a coding sub-data packet Yn1,2, N and storing;
(8) according to the forwarding probability P from the node i to each neighbor node j' in the downstream forwarding node listj'And respectively forwarding the N encoded sub data packets to corresponding neighbor nodes j'.
Each node has at least one downstream node, each downstream node corresponds to a transmission queue, and the time delay from the node to the destination node is different. The algorithm assigns forwarding priorities to a plurality of downstream nodes, node to destination node time delays (D)minThe smaller (j', d)), the higher the forwarding priority. And the nodes dynamically allocate forwarding probabilities to the downstream nodes according to the information of the downstream nodes. When the data packet is forwarded, the downstream nodes are polled in sequence from high to low according to the priority. When the data packet is determined to be forwarded through a certain downstream node, the data packet has a certain failure probability. In order to reduce the packet loss rate, the algorithm dynamically performs "compensation forwarding" on the data packet, that is, forwards the duplicated data packet with a certain probability.
The method transmits the queue information according to the downstream node, and carries out the probability forwarding of the coding packet. When N encoded packets need to be forwarded, the downstream node forwards the column from downstreamThe first node in the table begins to be polled. When the neighbor node j' is polled, NxP will bej'Transmitting the coded data packet to a neighbor node j';
(9) calculating failure probability P ' from node i to each neighbor node j ' in downstream forwarding node list 'j'And is in P'j'~5P′j'A random number is generated between the two as the compensation forwarding probability P ″)j'And forwarding the probability with the offset
Pj'The packet is repeatedly forwarded to the neighbor node j'.
Probability of failure P'j'The calculation method comprises the following steps:
when in use
Of (m), P'
j'=0;
When Q isavg(j')∈[minth,maxth]The method comprises the following steps:
P′j'=1-(1-P)(1-Pa)
in the formula, PaIs the average link loss, P is the transmission queue packet loss probability, P is the current average queue length Qavg(j') function:
without loss of generality, the average packet loss rate P of the linkaAnd maximum packet drop probability max of transmit queuepObtained by counting past data.
Pj′~5Pj' random number between them is used as forwarding threshold, and the generated random number is assumed to be 2Pj', then forward the probability 2P with the offsetj' will data packet Yn'retransmit to neighbor node j', that is, have 1-2PjThe probability of' is not forwarded.
(10) And receiving and storing the coded sub-data packets sent by each node, recovering the original M sub-data packets by a Gaussian elimination method when M coded sub-data packets with the same group identifier are received, and continuing to store and wait when M coded sub-data packets with the same group identifier are not received. .
Suppose the received packet is Y1,Y2,...,YnIf the decoding matrix G corresponding to the encoding packet coefficient vector is [ G ═ Gj1,gj2,...,gjm](j ═ 1, 2.. multidot.m) full rank, then can be passed through [ X ·1,X2,...Xm]T=G-1[Y1,Y2,...Ym]TAnd recovering the original data packet. If m coded packets are not collected or cannot be decoded, continuing to store and wait.
In summary, the most core design idea of the method is as follows:
(1) for an arriving packet, if the destination node of the packet is the packet which is sent to the destination node and received by the node for the first time, the node needs to be initialized, and the initialization includes parameter definition, downstream node selection and downstream node sequencing.
(2) In a network coding link, a source node divides a data packet into M data packets with equal size, wherein the M data packets have the same group number, and the data packets are coded and then forwarded by adopting random linear coding; when receiving a new data packet, the intermediate node recodes and forwards the same group of data packets cached originally, and then clears the cache; and if the destination node is the destination node, decoding the received M data packets to obtain corresponding information.
(3) For probability compensation forwarding, when a node forwards a coding packet, each downstream node has a forwarding opportunity, when the node is initialized, the node firstly distributes priority to the downstream node according to the time delay information of the downstream node, then dynamically distributes forwarding probability to the data packet according to the priority and other information of the data packet, when the data packet is forwarded through a certain downstream node, the data packet has failure probability, and an algorithm carries out compensation forwarding according to the failure probability and with a certain probability, so that the successful delivery rate of the data packet is improved. In this way, when congestion occurs locally, the probability of failure of forwarding the coded packet increases, the algorithm can increase the compensatory forwarding probability, and when the downstream link fails, the node will remove the failed node from the set of downstream nodes and update the set. The algorithm has good dynamic adaptability to network emergency, and ensures higher successful delivery rate of the data packet under the condition of lower redundancy.
Those skilled in the art will appreciate that those matters not described in detail in the present specification are well known in the art.