Packet loss prevention data transmission method and device, equipment and storage medium
By obtaining network index data in real time and using network state prediction model, dynamically adjusting FEC redundancy strategies is solved, and the problem that redundancy strategies in the existing technology cannot be dynamically adjusted is improved, and the reliability of data transmission and bandwidth utilization are improved.
Patent Information
- Application Number
- CN202510270753.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-06-06
AI Technical Summary
In the prior art, when dealing with network instability, FEC redundancy strategies cannot be dynamically adjusted, resulting in excessive redundancy and wasting bandwidth when the network is good, and insufficient redundancy can not be effectively repaired when the network deteriorates, affecting transmission efficiency and quality.
By obtaining the network index data of the current network, input it into the network state prediction model, predicting the current network state, and then dynamically adjusting the FEC redundancy strategy based on the prediction results, determining the number of redundant data packets, ensuring that sufficient fault tolerance is provided in an unstable network environment.
It realizes dynamic adjustment of redundant coding strategies based on real-time network status, reduces unnecessary redundant data transmission, improves bandwidth utilization, and ensures the reliability and quality of data transmission.
Smart Images

Figure CN120110602A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to an anti-packet loss data transmission method, device, equipment and storage medium. Background Art
[0002] In the field of real-time data transmission and communication, packet loss often affects data integrity and transmission quality, especially when network conditions are unstable. Packet loss is usually caused by factors such as unstable network bandwidth, congestion, delay jitter, etc., which may cause the quality of audio and video communication to deteriorate or even be interrupted in severe cases. In order to meet this challenge, traditional FEC (forward error correction) technology is widely used. By redundantly encoding data, the receiving end can use redundant data to restore the original data when packets are lost, thereby improving the reliability of data transmission. However, the traditional FEC scheme adopts a static redundancy strategy and cannot be dynamically adjusted according to the real-time network status, resulting in excessive redundancy and waste of bandwidth when the network is good, and insufficient redundancy when the network deteriorates and cannot effectively repair packet loss, affecting transmission efficiency and quality. The existing technology has poor adaptability to the network environment and cannot effectively cope with changing network conditions.
[0003] In summary, the defects existing in the prior art need to be solved urgently. Summary of the invention
[0004] The present invention provides a data transmission method, device, equipment and storage medium for preventing packet loss, so as to solve the defects in the prior art and make the redundant coding strategy more intelligent and flexible.
[0005] The present invention provides a data transmission method for preventing packet loss, comprising:
[0006] In response to the data transmission instruction, obtaining network indicator data of the current network;
[0007] Inputting the network indicator data into a network status prediction model to obtain a prediction result of the current network status;
[0008] Determining a FEC redundancy strategy according to the prediction result;
[0009] According to the FEC redundancy strategy, redundant encoding is performed on the data to be transmitted to obtain a redundant data packet;
[0010] The data to be transmitted and the redundant data packet are sent to a target receiving end.
[0011] According to a packet loss-proof data transmission method provided by the present invention, the network indicator data includes: delay, jitter and packet loss rate.
[0012] According to a packet loss prevention data transmission method provided by the present invention, before the step of inputting the network indicator data into a network status prediction model to obtain a prediction result of the current network status, the method further includes:
[0013] Convert the network indicator data into time series data,
[0014] Performing time alignment on the time series data by using a dynamic time warping algorithm;
[0015] The aligned time series data are subjected to feature extraction to obtain the network state feature matrix.
[0016] According to a packet loss prevention data transmission method provided by the present invention, the network status prediction model is composed of a multi-layer LSTM unit, including an input layer, a convolution layer, a pooling layer, a long short-term memory layer and an output layer;
[0017] The input layer is used to receive the network state feature matrix;
[0018] The convolution layer is used to extract local features in the network state feature matrix and perform feature learning and processing;
[0019] The pooling layer is used to downsample the network state feature matrix;
[0020] The long short-term memory layer is used to process and capture the long-term dependency of the network state feature matrix to predict time series data;
[0021] The output layer is used to generate a prediction result and output the prediction result of the current network state.
[0022] According to a packet loss prevention data transmission method provided by the present invention, the network status prediction model is trained by the following steps:
[0023] Using the long short-term memory layer as a shared network layer;
[0024] Determine a joint loss function based on multiple training tasks;
[0025] The network status prediction model is trained according to the joint loss function and historical network status data until the network status prediction model reaches a preset prediction accuracy.
[0026] According to a packet loss prevention data transmission method provided by the present invention, the step of determining the FEC redundancy strategy according to the prediction result specifically includes:
[0027] When the packet loss rate of the predicted result is high, the number of redundant data packets is increased;
[0028] When the packet loss rate of the predicted result is low, the number of redundant data packets is reduced.
[0029] According to a packet loss prevention data transmission method provided by the present invention, the step of redundantly encoding the data to be transmitted according to the FEC redundancy strategy to obtain a redundant data packet specifically includes:
[0030] Splitting the data to be transmitted to obtain original data packets;
[0031] Redundancy encoding is performed on the original data packet to obtain a redundant data packet.
[0032] The present invention also provides a data transmission device for preventing packet loss, comprising:
[0033] A data acquisition module, used to obtain network indicator data of the current network in response to the data transmission instruction;
[0034] A state prediction module, used to input the network indicator data into a network state prediction model to obtain a prediction result of the current network state;
[0035] A strategy determination module, used to determine the FEC redundancy strategy according to the prediction result;
[0036] A redundant encoding module, used to perform redundant encoding on the data to be transmitted according to the FEC redundancy strategy to obtain a redundant data packet;
[0037] The data transmission module is used to send the data to be transmitted and the redundant data packet to a target receiving end.
[0038] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the data transmission method for preventing packet loss as described above is implemented.
[0039] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the data transmission method for preventing packet loss as described above is implemented.
[0040] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned anti-packet loss data transmission methods.
[0041] The data transmission method, device, equipment and storage medium for preventing packet loss provided by the present invention obtain network indicator data of the current network by responding to a data transmission instruction; input the network indicator data into a network status prediction model to obtain a prediction result of the current network status; determine the FEC redundancy strategy according to the prediction result; perform redundant encoding on the data to be transmitted according to the FEC redundancy strategy to obtain a redundant data packet; send the data to be transmitted and the redundant data packet to the target receiving end. The present invention can dynamically adjust the number of redundant data packets according to the predicted network status, reduce unnecessary redundant data transmission, and improve bandwidth utilization. The adjustment of dynamic redundant coding reduces unnecessary bandwidth waste and ensures sufficient fault tolerance when the network is unstable, effectively ensuring the integrity of the data, while improving the fluency and stability of audio and video transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 It is a flowchart of the data transmission method for preventing packet loss provided by the present invention;
[0044] Figure 2 It is a schematic structural diagram of the data transmission device for preventing packet loss provided by the present invention;
[0045] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] In order to solve the problems in the prior art, the present invention proposes a data transmission method for preventing packet loss, so as to make the redundant coding strategy more intelligent and flexible. The data transmission method for preventing packet loss is described below. Figure 1 As shown, including but not limited to the following steps:
[0048] Step 110: In response to the data transmission instruction, obtain network indicator data of the current network.
[0049] In step 110, before data transmission begins, the system first receives a data transmission instruction, which may come from the application layer or a user-triggered operation. After receiving the instruction, the system needs to obtain the current network status information through the network interface, including but not limited to the following network indicators:
[0050] Latency: refers to the time required for data to be transmitted from the sender to the receiver, usually measured in milliseconds (ms).
[0051] Jitter: refers to the fluctuation of network delay. Large jitter may affect the quality of real-time communication.
[0052] Packet loss rate: refers to the proportion of data packets lost in the network, and is an important indicator for measuring network stability.
[0053] These network indicator data can be obtained through network management tools or real-time monitoring modules, and collected and transmitted through the network protocol stack to ensure that the current network status can be reflected in real time.
[0054] Step 120: Input the network indicator data into a network status prediction model to obtain a prediction result of the current network status.
[0055] The acquired network indicator data is used as input to a trained network status prediction model. This model is usually built with deep learning algorithms such as long short-term memory networks (LSTMs), which can analyze time series data and predict future network status changes.
[0056] During this process, the model uses historical network data (such as latency, packet loss rate, etc.) to train and identify changing trends in network conditions.
[0057] The input data is first converted into a format suitable for time series processing, and may also require feature extraction and data preprocessing (such as using the dynamic time warping (DTW) algorithm for time series alignment), and then sent to the LSTM model for prediction.
[0058] Through this step, the model will generate prediction results for the current network status, mainly including: the current network packet loss rate prediction and the predicted trend of network delay and jitter.
[0059] Step 130: Determine the FEC redundancy strategy according to the prediction result.
[0060] In step 130, the corresponding FEC redundancy strategy is determined according to the network status prediction result. If the packet loss rate of the predicted network is high, the redundancy strategy should increase the number of redundant data packets to improve the packet loss recovery capability; if the predicted network is relatively stable and the packet loss rate is low, the redundancy strategy can reduce the number of redundant data packets to save bandwidth and computing resources. When the predicted packet loss rate is high, the number of redundant data packets will increase to ensure that the receiving end can still recover the complete data even if some data packets are lost. When the predicted packet loss rate is low, the number of redundant data packets can be reduced, thereby improving the efficiency of data transmission and reducing the bandwidth occupied by redundant data.
[0061] Step 140: According to the FEC redundancy strategy, redundantly encode the data to be transmitted to obtain a redundant data packet.
[0062] In step 140, the data to be transmitted will first be divided into a number of original data packets according to the determined FEC redundancy strategy. Then, each original data packet will be redundantly encoded according to the redundancy strategy to generate a redundant data packet. According to the selected FEC algorithm, such as Reed-Sol omon encoding, XOR operation, etc., the original data is encoded to generate a redundant data packet. The number of redundant data packets depends on the network status prediction result. If the packet loss rate is high, the redundant packets are increased; if the packet loss rate is low, the redundant packets are reduced.
[0063] Step 150: Send the data to be transmitted and the redundant data packet to a target receiving end.
[0064] In step 150, the redundantly encoded data (including the original data packet and the redundant data packet) will be transmitted to the target receiving end. The data will be sent in a predetermined order to ensure that the receiving end can repair the lost data through the redundant data packet. During the transmission process, the receiving end parses the data packet and the redundant packet, and uses the redundant information to restore the lost data block, ensuring the data integrity and smoothness during the communication process. In the case of unstable network, the redundant packet can effectively compensate for data loss and avoid quality problems caused by packet loss.
[0065] The present invention achieves packet loss-proof data transmission by acquiring network status data in real time, predicting network conditions, and dynamically adjusting FEC redundancy strategies based on the prediction results. This method can improve the reliability of data transmission, ensure high communication quality in an unstable network environment, optimize bandwidth usage, and improve transmission efficiency.
[0066] As a further optional embodiment, the network indicator data includes: delay, jitter and packet loss rate.
[0067] As a further optional embodiment, before the step of inputting the network indicator data into the network status prediction model to obtain a prediction result of the current network status, the method further includes:
[0068] Convert the network indicator data into time series data,
[0069] Performing time alignment on the time series data by using a dynamic time warping algorithm;
[0070] The aligned time series data are subjected to feature extraction to obtain the network state feature matrix.
[0071] As a further optional embodiment, the network indicator data may include the following key indicators:
[0072] Latency: refers to the time required for data to be transmitted from the sender to the receiver in the network. Latency is an important parameter for measuring network quality. Too high a latency will cause audio and video communications to become stuck and reduce real-time performance.
[0073] Jitter: refers to the variation in delay, usually used to describe the stability of a network connection. Excessive jitter may cause data packets to be out of order and lost, thus affecting the quality of communication.
[0074] Packet loss rate: refers to the proportion of data packets lost during transmission. When the packet loss rate is high, the receiving end will not be able to receive the sent data completely, which may cause communication interruption or quality degradation.
[0075] These network indicator data are crucial for evaluating the network status. They can help the model more accurately predict future network changes and thus formulate appropriate redundant coding strategies.
[0076] In this embodiment, before inputting the network indicator data into the network status prediction model, the method may include the following steps:
[0077] Convert the network indicator data into time series data:
[0078] In this phase, the system converts the raw network indicator data (such as latency, jitter, and packet loss rate) into time series format. Time series data can help the system capture the trend of network status changes over time.
[0079] For example, latency, jitter, and packet loss rate data can be sorted by timestamp to form a data set of network status at each moment, so that the model can perform time series analysis.
[0080] The time series data is aligned using a dynamic time warping algorithm:
[0081] Dynamic Time Warping (DTW) algorithm is used to deal with the misalignment or time series deformation problem in time series data. In network data, the length and time distribution of time series data may not be completely consistent due to the fluctuation or change of different network indicators.
[0082] By using the DTW algorithm, these time series data can be aligned, allowing the model to better learn and compare the correlations between different time series. In this way, even if the network indicators change at different speeds or magnitudes, the system can effectively handle these differences.
[0083] Perform feature extraction on the aligned time series data to obtain the network state feature matrix:
[0084] In this step, the DTW-aligned time series data will be further processed to extract more meaningful features, which usually include the changing trend of latency, the fluctuation pattern of packet loss rate, the periodicity of jitter, etc.
[0085] The network status feature matrix obtained after feature extraction contains the key features extracted from the original network indicator data, and can help the network status prediction model to perform subsequent prediction analysis more accurately.
[0086] Through these three steps, the network indicator data is converted into a feature matrix suitable for model input, ensuring that the network status prediction model can effectively learn and predict the changing trend of the network status, providing an accurate basis for subsequent FEC redundancy strategy decisions.
[0087] As a further optional embodiment, the network state prediction model is composed of a multi-layer LSTM unit, including an input layer, a convolution layer, a pooling layer, a long short-term memory layer and an output layer;
[0088] The input layer is used to receive the network state feature matrix;
[0089] The convolution layer is used to extract local features in the network state feature matrix and perform feature learning and processing;
[0090] The pooling layer is used to downsample the network state feature matrix;
[0091] The long short-term memory layer is used to process and capture the long-term dependency of the network state feature matrix to predict time series data;
[0092] The output layer is used to generate a prediction result and output the prediction result of the current network state.
[0093] In this embodiment, the network state prediction model can adopt a deep learning structure composed of multiple layers of LSTM units. The structure includes an input layer, a convolution layer, a pooling layer, a long short-term memory layer (LSTM) and an output layer. Specifically, each layer plays an important role in the network state prediction process, which can help the model more accurately capture and predict the changing trend of the network state. The following is a description of the specific functions and effects of each layer:
[0094] Input Layer:
[0095] Function: The input layer is used to receive the network status feature matrix after preprocessing and feature extraction. The matrix contains the time series data of network indicators such as delay, jitter, and packet loss rate obtained through timing alignment and feature extraction.
[0096] Function: Use the network state feature matrix as the input of the model to start the model calculation process and provide raw data for subsequent convolutional layers and LSTM layers.
[0097] Convolutional Layer:
[0098] Function: The convolution layer is used to extract features from the input network state feature matrix. By applying convolution operations, it can find local features in the data and learn key information in the network state data.
[0099] Function: Through convolution operations, the convolution layer can extract local features in network indicator data, such as the law of delay fluctuations, periodic changes in packet loss rate, etc. This helps to obtain more meaningful representations from raw data and provides important feature information for subsequent processing.
[0100] Pooling layer:
[0101] Function: The pooling layer is used to downsample the data output by the convolutional layer, that is, to reduce the computational complexity by reducing the dimension of the data while retaining the most important features of the data.
[0102] Function: The pooling layer reduces the data dimension, allowing the network to process and store data more efficiently and reduce the risk of overfitting. Through pooling, the network can retain the most representative features while discarding redundant information and simplifying subsequent processing.
[0103] Long short-term memory layer (LSTM layer):
[0104] Function: The LSTM layer is used to capture long-term dependencies in network state data. LSTM is an improved version of a recurrent neural network (RNN) that can process and learn temporal dependencies in time series data, and is particularly suitable for processing situations where network indicators change over time.
[0105] Function: The LSTM layer helps the model understand and predict future trends in network status, such as changes in latency, jitter, and packet loss rate, by learning long-term patterns in historical data. LSTM can remember past information and predict future network behavior based on current network status, thus providing an accurate basis for FEC redundancy strategies.
[0106] Output layer:
[0107] Function: The output layer is used to generate prediction results. Through the output layer, the model will generate prediction results for the current network state based on the output of the LSTM layer.
[0108] Function: This layer outputs the prediction results of network status, such as packet loss rate, delay or jitter in the next few seconds. This prediction result will be used as a basis for decision-making to help determine the next FEC redundancy strategy.
[0109] As a further optional embodiment, the network status prediction model is trained by the following steps:
[0110] Using the long short-term memory layer as a shared network layer;
[0111] Determine a joint loss function based on multiple training tasks;
[0112] The network status prediction model is trained according to the joint loss function and historical network status data until the network status prediction model reaches a preset prediction accuracy.
[0113] In this embodiment, the training process of the network status prediction model may include the following steps:
[0114] Use the long short-term memory layer (LSTM layer) as a shared network layer
[0115] In the training process of the network state prediction model, the long short-term memory layer (LSTM layer) is designed as a shared network layer. This means that when processing multiple training tasks, the parameters of the LSTM layer will be shared between tasks, rather than setting up a separate LSTM layer for each task. The shared LSTM layer can promote collaborative learning between multiple tasks, thereby improving the learning efficiency and prediction accuracy of the model.
[0116] By sharing LSTM layers, the model can share implicit state representations in different tasks. In this way, the LSTM layer can not only obtain information from the learning of a single task, but also learn from multiple tasks, making the model have better generalization ability and higher prediction accuracy.
[0117] Determine the joint loss function based on multiple training tasks
[0118] During the model training process, considering the multi-task characteristics of the network status prediction model (such as network status prediction and packet loss rate prediction), a joint loss function needs to be defined to optimize the prediction effects of multiple tasks at the same time. The joint loss function is a weighted combination of the prediction errors of all tasks, which is used to guide the model on how to adjust parameters during the training process to improve the performance of the overall task.
[0119] The joint loss function can consider the prediction accuracy of multiple tasks at the same time, so that the model can be comprehensively optimized during the training process and the synergy of different tasks can be improved. For example, the network status prediction task and the packet loss rate prediction task share some information and parameters, and the performance of both can be improved through joint training.
[0120] Train the model based on the joint loss function and historical network state data
[0121] Once the relationship between the joint loss function and multiple tasks is determined, the model will be trained based on historical network status data. These historical data include time series data of indicators such as network delay, packet loss rate, and jitter. By inputting these data into the model, the model will adjust its internal parameters (especially the weights of the LSTM layer) according to the loss function and gradually optimize it through the back-propagation algorithm.
[0122] The model will continuously adjust parameters through the back propagation algorithm until the training loss converges and reaches the preset prediction accuracy. During the training process, the cross entropy loss function, mean square error and other methods are used to evaluate the prediction error of each task, and the model is adjusted based on the error feedback.
[0123] When the accuracy of the network status prediction model reaches a preset standard (for example, the error is lower than a certain threshold or the accuracy reaches a certain level), the training process stops and the model can be used for practical applications.
[0124] Through the above steps, the network status prediction model can efficiently perform multi-task learning, use the shared LSTM layer to improve information sharing between multiple tasks, and comprehensively optimize task performance through the joint loss function. The model will eventually be trained based on historical network status data until its prediction accuracy reaches the expected standard, thereby providing accurate prediction results for subsequent FEC redundancy strategies.
[0125] As a further optional embodiment, the step of determining the FEC redundancy strategy according to the prediction result specifically includes:
[0126] When the packet loss rate of the predicted result is high, the number of redundant data packets is increased;
[0127] When the packet loss rate of the predicted result is low, the number of redundant data packets is reduced.
[0128] In this embodiment, when the network status prediction model predicts that the packet loss rate in the current network status is high based on the input network indicator data (such as delay, jitter and packet loss rate), in order to ensure the reliability and integrity of data transmission, the system will increase the number of redundant data packets based on the prediction results.
[0129] Purpose: Increasing the number of redundant data packets can improve the fault tolerance during data transmission. Even if some data packets are lost during transmission, the receiving end can still repair the data through the redundant data packets to ensure that the data finally received is complete and correct.
[0130] Application scenarios: In the case of network congestion, frequent packet loss or unstable network conditions, appropriately increasing the number of redundant data packets can effectively avoid data loss and improve the stability of data transmission.
[0131] When the prediction results show that the current network packet loss rate is low, it means that the network transmission quality is good and the probability of packet loss is low. In this case, the system will reduce the number of redundant data packets according to the prediction results to improve transmission efficiency.
[0132] Purpose: Reducing the number of redundant data packets can save bandwidth resources and reduce unnecessary data transmission. Too many redundant data packets will occupy bandwidth, increase latency, and waste network resources. When network conditions are good, reducing the number of redundant data packets can effectively improve transmission efficiency and overall system performance.
[0133] Application scenario: When the network quality is good (for example, low packet loss rate and short delay), the number of redundant data packets can be reduced, thereby avoiding wasting bandwidth and increasing data transmission speed.
[0134] In the actual communication process, the network status changes dynamically, and network indicators such as packet loss rate, delay and jitter will change over time. Therefore, the redundancy strategy based on the prediction model should be adjusted dynamically to flexibly increase or decrease redundant data packets according to the real-time prediction results.
[0135] As a further optional embodiment, the step of redundantly encoding the data to be transmitted to obtain a redundant data packet according to the FEC redundancy strategy specifically includes:
[0136] Splitting the data to be transmitted to obtain original data packets;
[0137] Redundancy encoding is performed on the original data packet to obtain a redundant data packet.
[0138] In this embodiment, first, the data to be transmitted (such as audio, video or other types of real-time data) is divided into a plurality of original data packets. Each data packet contains a certain amount of original data, and these data packets are used as basic units for subsequent redundant encoding processing.
[0139] By segmenting data, the system can handle lost data more flexibly. When a data packet is lost, only the content of the data packet needs to be restored without affecting the transmission of the entire data stream. The granularity of segmentation depends on specific application requirements. For example, for video data, it may be segmented by frame or small block; for audio data, it may be segmented by sampling point or audio frame.
[0140] Once the data is divided into original data packets, they are then redundantly encoded according to the FEC redundancy strategy to generate redundant data packets. Different algorithms can be used for redundant encoding, such as XOR operation, Reed-Sol omon coding, Hamming coding, etc. The specific choice depends on the required fault tolerance and network environment. The main purpose of redundant encoding is to provide additional redundant information for the original data packets so that if some data packets are lost during data transmission, the receiver can recover the lost parts through redundant packets to ensure data integrity. According to the prediction results of the FEC redundancy strategy, when the packet loss rate is high, the number of redundant data packets is increased; and when the network is good, the number of redundant packets is reduced. In this way, the system can dynamically adjust the degree of redundancy according to the network conditions to optimize bandwidth usage and transmission efficiency.
[0141] After the redundant encoding is completed, the system sends the generated redundant data packets together with the original data packets to the target receiving end. The receiving end recovers the lost data blocks by parsing the original data packets and the redundant data packets to ensure the complete data received. The redundant data packets ensure that even if part of the original data packets are lost during the transmission process, the receiving end can still use the redundant information to recover the lost data parts to avoid data damage or loss.
[0142] By splitting the original data packets and performing redundant encoding, additional fault tolerance can be provided during data transmission. When packet loss occurs in the network, redundant encoding can help the receiver recover the lost parts and ensure data integrity. In different network environments, by dynamically adjusting the number of redundant data packets, the system can balance bandwidth usage and data transmission reliability. This method can significantly improve the stability and quality of data transmission, especially in unstable or bandwidth-limited network environments.
[0143] The anti-packet loss data transmission device provided by the present invention is described below. Figure 2 As shown, the anti-packet loss data transmission device described below and the anti-packet loss data transmission method described above can correspond to each other.
[0144] A data transmission device for preventing packet loss, comprising:
[0145] The data acquisition module 210 is used to obtain network indicator data of the current network in response to the data transmission instruction;
[0146] The state prediction module 220 is used to input the network indicator data into the network state prediction model to obtain the prediction result of the current network state;
[0147] A strategy determination module 230, configured to determine an FEC redundancy strategy according to the prediction result;
[0148] A redundant encoding module 240, configured to perform redundant encoding on the data to be transmitted according to the FEC redundant strategy to obtain a redundant data packet;
[0149] The data transmission module 250 is used to send the data to be transmitted and the redundant data packet to a target receiving end.
[0150] Figure 3 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the data transmission method for preventing packet loss, and the method includes:
[0151] In response to the data transmission instruction, obtaining network indicator data of the current network;
[0152] Inputting the network indicator data into a network status prediction model to obtain a prediction result of the current network status;
[0153] Determining a FEC redundancy strategy according to the prediction result;
[0154] According to the FEC redundancy strategy, redundant encoding is performed on the data to be transmitted to obtain a redundant data packet;
[0155] The data to be transmitted and the redundant data packet are sent to a target receiving end.
[0156] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM, Read-On l yMemory), a random access memory (RAM, Random Access Memory), a disk or an optical disk.
[0157] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the anti-packet loss data transmission method provided by the above methods, the method includes:
[0158] In response to the data transmission instruction, obtaining network indicator data of the current network;
[0159] Inputting the network indicator data into a network status prediction model to obtain a prediction result of the current network status;
[0160] Determining a FEC redundancy strategy according to the prediction result;
[0161] According to the FEC redundancy strategy, redundant encoding is performed on the data to be transmitted to obtain a redundant data packet;
[0162] The data to be transmitted and the redundant data packet are sent to a target receiving end.
[0163] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the data transmission method for preventing packet loss provided by the above methods is implemented, and the method includes:
[0164] In response to the data transmission instruction, obtaining network indicator data of the current network;
[0165] Inputting the network indicator data into a network status prediction model to obtain a prediction result of the current network status;
[0166] Determining a FEC redundancy strategy according to the prediction result;
[0167] According to the FEC redundancy strategy, redundant encoding is performed on the data to be transmitted to obtain a redundant data packet;
[0168] The data to be transmitted and the redundant data packet are sent to a target receiving end.
[0169] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0170] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0171] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data transmission method for preventing packet loss, characterized in that: include: In response to the data transmission instruction, obtaining network indicator data of the current network; Inputting the network indicator data into a network status prediction model to obtain a prediction result of the current network status; Determining a FEC redundancy strategy according to the prediction result; According to the FEC redundancy strategy, redundant encoding is performed on the data to be transmitted to obtain a redundant data packet; The data to be transmitted and the redundant data packet are sent to a target receiving end.
2. The data transmission method for preventing packet loss according to claim 1, characterized in that: The network indicator data includes: delay, jitter and packet loss rate.
3. The data transmission method for preventing packet loss according to claim 1, characterized in that: Before the step of inputting the network indicator data into the network status prediction model to obtain the prediction result of the current network status, the method further includes: Convert the network indicator data into time series data, Performing time alignment on the time series data by using a dynamic time warping algorithm; The aligned time series data are subjected to feature extraction to obtain the network state feature matrix.
4. The data transmission method for preventing packet loss according to claim 1, characterized in that: The network state prediction model is composed of a multi-layer LSTM unit, including an input layer, a convolution layer, a pooling layer, a long short-term memory layer and an output layer; The input layer is used to receive the network state feature matrix; The convolution layer is used to extract local features in the network state feature matrix and perform feature learning and processing; The pooling layer is used to downsample the network state feature matrix; The long short-term memory layer is used to process and capture the long-term dependency of the network state feature matrix to predict time series data; The output layer is used to generate a prediction result and output the prediction result of the current network state.
5. The data transmission method for preventing packet loss according to claim 4, characterized in that: The network status prediction model is trained by the following steps: Using the long short-term memory layer as a shared network layer; Determine a joint loss function based on multiple training tasks; The network status prediction model is trained according to the joint loss function and historical network status data until the network status prediction model reaches a preset prediction accuracy.
6. The data transmission method for preventing packet loss according to claim 1, characterized in that: The step of determining the FEC redundancy strategy according to the prediction result specifically includes: When the packet loss rate of the predicted result is high, the number of redundant data packets is increased; When the packet loss rate of the predicted result is low, the number of redundant data packets is reduced.
7. The data transmission method for preventing packet loss according to claim 1, characterized in that: The step of redundantly encoding the data to be transmitted to obtain a redundant data packet according to the FEC redundancy strategy specifically includes: Splitting the data to be transmitted to obtain original data packets; Redundancy encoding is performed on the original data packet to obtain a redundant data packet.
8. A data transmission device for preventing packet loss, characterized in that: include: A data acquisition module, used to obtain network indicator data of the current network in response to a data transmission instruction; A state prediction module, used to input the network indicator data into a network state prediction model to obtain a prediction result of the current network state; A strategy determination module, used to determine the FEC redundancy strategy according to the prediction result; A redundant encoding module, used to perform redundant encoding on the data to be transmitted according to the FEC redundancy strategy to obtain a redundant data packet; The data transmission module is used to send the data to be transmitted and the redundant data packet to a target receiving end.
9. An electronic device comprising 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 the data transmission method for preventing packet loss as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the anti-packet loss data transmission method as claimed in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Cross-border game acceleration stabilization method and device based on real-time network state prediction
CN120455513A
Network state sensing and adaptive coding control method and device
CN120602051A
Packet loss prevention transmission system based on dynamic redundancy adjustment
CN120710638A
Packet loss prevention transmission system based on dynamic redundancy adjustment
CN120710638B
Data interaction method based on adaptive redundancy transmission and related equipment
CN121239357A