Data packet loss reduction method and system
By combining retransmission, forward error correction, and network coding techniques, and dynamically adjusting redundant information and retransmission strategies, the problem of packet loss in high packet loss network environments is solved, achieving efficient packet recovery and improved robustness.
Patent Information
- Application Number
- CN202511924379.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-03-17
AI Technical Summary
Existing packet loss recovery methods suffer from significant performance bottlenecks in network environments with high packet loss rates and high latency. Current technologies, which rely on retransmission mechanisms, forward error correction, and network coding, still suffer from inefficiency.
By combining retransmission mechanisms, forward error correction technology, and network coding technology, redundant information and retransmission strategies are dynamically adjusted by monitoring network status. Lost data packets are selectively retransmitted, and at the receiving end, redundant data is generated through network coding to recover the lost packets.
It improves the efficiency of packet loss recovery, reduces network bandwidth waste, enhances overall system performance, reduces communication latency, and improves robustness.
Smart Images

Figure CN121691104A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communications, and in particular to a method and system for restoring packet loss during data transmission, which is used in network communications under high packet loss environments to ensure the integrity and reliability of data transmission. Background Technology
[0002] Packet loss recovery methods refer to the techniques used in network communication to recover lost data packets when they are lost during transmission, ensuring the integrity and reliability of communication. These methods are typically used to guarantee accurate data transmission, especially in unstable network environments. The most common packet loss recovery method is to request retransmission of lost data packets. After detecting packet loss, the receiving end sends a packet loss notification to the sending end, requesting the sending end to retransmit the lost packets. This method is usually managed by the protocol. Forward Error Correction (FEC) technology adds redundant information when sending data, enabling the receiver to recover lost data even in the event of packet loss. This redundant data helps the receiver recover the lost parts. Common FEC techniques include Hamming codes and Reed-Solomon coding. In transmission protocols, the sender and receiver use sequence numbers to identify each data packet. The receiver acknowledges the received packets and sends feedback to the sender. The sender can determine whether there is packet loss based on the acknowledgment information and thus retransmit. Network coding is an advanced technique that can generate new data packets by mixing the contents of multiple data packets. The receiver can obtain the original data by decoding. Even if some packets are lost, this method improves network robustness and reduces the number of retransmissions required.
[0003] However, while existing packet loss recovery methods can effectively solve the data loss problem in many cases, they also have some defects or limitations. In current data communication processes, especially in cases of poor network quality or high packet loss rate, packet loss is a common phenomenon. Existing packet loss recovery methods mainly rely on retransmission mechanisms, forward error correction technology and network coding technology. Although these technologies can alleviate the packet loss problem to a certain extent, they still have significant performance bottlenecks in network environments with high packet loss rate and high latency. Summary of the Invention
[0004] To address the shortcomings of existing technologies, the present invention aims to provide a data packet loss recovery method and system. By combining retransmission mechanisms, forward error correction technology, and network coding technology, and adaptively adjusting redundant information and retransmission strategies according to the real-time network status, the method effectively improves the efficiency of data packet loss recovery, reduces network bandwidth waste, and enhances the overall performance of the system.
[0005] The technical solution adopted by this invention to solve its technical problem is:
[0006] A method for restoring lost data packets includes:
[0007] Step 1: Monitor network status, including but not limited to packet loss rate, latency, and bandwidth parameters;
[0008] Step 2: Based on the network status, dynamically adjust the amount of forward error correction redundancy data. When the packet loss rate is low, reduce the transmission of redundant data; when the packet loss rate is high, increase the amount of redundant data.
[0009] Step 3: When packet loss is detected, a selective retransmission strategy is adopted, that is, only the lost packets are retransmitted, rather than all packets;
[0010] Step 4: If the network environment allows, combine network coding technology to generate redundant data by encoding the data packets, so that the receiver can use the redundant data to recover the lost packets;
[0011] Step 5: The receiver identifies, judges, and recovers the lost data packets based on the received data packets and redundant data.
[0012] As a preferred method, the following methods are used to monitor network status, including but not limited to packet loss rate, latency, and bandwidth parameters:
[0013] Packet loss rate represents the proportion of data packets lost during data transmission out of the total number of data packets sent. The formula for calculating packet loss rate is:
[0014]
[0015] The number of lost data packets refers to the number of data packets that failed to reach the receiving end during network transmission.
[0016] The number of data packets sent is the total number of data packets that have been sent in the network;
[0017] Latency is the time required for data to be transmitted from the source to the destination. The round-trip time is calculated using the following formula:
[0018]
[0019] The sender timestamp is the time when the data packet was sent from the source.
[0020] The receiver timestamp is the time when the data packet returns after arriving at the receiver.
[0021] One-way delay calculation formula:
[0022]
[0023] Bandwidth represents the amount of data that can be transmitted per unit of time in a network. The formula for calculating bandwidth is:
[0024]
[0025] The amount of data transmitted refers to the total amount of data transmitted over the network.
[0026] Transmission time is the time required for data transmission to complete, measured in seconds.
[0027] The comprehensive network status monitoring calculates these parameters individually, and also combines multiple parameters to assess network quality. The comprehensive assessment formula is as follows:
[0028]
[0029] in, To provide a comprehensive network quality score;
[0030] , , These are weighting coefficients, which can be adjusted according to actual needs.
[0031] For packet loss rate, Round trip time, For bandwidth.
[0032] As a preferred approach, the amount of forward error correction redundancy data is dynamically adjusted based on network conditions. When the packet loss rate is low, the transmission of redundant data is reduced; when the packet loss rate is high, the amount of redundant data is increased.
[0033] Set redundant data amount The ratio of redundant data in forward error correction to the original data is expressed as:
[0034]
[0035] in, The proportion of redundant data;
[0036] Packet loss rate;
[0037] and These are weighting coefficients that control how redundant data is adjusted.
[0038] When the packet loss rate is low, the system reduces and Reduce the transmission of redundant data;
[0039] When the packet loss rate is high, the system increases and The value;
[0040] Low packet loss rate scenarios :set up The proportion of redundant data Smaller:
[0041]
[0042] set up ,but:
[0043]
[0044] That is, the proportion of redundant data is approximately 10.1%;
[0045] High packet loss scenarios :set up The proportion of redundant data High;
[0046]
[0047] set up ,but:
[0048]
[0049] That is, the proportion of redundant data is 55%;
[0050] Regarding changes in packet loss rate and the proportion of redundant data Real-time adjustments, setting thresholds to determine when to add or remove redundant data:
[0051] If the packet loss rate is less than 1% The proportion of redundant data It is 10%;
[0052] If the packet loss rate is between 1% and 5% The proportion of redundant data Increase to 20%-30%;
[0053] If the packet loss rate is greater than 5% The proportion of redundant data Reaching 50% or higher.
[0054] As a preferred approach, when packet loss is detected, a selective retransmission strategy is employed, that is, only the lost packets are retransmitted, rather than all packets.
[0055] The sending end divides the data packet into multiple data packets marked with sequence numbers, and then sends them to the receiving end;
[0056] After receiving the data packet, the receiving end sends an acknowledgment signal to the sending end;
[0057] The sender waits for confirmation from the receiver. If no confirmation is received or the confirmation times out, the lost data packet is retransmitted.
[0058] The receiving end determines the received data packet based on the sequence number of the data packet. If a data packet is lost or erroneous, no acknowledgment is sent, and only the lost data packet is retransmitted.
[0059] Set the sequence number sent by the sender to be , ,..., After receiving the data packet, the receiving end sends an acknowledgment packet. This indicates that the sequence number has been successfully received. Data packets;
[0060] If the receiving end does not receive the data packet Skip the sequence number and wait for the lost data packet to be retransmitted;
[0061] The receiving end sends an acknowledgment packet. This indicates that the serial number was successfully received. For lost data packets The receiving end does not send an acknowledgment, so the sending end retransmits the lost data packet after detecting a timeout.
[0062]
[0063] The sender sets a timeout period. If no acknowledgment of a specific data packet is received within this time, the data packet will be retransmitted.
[0064]
[0065] in, The time after the data packet was sent;
[0066] Selective retransmission also requires setting a window size. This represents the maximum number of data packets that the sending end can continuously send;
[0067] The process of selective retransmission algorithm:
[0068] The sending end sends data packets sequentially and assigns a unique sequence number to each data packet. , ,...;
[0069] After receiving the data packet, if the data packet is correct, the receiving end sends an acknowledgment packet. Otherwise, continue waiting;
[0070] If the sender detects an acknowledgment packet for a certain data packet If the data packet does not arrive within the timeout period, the lost data packet will be retransmitted.
[0071] The receiving end uses a sliding window method to receive and acknowledge data packets. After receiving a correct data packet, it acknowledges it and slides the window.
[0072] As a preferred option, if the network environment permits, a method can be adopted whereby network coding technology is used to encode data packets to generate redundant data, allowing the receiver to recover the lost packets using the redundant data.
[0073] Set up a set of data packets , ,..., It will be sent, and through network encoding, a set of redundant data packets will be generated. , ,..., Redundant data packets It is a certain encoding combination of the original data packet;
[0074] A simple linear network coding method is adopted, which uses a linear combination of the original data packets as a method for generating redundant data:
[0075]
[0076] in, For redundant data packets, ,2,..., ;
[0077] The coding coefficients are randomly selected from a finite field;
[0078] For the original data packet, ,2,..., ;
[0079] The size of the finite field used for encoding;
[0080] After receiving the original data packet and the redundant data packet, the receiver uses the same network encoding and decoding strategy to recover the lost data packet;
[0081] The data packets received by the receiver are set as follows: , ,..., , , ,..., The receiver decodes these data packets to recover the lost data;
[0082] The receiver recovers the lost data packets using a decoding matrix and redundant data packets, as shown in the following formula:
[0083]
[0084] in, It is a matrix consisting of coding coefficients, the elements of which are ;
[0085] The vector of the original data packet, containing , ,..., ;
[0086] A vector of redundant data packets, containing , ,..., ;
[0087] Decoding process:
[0088] The receiver constructs a matrix based on the received redundant data packets and the original data packets. and ;
[0089] The receiver solves the matrix equations. Recover lost data packets ;
[0090] Set up 3 data packets , , and 2 redundant data packets , Redundant data packets are generated through linear encoding. The formula for generating redundant data is:
[0091]
[0092]
[0093] If the recipient loses According to the received , and , , restore ;
[0094] The formula for the receiver to recover lost data packets using redundant data packets is:
[0095]
[0096] The receiver recovers the lost data by solving this equation. .
[0097] As a preferred method, the receiver identifies and recovers lost data packets based on the received data packets and redundant data as follows:
[0098] The sender sent raw data packets , ,..., and Redundant data packets , ,..., These data packets are generated using network coding techniques, and redundant data packets are included. It is a linear combination of the original data packets. The data packets received by the receiver contain some lost packets, and the redundant data packets are used to recover the lost data.
[0099] The sender generates redundant data packets. The formula is:
[0100]
[0101] in, For redundant data packets;
[0102] This is the original data packet;
[0103] These are the coding coefficients;
[0104] The size of the finite field used for encoding;
[0105] After receiving the original data packets and redundant data packets, the receiver uses network coding techniques to recover the lost data packets. The receiver then uses the received data... , ,..., The lost packets were recovered from the partially received original data packets;
[0106] The receiver constructs a matrix Each row of the matrix corresponds to the coding coefficients of redundant data packets. :
[0107]
[0108] The receiver, based on the received redundant data packets , ,..., Construct vectors To represent redundant data packets:
[0109]
[0110] The receiver recovers the lost data packets by solving linear equations based on the relationship between the redundant data packets and the original data packets. It is assumed that the receiver received a portion of the data packets. , ,..., The receiver recovers the lost data packets using the received data packets and redundant data packets. , ,..., ;
[0111] The system of linear equations is as follows:
[0112]
[0113] in, It is a matrix composed of coding coefficients;
[0114] This is the vector of the original data packet;
[0115] A vector of redundant data packets;
[0116] If the receiver receives part of the original data packet and enough redundant data packets, the lost data packets can be recovered by solving a system of linear equations. The specific process is as follows:
[0117] The receiver constructs a matrix containing the received data packets and a vector of redundant data packets;
[0118] The receiver uses a system of linear equations Extract the lost original data packets;
[0119] If the number of redundant data packets This is sufficient, and the number of lost original data packets is small, allowing the receiver to recover all lost data packets;
[0120] Redundant data packet generation:
[0121]
[0122] Decoding formula for the receiver to recover lost data packets:
[0123]
[0124] in, The coding coefficient matrix, The original data packet vector, This is a redundant data packet vector;
[0125] By solving the above equations, the receiver recovers the lost data packets. .
[0126] A packet loss recovery system includes:
[0127] Monitoring module: Used to monitor network status, including packet loss rate, latency, and bandwidth information;
[0128] Forward error correction module: used to dynamically adjust the size of forward error correction redundancy information according to network status;
[0129] Retransmission module: Used to retransmit lost data packets when packet loss occurs, using a selective retransmission strategy;
[0130] Network coding module: used to generate redundant data based on packet loss rate and network status, and to recover lost data by decoding at the receiving end;
[0131] Recovery module: Used to receive and process data from the retransmission and encoding module, and recover lost data packets.
[0132] Another technical problem to be solved by the present invention is to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements a data packet loss recovery method and system as described above.
[0133] Another technical problem to be solved by the present invention is to provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a data packet loss recovery method and system.
[0134] The beneficial effects of this invention are:
[0135] This invention can adaptively adjust the amount of redundant information and retransmission strategy according to the real-time monitored network status, avoiding wasting bandwidth under low packet loss rates and improving network transmission efficiency. By combining selective retransmission and network coding, it reduces the amount of redundant data transmitted and the number of retransmissions, thereby effectively reducing communication latency. Combined with forward error correction and network coding technology, it can ensure efficient recovery of data packets under severe network packet loss, improving system robustness. Compared with existing single retransmission or single error correction technologies, this invention can save bandwidth resources and reduce transmission overhead under different network conditions by combining multiple recovery strategies. Attached Figure Description
[0136] Figure 1 This is a schematic diagram of a data packet loss recovery system according to the present invention. Detailed Implementation
[0137] The principles and features of the present invention are described below. The examples given are for illustrative purposes only and are not intended to limit the scope of the invention. The invention is described more specifically by way of example in the following paragraphs. The advantages and features of the invention will become clearer from the following description and claims.
[0138] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0139] Example
[0140] The technical solution adopted by this invention to solve its technical problem is:
[0141] A method for restoring lost data packets includes:
[0142] Step 1: Monitor network status, including but not limited to packet loss rate, latency, and bandwidth parameters;
[0143] Step 2: Based on the network status, dynamically adjust the amount of forward error correction redundancy data. When the packet loss rate is low, reduce the transmission of redundant data; when the packet loss rate is high, increase the amount of redundant data.
[0144] Step 3: When packet loss is detected, a selective retransmission strategy is adopted, that is, only the lost packets are retransmitted, rather than all packets;
[0145] Step 4: If the network environment allows, combine network coding technology to generate redundant data by encoding the data packets, so that the receiver can use the redundant data to recover the lost packets;
[0146] Step 5: The receiver identifies, judges, and recovers the lost data packets based on the received data packets and redundant data.
[0147] By dynamically adjusting the size of redundant data and employing selective retransmission strategies, the amount of redundant data transmitted can be effectively reduced, saving bandwidth resources and avoiding unnecessary data retransmissions. Combined with forward error correction and network coding techniques, the system can still provide high recovery capabilities even with severe network packet loss, ensuring data integrity and reliability. The selective retransmission strategy only retransmits lost data packets, avoiding the bandwidth waste of full retransmission, thereby reducing system latency and improving real-time performance. The system can automatically adjust its strategies based on real-time network conditions (such as packet loss rate and latency), enabling it to maintain high efficiency and robustness in different network environments. By comprehensively using forward error correction, selective retransmission, and network coding techniques, the system can maintain reliable data transmission in complex network environments and recover quickly even if packet loss occurs.
[0148] Methods for monitoring network status, including but not limited to packet loss rate, latency, and bandwidth parameters, include:
[0149] Packet loss rate represents the proportion of data packets lost during data transmission out of the total number of data packets sent. The formula for calculating packet loss rate is:
[0150]
[0151] The number of lost data packets refers to the number of data packets that failed to reach the receiving end during network transmission.
[0152] The number of data packets sent is the total number of data packets that have been sent in the network;
[0153] Latency is the time required for data to be transmitted from the source to the destination. The round-trip time is calculated using the following formula:
[0154]
[0155] The sender timestamp is the time when the data packet was sent from the source.
[0156] The receiver timestamp is the time when the data packet returns after arriving at the receiver.
[0157] One-way delay calculation formula:
[0158]
[0159] Bandwidth represents the amount of data that can be transmitted per unit of time in a network. The formula for calculating bandwidth is:
[0160]
[0161] The amount of data transmitted refers to the total amount of data transmitted over the network.
[0162] Transmission time is the time required for data transmission to complete, measured in seconds.
[0163] The comprehensive network status monitoring calculates these parameters individually, and also combines multiple parameters to assess network quality. The comprehensive assessment formula is as follows:
[0164]
[0165] in, To provide a comprehensive network quality score;
[0166] , , These are weighting coefficients, which can be adjusted according to actual needs.
[0167] For packet loss rate, Round trip time, For bandwidth.
[0168] The solution covers multiple dimensions of indicators such as packet loss rate, latency, and bandwidth, which can comprehensively reflect network performance and is suitable for different scenarios. The weighting coefficients can be adjusted according to actual needs. For example, latency weight can be increased for real-time applications, and bandwidth weight can be increased for file transfers. The parameter measurement method is simple, based on standard protocols, and compatible with existing tools. The comprehensive scoring formula simplifies complex network conditions into a single indicator, which is convenient for monitoring and comparison and is suitable for automated operation and maintenance and alarm systems. By analyzing each parameter, network problems can be quickly located.
[0169] Based on network conditions, the amount of redundant forward error correction data is dynamically adjusted. When the packet loss rate is low, the transmission of redundant data is reduced; when the packet loss rate is high, the amount of redundant data is increased. The method is as follows:
[0170] Set redundant data amount The ratio of redundant data in forward error correction to the original data is expressed as:
[0171]
[0172] in, The proportion of redundant data;
[0173] Packet loss rate;
[0174] and These are weighting coefficients that control how redundant data is adjusted.
[0175] When the packet loss rate is low, the system reduces and Reduce the transmission of redundant data;
[0176] When the packet loss rate is high, the system increases and The value;
[0177] Low packet loss rate scenarios :set up The proportion of redundant data Smaller:
[0178]
[0179] set up ,but:
[0180]
[0181] That is, the proportion of redundant data is approximately 10.1%;
[0182] High packet loss scenarios :set up The proportion of redundant data High;
[0183]
[0184] set up ,but:
[0185]
[0186] That is, the proportion of redundant data is 55%;
[0187] Regarding changes in packet loss rate and the proportion of redundant data Real-time adjustments, setting thresholds to determine when to add or remove redundant data:
[0188] If the packet loss rate is less than 1% The proportion of redundant data It is 10%;
[0189] If the packet loss rate is between 1% and 5% The proportion of redundant data Increase to 20%-30%;
[0190] If the packet loss rate is greater than 5% The proportion of redundant data Reaching 50% or higher.
[0191] In high packet loss scenarios, increasing the proportion of redundant data improves the receiver's ability to recover lost data and reduces retransmission requirements, making it particularly suitable for real-time applications. In low packet loss scenarios, reducing the proportion of redundant data lowers bandwidth overhead and improves transmission efficiency, making it suitable for bandwidth-constrained networks. The dynamic adjustment mechanism adjusts the redundancy ratio according to the real-time packet loss rate, adapting to network fluctuations and ensuring stable performance. FEC avoids the waiting time of traditional retransmission mechanisms, making it suitable for latency-sensitive applications. The weighting coefficients and thresholds can be customized according to application requirements, making it applicable to various scenarios.
[0192] When packet loss is detected, a selective retransmission strategy is adopted, that is, only the lost packets are retransmitted, rather than all packets.
[0193] The sending end divides the data packet into multiple data packets marked with sequence numbers, and then sends them to the receiving end;
[0194] After receiving the data packet, the receiving end sends an acknowledgment signal to the sending end;
[0195] The sender waits for confirmation from the receiver. If no confirmation is received or the confirmation times out, the lost data packet is retransmitted.
[0196] The receiving end determines the received data packet based on the sequence number of the data packet. If a data packet is lost or erroneous, no acknowledgment is sent, and only the lost data packet is retransmitted.
[0197] Set the sequence number sent by the sender to be , ,..., After receiving the data packet, the receiving end sends an acknowledgment packet. This indicates that the sequence number has been successfully received. Data packets;
[0198] If the receiving end does not receive the data packet Skip the sequence number and wait for the lost data packet to be retransmitted;
[0199] The receiving end sends an acknowledgment packet. This indicates that the serial number was successfully received. For lost data packets The receiving end does not send an acknowledgment, so the sending end retransmits the lost data packet after detecting a timeout.
[0200]
[0201] The sender sets a timeout period. If no acknowledgment of a specific data packet is received within this time, the data packet will be retransmitted.
[0202]
[0203] in, The time after the data packet was sent;
[0204] Selective retransmission also requires setting a window size. This represents the maximum number of data packets that the sending end can continuously send;
[0205] The process of selective retransmission algorithm:
[0206] The sending end sends data packets sequentially and assigns a unique sequence number to each data packet. , ,...;
[0207] After receiving the data packet, if the data packet is correct, the receiving end sends an acknowledgment packet. Otherwise, continue waiting;
[0208] If the sender detects an acknowledgment packet for a certain data packet If the data packet does not arrive within the timeout period, the lost data packet will be retransmitted.
[0209] The receiving end uses a sliding window method to receive and acknowledge data packets. After receiving a correct data packet, it acknowledges it and slides the window.
[0210] Retransmitting only lost or erroneous data packets avoids the overhead of retransmitting the entire window as in the Go-Back-N protocol, significantly reducing unnecessary bandwidth consumption. In high packet loss rates or unstable networks, selective retransmission maintains high transmission efficiency by accurately retransmitting lost data packets. The sliding window allows the receiver to buffer out-of-order data packets, reducing retransmission requirements caused by network jitter, making it suitable for modern networks. Compared to the stop-and-wait protocol, the sliding window allows multiple data packets to be sent continuously, reducing waiting time and increasing throughput.
[0211] If the network environment permits, by combining network coding techniques, redundant data can be generated by encoding data packets, allowing the receiver to recover the lost packets using this redundant data.
[0212] Set up a set of data packets , ,..., It will be sent, and through network encoding, a set of redundant data packets will be generated. , ,..., Redundant data packets It is a certain encoding combination of the original data packet;
[0213] A simple linear network coding method is adopted, which uses a linear combination of the original data packets as a method for generating redundant data:
[0214]
[0215] in, For redundant data packets, ,2,..., ;
[0216] The coding coefficients are randomly selected from a finite field;
[0217] For the original data packet, ,2,..., ;
[0218] The size of the finite field used for encoding;
[0219] After receiving the original data packet and the redundant data packet, the receiver uses the same network encoding and decoding strategy to recover the lost data packet;
[0220] The data packets received by the receiver are set as follows: , ,..., , , ,..., The receiver decodes these data packets to recover the lost data;
[0221] The receiver recovers the lost data packets using a decoding matrix and redundant data packets, as shown in the following formula:
[0222]
[0223] in, It is a matrix consisting of coding coefficients, the elements of which are ;
[0224] The vector of the original data packet, containing , ,..., ;
[0225] A vector of redundant data packets, containing , ,..., ;
[0226] Decoding process:
[0227] The receiver constructs a matrix based on the received redundant data packets and the original data packets. and ;
[0228] The receiver solves the matrix equations. Recover lost data packets ;
[0229] Set up 3 data packets , , and 2 redundant data packets , Redundant data packets are generated through linear encoding. The formula for generating redundant data is:
[0230]
[0231]
[0232] If the recipient loses According to the received , and , , restore ;
[0233] The formula for the receiver to recover lost data packets using redundant data packets is:
[0234]
[0235] The receiver recovers the lost data by solving this equation. .
[0236] Network coding, through redundant data packets, enables the receiver to directly recover some lost data packets, reducing reliance on retransmissions and thus lowering network latency and bandwidth consumption. Redundant data packets allow the receiver to recover data even when any data is lost. Even with only a few data packets, the original data can still be recovered, enhancing its resilience against packet loss. Network coding generates redundant data packets through linear combination, with each redundant data packet containing information from all the original data packets, making it more efficient than simply copying data packets. Network coding is naturally suitable for multi-path routing scenarios, as redundant data packets can be transmitted along different paths. The receiving end only needs to collect enough data packets to decode them, without needing to know the origin of the data packets. The coding coefficients can be in the finite domain. Random selection increases encoding diversity and reduces the probability of decoding failure; network encoding prioritizes recovering lost packets through redundant data, reducing the need for retransmission.
[0237] The receiver identifies and recovers lost data packets based on the received data packets and redundant data as follows:
[0238] The sender sent raw data packets , ,..., and Redundant data packets , ,..., These data packets are generated using network coding techniques, and redundant data packets are included. It is a linear combination of the original data packets. The data packets received by the receiver contain some lost packets, and the redundant data packets are used to recover the lost data.
[0239] The sender generates redundant data packets. The formula is:
[0240]
[0241] in, For redundant data packets;
[0242] This is the original data packet;
[0243] These are the coding coefficients;
[0244] The size of the finite field used for encoding;
[0245] After receiving the original data packets and redundant data packets, the receiver uses network coding techniques to recover the lost data packets. The receiver then uses the received data... , ,..., The lost packets were recovered from the partially received original data packets;
[0246] The receiver constructs a matrix Each row of the matrix corresponds to the coding coefficients of redundant data packets. :
[0247]
[0248] The receiver, based on the received redundant data packets , ,..., Construct vectors To represent redundant data packets:
[0249]
[0250] The receiver recovers the lost data packets by solving linear equations based on the relationship between the redundant data packets and the original data packets. It is assumed that the receiver received a portion of the data packets. , ,..., The receiver recovers the lost data packets using the received data packets and redundant data packets. , ,..., ;
[0251] The system of linear equations is as follows:
[0252]
[0253] in, It is a matrix composed of coding coefficients;
[0254] This is the vector of the original data packet;
[0255] A vector of redundant data packets;
[0256] If the receiver receives part of the original data packet and enough redundant data packets, the lost data packets can be recovered by solving a system of linear equations. The specific process is as follows:
[0257] The receiver constructs a matrix containing the received data packets and a vector of redundant data packets;
[0258] The receiver uses a system of linear equations Extract the lost original data packets;
[0259] If the number of redundant data packets This is sufficient, and the number of lost original data packets is small, allowing the receiver to recover all lost data packets;
[0260] Redundant data packet generation:
[0261]
[0262] Decoding formula for the receiver to recover lost data packets:
[0263]
[0264] in, The coding coefficient matrix, The original data packet vector, This is a redundant data packet vector;
[0265] By solving the above equations, the receiver recovers the lost data packets. .
[0266] By using redundant data packets, the scheme effectively addresses data packet loss, enabling recovery of original data even in situations with high packet loss rates. Compared to traditional retransmission mechanisms, network coding reduces retransmission requirements, lowering network latency and bandwidth consumption. Network coding technology is applicable to various network environments and makes no strict assumptions about packet loss patterns. The linear combination of redundant data packets allows intermediate nodes to perform encoding operations, further improving network transmission efficiency. In finite domains… In this process, the probability of generating a full-rank matrix from random coding coefficients is relatively high, ensuring a high decoding success rate. Mathematical linear algebra methods provide a reliable recovery mechanism.
[0267] A packet loss recovery system includes:
[0268] Monitoring module: Used to monitor network status, including packet loss rate, latency, and bandwidth information;
[0269] Forward error correction module: used to dynamically adjust the size of forward error correction redundancy information according to network status;
[0270] Retransmission module: Used to retransmit lost data packets when packet loss occurs, using a selective retransmission strategy;
[0271] Network coding module: used to generate redundant data based on packet loss rate and network status, and to recover lost data by decoding at the receiving end;
[0272] Recovery module: Used to receive and process data from the retransmission and encoding module, and recover lost data packets.
[0273] By combining forward error correction, retransmission, and network coding mechanisms, the system can effectively recover lost data even if packet loss occurs. The monitoring module monitors the network status in real time, and the forward error correction module dynamically adjusts the redundancy based on the packet loss rate, ensuring optimal performance under different network environments. Selective retransmission strategies and dynamic adjustment of redundant data volume reduce unnecessary data retransmissions and redundant data transmissions, thereby saving bandwidth resources. Through flexible recovery mechanisms and rapid retransmission of lost data, the system can reduce latency while ensuring data reliability and improving user experience. By combining different technical means, the system can cope with various packet loss scenarios, maximizing the efficiency and reliability of data transmission.
[0274] This embodiment also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements a data packet loss recovery method and system as described above.
[0275] This embodiment also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a data packet loss recovery method and system as described above.
[0276] This invention employs a strategy of real-time monitoring of network status and dynamic adjustment of redundant data volume. Existing FEC and retransmission mechanisms are typically based on static configuration, while this invention adjusts the recovery strategy according to real-time network conditions.
[0277] By combining selective retransmission with network coding technology, redundant data recovery is adopted for network environments with severe packet loss. This innovation has significantly improved the recovery effect and efficiency.
[0278] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0279] Those skilled in the art will understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above.
[0280] The above embodiments of the present invention are not intended to limit the scope of protection of the present invention. The implementation of the present invention is not limited thereto. All other modifications, substitutions or alterations made to the above structure of the present invention based on the above content of the present invention, in accordance with ordinary technical knowledge and common practice in the field, without departing from the basic technical idea of the present invention, shall fall within the scope of protection of the present invention.
Claims
1. A method for restoring lost data packets, characterized in that, Comprise: Step 1: Monitor network status, including but not limited to packet loss rate, delay, bandwidth parameters; Step 2: Based on network status, dynamically adjust the amount of forward error correction redundant data, when the packet loss rate is low, reduce the transmission of redundant data, when the packet loss rate is high, increase the redundant data; Step 3: When detecting data packet loss, use selective retransmission strategy, that is, only retransmit the lost data packet, not all data packets; Step 4: If the network environment allows, combine network coding technology, generate redundant data by encoding data packets, so that the receiving party uses redundant data to recover the lost packet; Step 5: The receiving party identifies and recovers the lost data packet according to the received data packet and redundant data.
2. The method of claim 1, wherein, The method for monitoring network status, including but not limited to packet loss rate, delay, bandwidth parameters is: Packet loss rate represents the proportion of lost data packets in total sent data packets in the data transmission process, and the packet loss rate calculation formula is: Wherein, the number of lost data packets is the number of data packets that fail to successfully arrive at the receiving end in the network transmission process; The number of sent data packets is the number of all data packets sent in the network; Delay is the time required for data to be transmitted from the source end to the target end, and the round-trip time calculation formula is: Wherein, the sending end timestamp is the time when the data packet is sent from the source end; The receiving end timestamp is the time when the data packet arrives at the receiving end and returns; The one-way delay calculation formula is: Bandwidth represents the amount of data that can be transmitted per unit time in the network, and the bandwidth calculation formula is: Wherein, the amount of data transmitted is the total amount of data transmitted through the network; Transmission time is the time required for data transmission, in seconds; In addition to separately calculating these parameters, the network status monitoring also combines multiple parameters to evaluate network quality, and the comprehensive evaluation formula is: wherein, is an overall network quality score; , , are weight coefficients, adjusted according to actual needs; P is the packet loss rate, RTT is the round trip time, BW is the bandwidth.
3. The method of claim 2, wherein, Based on network status, dynamically adjust the amount of forward error correction redundant data, when the packet loss rate is low, reduce the transmission of redundant data, when the packet loss rate is high, increase the redundant data, the method is: Setting the amount of redundancy data The ratio of forward error correction redundancy data to original data is denoted as: wherein, is the proportion of redundant data; P is the packet loss rate; and are weight coefficients, controlling the adjustment mode of the redundant data; When the packet loss rate is low, the system reduces the transmission of redundant data by reducing the number of packets transmitted and reducing the transmission of redundant data; When the packet loss rate is high, the system increases and values; Low packet loss scenario : setting , proportion of redundant data Smaller: Establishment Then: That is, the proportion of redundant data is about 10.1%; High packet loss scenarios : setting , proportion of redundant data Higher; Establishment Then: That is, the proportion of redundant data is 55%; For changes in packet loss rate, the proportion of redundant data Real-time adjustment, set threshold to determine when to increase or decrease the redundant data: If the packet loss rate is less than 1% , then the redundancy data ratio is 10%. If the packet loss rate is between 1% and 5% then the proportion of redundant data is increased to 20-30%; If the packet loss rate is greater than 5% then the proportion of redundant data reaches 50% or more.
4. The method of claim 3, wherein, When detecting data packet loss, use selective retransmission strategy, that is, only retransmit the lost data packet, not all data packets, the method is: The sending end divides the data packets into multiple sequence number marked data packets, and then sends them to the receiving end; The receiving end receives the data packet and sends an acknowledgement signal to the sending end; The sending end waits for the acknowledgement from the receiving end, and if no acknowledgement is received or the acknowledgement is received beyond the time limit, the lost data packet is retransmitted; The receiving end judges the received data packet according to the sequence number, and if a data packet is lost or has an error, it does not send an acknowledgement, requiring only the lost data packet to be retransmitted; The sequence number sent by the sending end is set up , ,..., The receiving end sends an acknowledgement packet after receiving the data packet Indicates that the data packet with sequence number has been successfully received; If the receiving end does not receive the data packet , the sequence number is skipped and the retransmission of the missing data packet is waited for; Receiver sends acknowledgement packet Indicates successful receipt of packet with sequence number Receiver does not send acknowledgement, so sender retransmits missing packet after timeout The sender sets a timeout period If no acknowledgement is received for a particular packet within that period, the packet is retransmitted. wherein, is the time after the data packet was sent; A window size is also needed in selective retransmission , representing the maximum number of data packets sent continuously by the sending end. The flow of selective retransmission algorithm is: The sending end sends data packets in sequence and assigns a unique sequence number to each data packet , ,...; If the data packet is correct, the receiving end sends an acknowledgement packet , otherwise it continues to wait. If the sending end detects an acknowledgement packet for a certain data packet If the timeout has not arrived, the missing data packet is retransmitted. The receiving end uses a sliding window method to receive and acknowledge data packets, and after receiving a correct data packet, it acknowledges it and slides the window.
5. The method of claim 4, wherein, If the network environment allows, combine network coding technology, generate redundant data by encoding data packets, so that the receiving party uses redundant data to recover the lost packet, the method is: Set up a set of data packets , , Send, through network coding, a set of redundant data packets , , Where the redundant data packets are some encoding combination of the original data packets; A simple linear network coding method is established, that is, the linear combination of the original data packet is used as the redundant data generation method: wherein is a redundant data packet, , 2,..., ; For the encoding coefficients, random selection from one finite field; for the original data packet, , 2,..., ; Finite field size used for encoding; The receiver receives the original data packets and the redundant data packets, and uses the same network coding decoding strategy to recover the lost data packets; The data packets received by the receiver are set up as , ,..., , , ,..., The receiver decodes these data packets and recovers the lost data. The receiver recovers the lost data packets by decoding the matrix and the redundant data packets, according to the following formula: wherein is a matrix consisting of coding coefficient groups, the elements of which are ; is a vector of original data packets, containing , ,..., ; is a vector of redundant data packets, comprising , , ; Decoding process: The receiver constructs a matrix from the received redundant data packets and the original data packets and ; The receiver solves a matrix equation recovering lost data packets ; Three data packets are set up , , and two redundant data packets , The redundant data packets are generated by linear encoding, and the generation formula of the redundant data is: If the receiver has lost , from the received , and , , the recovery of ; The formula for the receiver to recover the lost data packets using the redundant data packets is as follows: The receiver recovers the lost data by solving this equation .
6. The method of claim 5, wherein, The method for the receiver to identify, judge and recover the lost data packets according to the received data packets and the redundant data is as follows: The sender sets up to send original data packets , , and redundant data packets , , , which are generated by network coding technology, wherein the redundant data packets are linear combinations of the original data packets, and the data packets received by the receiver contain some lost packets, and the redundant data packets are used to recover the lost data; Sender generating redundant data packets The formula is: wherein is a redundant data packet; is the original data packet; to encode the coefficients; Finite field size used for encoding; The receiver receives the original data packet and the redundant data packet, and recovers the lost data packet by using the network coding technology. The receiver recovers the lost data packet according to the received , ,..., and the partially received original data packet. The receiver constructs a matrix where each row of the matrix corresponds to an encoding coefficient of the redundant data packet : The receiver constructs a vector , ,..., , from the received redundant data packets to represent the redundant data packets: The receiver recovers the lost data packet by solving linear equations according to the relationship between the redundant data packet and the original data packet, and sets that the receiver has received part of the data packet , ,..., The receiver recovers the lost data packet by solving linear equations according to the relationship between the redundant data packet and the original data packet, and sets that the receiver has received part of the data packet , ,..., ; The linear equation set is as follows: wherein is a matrix consisting of encoding coefficient groups; is a vector of original data packets; a vector of redundant data packets; If the receiver receives some original data packets and enough redundant data packets, the lost data packets can be recovered by solving the linear equation set, and the specific process is as follows: The receiver constructs a matrix containing the received data packets and a vector containing the redundant data packets; The receiver solves the linear equations to recover the missing original packets. If the number of redundant data packets This is sufficient, and the number of lost original data packets is small, allowing the receiver to recover all lost data packets; Redundant data packet generation: The decoding formula for the receiver to recover the lost data packets is as follows: wherein, is a matrix of encoded coefficients, is a vector of original data packets, is a vector of redundant data packets; By solving the above equation, the receiver recovers the lost data packet .
7. A data packet loss recovery system, characterized by, It includes: Monitoring module: used for monitoring network status, including packet loss rate, delay, bandwidth information; Forward error correction module: used for dynamically adjusting the size of forward error correction redundancy information according to network status; Re-transmission module: used for retransmitting the lost data packets through selective retransmission strategy when packet loss occurs; Network coding module: used for generating redundant data according to the network status of packet loss rate, and recovering the lost data at the receiving end through decoding; Recovery module: used for receiving and processing data from the retransmission and coding modules to recover the lost data packets.
8. An electronic device, comprising: A computer program product comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the data packet loss recovery method according to any one of claims 1-6 when executing the program.
9. A computer readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the data packet loss recovery method according to any one of claims 1-6.