CN115549860A - Data recovery method, device, equipment and storage medium - Google Patents

Data recovery method, device, equipment and storage medium Download PDF

Info

Publication number
CN115549860A
CN115549860A CN202211119139.9A CN202211119139A CN115549860A CN 115549860 A CN115549860 A CN 115549860A CN 202211119139 A CN202211119139 A CN 202211119139A CN 115549860 A CN115549860 A CN 115549860A
Authority
CN
China
Prior art keywords
value
trip delay
packet loss
predicted value
packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211119139.9A
Other languages
Chinese (zh)
Other versions
CN115549860B (en
Inventor
章小敏
李勇
万志宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Original Assignee
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Topsec Technology Co Ltd, Beijing Topsec Network Security Technology Co Ltd, Beijing Topsec Software Co Ltd filed Critical Beijing Topsec Technology Co Ltd
Priority to CN202211119139.9A priority Critical patent/CN115549860B/en
Publication of CN115549860A publication Critical patent/CN115549860A/en
Application granted granted Critical
Publication of CN115549860B publication Critical patent/CN115549860B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0033Systems modifying transmission characteristics according to link quality, e.g. power backoff arrangements specific to the transmitter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0036Systems modifying transmission characteristics according to link quality, e.g. power backoff arrangements specific to the receiver
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0041Arrangements at the transmitter end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0045Arrangements at the receiver end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1829Arrangements specially adapted for the receiver end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1867Arrangements specially adapted for the transmitter end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/20Arrangements for detecting or preventing errors in the information received using signal quality detector
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0894Packet rate

Abstract

The present disclosure relates to a data recovery method, apparatus, device, and storage medium, wherein the method comprises: acquiring a round-trip delay sampling value, a bandwidth sampling value and a packet loss rate sampling value in the current data transmission process; predicting the round trip delay sampling value by adopting a prediction algorithm to determine a round trip delay predicted value; determining a bandwidth predicted value and a packet loss rate predicted value according to the round trip delay predicted value; and in response to receiving packet loss information returned by the server, determining to adopt a forward error correction mode and/or a negative feedback mode for data recovery according to the round trip delay sampling value, the bandwidth sampling value, the packet loss rate sampling value, the round trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value compared with preset conditions. According to the technical scheme, a proper mode can be selected in a self-adaptive mode for data restoration, the data restoration capability is improved on the premise that the bandwidth is ensured, and the time delay and variability caused by a weak network environment are reduced.

Description

Data recovery method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of internet of things technology, and in particular, to a data recovery method, apparatus, device, and storage medium.
Background
With the popularization and development of the internet of everything, the internet of things equipment and data generated by the internet of things equipment grow exponentially, however, the internet of things data cannot reach timeliness due to the fact that a plurality of internet of things equipment operates in a weak network environment, and therefore data loss can bring irreversible influence on occasions with high timeliness requirements such as the audio and video field.
In the related art, a way to solve the problem of packet loss is to perform data retransmission, which causes bandwidth consumption of the internet of things device, and a data recovery scheme capable of adapting to the current environment network and balancing bandwidth and timeliness is required at present.
Disclosure of Invention
To solve the technical problem or at least partially solve the technical problem, the present disclosure provides a data recovery method, apparatus, device and storage medium.
In a first aspect, an embodiment of the present disclosure provides a data recovery method, which is applied to a client, and the method includes:
acquiring a round-trip delay sampling value, a bandwidth sampling value and a packet loss rate sampling value in the current data transmission process;
predicting the round trip delay sampling value by adopting a prediction algorithm to determine a round trip delay predicted value;
determining a bandwidth predicted value according to the round trip delay predicted value, and substituting a pre-established regression function according to the round trip delay predicted value and the bandwidth predicted value to determine a packet loss rate predicted value;
and responding to the received packet loss information returned by the server, determining to package the corresponding data of the buffer area by adopting a forward error correction mode and/or a negative feedback mode according to the round trip delay sampling value, the bandwidth sampling value, the packet loss rate sampling value, the round trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value compared with preset conditions, and sending the packaged corresponding data to the server to recover the data.
Optionally, the step of predicting the round trip delay sample value by using a prediction algorithm by using the smoothed round trip delay to determine a predicted round trip delay value includes:
the round trip delay prediction value is determined by the following formula,
SRTT n,n =SRTT n,n-1 +a n (SRTT n -SRTT n,n-1 )
wherein, SRTT n The value of the sample, SRTT, representing the round trip delay at time n n,n Is shown in SRTT n Predicted value of round trip delay at n time under given premise, SRTT n,n-1 Is shown in SRTT n-1 Predicted value of round-trip delay at n time under given premise, a n Representing a gain factor.
Optionally, the determining, according to the round trip delay sampling value, the bandwidth sampling value, the packet loss rate sampling value, the round trip delay predicted value, the bandwidth predicted value, and the packet loss rate predicted value, and the comparison with a preset condition, to adopt a forward error correction mode and/or a negative feedback mode includes:
before the round-trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value are stable, determining to adopt a forward error correction mode and/or a negative feedback mode according to comparison of the round-trip delay sampled value, the bandwidth sampled value and the packet loss rate sampled value with preset conditions;
and after the round-trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value are stable, determining to adopt the round-trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value to compare with preset conditions, and determining to adopt a forward error correction mode and/or a negative feedback mode.
Optionally, the determining that a forward error correction mode and/or a negative feedback mode is/are adopted by comparing the predicted round trip delay value, the predicted bandwidth value and the predicted packet loss rate value with a preset condition includes:
if the predicted value of the round-trip delay meets the interval [0,2/5T ] or the predicted value of the packet loss rate is less than or equal to 4%, determining to adopt a negative feedback mode, wherein T is the preset maximum delay time;
if the predicted value of the round trip delay is greater than T or the predicted value of the packet loss rate is greater than 8%, determining to adopt a forward error correction mode;
otherwise, adopting a forward error correction mode and a negative feedback mode.
Optionally, the determining to encapsulate the data corresponding to the buffer by using a forward error correction method and/or a negative feedback method, and send the encapsulated corresponding data to the server to recover the data includes:
if the negative feedback mode is determined, packaging the original packet corresponding to the packet loss information to generate a NACK packet, and sending the NACK packet to the server; and the server analyzes the NACK packet to generate an original packet, and returns packet loss information to the client under the condition of detecting packet loss.
Optionally, the determining to encapsulate the data corresponding to the buffer by using a forward error correction method and/or a negative feedback method, and send the encapsulated corresponding data to the server to recover the data includes:
if the forward error correction mode is determined, encapsulating the original packet and the redundant packet into FEC packets one by one according to the sizes of the original packet and the redundant packet; and the service end decodes the FEC packet to obtain an original packet and inserts the original packet into the data packet.
Optionally, the determining to encapsulate the data corresponding to the buffer by using a forward error correction method and/or a negative feedback method, and send the encapsulated corresponding data to the server to recover the data includes:
if the forward error correction mode and the negative feedback mode are determined to be adopted, the original packet and the redundant packet are encapsulated into an FEC packet one by one according to the sizes of the original packet and the redundant packet; and if the unrecovered original packet exists, packet loss information is returned to the client.
In a second aspect, an embodiment of the present disclosure provides a data recovery apparatus, which is applied to a client, and the apparatus includes:
the acquisition module is used for acquiring a round-trip delay sampling value, a bandwidth sampling value and a packet loss rate sampling value in the current data transmission process;
the first prediction module is used for predicting the round trip delay sampling value by adopting a prediction algorithm and determining a round trip delay prediction value;
the second prediction module is used for determining a bandwidth prediction value according to the round-trip delay prediction value and substituting a pre-established regression function according to the round-trip delay prediction value and the bandwidth prediction value to determine a packet loss rate prediction value;
and the recovery module is used for responding to the received packet loss information returned by the server, determining that the data corresponding to the buffer area is packaged by adopting a forward error correction mode and/or a negative feedback mode according to the round trip delay sampling value, the bandwidth sampling value, the packet loss rate sampling value, the round trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value compared with preset conditions, and sending the packaged corresponding data to the server to recover the data.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor; a memory for storing the processor-executable instructions; the processor is configured to read the executable instruction from the memory, and execute the instruction to implement the data recovery method according to the first aspect.
In a fourth aspect, the present disclosure provides a computer-readable storage medium, where the storage medium stores a computer program, and the computer program, when executed by a processor, implements the data recovery method according to the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages: by acquiring a round trip delay sampling value, a bandwidth sampling value and a packet loss rate sampling value in the current data transmission process, predicting a round trip delay prediction value, a bandwidth prediction value and a packet loss rate prediction value, responding to received packet loss information returned by a server, and comparing the sampling value or the prediction value with preset conditions, determining to adopt a forward error correction mode and/or a negative feedback mode for data recovery, the self-adaptive selection of the forward error correction mode and/or the negative feedback mode for data recovery is realized, the data recovery capability is improved on the premise of ensuring the bandwidth, the balance between the bandwidth and timeliness is realized, and the delay and the variability brought by the weak network environment are reduced by performing prediction and packaging at a client.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a data recovery method according to an embodiment of the disclosure;
fig. 2 is a schematic diagram of a client package according to an embodiment of the disclosure;
fig. 3 is a schematic diagram illustrating a client and a server according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a data recovery apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
Fig. 1 is a schematic flowchart of a data recovery method according to an embodiment of the present disclosure, where the method according to the embodiment of the present disclosure may be executed by a data recovery apparatus, and the apparatus may be implemented by software and/or hardware and may be integrated on any electronic device with computing capability.
As shown in fig. 1, a data recovery method provided by an embodiment of the present disclosure may include:
step 101, obtaining a round-trip delay sampling value, a bandwidth sampling value and a packet loss rate sampling value in the current data transmission process.
The method disclosed by the embodiment of the disclosure can be applied to the weak network environment, for example, to equipment such as an internet of things gateway. The client performs packet processing, the server performs unpacking processing and data restoration, and the client includes: the system comprises a data reading and buffering module, a bandwidth and Round-Trip Time (RTT) acquisition and prediction module, a packet loss rate calculation and prediction module, a Negative feedback (NACK) or Forward Error Correction (FEC) mechanism module, and a server performs corresponding unpacking processing according to a data protocol format transmitted by a client.
In this embodiment, the data reading buffer module is configured to store data sent by the client, so as to recover the data in a later period. And the bandwidth and RTT acquisition and prediction module is used for acquiring real-time bandwidth and RTT data and predicting according to the acquired data. And the packet loss rate calculation and prediction module is used for acquiring relevant data to calculate the packet loss rate and predicting the packet loss rate.
The following explains the acquisition section.
As an example, RTT employs a smoothed round trip delay (i.e., SRTT), where SRTT = (α × SRTT) + ((1- α) × RTT), where α is taken to be [0.8,0.9 = [, [ SRTT ] ]]Constant in between. One thread collects the SRTT from the client, wherein, the starting phase only collects the SRRT data at the 0 th time, and the SRTT at the time 1,0 =SRTT 0 . And when the SRTT is acquired, the other thread performs bandwidth acquisition work in each SRTT period through a bandwidth acquisition program, and stores the result into a set of the bandwidth B.
The packet loss rate calculation formula is as follows:
Figure BDA0003843751510000061
wherein, LPR represents the packet loss rate, RP represents the number of packets that need to be retransmitted, and SP represents the number of transmitted packets. And in each SRTT period, after the client receives RP data through NACK (negative acknowledgement), the LPR is calculated by combining with the known SP and is stored in a packet loss ratio LPR set through the thread.
And step 102, predicting the round trip delay sampling value by adopting a prediction algorithm, and determining a round trip delay predicted value.
In the present embodiment, the prediction algorithm includes, but is not limited to, a kalman filter algorithm and the like. Kalman filtering (Kalman filtering) is an algorithm that uses a linear system state equation to optimally estimate the state of a system by inputting and outputting observation data through the system.
As an example, the round trip delay prediction value is determined by the following formula,
SRTT n,n =SRTT n,n-1 +a n (SRTT n -SRTT n,n-1 )
wherein, SRTT n The value of the sample, SRTT, representing the round trip delay at time n n,n Is shown in SRTT n Round trip delay under given premisePredicted value at time n, SRTT n,n-1 Is shown in SRTT n-1 Predicted value of round-trip delay at n time under given premise, a n Representing a gain factor.
In this example, for time 0, SRTT 1,0 =SRTT 0 And then, the two are brought into Kalman filtering, and a is set n And =1, continuously iterating to perform prediction and update operations, and storing the result in the set of the SRTT.
And 103, determining a bandwidth predicted value according to the round trip delay predicted value, and substituting the round trip delay predicted value and the bandwidth predicted value into a pre-established regression function to determine a packet loss rate predicted value.
In this embodiment, the SRTT time and bandwidth formula is:
Figure BDA0003843751510000071
wherein, the first and the second end of the pipe are connected with each other,
Figure BDA0003843751510000072
which indicates the time required to transmit the data,
Figure BDA0003843751510000073
indicating the delay time required to transmit the FL frame, which indicates the size of the transmitted data frame.
When the end-to-end delay is controlled within 200ms, the data transmission overall cannot sense obvious delay, T is the maximum delay time appointed to a target, optionally, T is 200ms, the equation is changed, and a bandwidth predicted value is determined according to a round-trip delay predicted value.
In this embodiment, the SRTT data and the bandwidth data are read, and the packet loss rate calculated in one SRTT period is obtained, and then a curve of the packet loss rate associated with the SRTT and the bandwidth is fitted by regression, so as to predict the packet loss rate.
In the embodiment, by fitting a regression function among the LPR, the SRTT and the bandwidth B, data are taken out from sets LPR, SRTT and B for training, parameters of the regression function are fitted, and the regression function is used for predicting the packet loss rate.
And step 104, in response to receiving packet loss information returned by the server, determining to package the corresponding data of the buffer area by adopting a forward error correction mode and/or a negative feedback mode according to the round trip delay sampling value, the bandwidth sampling value, the packet loss rate sampling value, the round trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value compared with preset conditions, and sending the packaged corresponding data to the server to recover the data.
In this embodiment, the client sends data to the server, and when packet loss occurs, the server returns packet loss information to the client.
Optionally, before the round-trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value are stable, a forward error correction mode and/or a negative feedback mode are determined to be adopted according to comparison of the round-trip delay sampled value, the bandwidth sampled value and the packet loss rate sampled value with preset conditions. And after the round-trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value are stable, determining to adopt a forward error correction mode and/or a negative feedback mode by comparing the round-trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value with preset conditions. For example, taking a kalman filter algorithm as an example, according to the currently acquired SRTT time, bandwidth B, and calculated packet loss ratio LPR, as well as an SRTT predicted value, a predicted value of bandwidth B, and a packet loss ratio predicted based on a regression function determined based on the kalman filter algorithm, before the kalman filter predicted value becomes stable, the client is encapsulated by adopting a repair method corresponding to the sampling value, and when the kalman filter predicted value becomes stable, the client is encapsulated by adopting a repair method corresponding to the predicted value, so as to select a data repair method suitable for the current network.
The preset conditions will be explained below.
Optionally, taking the predicted value as an example, if the predicted value of the round-trip delay is less than or equal to the first time or the predicted value of the packet loss rate is less than or equal to the first ratio, determining to adopt a negative feedback mode; if the predicted round-trip delay value is greater than a second time or the predicted packet loss rate value is greater than a second proportion, determining to adopt a forward error correction mode; otherwise, adopting a forward error correction mode and a negative feedback mode. Wherein the first time is less than the second time, and the first proportion is less than the second proportion.
Optionally, the data delay is less than 200ms, the jitter is less than 40ms, and the packet loss rate is less than 8%, and when the data delay is within the value range, the picture has no delay. Generally, when the MTU =1500 and the network bandwidth is 1000Mbps, the data transmission time is negligible, and the target maximum delay time T is about equal to (1/2) SRTT time. When a NACK mechanism is used, the optimal situation is that one retransmission achieves the effect of repairing a packet, the data of the opposite terminal needs (3/2) SRTT time, and the service terminal at least needs (7/2) SRTT time to repair the data when the retransmission times reach 3 times and the data is not transmitted and discarded.
As an example, taking a predicted value as an example, if the predicted value of the round-trip delay meets an interval [0,2/5T ] or the predicted value of the packet loss rate is less than or equal to 4%, determining to adopt a negative feedback mode, where T is a preset maximum delay time; if the predicted value of the round trip delay is larger than T or the predicted value of the packet loss rate is larger than 8%, determining to adopt a forward error correction mode; otherwise, adopting a forward error correction mode and a negative feedback mode. It should be noted that the specific value of the above-mentioned determination condition is an example, and the implementation manner of comparing the sampling value with the preset condition may refer to the above-mentioned predicted value, which is not described herein again.
In this embodiment, the client acquires data corresponding to packet loss information from the data buffer area in a certain manner, packages the data, and sends the data to the server, and the server analyzes the manner in which the client sends the data according to an agreed protocol format, and performs unpacking processing according to a corresponding manner, so as to perform repair-package processing on the unpacked data. Wherein, the whole data repairing process is a process of continuous iteration and updating. The client-side packaging flow chart is shown in fig. 2, and the client-side and server-side parsing flow chart is shown in fig. 3.
The following describes a process of performing data recovery by using a forward error correction method and/or a negative feedback method.
As an example, if it is determined that a negative feedback mode is adopted, encapsulating an original packet corresponding to the packet loss information to generate a NACK packet, and sending the NACK packet to the server; and the server analyzes the NACK packet to generate an original packet, and returns packet loss information to the client under the condition of detecting packet loss.
As another example, if it is determined that a forward error correction manner is adopted, encapsulating the original packet and the redundant packet one by one into an FEC packet according to the sizes of the original packet and the redundant packet; and the service end decodes the FEC packet to obtain an original packet and inserts the original packet into the data packet.
As another example, if it is determined that a forward error correction manner and a negative feedback manner are adopted, the original packet and the redundant packet are encapsulated into an FEC packet one by one according to the sizes of the original packet and the redundant packet; and if the unrecovered original packet exists, packet loss information is returned to the client.
The following is an example with reference to an actual application scenario.
In this example, the module is applied to the internet of things video gateway data control and repair module in the internet of things industry. Firstly, in the data transmission stage, after receiving video data, a client stores the data to be transmitted in a buffer area, then transmits the data to an opposite-end video gateway, and records the current time and the number of current data packet transmission packets. And after receiving the data, the server detects whether the data has packet loss, and if the data has packet loss, the server packages the serial number of the packet loss according to the data packet in the NACK protocol format and returns the data packet to the client.
When the server returns data, recording the current time and calculating a difference value with the sending time, performing smoothing processing to generate SRTT data, further, analyzing the data by the client, continuously packaging and sending the data to the opposite terminal if the SRTT data is not contained, recording the number of packet loss and a packet loss serial number if the NACK data is contained, collecting the current bandwidth B, calculating the current packet loss rate LPR, training a Kalman filtering model by the current SRTT, the bandwidth B and the packet loss rate LPR, obtaining the SRTT and the bandwidth B of the next state and the packet loss rate LPR predicted by using a regression algorithm, determining whether a predicted value or a sampling value is used according to whether the Kalman filtering predicted value is stable, packaging in a corresponding packaging mode, sending the SRTT and sending the packet to the opposite terminal, and simultaneously recording the current time, the number of sent packets and the NACK retry number.
In the process of packaging, if the packet is in a NACK form, directly taking an original packet corresponding to the packet loss serial number from the buffer area and packaging the original packet into a NACK packet; if the packet is in the FEC form, determining the sizes of an original packet K and a redundant packet N-K, wherein N is the total size of the original packet and the redundant packet, grouping the current N packets, and encapsulating the current N packets into FEC protocol format packets one by one; if the packet is in the NACK and FEC forms, the FEC packet is packaged firstly, the original packet which is not recovered by the FEC packet is returned in the NACK form, and then the packet loss serial number is taken out from the buffer area to be sent.
After receiving the packet data of the client, the server analyzes various protocol format packets contained in the packets, if the packets are in a NACK form, the server directly analyzes the original packets and detects whether packet loss exists or not, and if the packet loss exists, the packets are packaged into NACK packets and returned to the client; if the FEC type is adopted, the FEC packet is decoded to recover an original packet and then is inserted into an original data packet; and if the packets are in the FEC and NACK forms, decoding the original packets by using the FEC, recording the unrecovered original packets, and returning the unrecovered original packets to the client in the NACK form. Therefore, by iterating the processes, the system realizes data restoration in a mode of adaptively selecting the restoration packet according to the comparison between the acquired data and the predicted data.
According to the technical scheme of the embodiment of the disclosure, the round-trip delay sampling value, the bandwidth sampling value and the packet loss rate sampling value in the current data transmission process are obtained, the round-trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value are predicted, the packet loss information returned by the server is responded, and the data recovery is determined to be performed by adopting a forward error correction mode and/or a negative feedback mode according to the comparison of the sampling value or the predicted value and the preset condition. In addition, a Kalman filtering algorithm is applied to iterative prediction in the scene so as to accurately determine the network state at the next moment, and the data recovery capability is further improved.
Fig. 4 is a schematic structural diagram of a data recovery apparatus according to an embodiment of the present disclosure, and as shown in fig. 4, the data recovery apparatus includes: an acquisition module 41, a first prediction module 42, a second prediction module 43, and a recovery module 44.
The acquisition module 41 is configured to acquire a round-trip delay sampling value, a bandwidth sampling value, and a packet loss rate sampling value in a current data transmission process;
a first prediction module 42, configured to predict the round trip delay sample value by using a prediction algorithm, and determine a round trip delay predicted value;
a second prediction module 43, configured to determine a bandwidth prediction value according to the round-trip delay prediction value, and substitute a pre-established regression function according to the round-trip delay prediction value and the bandwidth prediction value to determine a packet loss rate prediction value;
and the recovery module 44 is configured to, in response to receiving packet loss information returned by the server, determine to package data corresponding to the buffer area in a forward error correction manner and/or a negative feedback manner according to the round-trip delay sampling value, the bandwidth sampling value, the packet loss rate sampling value, the round-trip delay predicted value, the bandwidth predicted value, and the packet loss rate predicted value, and compare the preset conditions, and send the packaged corresponding data to the server to recover the data.
Optionally, with the round trip delay smoothed, the first prediction module 42 is specifically configured to: the predicted round-trip delay value, SRTT, is determined by the following formula n,n =SRTT n,n-1 +a n (SRTT n -SRTT n,n-1 ) Wherein, SRTT n The value of the sample, SRTT, representing the round trip delay at time n n,n Is shown in SRTT n Predicted value of round trip delay at time n, SRT, on the given premiseT n,n-1 Is shown in SRTT n-1 Predicted value of round-trip delay at n time under given premise, a n Representing a gain factor.
Optionally, the recovery module 44 comprises: the judging unit is used for determining to adopt a forward error correction mode and/or a negative feedback mode according to the comparison of the round-trip delay sampling value, the bandwidth sampling value and the packet loss rate sampling value with preset conditions before the round-trip delay predicting value, the bandwidth predicting value and the packet loss rate predicting value are stable; and after the round-trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value are stable, determining to adopt the round-trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value to compare with preset conditions, and determining to adopt a forward error correction mode and/or a negative feedback mode.
Optionally, the judging unit block is specifically configured to: if the predicted value of the round-trip delay meets the interval [0,2/5T ] or the predicted value of the packet loss rate is less than or equal to 4%, determining to adopt a negative feedback mode, wherein T is the preset maximum delay time; if the predicted value of the round trip delay is greater than T or the predicted value of the packet loss rate is greater than 8%, determining to adopt a forward error correction mode; otherwise, adopting a forward error correction mode and a negative feedback mode.
Optionally, the recovery module 44 comprises: the first packaging unit is used for packaging the original packet corresponding to the packet loss information to generate a NACK packet and sending the NACK packet to the server if a negative feedback mode is determined to be adopted; and the server analyzes the NACK packet to generate an original packet, and returns packet loss information to the client under the condition of detecting packet loss.
Optionally, the recovery module 44 comprises: a second encapsulating unit, configured to encapsulate the original packet and the redundant packet one by one into an FEC packet according to sizes of the original packet and the redundant packet if it is determined that the forward error correction mode is adopted; and the service end decodes the FEC packet to obtain an original packet and inserts the original packet into the data packet.
Optionally, the recovery module 44 comprises: a third encapsulating unit, configured to encapsulate the original packet and the redundant packet one by one into an FEC packet according to sizes of the original packet and the redundant packet if it is determined that a forward error correction manner and a negative feedback manner are used; and if the unrecovered original packet exists, packet loss information is returned to the client.
The data recovery device provided by the embodiment of the disclosure can execute any data recovery method provided by the embodiment of the disclosure, and has corresponding functional modules and beneficial effects of the execution method. Reference may be made to the description of any method embodiment of the disclosure that may not be described in detail in the embodiments of the apparatus of the disclosure.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 5, the electronic device 600 includes one or more processors 601 and memory 602.
The processor 601 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device 600 to perform desired functions.
The memory 602 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. Volatile memory can include, for example, random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, read Only Memory (ROM), a hard disk, flash memory, and the like. One or more computer program instructions may be stored on a computer-readable storage medium and executed by processor 601 to implement the methods of the embodiments of the present disclosure above and/or other desired functionality. Various contents such as an input signal, a signal component, a noise component, etc. may also be stored in the computer-readable storage medium.
In one example, the electronic device 600 may further include: an input device 603 and an output device 604, which are interconnected by a bus system and/or other form of connection mechanism (not shown). The input device 603 may also include, for example, a keyboard, a mouse, and the like. The output device 604 may output various information including the determined distance information, direction information, and the like to the outside. The output devices 604 may include, for example, a display, speakers, a printer, and a communication network and remote output devices connected thereto, among others.
Of course, for simplicity, only some of the components of the electronic device 600 relevant to the present disclosure are shown in fig. 5, omitting components such as buses, input/output interfaces, and the like. In addition, electronic device 600 may include any other suitable components depending on the particular application.
In addition to the methods and apparatus described above, embodiments of the present disclosure may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform any of the methods provided by embodiments of the present disclosure.
The computer program product may write program code for performing operations for embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform any of the methods provided by the embodiments of the present disclosure.
The computer-readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It is noted that, in this document, relational terms such as "first" and "second," and the like, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The previous description is only for the purpose of describing particular embodiments of the present disclosure, so as to enable those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A data recovery method is applied to a client, and the method comprises the following steps:
acquiring a round-trip delay sampling value, a bandwidth sampling value and a packet loss rate sampling value in the current data transmission process;
predicting the round trip delay sampling value by adopting a prediction algorithm to determine a round trip delay predicted value;
determining a bandwidth predicted value according to the round trip delay predicted value, and substituting a pre-established regression function according to the round trip delay predicted value and the bandwidth predicted value to determine a packet loss rate predicted value;
and responding to the received packet loss information returned by the server, determining to package the corresponding data of the buffer area by adopting a forward error correction mode and/or a negative feedback mode according to the round trip delay sampling value, the bandwidth sampling value, the packet loss rate sampling value, the round trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value compared with preset conditions, and sending the packaged corresponding data to the server to recover the data.
2. The method of claim 1 wherein using the smoothed round trip delay and using a prediction algorithm to predict the round trip delay sample values to determine a round trip delay prediction value comprises:
the round trip delay prediction value is determined by the following formula,
SRTT n,n =SRTT n,n-1 +a n (SRTT n -SRTT n,n-1 )
wherein SRTT n The value of the sample, SRTT, representing the round trip delay at time n n,n Is shown in SRTT n Predicted value of round trip delay at n time under given premise, SRTT n,n-1 Is shown in SRTT n-1 Predicted value of round-trip delay at n time under given premise, a n Representing the gain factor.
3. The method of claim 1, wherein the determining to use a forward error correction mode and/or a negative feedback mode according to the round trip delay sampling value, the bandwidth sampling value, the packet loss sampling value, the round trip delay prediction value, the bandwidth prediction value, and the packet loss prediction value compared with preset conditions comprises:
before the round-trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value are stable, determining to adopt a forward error correction mode and/or a negative feedback mode according to comparison of the round-trip delay sampling value, the bandwidth sampling value and the packet loss rate sampling value with preset conditions;
and after the round-trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value are stable, determining to adopt the round-trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value to compare with preset conditions, and determining to adopt a forward error correction mode and/or a negative feedback mode.
4. The method as claimed in claim 3, wherein said determining to use a forward error correction mode and/or a negative feedback mode by comparing the predicted round trip delay value, the predicted bandwidth value, and the predicted packet loss rate value with preset conditions comprises:
if the predicted value of the round-trip delay meets the interval [0,2/5T ] or the predicted value of the packet loss rate is less than or equal to 4%, determining to adopt a negative feedback mode, wherein T is the preset maximum delay time;
if the predicted value of the round trip delay is larger than T or the predicted value of the packet loss rate is larger than 8%, determining to adopt a forward error correction mode;
otherwise, adopting a forward error correction mode and a negative feedback mode.
5. The method as claimed in claim 1, wherein the determining encapsulates the buffer corresponding data in a forward error correction manner and/or a negative feedback manner, and sends the encapsulated corresponding data to the server to recover the data comprises:
if the negative feedback mode is determined, packaging the original packet corresponding to the packet loss information to generate a NACK packet, and sending the NACK packet to the server; and the server analyzes the NACK packet to generate an original packet, and returns packet loss information to the client under the condition of detecting packet loss.
6. The method as claimed in claim 1, wherein the determining encapsulates the buffer corresponding data in a forward error correction manner and/or a negative feedback manner, and sends the encapsulated corresponding data to the server to recover the data comprises:
if the forward error correction mode is determined, encapsulating the original packet and the redundant packet into FEC packets one by one according to the sizes of the original packet and the redundant packet; and the service end decodes the FEC packet to obtain an original packet and inserts the original packet into the data packet.
7. The method as claimed in claim 1, wherein the determining to encapsulate the buffer corresponding data in a forward error correction manner and/or a negative feedback manner, and send the encapsulated corresponding data to the server to recover the data comprises:
if the forward error correction mode and the negative feedback mode are determined to be adopted, the original packet and the redundant packet are encapsulated into an FEC packet one by one according to the sizes of the original packet and the redundant packet; and if the unrecovered original packet exists, packet loss information is returned to the client.
8. A data recovery apparatus, applied to a client, the apparatus comprising:
the acquisition module is used for acquiring a round-trip delay sampling value, a bandwidth sampling value and a packet loss rate sampling value in the current data transmission process;
the first prediction module is used for predicting the round trip delay sampling value by adopting a prediction algorithm and determining a round trip delay prediction value;
the second prediction module is used for determining a bandwidth prediction value according to the round-trip delay prediction value and substituting a pre-established regression function according to the round-trip delay prediction value and the bandwidth prediction value to determine a packet loss rate prediction value;
and the recovery module is used for responding to the received packet loss information returned by the server, determining to adopt a forward error correction mode and/or a negative feedback mode to package the corresponding data of the buffer area according to the round trip delay sampling value, the bandwidth sampling value, the packet loss rate sampling value, the round trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value compared with preset conditions, and sending the packaged corresponding data to the server so as to recover the data.
9. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the data recovery method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the data recovery method of any of the preceding claims 1-7.
CN202211119139.9A 2022-09-13 2022-09-13 Data recovery method, device, equipment and storage medium Active CN115549860B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211119139.9A CN115549860B (en) 2022-09-13 2022-09-13 Data recovery method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211119139.9A CN115549860B (en) 2022-09-13 2022-09-13 Data recovery method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115549860A true CN115549860A (en) 2022-12-30
CN115549860B CN115549860B (en) 2023-08-29

Family

ID=84727455

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211119139.9A Active CN115549860B (en) 2022-09-13 2022-09-13 Data recovery method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115549860B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101304537A (en) * 2008-03-24 2008-11-12 北京邮电大学 3G-IP wireless video transmission system
US20130114421A1 (en) * 2011-11-04 2013-05-09 Microsoft Corporation Adaptive bandwidth estimation
WO2019060908A1 (en) * 2017-09-25 2019-03-28 Dolby Laboratories Licensing Corporation Systems and methods to optimize the load of multipath data transportation
CN110855400A (en) * 2019-11-29 2020-02-28 江苏方天电力技术有限公司 Self-adaptive packet loss recovery method based on error correction code, computing device and storage medium
CN113067750A (en) * 2021-03-24 2021-07-02 北京字节跳动网络技术有限公司 Bandwidth measuring method and device and electronic device
CN113891172A (en) * 2021-09-02 2022-01-04 西北工业大学 Adaptive code rate control method based on RTT (round trip time) and suitable for wireless Mesh network
CN114337928A (en) * 2021-12-30 2022-04-12 福州大学 Real-time video transmission method based on ARQ and FEC self-adaptive selection

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101304537A (en) * 2008-03-24 2008-11-12 北京邮电大学 3G-IP wireless video transmission system
US20130114421A1 (en) * 2011-11-04 2013-05-09 Microsoft Corporation Adaptive bandwidth estimation
WO2019060908A1 (en) * 2017-09-25 2019-03-28 Dolby Laboratories Licensing Corporation Systems and methods to optimize the load of multipath data transportation
CN110855400A (en) * 2019-11-29 2020-02-28 江苏方天电力技术有限公司 Self-adaptive packet loss recovery method based on error correction code, computing device and storage medium
CN113067750A (en) * 2021-03-24 2021-07-02 北京字节跳动网络技术有限公司 Bandwidth measuring method and device and electronic device
CN113891172A (en) * 2021-09-02 2022-01-04 西北工业大学 Adaptive code rate control method based on RTT (round trip time) and suitable for wireless Mesh network
CN114337928A (en) * 2021-12-30 2022-04-12 福州大学 Real-time video transmission method based on ARQ and FEC self-adaptive selection

Also Published As

Publication number Publication date
CN115549860B (en) 2023-08-29

Similar Documents

Publication Publication Date Title
US20230237117A1 (en) Method and system for detecting slow page load
US9584380B2 (en) Method and system for detecting slow page load
CN113169896B (en) Continuous calibration of network metrics
US10594449B2 (en) Voice data transmission method and device
US20100268757A1 (en) Pseudo Pipelining of Client Requests
US10164893B2 (en) Data transfer apparatus, data transfer controlling method and data stream
JP2017516336A (en) Transport accelerator that implements extended transmission control functionality
CN111970208B (en) Network transmission method, device, equipment and computer readable storage medium
CN110830460B (en) Connection establishing method and device, electronic equipment and storage medium
CN102469028B (en) Apparatus and method for ensuring fairness of UDP data transmission in Ethernet environment
US20030198250A1 (en) Method, apparatus and system for transmitting compressed header data
JP6398329B2 (en) Control device, control method and program
JP5170891B2 (en) Internet network device and data transmission method thereof
CN115549860B (en) Data recovery method, device, equipment and storage medium
CN110535781B (en) Flow control method based on window prediction
JP2008210089A (en) Command relay unit and command relay program
US11368400B2 (en) Continuously calibrated network system
CN113179317A (en) Test system and method for content rewriting device
US8837314B2 (en) Connection timeout management in a communication network with network redundancy
KR102469659B1 (en) Data transfer device, data transfer controlling method and data stream
CN113439416B (en) Continuously calibrated network system
US11356326B2 (en) Continuously calibrated network system
CN115150283B (en) Network bandwidth detection method and device, computer equipment and storage medium
US20160179480A1 (en) Computer application development assistance
Salameh Towards Faster Web Page Loads Over Multiple Network Paths

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant