CN107508655B - Self-adaptive end-to-end network coding transmission method - Google Patents
Self-adaptive end-to-end network coding transmission method Download PDFInfo
- Publication number
- CN107508655B CN107508655B CN201710588600.8A CN201710588600A CN107508655B CN 107508655 B CN107508655 B CN 107508655B CN 201710588600 A CN201710588600 A CN 201710588600A CN 107508655 B CN107508655 B CN 107508655B
- Authority
- CN
- China
- Prior art keywords
- network coding
- data message
- tcp
- message
- layer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/02—Traffic management, e.g. flow control or congestion control
- H04W28/06—Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/004—Arrangements for detecting or preventing errors in the information received by using forward error control
- H04L1/0076—Distributed coding, e.g. network coding, involving channel coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/12—Arrangements for detecting or preventing errors in the information received by using return channel
- H04L1/16—Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
- H04L1/1607—Details of the supervisory signal
- H04L1/1657—Implicit acknowledgement of correct or incorrect reception, e.g. with a moving window
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a self-adaptive end-to-end network coding transmission method, which mainly comprises the following steps: on a network coding layer, maintaining the sending queue for caching the original data message of the TCP layer, wherein when the message is sent, the length of a coding window is fixed to be N, and the coding window can orderly slide backwards according to the arrival of a new data message to be sent; the network congestion packet loss resistance is realized by redundant coding in a network coding layer; the receiving end maintains three decoding related queues to realize the processing of different data messages, disordered or valuable messages decoded from the data messages in the future are cached in a data message queue to be processed, the processing of a network coding layer is waited, valuable data messages decoded at present are cached in a message queue being decoded, messages decoded are cached in a decoded data message queue, and the messages are waited to be uploaded to a TCP layer or wait for the TCP layer to receive confirmation. The invention can ensure good transmission rate and improve the bandwidth utilization rate.
Description
Technical Field
The invention relates to the field of network coding and decoding, in particular to a self-adaptive end-to-end network coding transmission method.
Background
With the rapid popularization of mobile communication devices and the advent of the 4G era, various wireless network applications gradually penetrate into various aspects of people's lives, and wireless networks play an increasingly important role. Therefore, how to improve the transmission quality of wireless networks (including satellite networks, aeronautical communication networks, wireless mobile networks, etc.) becomes a hot issue of much attention in network research nowadays.
Many network applications today do not leave reliable data transfer services. The TCP protocol (transmission control protocol) is widely used because it can provide a good reliable transmission service in a wired network environment. In practical wireless network applications, the traditional TCP protocol is still used in the transport layer, but some unique features of the wireless network also cause a serious TCP performance degradation problem. The TCP protocol is designed to consider congestion in the network once packet loss occurs, and thus, strategies such as adjusting a congestion window, a congestion threshold, fast recovery and the like are adopted, so that the TCP protocol can well work in a wired network. In a wireless network, congestion packet loss exists, but more cases are random packet loss caused by wireless transmission characteristics, and a TCP protocol cannot distinguish the reason of packet loss, and only a single congestion strategy is adopted to perform packet loss processing. For non-congestion packet loss, the TCP protocol still adopts a strategy of reducing the congestion window to reduce the sending rate, and this processing method for congestion packet loss can result in a decrease in throughput and an increase in delay. In fact, for non-congested packet losses due to radio transmission problems, the correct measures that the TCP protocol should take are to increase the sending rate, rather than to reduce the congestion window. Therefore, how to improve the transmission performance of the existing TCP protocol is especially critical in a wireless network with high packet loss rate and large delay.
in 2000, Ahlswede r, Ning Cai, L i s. -y.r., Yeung, r.w. in the document "network coding flow (IEEE Transactions on Information Theory, vol 43, pp.1204-1216, April 2000)", a concept of Network Coding (NC) was first proposed, which has a core idea that nodes in a network encode and merge a plurality of received data packets, and the encoded data is then forwarded, and a destination node can decode according to a corresponding encoding coefficient, thereby restoring original data, and using network coding can improve network throughput, balance network load, and improve network bandwidth utilization.
in 2011, JK discovery of networks, D Shah, M M year and so on in the document "Network coding protocol TCP: the protocol and implementation (Proceedings of the IEEE, vol.99, pp.490-512, March, 2011)", first, a communication transmission protocol combining Network coding with TCP is proposed, which can effectively improve the communication transmission quality in a lost packet Network, in the process of combining the TCP protocol with the Network coding, two contents are mainly involved, namely, a coding mechanism and an ACK confirmation mechanism, a Network coding scheme, which is mainly divided into deterministic coding and random coding, and a coding scheme based on batch coding and sliding window, in 2006, transmission Ho, multimedia coding and so on in the document "architecture linking protocol to multicast (IEEE, transport networking, 52, the audio coding protocol, 2011, which is based on a linear coding protocol, a method, which is based on a linear coding, a Network coding, a method, which is based on a Network coding, a Network coding method, which is effective in a receiving end, a Network coding scheme, a Network coding method, which is based on linear coding, a Network coding method, a method, which is effectively improved, a Network coding method based on a Network coding method, a.
JK Sundararajan et al in the document "ARQ for Network Coding (IEEE IST 2008)" proposed an ACK acknowledgement mechanism in the process of combining TCP protocol and Network Coding, and specifically proposed the concepts of "see" and "decoded" during decoding, which can reduce the requirement for buffer size.
Around the combination of network coding and TCP transmission protocol, there are also many patent achievements of invention at home and abroad. The chinese patent CN101841479A (a high error rate and long delay network adaptive transmission method based on network coding, university of sichuan) proposes an adaptive transmission method based on network coding. The sending end carries out self-adaptive network coding on the TCP message according to the flow of the transmission layer, then sends the coded message to the receiving end, and the sending end carries out coding redundancy on the sent message. The receiving end carries out network decoding, and the original message can be recovered only by receiving part of the message, so that the influence of the high packet loss rate on the transmission performance of the network is improved, and the throughput of the transmission protocol is improved. Because of adopting the self-adaptive coding mode, the confidentiality of the information is improved. And the method does not need to be matched with a transmission intermediate node, belongs to an end-to-end transmission acceleration method, and can be compatible with the current mainstream reliable transmission protocol. The method is mainly characterized in that: 1) carrying out self-adaptive network coding redundancy on a TCP message transmitted at a transmitting end according to the flow of a transmission layer; 2) if the number of the messages sent in the monitoring time interval of the transport layer flow is larger than N, the adaptive network coding is implemented, otherwise, the adaptive network coding is not implemented; 3) when the receiving end decodes, it is necessary to wait until the data packets with more than or equal to N linear combinations are received, and then the decoding operation is started. The method is mainly a network coding algorithm according to batches, a sending end needs to wait for N data messages to be coded, a receiving end also needs to start decoding operation after receiving more than or equal to N data packets, and the problems of an ACK mechanism, estimation of self-adaptive packet loss rate and the like are not considered in the method.
The chinese invention patent CN102904689A (an improved method of a transmission control protocol based on network coding, shenzhen research institute of harbinge industrial university) provides an improved method of a transmission control protocol based on network coding. The mechanism of the TCP protocol is modified at the transport layer, and a network coding window is added. The data is generated by an application layer and is transmitted to a TCP window from top to bottom, and a network coding window receives and caches the data packet of the TCP window. When the network code receives a plurality of data packets, the specified number of coded data packets are generated and transmitted to the network layer. Therefore, the retransmission times of the data packet can be obviously reduced, and the throughput of the network is improved. The scheme is mainly characterized in that: 1) the transport layer maintains two windows-a TCP window and a network coding window; 2) the size B of the coding window is m × k, the data packets in the coding window are divided into m small blocks, wherein the number of the data packets of each small block is k, the data of one coding window is coded into n data packets (n ═ B/(1-p), p is packet loss rate), and each small block is coded into t (t ═ n/m) data packets; 3) when a small block still cannot be decoded after t times of transmission, the small block and a data packet of the next small block are coded together, when the small block still cannot be decoded after 2t times of transmission, the data packets of the first three small blocks are coded together, and the like is repeated, namely a multi-batch mixed network coding method; 3) when sending the ACK packet, the Num, Start, and End fields of the received coded packet are sent together as a part of the ACK, which is similar to a feedback mechanism. The encoding algorithm of the scheme is a network encoding algorithm based on multi-batch mixing, and the ACK message of the receiving end is also changed.
Chinese patent CN103152359A (an end-to-end wireless transmission control protocol linear network coding, Chongqing university) proposes an end-to-end linear network coding improvement method. The scheme is mainly characterized in that: 1) the network coding head is optimized, the parameters of coding and decoding are comprehensively considered, the length of the network coding head is shortened, and the complexity of network coding is reduced; 2) according to the wireless packet loss condition, designing a reasonable sliding window and a reasonable coding window, and optimizing to ensure that the sliding window and the coding window are equal; 3) the lost message retransmission mechanism is modified, and when the accumulated packet loss of the coded message reaches the size of the sliding window, retransmission is started, so that the complexity of network coding is reduced, and the efficiency of network coding and the end-to-end system TCP throughput are improved.
Chinese patent CN103209064A (an improved method for a transmission control protocol acknowledgement mechanism based on network coding, Chongqing university) proposes a processing mechanism in case of acknowledgement message loss, which can significantly reduce the retransmission times of the message, thereby improving the throughput of the network. The scheme is mainly characterized in that: 1) the confirmation mechanism is modified, and an enhanced confirmation message (EACK) is designed; 2) after receiving the message, the receiving end selects to send ACK or EACK, if other messages before the coded message are not successfully received, the EACK is sent, otherwise, ACK is sent. Chinese patent No. CN103840928A (system and method for TCP for network coding in long term evolution, blosson usa) provides a configuration and method for determining an operation mode of a communication link for a User Equipment (UE) in a communication system, including physical layer channel error recovery, modulation, channel selection, based on whether the UE is configured as a TCPNC.
The invention patent US20120218891a1(Method and apparatus providing network based flow control) proposes a new congestion control scheme and ACK acknowledgement mechanism based on the idea of random linear network coding. And at the transmitting end, transmitting the linear combination of the data packets in the current congestion window according to a sliding window protocol. At the receiving end, the ACK mechanism acknowledges the degree of freedom. If a linear combination reveals a unit of new information, even if the original packet cannot be decoded completely, the receiving end is said to see ("see") a new packet, and a corresponding ACK is sent. The scheme is mainly characterized in that: 1) the sending node performs operations including: determining a random linear combination according to the data messages in the sending queue; sending the linearly combined data message according to a sliding window protocol; receiving the ACK and determining which data message has been seen, thereby deleting the corresponding data message from the sliding window; 2) the operations performed by the receiving node include: receiving a linearly combined data message; determining whether a new data message is seen; and sending corresponding ACK according to the seen new data message. Extracting coding coefficients from the headers of the linear combination data packets and placing the coding coefficients into a decoding matrix, then performing Gaussian elimination to determine which data packet can be seen ("see"), placing the data packets which are not decoded into a receiving cache, and transferring the decoded data packets to a TCP layer; 3) the operation performed by the intermediate node: receiving a linearly combined data message; and sending the random linear combination of the data messages in the transmission queue according to a sliding window protocol. The scheme can greatly improve the throughput under the packet loss scene.
The invention patent US2010046371a1(Feedback-based online network coding) proposes a real-time network coding scheme based on Feedback. The scheme is mainly characterized in that: 1) defining the concepts of 'see' and 'decoded' when decoding at a receiving end, wherein 'see' represents that when a data message can be represented by linear combination of other data messages with higher sequence numbers than the data message, the data message can be considered to be 'see' and 'decoded' represents that a certain row of a decoded matrix has only one element of 1, the data message is considered to be 'decoded'; 2) and sending the ACK message as long as the data message is 'seen', and simultaneously deleting the data message in the sliding window by the sending end according to the message instead of 'decoded' to send the ACK message.
The invention patent US20120114481a1(Coding apparatus For a Robust And flexible communication Protocol) provides a Coding scheme of a multipath TCP transmission Protocol with both robustness And flexibility, the scheme can make full use of the characteristics of multipath, multiple interfaces, multiple media And multiple servers in a network, And can quickly respond to the congestion of the network by performing load balancing on different network resources, And the scheme is also suitable For soft handover in a heterogeneous network. The scheme is mainly characterized in that: 1) one file can be divided into a plurality of blocks for transmission, and different coding strategies can be realized on different blocks according to the urgency degree of each block; 2) with first and second access technologies, multiple blocks may be transmitted over multiple access connections.
The technical research results in the aspects of combining network coding and TCP protocols at home and abroad are comprehensively analyzed, and at present, a feasible solution about a network coding algorithm, a decoding scheme and an ACK (acknowledgement character) mechanism is provided. However, by carefully analyzing these prior arts, it is not easy to find that there are not many methods around redundancy adjustment at the transmitting end of network coding, and that there are not many methods for optimizing design by simply modifying the ACK mechanism of the network coding layer and combining the ACK mechanism with the congestion control algorithm of the TCP layer at the receiving end of network coding.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a self-adaptive end-to-end network coding transmission method, which can ensure good transmission rate and improve the bandwidth utilization rate.
In order to solve the technical problems, the invention adopts the technical scheme that:
An adaptive end-to-end network coding transmission method comprises the following steps:
At the encoding end
1. In the process of establishing connection, the transmitting and receiving parties negotiate whether the transmission control protocol stream carries out network coding or not, if the transmission control protocol stream carries out network coding, a corresponding network coding layer control block is established, control information is initialized, and a corresponding mark of the transmission control protocol connection control block is set;
2. When the transmission control protocol layer sends the original data message, the processing method of the network coding layer is as follows:
1) Searching a corresponding network coding layer connection control block according to the original data message, if the corresponding control block can be found, indicating that network coding operation needs to be executed, and executing the step 2); if the corresponding control block is not found, indicating that the network coding is not required to be executed, and executing the step 5);
2) Judging whether the original data message is a control message or a message carrying data, if the original data message is the control message, executing the step 5 without executing network coding operation;
3) Caching the message carrying data into a sliding window, and sliding the current coding window backwards by one message;
4) Setting a coding counter NUM to NUM + R, wherein R is the current adaptive redundancy and generates A coded message, which is a linear combination of the messages of the current coding window, fills the corresponding coding header, where Representing the number of the coding messages to be generated; and updating the encoding counter
5) Sending the coded message to an internet protocol layer, and sending the coded message out through the internet protocol layer and a data link layer;
3. When receiving the ACK message fed back by the receiving end, the following processing method is carried out:
1) According to the confirmation sequence number in the confirmation ACK message, operating the sending queue of the encoding end, and deleting the original data message with the byte sequence number smaller than the confirmation sequence number from the sending queue;
2) According to the receiving information of the receiving end in the header of the feedback acknowledgement ACK message, self-adaptive packet loss rate estimation and redundancy adjustment are carried out;
3) Modifying the feedback ACK message into a format conforming to the transmission control protocol data message, and transmitting the modified ACK message to a transmission control protocol layer;
At the receiving end
1. In the process of establishing connection, the transmitting and receiving parties negotiate whether the transmission control protocol stream carries out network coding or not, if the transmission control protocol stream carries out network coding, a corresponding network coding layer control block is established, control information is initialized, and a corresponding mark of the transmission control protocol connection control block is set;
2. When receiving the data message transmitted upwards by the internet protocol layer, the processing method of the network coding layer is as follows:
1) Searching a corresponding network coding layer connection control block according to the data message, if the corresponding control block can be found, indicating that network coding operation needs to be executed, and executing the step 2); if the corresponding control block can not be found, the network coding operation is not required to be executed, and step 7) is executed;
2) Judging whether the message is a control message or a message carrying data, and if the message is the control message, executing the step 7);
3) Caching a message carrying data into a correspondingly connected data message queue backlog to be processed, wherein the backlog represents the message to be processed;
4) Judging whether the data messages in the data message queue backlog to be processed contain the information of the next original data message expected to be decoded one by one; if so, acquiring a coding coefficient vector of the message, and adding the message into a data message queue decoding which is decoding, wherein the decoding indicates that the message is being decoded;
5) Obtaining a decoding coefficient matrix according to a coding coefficient vector of a data message in decoding of a data message queue, performing Gaussian elimination on the decoding matrix, and obtaining a corresponding 'see' and a 'decoded' message from the matrix after the Gaussian elimination; wherein 'seen' indicates that when a datagram is represented by the linear combination of other datagrams with higher sequence numbers than the linear combination, the datagram is considered to be 'seen', and 'decoded' indicates that a row of a decoded matrix has only one element of 1, the datagram is considered to be 'decoded', and the datagram is added into a decoded datagram queue;
6) If a new 'seen' message exists, sending a corresponding ACK message;
7) Sending the message in the decoded data message queue to a transmission control protocol layer for processing;
3. When a new 'seen' message exists, the information of successful receiving of the network coding layer of the receiving end needs to be fed back, and the process depends on a transmission control protocol layer to send an acknowledgement ACK message; when the transmission control protocol layer sends an ACK message:
1) Updating the sequence number to a corresponding network coding layer connection control block according to the ACK sequence number in the ACK message sent by a transmission control protocol layer, and deleting the sequence number used for the data message in the decoded data message queue;
2) Calculating the window value of the network coding layer according to the transmission control protocol layer confirmation number and the window value;
3) And modifying the network coding layer acknowledgement number and the window value into an acknowledgement ACK message, and then sending out.
Further, the redundancy adjusting method comprises the following steps:
At a sending end, adding a serial number to a data message of a transmission control protocol layer reaching a network coding layer when the data is sent, wherein the serial number does not distinguish a retransmission message from a normal message and does not distinguish whether data exists or not, and the serial number is uniformly numbered as long as the message is connected with the transmission control protocol and is written into a data packet network coding header;
At a receiving end, firstly determining a calculation interval for calculating the packet loss rate; when receiving data, calculating the packet loss rate once every 100 sequence numbers according to the sequence number value in the network coding header, and writing the current packet loss rate in the network coding header of the ACK message;
After receiving the ACK packet, the sending end reads the packet loss rate loss _ rate calculated by the receiving end, and calculates the redundancy according to the packet loss rate, where the redundancy R is calculated by the following formula:
Wherein m and n are constants.
Furthermore, the network coding layer connection corresponds to a set of network coding layer control information, which includes network coding layer connection control information, network coding layer connection state, maximum segment length MSS and window extension information of the data packet, decoding parameter information, private control information, and queue management information.
Further, the sliding method of the sliding window comprises the following steps: maintaining an original data message queue participating in encoding on a network encoding layer, and selecting the current original data message and the previous 4 original data messages for encoding and then transmitting when the original data message needs encoding transmission each time.
Compared with the prior art, the invention has the beneficial effects that:
1. The invention uses a self-adaptive redundancy adjusting mechanism, and can estimate the relative packet loss rate of the network in real time so as to adjust the redundancy. The mechanism can well deal with real-time change of the packet loss rate of the network and better deal with the network environment with uncertain packet loss rate, in particular to a wireless network.
2. The modification of the quick retransmission mechanism ensures that the invention can quickly recover the throughput under the condition of burst large packet loss, and ensures that the transmission performance of the network is kept stable.
3. Whether network coding is selected or not is negotiated in the process of establishing the TCP connection, if network coding is not carried out, a data message of a TCP layer is directly sent to an IP layer and then sent out without passing through the network coding layer, so that the receiving end also needs to carry out network coding if the negotiation result is that network coding is required, and the receiving end and the transmitting end both need to pass through the network coding layer, so that the scheme can be perfectly compatible with the existing TCP protocol.
Drawings
Fig. 1 is a format of a network coding layer header in the present invention.
Fig. 2 is a strategy of a coding window in a transmit queue, sliding window, in accordance with the present invention.
Fig. 3 is a system implementation framework of the present invention.
Fig. 4 is a data message format in the present invention.
Fig. 5 is a formula representation of a coded data message received in the present invention.
Fig. 6 is a simplified representation of the formula of the encoded data message received in the present invention.
Fig. 7 shows a queue snd _ buf _ head for sending data packets according to the present invention.
Fig. 8 is a pending (backlog), decoding (decoding), decoded (decoded) data packet queue in the decoding process of the present invention.
FIG. 9 is a diagram of the relationship between the network coding layer queue and the private control information in the present invention.
Fig. 10 is a flow chart of the three-way handshake implementation of the present invention.
FIG. 11 is a flow chart of a four-hand swing implementation of the present invention.
Fig. 12 is a flow chart of the coding implementation of the present invention.
FIG. 13 is a flow chart of decoding implementation in the present invention.
Fig. 14 is a measured scene framework diagram of the present invention.
Fig. 15 is a graph showing a comparison of transmission performance with a dynamic bandwidth change, where the packet loss rate is 5% and RTT is 100 ms.
Fig. 16 is a schematic diagram illustrating the influence of the change in the packet loss rate on the transmission performance when the bandwidth is 1Mbps and the RTT is 100 ms.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments. The basic implementation framework of the present invention is to add a network coding layer between the TCP layer and the IP layer of the conventional OSI seven-layer network model to implement the coding and decoding transmission functions, as shown in fig. 3.
The network coding function module is used for coding each TCP connection, data messages of different connections are not coded, and only data messages of the same connection are coded. Whether network coding is selected or not is negotiated in the process of establishing the TCP connection, if network coding is not carried out, a data message of a TCP layer is directly sent to an IP layer and then sent out without passing through the network coding layer, so that the receiving end also needs to carry out network coding if the negotiation result is that network coding is required, and the receiving end and the transmitting end both need to pass through the network coding layer, so that the scheme can be perfectly compatible with the existing TCP protocol.
The format of the data message after network coding is shown in fig. 4. In the traditional network protocol, a data message consists of an IP header, a TCP header and a TCP data load. The data message of the scheme comprises an IP layer header, a network coding layer header and a network coding layer data load, wherein the network coding layer data load is obtained by coding a TCP header and a TCP data load of a traditional network protocol, and the network coding layer header is some corresponding coding and decoding control information after the network coding layer is introduced. The length of the IP layer header is 20-60 bytes (similar to the traditional IP layer header), the length of the network coding layer header is 48 bytes, and the length of the data load of the network coding layer is the sum of the lengths of the TCP header and the TCP data load.
The format of the network coding layer header is shown in fig. 1. The network coding layer header consists of 48 bytes. The Source port and the Destination port respectively represent a Source port and a Destination port of the network coding data message, and the port is a port of a TCP layer because a network coding layer utilizes a traditional TCP/IP protocol; the Base field represents the minimum byte sequence number in the sending queue of the sending end; the Start 1 field indicates the first byte sequence number of the first original TCP data packet participating in encoding, which is an absolute value here, so the length is 32 bits; the resv field represents a reserved part, and in the current version, the length of the header of the filled network coding layer; the End 1 field represents the last byte sequence number of the first original TCP data message participating in encoding, and the sequence number is a relative value relative to the Start 1 and has a length of 16 bits; the Start 2 field indicates the first byte sequence number of the original TCP data packet participating in encoding, which is a relative value with respect to Start 1, and the length is 16 bits, and when only one TCP data packet participates in encoding, the value is filled with 0; the meaning of the fields Start 3, Start 4 and Start 5 is similar to that of Start 2; end 2 represents the last byte sequence number of the original TCP data packet participating in encoding, which is a relative value with respect to Start 1, and has a length of 16 bits, and when only one TCP data packet participates in encoding, the value is filled with 0; the End 3, End 4, End 5 domains have similar meanings to End 2; n field represents the number of original TCP data messages participating in encoding; the ai field represents the coding coefficient corresponding to the ith original TCP data message participating in coding, and if the ith original TCP data message does not participate, the coding coefficient is 0; wscale represents the window expansion factor of the network coded data packet; the ncack domain represents the byte sequence number confirmed by the network coding layer, namely the sequence number of the next byte expected to be received by the network coding layer which sends the network coding data message; the recv window field represents the current receiving window value of the network coding layer for sending the data message; the private 1 and private 2 fields are feedback parameters for adaptive redundancy adjustment.
The principle of network coding can be seen as the following matrix operation:
Wherein q is iIndicating that the ith original TCP data packet participating in encoding is also a data packet to be decoded, P jAnd the coded data message of the j-th coded network is represented. Wherein the element is composed of the element a ijThe matrix A is a relative coding coefficient matrix, each row of which corresponds to a coded data packet P jEach column of the coefficient vector of (a) corresponds to each original TCP data packet participating in encoding, thus element a ijAnd representing the coding coefficient corresponding to the jth original TCP data message in the ith coding data message. In the matrix operation, 3 original TCP data messages are encoded into 4 network encoded data messages, and the original TCP data messages can be decoded only by ensuring that the 3 network encoded data messages can be received at a receiving end and each line of the coefficient matrix is linearly independent. The idea utilized here is that of redundant coding, thus realizing to combat the loss of network data messages.
The redundancy coding is used for realizing the purpose of resisting the loss of network messages, and the design of redundancy is involved. The increase of the redundancy will result in a certain decrease of the effective rate of transmission, but it can be seen through practical tests that the rate decrease caused by packet loss is much higher than the loss caused by the redundant redundancy. Therefore, it is preferable that the redundancy is higher than the corresponding packet loss rate, and is dynamically adjusted according to the change of the packet loss rate. The invention provides a self-adaptive redundancy algorithm, which has the following principle: when sending coded data message, filling a data message sequence number in the header of the network coding layer, wherein the sequence number is different from the TCP layer byte sequence number, the TCP layer byte sequence number is used for ensuring the reliable transmission of bytes, and the data message sequence number of the network coding layer is used for realizing the estimation of self-adaptive redundancy; at a receiving end, estimating packet loss rate by acquiring the serial number of data messages of a network coding layer and calculating the number of data messages lost in a period of time of a current data stream, and feeding back the estimated packet loss rate to a sending end; at a transmitting end, redundancy is calculated through the packet loss rate fed back, and the redundancy is calculated theoretically The redundancy of the actual calculation is often larger than the theoretical value.
Although the window size of the network coding is fixed, the actual data packet coding adopts a sliding window mechanism, as shown in fig. 2, that is, an original TCP data packet queue participating in the coding is maintained at the network coding layer, and when the original data packet needs to be coded and transmitted each time, the current original TCP data packet and the 4 original TCP data packets before the current original TCP data packet are selected for coding and then transmitted. For example, when the TCP layer sends the original data packet q kThen, the original data message currently participating in encoding is (q) k-4,qk-3,qk-2,qk-1,qk) Then the next TCP layer sends the original data packet q k+1Then, the original data message participating in encoding is (q) k-3,qk-2,qk-1,qk,qk+1) Thus, although the encoding window is 5, the window will slide backward by one datagram length each time the original TCP datagram is sent, and so on until the datagram is sent completely.
At the receiving end of the network coding layer, the decoding process can be expressed as a formula as shown in fig. 5. Wherein p is jRepresenting the jth received coded transmission data message, q iRepresenting the original TCP data message sent by the ith TCP layer The middle matrix is a coefficient matrix. Each row in the coefficient matrix corresponds to a coded data packet p jEach column of the coefficient vector of (1) corresponds to each original TCP data packet participating in encoding. Since the coding window is shifted backwards in a sliding manner, the number of columns of the coding window is increased along with the updating of the coding window; the number of rows increases with time and the number of encoded data messages received. The decoding process solves the original TCP data message q iTherefore, the original TCP data message can be decoded only by converting the coefficient matrix into the unit matrix.
In the process of performing the decoding operation, even if there is no way to convert the coefficient matrix into the unit matrix, i.e. the original TCP datagram cannot be decoded, it is also meaningful in this case if the coefficient matrix can be reduced into a form as shown in fig. 6, i.e. the coefficient matrix is changed into two sub-matrices, the left sub-matrix is the unit matrix, and the right sub-matrix is the non-zero matrix. If a row of the matrix has only one non-zero element, the original TCP data packet corresponding to the column of the non-zero element can be "decoded", such as the first row of the matrix; if the coefficient matrix can be simplified to the above form, it can be considered that the original TCP data packet corresponding to each column in the left unit matrix can be considered as "see", because in this case, the subsequent encoded data packet may not include the original TCP data packet, and the receiving end only needs to receive other data packet packets, such as q packet packets 6,q7Q may also be 5For this, the receiving end can send the confirmation of successful reception of the "seen" data packet in advance, thereby notifying the sending end that the data packet can be deleted. At the network coding layer, the next expected received byte sequence number is a data packet containing the next expected byte sequence number from "seen". Thus, in the implementation process, the confirmed byte sequence number is the sequence number of "see".
In a network coding layer, when a new data message byte is 'seen', an Acknowledgement (ACK) message needs to be sent and fed back to a sending end to announce corresponding receiving success information; when a new data packet byte is "decoded", the corresponding decoded byte needs to be transferred to the TCP layer.
Similar to the TCP layer, the network coding layer also has the corresponding network coding layer connection control information. Since the network coding function is coded for each TCP connection, to ensure a reliable connection, the scheme also defines a network coding layer connection, which is uniquely identified by a quadruple of (source IP, destination IP, source TCP port, destination TCP port).
for each network coding layer connection, it contains a number of network coding layer states (states), the main functions are connection establishment, connection maintenance, connection release, corresponding to TCP connection establishment (three handshake), codec transmission, TCP connection release (four wave), respectively.
The network coding layer control information comprises a part of control information acquired from TCP connection, and the acquisition of the control information is mainly obtained by analyzing an original TCP data message. These control information include: sock information of the corresponding TCP connection, window spreading factor (wscale), maximum segment length (MSS), receive window value of the TCP connection (TCP _ wnd), acknowledgement number of the TCP connection (TCP _ ack).
The private control information of the network coding layer mainly comprises: the next byte number expected to be "seen" (nxt _ seen), the next byte number expected to be decoded "(nxt _ decoded), the next byte number expected to be passed to the TCP layer (nxt _ kernel), the next byte number expected to be added to the decode queue (nxt _ next bytes), the number of data messages that the network coding layer acknowledges but have not yet been acknowledged by the kernel (num _ ncpkt), the network coding layer early acknowledgement (the number of bytes acknowledged by the network coding layer-the number of bytes acknowledged by the TCP layer), which may also be considered as the number of bytes of data (nc _ len) temporarily stored in the network coding layer.
the decoding method comprises the steps of decoding a coefficient matrix, wherein each column of the coefficient matrix corresponds to each original TCP data message participating in encoding, and each column of the coefficient matrix represents one original TCP data message, so how to distinguish one original data message, and the initial byte number and the length of each original data message are respectively and uniquely used for determining one original TCP data message.
The network coding layer mainly comprises four data message queues: a. sending a message queue (snd _ buf _ head); b. receiving a data message queue (backlog) to be processed by a terminal; c. a data packet queue (decoding) currently being decoded; d. decoded data message queues (decoded).
The send packet queue is a buffer queue that stores the original TCP data packets, as shown in fig. 7. The adding criterion is that when the TCP layer needs to send the original TCP data message, the data message is copied at the network coding layer, then the original data message is released, the copied data message is added into a message sending queue, and then the coding and sending operation is waited to be executed; the deletion criterion is to check the ACK acknowledgment number of the corresponding received data packet, and if the byte before the ACK acknowledgment number indicates that the ACK acknowledgment number has been decoded or can be decoded by the receiving end, the byte before the ACK acknowledgment number can be deleted, so that the transmitted data packet with the last byte having a sequence number less than the value can be removed from the queue and deleted.
The pending data message queue (backlog) functions like a backlog queue, primarily storing out-of-order data messages that are not valuable for current decoding operations but valuable for future decoding operations. The insertion criterion is that after the network coding layer receives the coded data message, the coded data message is added into a queue to be processed; the removing criterion is that whether the data message on the queue to be processed is valuable to the current decoding operation is firstly checked in the receiving and processing process, if so, the data message is removed from the queue to be processed and added to a decoding queue, otherwise, the data message is continuously cached in the queue to be processed.
the removal criteria are that when the data message is DECODED and has no value for the subsequent decoding operation (i.e. the smallest undecoded byte is not in an encoding window, it is certain that the decoding of the smallest undecoded byte has no value), the data message can be removed from the decoding queue, the removal operation is often accompanied by updating of coefficient matrix decoding parameters NC _ dseq [ COEFL EN ], NC _ den [ COEF L EN ], the removal operation needs to be noted that for each data message being DECODED, a coding coefficient vector is corresponding to each coding coefficient vector for representing the coding coefficients of the original TCP data message participating in encoding, and a decoding state variable, including NC _ SESEEN, which indicates that the decoding of the original TCP data message can be performed in advance, the decoding state of the data message is changed into the original data message, namely, the original data message can be confirmed to be added into the decoding state NC _ NC, NC _ N, NC _ N, NC _ N is a number of the data message being DECODED, and the number of the data message being DECODED can be equal to the number of the data message being DECODED, and the number of the data message being DECODED, the number of;
NC _ redundancy indicates that the current datagram is a redundant datagram, and to set this state, it must be satisfied that the coefficient vector must be able to be transformed to all 0 s during decoding, in which case the datagram is not valuable for decoding and can be directly deleted.
The decoded datagram queue (decoded) buffers the datagrams that have been decoded but have not yet been acknowledged by the TCP layer. The insertion criterion is that the data message in the decoding queue can be directly inserted into the decoded queue after being decoded; the removal criteria is that the data packet can be removed from the decoded queue after it is acknowledged by the TCP layer (i.e., it has been successfully received by the TCP layer). For the data messages on the decoded queue, all the data messages correspond to a state variable used for identifying the state transmitted to the local TCP layer, and the main states are as follows: NC _ unsent (not yet passed to the TCP layer), NC _ send _ UNACK (passed to the TCP layer but not yet successfully received by the TCP layer acknowledgement), NC _ send _ ACK (already successfully received by the TCP layer acknowledgement), NC _ send _ SACK (selective ACK, i.e., a portion of a data packet is successfully received by the TCP layer acknowledgement and a portion is not successfully received by the TCP layer acknowledgement), NC _ reset _ SACK (acknowledged by SACK but not successfully received by the ordered acknowledgement, re-upload), and NC _ dupsenttup (unsuccessfully received by the acknowledgement, re-upload).
A part of the data packets are present in both the decoding queue (decoded) and the decoded queue (decoded), because these data packets, although decoded, are valuable for subsequent decoding. And if the data packet does not exist on other queues, the data packet can be directly deleted.
Fig. 8 shows the pending (backing log), decoding (decoding), decoded (decoded) data packet queues in the decoding process, although one data packet may exist in both data packet queues, there is still only one data packet body, and only two different pointers point to the data packet.
The queue mechanism of the network coding layer corresponds to the private control information. As shown in fig. 9, the decoded data packet queue goes from TCP _ ack (i.e. the next byte sequence number expected by the TCP layer) to nxt _ decoded (the next byte sequence number expected to be decoded by the network coding layer); the data packet queue currently being decoded is from nc _ dseq [0] to nxt _ next bytes (i.e., the next byte number expected to be added to the decode queue). The number of bytes that have passed to the TCP layer but have not yet been acknowledged as successfully received is indicated from TCP _ ack to nxt _ kernel (the next byte sequence number expected to be sent to the TCP layer); the nxt _ kernel to nxt _ decoded represents the number of bytes that have been decoded but not passed to the TCP layer; nxt _ decoded to nxt _ seen represent the number of bytes that can be acknowledged ahead of time by the network coding layer but cannot be decoded successfully; where nxt _ seen to nxt _ newbytes indicate the number of bytes that cannot be acknowledged in advance.
The control information jointly forms control information of the network coding layers, each network coding layer is connected with one corresponding set of control information, and the control information comprises control information (only determining one network coding layer connection and connection state), maximum segment length and window expansion information of the data message, decoding parameter information, private control information and queue management information which are connected with the network coding layers.
The three-way handshake process is a process of constructing an NC layer connection control block and initializing some coding and decoding parameters, mainly decoding parameters. The main parameter initialization is therefore at the time of the last control type packet received. As shown in fig. 10, the specific implementation flow of the three-way handshake is as follows:
1) A TCP layer of the Client sends a SYN message, and after an NC layer of the Client receives the SYN message, the NC layer of the Client understands that the Client needs to initiate a connection, so that an NC layer control block needs to be established for the TCP connection, the connection state of the NC layer is set to be NCSYN _ SENT, and then the SYN message is directly SENT to a Server;
2) After receiving the SYN message of the Client, the NC layer of the Server understands that one Client requests a connection, therefore, an NC layer control block is also required to be established for the connection, the connection state of the NC layer is set to be NCSYN _ RECV, and then the SYN message is sent to the TCP layer;
3) A TCP layer of the Server sends a SYN + ACK message, and after an NC layer of the Server receives the message, the connection state of the NC layer is set as NCSYN _ ACK _ SENT, and the message is directly SENT to the Client;
4) The NC layer of the Client receives a SYN + ACK message sent by the Server, firstly, the NC connection state is set as NCSYN _ ACK _ RECV, because the message is the last control message before the Client receives the message with data, decoding parameters connected with the NC layer need to be initialized, the decoding parameters comprise the byte sequence number of the NC layer which is expected to be added into a decoding queue next time, the byte sequence number of the next expected 'seen', the byte sequence number of the next expected to be decoded and the byte sequence number which is expected to be transmitted to the kernel next time, and the byte sequence numbers are equal to the sequence number of the current SYN + ACK data packet plus 1 and further comprise the ACK sequence number of the far end and the size of a receiving window. Then directly transmitting the message to a TCP layer;
5) the TCP layer of the Client sends an ACK message to indicate that SYN + ACK is received, and in the NC layer, the NC connection state is set to NCESTABI L ISHED at first, then a NC message header is added to the current ACK message, and then the current ACK message is sent to the Server;
6) the NC layer of the Server judges the difference between the ACK message and the ACK message when transmitting data when receiving the ACK message, and the NC layer needs to judge by combining the states, namely if the NC connection state is NCSYN _ ACK _ SENT and the ACK message is received, the ACK message is a message of the third handshake, firstly, the NC connection state is set to NCESTABI L ISHED;
based on the above operation, the negotiation operation of three-way handshake is completed, and the NC layer connection of Server and Client is in NCESTABI L ISHED state, so that the transmitted coding and decoding operation can be performed.
The process of four hands-off is actually the process of releasing the resources of the NC layer and connecting the control blocks. As shown in fig. 11, the main procedure is described by taking the Client first sending FIN packet as an example:
1) A TCP layer of a Client sends a FIN message, when a local NC layer receives the FIN message, a FIN data packet is firstly placed on the NC layer, all data messages in a sending queue are waited to be confirmed, when all the data messages are confirmed, the sending queue connected with the NC is emptied, the connection state is NCFIN _ WAIT _1, and the FIN message is sent to a Server;
2) When receiving a FIN message sent by a Client, an NC layer of a Server checks whether a data packet in a local decoded data packet queue is not sent to a TCP layer, if so, the data packet is sent to the TCP layer immediately, when the TCP layer confirms all the data packets, the NC layer empties the queue related to decoding, the connection state is NCFIN-RECV, and the FIN message is transmitted to the TCP layer;
3) the TCP layer of the Server sends an ACK message, when the current NC connection state is judged to be NCFIN _ RECV and the ACK message is sent, the ACK message is confirmed to be a FIN message sent by a counter end, the NC connection state is set to be NC _ C L OSEWAIT, and the ACK message is directly sent to the Client;
4) The NC layer of the Client receives the ACK message, when the current NC connection state is judged to be NCFIN _ WAIT _1 and the received ACK message is ACK message, the confirmation of the sent FIN message is shown, the NC connection state is set to be NCFIN _ WAIT2, and the ACK message is directly sent to the TCP layer;
5) the TCP layer of the Server sends a FIN message, when the local NC layer receives the FIN message, a FIN data packet is firstly placed on the NC layer, all data messages in a sending queue are waited to be confirmed, when all the data messages are confirmed, the sending queue connected with the NC is emptied, the connection state is NC L AST _ ACK, and the FIN message is sent to the Client;
6) when receiving a FIN message sent by a Server, an NC layer of a Client firstly checks whether a data packet in a local decoded data packet queue is not sent to a TCP layer, if so, the data packet is sent to the TCP layer immediately, when the TCP layer confirms all the data packets, the NC layer clears the queue related to decoding, the connection state is NC L AST _ ACK _ RECV, and the FIN message is transmitted to the TCP layer;
7) the TCP layer of the Client sends an ACK message, when the current NC connection state is judged to be NC L AST _ ACK _ RECV and the ACK message is sent, the confirmation of the FIN message sent by the opposite end is shown, the NC connection state is set to be NCTIME _ WAIT, and the ACK message is directly sent to the Server;
8) the NC layer of the Server receives the ACK message, when the current NC connection state is judged to be NC L AST _ ACK and the received ACK message is ACK message, the confirmation of the sent FIN message is shown, the NC connection state is set to be NCC L OSED, the ACK message is directly sent to the TCP layer, and all resources of the control block of the NC layer and information of the control block are released;
9) after waiting for two maximum segment lifetime times, the Client sets the NC connection state as NCC L OSED, and releases all resources of the NC layer control block and control block information.
the network coding layer must perform the coding operation of the data packet in the ncisetabi L idle state, and the specific implementation flow is shown in fig. 12:
1) In the process of establishing the connection, the transmitting and receiving parties negotiate whether the TCP stream carries out network coding or not, and set a corresponding identifier of a connection control block;
2) establishing network coding layer connection through three-way handshake, and ensuring the connection of the network coding layer to be in a NCESTABI L ISHED state;
3) When the TCP layer needs to send an original TCP data message, the processing method of the network coding layer is as follows: 1) judging whether the message is a control message or a message carrying data, and if the message is the control message, directly entering 4); 2) caching the data message into a sliding window, and sliding the current coding window backwards by one message; 3) setting NUM to NUM + R (where R is the current adaptively adjusted redundancy, derived directly from the control information of the connection), and generating The coded data message is formed by linear combination of messages of the current coding window, and the corresponding coding head is filled, and the setting is carried out 4) And sending the coded message to an IP layer for processing.
The implementation process of the self-adaptive redundancy algorithm comprises the following steps:
1) At a sending end, when data is sent, a serial number is added to a data message which reaches a network coding layer by a TCP layer, the serial number is different from the TCP serial number, the retransmission message and a normal message are not distinguished, whether data exists or not is not distinguished, and the data message is uniformly numbered as long as the data message is connected with the TCP and is written into a data packet network coding header.
2) At a receiving end, determining a calculation interval (generally 100 data packets) for calculating the packet loss rate; when receiving data, the packet loss rate is calculated every 100 sequence numbers according to the sequence number value in the network coding header, and the current packet loss rate is written in the network coding header of the ACK message.
3) And after receiving the ACK message, the sending end reads the packet loss rate loss _ rate calculated by the receiving end and calculates the redundancy according to the packet loss rate. The redundancy calculation formula is as follows:
Wherein m and n are coefficients; typically m is 1.1 and n is 1.
The specific implementation flow of the decoding flow is shown in fig. 13:
1) In the process of establishing the connection, the transmitting side and the receiving side negotiate whether the TCP stream is subjected to network coding or not, and a corresponding mark of a TCP connection control block is set;
2) When receiving the data message transmitted upwards by the IP layer, the processing method of the network coding layer comprises the following steps: 1) judging whether the message is a control message or a message carrying data, and if the message is the control message, directly entering 5); 2) caching the data message into a data message queue (backing log) to be processed, 3) adding the data message in the data message queue (backing log) to a data message queue (decoding) being decoded, and obtaining a corresponding decoding matrix according to a coding coefficient vector of the data message in the current decoding queue; 4) gaussian elimination is carried out on the decoding matrix, and corresponding 'see' and 'decoded' messages are obtained from the matrix after the Gaussian elimination; 5) if a new 'seen' message exists, sending a corresponding ACK message; 6) updating the data message in the decoding queue according to the matrix and the transformation matrix of the Gaussian elimination; 7) and sending the decoded data message to a TCP layer for processing.
3) When the TCP layer feeds back the ACK packet to the sending end, the ACK sequence number and the receiving window value need to be modified according to the decoding information of the local network coding layer, and then the ACK packet is sent out.
When the TCP layer feeds back an ACK message to the sending end, the original ACK message confirms the successfully received byte sequence number confirmed by the TCP. After the network coding layer is introduced, through coding transmission, even if the network coding layer cannot decode the corresponding data message, as long as the network coding layer is ensured to carry the data message in the ' seen ' state, the subsequent coding message can decode the data message even if the subsequent coding message does not contain the data message information and as long as enough information after the message is contained, so that the network coding layer actually confirms that the byte sequence number of the expected seen ' state next time is the next time. For an ACK packet sent by the TCP layer, the ACK acknowledgment number needs to be modified to an nxt _ seen sequence number, and meanwhile, the corresponding window value also needs to be modified. Theoretically, the modified window value is equal to the overhead of the window value size in the current original ACK message minus the number of bytes acknowledged ahead (nxt _ seen-tcp _ ACK). In the actual implementation process, the calculation expression of the window value (nc _ reviwnd) is as follows:
nc_recvwnd=tcp_wnd-[(nxt_seen-tcp_ack)+num_ncpkt*overhead]
The TCP _ wnd represents the window value of the original ACK packet of the TCP layer, num _ ncpkt represents the number of data packets that need to be confirmed in advance in the network coding layer, and overhead represents the overhead of an extra window that each data packet of the network coding layer may occupy, including an IP layer header, an MAC layer header, a data packet structure overhead, and the like.
in order to verify the beneficial effects of the invention, the actual measurement scene framework of the invention is shown in FIG. 14, two L inux network management server channel simulation devices are connected, two L inux gateways are respectively connected with one Windows computer, and the two Windows computers transmit data through the corresponding L inux gateway servers.
And (3) a broadband actual measurement result: considering two different bandwidths of 100Mbps and 20Mbps, five packet loss rates of 0%, 3%, 5%, 10% and 20%, and two time delay scenarios of 100ms and 1000ms, the end-to-end reliable information transmission rate of two Windows computers is tested. Specific test results are shown in tables 1 and 2.
TABLE 1 Bandwidth 100Mbps Performance test comparison
TABLE 2 Bandwidth 20Mbps Performance test comparison
And (4) test conclusion: from the above test results, it can be seen that the conventional TCP protocol has a sharp deterioration in transmission rate when the transmission environment deteriorates and the packet loss rate increases. As shown in table 2, when the bandwidth is 20Mbps, the packet loss rate changes from 0% to 3%, and the transmission performance decreases by about 29 times. When a network coding protocol is used, the packet loss rate cannot be rapidly reduced due to the increase of the packet loss rate, and the transmission rate can be well guaranteed. As shown in table 1, when the bandwidth is 100Mbps and the RTT is 100ms, and the packet loss rate is 10% or less, the transmission rate of the network coding technique is 50Mbps or more, and even if the packet loss rate is 20%, the transmission rate can still be stabilized at 32 Mbps. Comparing table 1 and table 2, it can be seen that, after the network packet loss occurs, the transmission performance of the conventional TCP protocol basically has no relation with the bandwidth, and the bottleneck of the transmission performance is the network packet loss. The network coding technology can better overcome the adverse effect of network packet loss on the transmission performance and improve the bandwidth utilization rate.
And (3) narrow-band actual measurement result: the reliable information transmission rate from end to end is tested by aiming at 2 different bandwidths of 1Mbps,512Kbps and the like, 5 packet loss rates of 0%, 3%, 5%, 10%, 20% and the like, and two delay configurations of 100ms and 1000 ms. Specific test results are shown in tables 3 and 4.
TABLE 3 Bandwidth 1Mbps Performance test comparison
TABLE 4 comparison of Bandwidth 512Kbps Performance test
And (4) test conclusion: from the above test results, it can be seen that, under a narrow-band condition, when a transmission environment of the conventional TCP protocol deteriorates and a packet loss rate increases, a transmission rate may deteriorate sharply, and in a case of a high packet loss rate, the deterioration condition is more serious. As shown in table 4, when the bandwidth is 512Kbps, the packet loss rate changes from 10% to 20%, and the transmission performance decreases by approximately 9 times. When a network coding protocol is used, the transmission rate can be well maintained under the condition of high packet loss rate. As shown in table 4, when the bandwidth is 512Kbps and RTT is 100ms, and the packet loss rate is 20%, the transmission rate can still reach 240 Kbps. Compared with the test data of the traditional TCP protocol and the network coding protocol, the network coding technology can better overcome the adverse effect of network packet loss on the transmission performance under the low bandwidth configuration, and improve the bandwidth utilization rate.
And (5) dynamically changing the actual measurement result of the network bandwidth. The verification method comprises the following steps: the initial bandwidth is 1Mbps, the bandwidth is increased by 2Mbps every 30s, and after the bandwidth is increased to 11Mbps, the bandwidth is decreased by 2Mbps every 30s, and the test result is shown in fig. 15.
And (4) test conclusion: as can be seen from the above test results, when the network packet loss rate is 5%, although the bandwidth is large enough, the transmission rate of the conventional TCP transmission protocol is still low. When a network coding protocol is configured, the transmission performance is obviously improved, and the transmission rates of different time periods are consistent with the corresponding bandwidth, so that the bandwidth utilization rate is improved. But the average rate of the traditional TCP transmission protocol is always small, which indicates that the bandwidth utilization rate of the traditional TCP protocol is low.
And dynamically changing the actual measurement result of the network packet loss rate. Aiming at the scenes of two bandwidths of 1Mbps and 20Mbps and 100ms delay, the influence of dynamic change on the end-to-end information transmission rate under the four conditions of 3%, 5%, 10% and 20% of packet loss rate is tested. The specific test scenario configuration of the dynamic change of the packet loss rate is as follows: 0-60 s, and the packet loss rate is 3%; 60-120 s, and the packet loss rate is 5%; 120-180 s, and the packet loss rate is 10%; the packet loss rate is 20% in 180-240 s, and the specific test result is shown in fig. 16.
And (4) test conclusion: from the above test results, it can be seen that, in the conventional TCP transmission protocol, when there is packet loss in the network, the transmission rate is much smaller than the bandwidth, and when the transmission environment deteriorates and the packet loss rate increases, the transmission rate deteriorates. When a network coding protocol is configured, the transmission performance of the network coding protocol is obviously better than that of an unreinforced TCP (transmission control protocol), the average transmission rate of the network coding protocol is not sharply reduced, the transmission rate can be well ensured, and the bandwidth utilization rate is higher.
Claims (3)
1. An adaptive end-to-end network coding transmission method is characterized by comprising the following steps:
At the transmitting end
1) During the process of establishing TCP connection, the transmitting and receiving parties negotiate whether the transmission control protocol stream carries out network coding, if the transmission control protocol stream carries out network coding, a corresponding network coding layer control block is established, control information is initialized, and a corresponding mark of the transmission control protocol connection control block is set;
2) When the transmission control protocol layer sends a TCP data message, the processing method of the network coding layer is as follows:
(1) Searching a corresponding network coding layer connection control block according to the TCP data message, if the corresponding network coding layer connection control block can be found, indicating that network coding operation needs to be executed, and executing the step (2); if the corresponding network coding layer connection control block is not found, the TCP data message is sent out through the Internet protocol layer without executing the network coding;
(2) Judging whether the TCP data message is a TCP data message containing control information or a TCP data message carrying data, if the TCP data message is the TCP data message containing the control information, the network coding operation is not required to be executed, and the TCP data message is sent out through an internet protocol layer;
(3) Caching a TCP data message carrying data into a sliding window, and sliding a current coding window backwards to form a TCP data message carrying data;
(4) Setting a coding counter NUM to NUM + R, wherein R is the current adaptive redundancy and generates A network coded data message formed by linear combination of TCP data messages carrying data of the current coding window fills the corresponding network coded data message header, here Representing the number of the network coding data messages needing to be generated; and updating the encoding counter
(5) Sending the network coding data message to an internet protocol layer, and sending the network coding data message out through the internet protocol layer and a data link layer;
3) When receiving the ACK message fed back by the receiving end, the following processing method is carried out:
(1) According to the confirmation sequence number in the confirmation ACK message, operating the sending queue of the sending end, and deleting the TCP data message of which the byte sequence number is smaller than the confirmation sequence number from the sending queue;
(2) According to the receiving information of the receiving end in the header of the feedback acknowledgement ACK message, self-adaptive packet loss rate estimation and redundancy adjustment are carried out;
(3) Modifying the feedback ACK message into a format conforming to the TCP data message, and transmitting the modified ACK message to a transmission control protocol layer;
At the receiving end
1) During the process of establishing TCP connection, the transmitting and receiving parties negotiate whether the transmission control protocol stream carries out network coding, if the transmission control protocol stream carries out network coding, a corresponding network coding layer control block is established, control information is initialized, and a corresponding mark of the transmission control protocol connection control block is set;
2) When receiving the data message transmitted upwards by the internet protocol layer, the processing method of the network coding layer is as follows:
(1) Searching a corresponding network coding layer connection control block according to the data message, if the corresponding network coding layer connection control block can be found, indicating that network decoding operation needs to be executed, and executing the step (2); if the corresponding network coding layer connection control block cannot be found, the network coding layer connection control block indicates that the network decoding operation is not required to be executed, and the data message is sent to a transmission control protocol layer;
(2) Judging whether the data message is a data message only containing control information or a data message carrying data, and if the data message is the data message only containing the control information, sending the data message to a transmission control protocol layer;
(3) Caching data messages carrying data into a correspondingly connected data message queue backlog to be processed, wherein the backlog represents the data messages to be processed;
(4) Judging whether the data messages in the data message queue backlog to be processed contain the information of the next TCP data message expected to be decoded one by one; if so, acquiring a decoding coefficient vector of the data message, and adding the data message into a data message queue decoding which is decoding, wherein the decoding indicates that the data message is being decoded;
(5) Obtaining a decoding coefficient matrix according to a decoding coefficient vector of a data message in decoding of a data message queue, performing Gaussian elimination on the decoding coefficient matrix, and obtaining a corresponding 'see' and a 'decoded' TCP data message from the decoding coefficient matrix after the Gaussian elimination; wherein "see" indicates that when one TCP datagram is represented by a linear combination of other TCP datagrams with higher sequence numbers than that of the TCP datagram, the TCP datagram is considered to be "see" and "decoded" indicates that when one row of the decoding coefficient matrix after gaussian elimination has only one element of 1, the TCP datagram is considered to be "decoded" and added to the decoded datagram queue;
(6) If a new 'seen' TCP data message exists, sending a corresponding ACK message;
(7) Sending the TCP data message in the decoded data message queue to a transmission control protocol layer for processing;
3) When a new 'seen' TCP data message exists, information that a network coding layer of a receiving end receives successfully needs to be fed back, and the process depends on a transmission control protocol layer to send an acknowledgement ACK message; when the transmission control protocol layer sends an ACK message:
(1) Updating the ACK sequence number to a corresponding network coding layer connection control block according to the ACK sequence number in the ACK message sent by a transmission control protocol layer, and deleting the ACK sequence number for the data message in the decoded data message queue;
(2) Calculating the window value of the network coding layer according to the transmission control protocol layer confirmation number and the window value;
(3) Modifying the network coding layer acknowledgement number and the window value into an acknowledgement ACK message, and then sending out;
The redundancy adjusting method comprises the following steps:
At a sending end, adding a serial number to a TCP data message reaching a network coding layer by a transmission control protocol layer during data sending, wherein the serial number does not distinguish a retransmitted TCP data message from a normal TCP data message and does not distinguish whether the TCP data message has data or not, and the TCP data message connected by the transmission control protocol is uniformly numbered and written into a data packet network coding header;
At a receiving end, firstly determining a calculation interval for calculating the packet loss rate; when receiving data, calculating the packet loss rate once every 100 sequence numbers according to the sequence number value in the network coding header, and writing the current packet loss rate in the network coding header of the ACK message;
After receiving the ACK packet, the sending end reads the packet loss rate loss _ rate calculated by the receiving end, and calculates the redundancy according to the packet loss rate, where the redundancy R is calculated by the following formula:
Wherein m and n are constants.
2. The adaptive end-to-end network coding transmission method according to claim 1, wherein the network coding layer connection of the sending end and the network coding layer connection of the receiving end both correspond to a set of network coding layer control information, including control information of the network coding layer connection, a network coding layer connection state, a maximum segment length MSS of the TCP data packet, window extension information, decoding parameter information, private control information, and queue management information.
3. The adaptive end-to-end network coding transmission method of claim 1, wherein the sliding method of the sliding window is: and maintaining a TCP data message queue participating in network coding on a network coding layer of a sending end, and selecting the latest received TCP data message and the 4 TCP data messages before the latest received TCP data message for network coding and then transmitting the latest received TCP data message and the 4 TCP data messages when the TCP data message needs to be subjected to network coding transmission each time.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710588600.8A CN107508655B (en) | 2017-07-19 | 2017-07-19 | Self-adaptive end-to-end network coding transmission method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710588600.8A CN107508655B (en) | 2017-07-19 | 2017-07-19 | Self-adaptive end-to-end network coding transmission method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107508655A CN107508655A (en) | 2017-12-22 |
CN107508655B true CN107508655B (en) | 2020-08-07 |
Family
ID=60679835
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710588600.8A Expired - Fee Related CN107508655B (en) | 2017-07-19 | 2017-07-19 | Self-adaptive end-to-end network coding transmission method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107508655B (en) |
Families Citing this family (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110166166B (en) * | 2018-02-14 | 2022-01-28 | 瑞昱半导体股份有限公司 | Network data processing device and method |
CN110299972A (en) * | 2018-03-23 | 2019-10-01 | 天地融科技股份有限公司 | A kind of data transmission method for uplink and device |
CN110299969B (en) * | 2018-03-23 | 2022-04-08 | 天地融科技股份有限公司 | Method and device for transmitting data in rolling mode |
CN110299970B (en) * | 2018-03-23 | 2022-04-05 | 天地融科技股份有限公司 | Data message sending method and device |
CN109088874A (en) * | 2018-08-21 | 2018-12-25 | 北京睦合达信息技术股份有限公司 | A kind of data transmission method and equipment |
CN109862061A (en) * | 2018-09-29 | 2019-06-07 | 中国民航科学技术研究院 | A kind of load system and method for WQAR data distribution |
CN109714132B (en) * | 2019-01-23 | 2021-04-20 | 中国电子科技集团公司第二十八研究所 | Multi-link anti-interference real-time transmission method used in complex electromagnetic environment |
CN110048818B (en) * | 2019-05-05 | 2020-06-23 | 华中科技大学 | Feedback information confirmation and processing system and processing method for TID of user |
CN110138680B (en) * | 2019-05-08 | 2022-08-23 | 京信网络系统股份有限公司 | Method and device for discarding packet of PDCP queue and base station equipment |
CN110324255B (en) * | 2019-07-05 | 2021-01-29 | 中南大学 | Data center network coding oriented switch/router cache queue management method |
US11528342B2 (en) | 2019-10-02 | 2022-12-13 | APS Technology 1 LLC | Invoking a random linear network coding communications protocol |
CN110830819B (en) * | 2019-11-19 | 2022-03-25 | 聚好看科技股份有限公司 | Encoding method, decoding method, encoding end and decoding end |
CN111343668B (en) * | 2020-03-03 | 2022-05-03 | 重庆邮电大学 | Coding sensing routing method based on backpressure strategy |
CN111404650B (en) * | 2020-03-17 | 2023-05-19 | 许昌泛网信通科技有限公司 | Vehicle control message processing method |
CN112436920B (en) * | 2020-11-23 | 2021-10-26 | 南通大学 | Network coding and decoding method suitable for multi-hop relay communication |
CN113064047B (en) * | 2021-03-05 | 2024-03-08 | 万向一二三股份公司 | Testing device and testing method for end-to-end protection between electronic control units |
CN115134047B (en) * | 2021-03-29 | 2024-09-13 | 维沃移动通信有限公司 | Transmission method, apparatus, device, and readable storage medium |
CN115240636A (en) * | 2021-04-20 | 2022-10-25 | 华为技术有限公司 | Text reading method and equipment |
CN114363370B (en) * | 2021-12-29 | 2023-12-26 | 中汽创智科技有限公司 | Vehicle-mounted device communication method, device and system and vehicle |
CN114938235B (en) * | 2022-04-08 | 2023-05-30 | 北京邮电大学 | Satellite network data transmission method and device integrating multipath and network coding |
CN115134307B (en) * | 2022-06-27 | 2024-01-26 | 长沙理工大学 | Load balancing method based on packet loss rate coding in cloud computing |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102111820A (en) * | 2009-12-29 | 2011-06-29 | 上海摩波彼克半导体有限公司 | Method for realizing scheduling control of network encoding perceived by transmission control protocol in wireless network |
CN102209079A (en) * | 2011-06-22 | 2011-10-05 | 北京大学深圳研究生院 | Transmission control protocol (TCP)-based adaptive network control transmission method and system |
CN102291226A (en) * | 2011-09-02 | 2011-12-21 | 北京大学深圳研究生院 | Self-adaptive network transmission control method and system based on TCP (Transmission Control Protocol) protocol |
US8130776B1 (en) * | 2009-08-28 | 2012-03-06 | Massachusetts Institute Of Technology | Method and apparatus providing network coding based flow control |
CN103152359A (en) * | 2013-03-25 | 2013-06-12 | 重庆大学 | Method for improving end-to-end wireless transmission control protocol (TCP) linear network coding |
-
2017
- 2017-07-19 CN CN201710588600.8A patent/CN107508655B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8130776B1 (en) * | 2009-08-28 | 2012-03-06 | Massachusetts Institute Of Technology | Method and apparatus providing network coding based flow control |
CN102111820A (en) * | 2009-12-29 | 2011-06-29 | 上海摩波彼克半导体有限公司 | Method for realizing scheduling control of network encoding perceived by transmission control protocol in wireless network |
CN102209079A (en) * | 2011-06-22 | 2011-10-05 | 北京大学深圳研究生院 | Transmission control protocol (TCP)-based adaptive network control transmission method and system |
CN102291226A (en) * | 2011-09-02 | 2011-12-21 | 北京大学深圳研究生院 | Self-adaptive network transmission control method and system based on TCP (Transmission Control Protocol) protocol |
CN103152359A (en) * | 2013-03-25 | 2013-06-12 | 重庆大学 | Method for improving end-to-end wireless transmission control protocol (TCP) linear network coding |
Also Published As
Publication number | Publication date |
---|---|
CN107508655A (en) | 2017-12-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107508655B (en) | Self-adaptive end-to-end network coding transmission method | |
US7411903B2 (en) | Method of generating transmission control parameters and method of selective retransmission according to packet characteristics | |
JP5591708B2 (en) | Method, system and apparatus for improving multicast reliability | |
KR100785293B1 (en) | System and Method for TCP Congestion Control Using Multiple TCP ACKs | |
Xu et al. | CMT-NC: improving the concurrent multipath transfer performance using network coding in wireless networks | |
US8169914B2 (en) | Method and node for transmitting data over a communication network using negative acknowledgment | |
JP4834072B2 (en) | Block acknowledgment protocol for wireless packet networks | |
US7502860B1 (en) | Method and apparatus for client-side flow control in a transport protocol | |
US7301928B2 (en) | Wireless packet transfer apparatus and method | |
JP2003521155A (en) | Wireless network system and method | |
EP2437421B1 (en) | Method, device and communication system for retransmitting based on forward error correction | |
CN107547436B (en) | Coding and decoding method of transmission control protocol based on network coding | |
WO2016045332A1 (en) | Method and device for encoding parameter adjustment and feedback information processing | |
WO2002100067A1 (en) | Real-time packetization and retransmission in streaming applications | |
WO2012045049A1 (en) | Block acknowledgement with retransmission policy differentiation | |
US9900802B2 (en) | Data transmission method and apparatus, base station, and user equipment | |
JP2014509483A (en) | Mechanisms to improve the performance of transmission control protocols in wireless networks | |
KR20040023568A (en) | Forward error correction system and method for packet based communication systems | |
Raman et al. | ITP: An image transport protocol for the internet | |
EP1787419A1 (en) | Signalling a state of a transmission link via a transport control protocol | |
CN102013962B (en) | Data transmission method and equipment | |
CN114745042A (en) | Method and device for transmitting data of broadband and narrowband integrated satellite network | |
WO2017219216A1 (en) | Data transmission method, and related device and system | |
Shamieh et al. | Dynamic cross-layer signaling exchange for real-time and on-demand multimedia streams | |
CN108769000B (en) | High-efficiency streaming media transmission method for deep space environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20200807 Termination date: 20210719 |