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

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

Info

Publication number
CN115549860B
CN115549860B CN202211119139.9A CN202211119139A CN115549860B CN 115549860 B CN115549860 B CN 115549860B CN 202211119139 A CN202211119139 A CN 202211119139A CN 115549860 B CN115549860 B CN 115549860B
Authority
CN
China
Prior art keywords
predicted value
trip delay
packet loss
round trip
bandwidth
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.)
Active
Application number
CN202211119139.9A
Other languages
Chinese (zh)
Other versions
CN115549860A (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Quality & Reliability (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present disclosure relates to a data recovery method, apparatus, device and storage medium, wherein 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 and a packet loss rate predicted value according to the round trip delay predicted value; and responding to the received packet loss information returned by the server, and determining to use a forward error correction mode and/or a negative feedback mode to recover data 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 comparing with preset conditions. According to the technical scheme, the data restoration can be performed in a self-adaptive mode, the data restoration capability is improved on the premise of guaranteeing the bandwidth, and the delay and the variability brought by a weak network environment are reduced.

Description

Data recovery method, device, equipment and storage medium
Technical Field
The disclosure relates to the technical field of internet of things, and in particular relates to a data recovery method, a device, equipment and a storage medium.
Background
With popularization and development of internet of things, internet of things equipment and data generated by the internet of things equipment grow exponentially, however, many internet of things equipment operate in a weak network environment, so that the timeliness of the internet of things data cannot be achieved, and in some occasions with higher timeliness requirements in the field of audio and video, the data loss can bring irreversible influence.
In the related art, the way to solve the packet loss problem is to perform data retransmission, which can bring about bandwidth consumption of the internet of things device, and at present, a data recovery scheme capable of adapting to the current environment network and balancing bandwidth and timeliness is needed.
Disclosure of Invention
In order to solve the above technical problems or at least partially solve the above technical problems, 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, applied to a client, where 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 the bandwidth predicted value into a pre-established regression function according to the round trip delay 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 zone 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 and comparing 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 sampling value by using a prediction algorithm to determine a round trip delay predicted 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 Sample value of round trip delay at time n, SRTT n,n Indicated at SRTT n Predicted value of round trip delay at time n under given premise, SRTT n,n-1 Indicated at SRTT n-1 Predicted value of round trip delay at time n under given premise, a n Representing the gain factor.
Optionally, the determining, according to the round trip delay sampling value, the bandwidth sampling value, the packet loss rate sampling value, and the round trip delay predicted value, the bandwidth predicted value, and the packet loss rate predicted value compared with preset conditions, 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 reach stability, 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;
after the round-trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value reach stability, 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, comparing the round trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value with preset conditions to determine that a forward error correction mode and/or a negative feedback mode is adopted, including:
if the round trip delay predicted value meets the interval [0,2/5T ] or the packet loss rate predicted value is smaller than or equal to 4%, determining to adopt a negative feedback mode, wherein T is the preset maximum delay time;
if the round trip delay predicted value is larger than T or the packet loss rate predicted value is larger 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 encapsulates the buffer corresponding data by adopting a forward error correction mode and/or a negative feedback mode, and sends the encapsulated corresponding data to the server to recover the data, which includes:
if the negative feedback mode is determined to be adopted, packaging an original packet corresponding to the packet loss information, generating a NACK packet, and sending the NACK packet to the server; the server analyzes the NACK packet to generate an original packet, and returns packet loss information to the client under the condition that packet loss is detected.
Optionally, the determining encapsulates the buffer corresponding data by adopting a forward error correction mode and/or a negative feedback mode, and sends the encapsulated corresponding data to the server to recover the data, which includes:
if the forward error correction mode is determined to be adopted, the original packet and the redundant packet are packaged into FEC packets one by one according to the sizes of the original packet and the redundant packet; the service end decodes the FEC packet to obtain an original packet, and inserts the original packet into the data packet.
Optionally, the determining encapsulates the buffer corresponding data by adopting a forward error correction mode and/or a negative feedback mode, and sends the encapsulated corresponding data to the server to recover the data, which includes:
if the forward error correction mode and the negative feedback mode are adopted, the original packets and the redundant packets are packaged into FEC packets one by one according to the sizes of the original packets and the redundant packets; the server decodes the FEC packet to obtain an original packet, inserts the original packet into a data packet, and returns packet loss information to the client if the unrecovered original packet exists.
In a second aspect, an embodiment of the present disclosure provides a data recovery apparatus, applied to a client, the apparatus including:
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 predicted value;
the second prediction module is used for determining a bandwidth predicted value according to the round trip delay predicted value and substituting the bandwidth predicted value into a preset regression function according to the round trip delay predicted value and the bandwidth predicted value to determine a packet loss rate predicted value;
and the recovery module is used for responding to the received packet loss information returned by the server, determining to package the corresponding data of the buffer zone 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 and comparing with preset conditions, and sending the packaged corresponding data to the server so as 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 described in the first aspect.
In a fourth aspect, an embodiment of the present disclosure provides a computer readable storage medium storing a computer program, where the computer program is executed by a processor to implement 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: the method comprises the steps of obtaining 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 predicted value, a bandwidth predicted value and a packet loss rate predicted value, responding to received packet loss information returned by a server, and determining to adopt a forward error correction mode and/or a negative feedback mode to restore data according to comparison of the above sampling values or predicted values and preset conditions, thereby realizing self-adaptive selection of the forward error correction mode and/or the negative feedback mode to restore data, improving data restoration capability, realizing balance of bandwidth and timeliness on the premise of guaranteeing bandwidth, and predicting and packaging at a client, and reducing delay and variability brought by a weak network environment.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a flow chart of a data recovery method according to an embodiment of the disclosure;
FIG. 2 is a schematic diagram of a client packet according to an embodiment of the disclosure;
fig. 3 is a schematic diagram illustrating analysis of a client and a server according to an embodiment of the disclosure;
fig. 4 is a schematic structural diagram of a data recovery device according to an embodiment of the 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, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
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 otherwise than as described herein; it will be apparent that the embodiments in the specification are only some, but not all, embodiments of the disclosure.
Fig. 1 is a flow chart of a data recovery method provided by an embodiment of the present disclosure, where the method provided by the embodiment of the present disclosure may be performed by a data recovery device, and the device may be implemented by using software and/or hardware and may be integrated on any electronic device with computing capability.
As shown in fig. 1, the data recovery method provided by the embodiment of the present disclosure may include:
step 101, 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 method of the embodiment of the disclosure can be applied to a weak network environment, for example, equipment such as an Internet of things gateway. The client side processes the package, the server side processes the unpacking and repairs the data, the client side includes: the system comprises a data reading buffer module, a bandwidth and Round Trip Time (RTT) acquisition prediction module, a packet loss rate calculation prediction module, an adaptive Negative Acknowledgement (NACK) (Negative Acknowledgement, negative feedback) or Forward Error Correction (FEC) (Forward Error Correction) mechanism module, and a server side which performs corresponding unpacking processing according to a data protocol format transmitted by a client side.
In this embodiment, the data reading buffer module is configured to store data sent by the client, for later recovery of the data. The bandwidth and RTT acquisition prediction module is used for acquiring bandwidth and RTT data in real time and predicting according to the acquired data. The packet loss rate calculation and prediction module is used for collecting related data, calculating the packet loss rate and predicting the packet loss rate.
The acquisition section is described below.
As an example, RTT uses a smoothed round trip delay (i.e., SRTT), where srtt= (α SRTT) + (1- α) RTT), where α takes [0.8,0.9]Constant of the same. One thread collects the SRTT from the client, wherein the starting stage only collects the SRRT data at the 0 th moment, and the SRTT at the moment 1,0 =SRTT 0 . While the SRTT is being acquired, anotherThe thread performs bandwidth collection work in each SRTT period through a bandwidth collection program, and stores the result into a set of bandwidths B.
The calculation formula of the packet loss rate is as follows:
wherein, LPR represents packet loss rate, RP represents the number of packets to be retransmitted, and SP represents the number of packets to be transmitted. And in each SRTT period, after the client receives RP data through NACK, calculating LPR by combining with known SP and storing the LPR into a packet loss rate LPR set.
And 102, predicting a round trip delay sampling value by adopting a prediction algorithm to determine a round trip delay predicted value.
In this 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 the system by inputting and outputting observed 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 Sample value of round trip delay at time n, SRTT n,n Indicated at SRTT n Predicted value of round trip delay at time n under given premise, SRTT n,n-1 Indicated at SRTT n-1 Predicted value of round trip delay at time n under given premise, a n Representing the gain factor.
In this example, for time 0, SRTT 1,0 =SRTT 0 Further, both are brought into Kalman filtering, and a is set at the same time n =1, performing prediction and update operations continuously and iteratively, and storing the result into the set of SRTTs.
And step 103, determining a bandwidth predicted value according to the round trip delay predicted value, and substituting the bandwidth predicted value into a pre-established regression function according to the round trip delay predicted value to determine a packet loss rate predicted value.
In this embodiment, the formula of SRTT time and bandwidth is:
wherein, the liquid crystal display device comprises a liquid crystal display device,represents the time required to transmit data, +.>Indicating the delay time required to transmit the FL frame, and FL indicates the size of the transmitted data frame.
When the delay from end to end is controlled within 200ms, the data transmission is not perceived to have obvious delay as a whole, T is the maximum delay time appointed to the target, alternatively, T takes 200ms, the above equation is changed, and the bandwidth predicted value is determined according to the round trip delay predicted value.
In this embodiment, the SRTT data, the bandwidth data, and the packet loss rate calculated in one SRTT period are read, and then, a curve associated with the packet loss rate, the SRTT and the bandwidth is fitted through regression, so as to predict the packet loss rate.
The generation of the packet loss condition has an internal relation with the bandwidth in the network environment and the maximum delay time to the target, so that the relation between the LPR and the SRTT and the bandwidth B is established under the condition of predicting the packet loss, in the embodiment, the regression function between the LPR and the SRTT and the bandwidth B is fitted, the data is taken out from the set LPR, SRTT, B for training, the parameters of the regression function are fitted, and the regression function is used for predicting the packet loss rate.
And 104, responding to the received packet loss information returned by the server, determining to package the corresponding data of the buffer zone 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 and comparing 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 reach stability, 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. After the round-trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value reach stability, the round-trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value are determined to be adopted, and compared with preset conditions, the forward error correction mode and/or the negative feedback mode are determined to be adopted. For example, taking a kalman filtering algorithm as an example, according to the currently acquired SRTT time, the bandwidth B, the calculated packet loss rate LPR, the SRTT predicted value determined based on the kalman filtering algorithm, the predicted value of the bandwidth B, and the packet loss rate predicted based on the regression function, before the kalman filtering predicted value reaches a plateau, performing client-side encapsulation by adopting a repairing mode corresponding to a sampling value, and after the kalman filtering predicted value reaches a plateau, performing client-side encapsulation by adopting a repairing mode corresponding to the predicted value, so as to select a data repairing mode suitable for the current network.
The preset conditions are explained below.
Optionally, taking the predicted value as an example, if the round trip delay predicted value is less than or equal to a first time or the packet loss rate predicted value is less than or equal to a first proportion, determining to adopt a negative feedback mode; if the round trip delay predicted value is larger than the second time or the packet loss rate predicted value is larger than the 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 ratio is less than the second ratio.
Optionally, the data delay is less than 200ms, the jitter is less than 40ms, the packet loss rate is less than 8%, and when the data delay is within the numerical range, the picture has no delay sense. Typically, mtu=1500, and when 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 applied, the optimal condition is that one retransmission achieves the effect of repairing the packet, the (3/2) SRTT time is required for the data of the opposite terminal, and the service terminal is set to repair the data at least by (7/2) SRTT time when the retransmission times reach 3 times and the data are not transmitted and are discarded.
Taking a predicted value as an example, if the round trip delay predicted value meets the interval [0,2/5T ] or the packet loss rate predicted value is less than or equal to 4%, determining to adopt a negative feedback mode, wherein T is a preset maximum delay time; if the round trip delay predicted value is larger than T or the packet loss rate predicted value 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 judgment 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 the packet loss information from the data buffer in a determined manner, packages the data, sends the data to the server, analyzes the manner in which the client sends the data according to the agreed protocol format, and performs unpacking processing according to the corresponding manner, so as to repair the unpacked data. The whole data repairing process is a process of continuous iteration and updating. The packet flow chart at the client side is shown in fig. 2, and the analysis flow charts at the client and the server are shown in fig. 3.
The following describes a process of data recovery using a forward error correction mode and/or a negative feedback mode.
As an example, if it is determined that the negative feedback mode is adopted, packaging an original packet corresponding to the packet loss information, generating a NACK packet, and sending the NACK packet to the server; the server analyzes the NACK packet to generate an original packet, and returns packet loss information to the client under the condition that packet loss is detected.
As another example, if it is determined that the forward error correction method is adopted, the original packet and the redundant packet are packaged into FEC packets one by one according to the sizes of the original packet and the redundant packet; 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 the forward error correction mode and the negative feedback mode are adopted, the original packet and the redundant packet are packaged one by one into an FEC packet according to the sizes of the original packet and the redundant packet; the server decodes the FEC packet to obtain an original packet, inserts the original packet into a data packet, and returns packet loss information to the client if the unrecovered original packet exists.
The following is an illustration in connection with a practical application scenario.
In the example, the Internet of things video gateway data control and repair module is applied to the Internet of things industry. Firstly, in the data transmission stage, after the client is connected with the video data, the data to be transmitted is stored in a buffer area, and then the data is transmitted to the opposite-end video gateway, and the current time and the current data packet sending number are recorded. After receiving the data, the server detects whether the data has packet loss, if so, packages the sequence number of the packet loss according to the data packet in NACK protocol format, and returns to the client.
After the server returns data, recording the current time and calculating a difference value with the sending time, carrying out smoothing processing to generate SRTT data, further, analyzing the data by the client, if not containing NACK data, continuing to package and sending the package to the opposite end, if so, recording the number of lost packages and the serial number of lost packages, collecting the current bandwidth B, calculating the current lost package rate LPR, training a Kalman filtering model for the current SRTT, the bandwidth B and the lost package rate LPR to obtain the SRTT and the bandwidth B in the next state, predicting the lost package rate LPR by using a regression algorithm, determining whether the predicted value is used or the sampling value according to whether the predicted value of the Kalman filtering reaches stability, carrying out package in a corresponding package mode, sending the package to the opposite end, and simultaneously recording the current time, the package sending number and the NACK retry times.
In the process of the packet, if the packet is in a NACK form, directly taking out 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 data is in the FEC form, the sizes of an original packet K and a redundant packet N-K are determined, wherein N is the total size of the original packet and the redundant packet, the current N packets are taken as a group, and the packets are packaged into FEC protocol format packets one by one; and if the packet is in the NACK and FEC forms, packaging the FEC packet, returning the original packet which is not recovered by the FEC packet through the NACK form, and then taking out the packet loss sequence number from the buffer area for transmission.
After receiving the packet data of the client, the server analyzes various protocol format packets contained in the packets, directly analyzes the original packets if the packets are in a NACK form, detects whether packet loss exists, and encapsulates the packets into NACK packets to return to the client if the packet loss exists; if the data packet is in the FEC form, decoding the FEC packet to recover the original packet, and then inserting the original packet into the original data packet; if the data is in the form of FEC and NACK, the original packet is decoded by FEC, the unrecovered original packet is recorded, and the data is returned to the client in the form of NACK. Therefore, by iterating the above processes, the system realizes data repair by adaptively selecting a repair packet according to the comparison of the acquired data and the predicted data.
According to the technical scheme of the embodiment of the disclosure, by acquiring the round trip delay sampling value, the bandwidth sampling value and the packet loss rate sampling value in the current data transmission process, predicting the round trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value, responding to the packet loss information returned by the receiving server, and comparing the sampled values or the predicted values with preset conditions, determining to perform data recovery in a forward error correction mode and/or a negative feedback mode, thereby realizing data recovery in a self-adaptive selection NACK and/or FEC mode, improving the data recovery capability under the premise of ensuring the bandwidth, realizing the balance of the bandwidth and timeliness, and performing prediction and encapsulation at the client, and reducing the delay and variability brought by a weak network environment. In addition, a Kalman filtering algorithm is applied to the scene to carry out iterative prediction so as to accurately determine the network state at the next moment and further improve the data recovery capability.
Fig. 4 is a schematic structural diagram of a data recovery device according to an embodiment of the present disclosure, as shown in fig. 4, where the data recovery device includes: the system comprises 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 sampling 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 determine a packet loss rate prediction value according to the round trip delay prediction value and substitution of the bandwidth prediction value into a regression function established in advance;
and the recovery module 44 is configured to determine, in response to receiving packet loss information returned by the server, to package the buffer corresponding data 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 compared with 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: determining the round trip delay predicted value, SRTT, by the following formula n,n =SRTT n,n-1 +a n (SRTT n -SRTT n,n-1 ) Wherein, SRTT n Sample value of round trip delay at time n, SRTT n,n Indicated at SRTT n Predicted value of round trip delay at time n under given premise, SRTT n,n-1 Indicated at SRTT n-1 Predicted value of round trip delay at time n under given premise, a n Representing the gain factor.
Optionally, the recovery module 44 includes: the judging unit is used for determining to adopt a forward error correction mode and/or a negative feedback mode according to the round trip delay sampling value, the bandwidth sampling value and the packet loss rate sampling value and comparing with preset conditions before the round trip delay predicting value, the bandwidth predicting value and the packet loss rate predicting value reach stability; after the round-trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value reach stability, 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 round trip delay predicted value meets the interval [0,2/5T ] or the packet loss rate predicted value is smaller than or equal to 4%, determining to adopt a negative feedback mode, wherein T is the preset maximum delay time; if the round trip delay predicted value is larger than T or the packet loss rate predicted value is larger 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 includes: the first packaging unit is used for packaging the original packet corresponding to the packet loss information if the negative feedback mode is determined to be adopted, generating a NACK packet and sending the NACK packet to the server; the server analyzes the NACK packet to generate an original packet, and returns packet loss information to the client under the condition that packet loss is detected.
Optionally, the recovery module 44 includes: the second encapsulation unit is used for encapsulating the original packets and the redundant packets one by one into FEC packets according to the sizes of the original packets and the redundant packets if the forward error correction mode is determined to be adopted; 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 includes: the third encapsulation unit is used for encapsulating the original packets and the redundant packets into FEC packets one by one according to the sizes of the original packets and the redundant packets if the forward error correction mode and the negative feedback mode are determined to be adopted; the server decodes the FEC packet to obtain an original packet, inserts the original packet into a data packet, and returns packet loss information to the client if the unrecovered original packet exists.
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 the corresponding functional modules and beneficial effects of the execution method. Details of the embodiments of the apparatus of the present disclosure that are not described in detail may refer to descriptions of any of the embodiments of the method of the present 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 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, which 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) and/or cache memory (cache) and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on a computer readable storage medium and the processor 601 may execute the program instructions to implement the methods of the embodiments of the present disclosure above and/or other desired functions. Various contents such as an input signal, a signal component, a noise component, and the like may also be stored in the computer-readable storage medium.
In one example, the electronic device 600 may further include: input device 603 and output device 604, which are interconnected by a bus system and/or other form of connection mechanism (not shown). In addition, the input device 603 may also include, for example, a keyboard, a mouse, and the like. The output device 604 may output various information to the outside, including the determined distance information, direction information, and the like. The output means 604 may include, for example, a display, speakers, a printer, and a communication network and remote output devices connected thereto, etc.
Of course, only some of the components of the electronic device 600 that are relevant to the present disclosure are shown in fig. 5 for simplicity, components such as buses, input/output interfaces, etc. are omitted. In addition, the 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 which, when executed by a processor, cause the processor to perform any of the methods provided by the embodiments of the present disclosure.
The computer program product may be written 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, 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 which, when executed by a processor, cause the processor to perform any of the methods provided by the embodiments of the present disclosure.
A computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is 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 would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It should be 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. Moreover, 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 phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely a specific embodiment of the disclosure to enable one skilled in the art to understand or practice the 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 and described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A method for recovering data, applied to a client, the method comprising:
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 of the next state;
determining a bandwidth predicted value of the next state according to the round-trip delay predicted value, and substituting the bandwidth predicted value into a pre-established regression function according to the round-trip delay predicted value to determine a packet loss rate predicted value of the next state; the method comprises the steps of taking data from a set of round trip delay, bandwidth and packet loss rate, training, fitting parameters of a regression function, fitting a curve of the packet loss rate and the correlation of the round trip delay and the bandwidth through regression, and using the regression function for predicting the packet loss rate;
responding to the received packet loss information returned by the server, determining to package the corresponding data of the buffer zone 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 and comparing with preset conditions, and sending the packaged corresponding data to the server to recover the data; after the round-trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value reach stability, if the round-trip delay predicted value meets a range [0,2/5T ] or the packet loss rate predicted value is smaller than or equal to 4%, determining to adopt a negative feedback mode, wherein T is a preset maximum delay time; if the round trip delay predicted value is larger than T or the packet loss rate predicted value is larger than 8%, determining to adopt a forward error correction mode; otherwise, adopting a forward error correction mode and a negative feedback mode;
wherein, the round-trip delay after smoothing is adopted to determine the predicted value of the round-trip delay through the following formula,
SRTT n, =SRTT n, +a n (SRTT n -SRTT n, )
wherein, SRTT n Sample value of round trip delay at time n, SRTT n, Indicated at SRTT n Predicted value of round trip delay at time n under given premise, SRTT n, Indicated at SRTT n-1 Predicted value of round trip delay at time n under given premise, a n Representing the gain factor.
2. The method of claim 1, wherein determining to use a forward error correction mode and/or a negative feedback mode based on the round trip delay sample value, the bandwidth sample value, the packet loss rate sample value, and the round trip delay predicted value, the bandwidth predicted value, the packet loss rate predicted value compared with a preset condition comprises:
before the round-trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value reach stability, 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.
3. The method of 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, and the determining comprises:
if the negative feedback mode is determined to be adopted, packaging an original packet corresponding to the packet loss information, generating a NACK packet, and sending the NACK packet to the server; the server analyzes the NACK packet to generate an original packet, and returns packet loss information to the client under the condition that packet loss is detected.
4. The method of 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, and the determining comprises:
if the forward error correction mode is determined to be adopted, the original packet and the redundant packet are packaged into FEC packets one by one according to the sizes of the original packet and the redundant packet; the service end decodes the FEC packet to obtain an original packet, and inserts the original packet into the data packet.
5. The method of 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, and the determining comprises:
if the forward error correction mode and the negative feedback mode are adopted, the original packets and the redundant packets are packaged into FEC packets one by one according to the sizes of the original packets and the redundant packets; the server decodes the FEC packet to obtain an original packet, inserts the original packet into a data packet, and returns packet loss information to the client if the unrecovered original packet exists.
6. A data recovery device for application to a client, the device 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 predicted value of the next state;
the second prediction module is used for determining a bandwidth predicted value of the next state according to the round trip delay predicted value, and substituting the bandwidth predicted value into a pre-established regression function according to the round trip delay predicted value to determine a packet loss rate predicted value of the next state; the method comprises the steps of taking data from a set of round trip delay, bandwidth and packet loss rate, training, fitting parameters of a regression function, fitting a curve of the packet loss rate and the correlation of the round trip delay and the bandwidth through regression, and using the regression function for predicting the packet loss rate;
the recovery module is used for responding to the received packet loss information returned by the server, determining to package the corresponding data of the buffer zone 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 and comparing with preset conditions, and sending the packaged corresponding data to the server so as to recover the data; after the round-trip delay predicted value, the bandwidth predicted value and the packet loss rate predicted value reach stability, if the round-trip delay predicted value meets a range [0,2/5T ] or the packet loss rate predicted value is smaller than or equal to 4%, determining to adopt a negative feedback mode, wherein T is a preset maximum delay time; if the round trip delay predicted value is larger than T or the packet loss rate predicted value is larger than 8%, determining to adopt a forward error correction mode; otherwise, adopting a forward error correction mode and a negative feedback mode;
the first prediction module is specifically configured to: the round trip delay prediction value is determined by the following formula,
SRTT n, =SRTT n, +a n (SRTT n -SRTT n, )
wherein, SRTT n Sample value of round trip delay at time n, SRTT n, Indicated at SRTT n Predicted value of round trip delay at time n under given premise, SRTT n, Indicated at SRTT n-1 Predicted value of round trip delay at time n under given premise, a n Representing the gain factor.
7. 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 according to any one of the preceding claims 1-5.
8. 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-5.
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 CN115549860A (en) 2022-12-30
CN115549860B true 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 (6)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9215157B2 (en) * 2011-11-04 2015-12-15 Microsoft Technology Licensing, Llc Adaptive bandwidth estimation

Patent Citations (6)

* 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
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
CN115549860A (en) 2022-12-30

Similar Documents

Publication Publication Date Title
US9722900B2 (en) Methods and computer program products for transaction analysis of network traffic in a network device
US9154397B2 (en) Methods and computer program products for transaction relationships between application servers
US8335838B2 (en) Web page load time prediction and simulation
US10594449B2 (en) Voice data transmission method and device
US11252097B2 (en) Continuous calibration of network metrics
US20170353386A1 (en) Kind of congestion improvement method based on the quic protocol
US9584380B2 (en) Method and system for detecting slow page load
WO2010121063A1 (en) Pseudo pipelining of client requests
US20100058147A1 (en) Method and apparatus for reliable media transport
CN115549860B (en) Data recovery method, device, equipment and storage medium
CN110535781B (en) Flow control method based on window prediction
JP2006303765A (en) Tcp/ip transmission processing circuit and semiconductor integrated circuit provided with the same
WO2021051093A1 (en) Web acceleration via learning
WO2016058401A1 (en) Hypertext transfer protocol data restoring method and device
CN116320053A (en) Adaptation method, device, equipment and medium for protocol transmission interface parameter
US11368400B2 (en) Continuously calibrated network system
CN113179317A (en) Test system and method for content rewriting device
US11356326B2 (en) Continuously calibrated network system
US20160179480A1 (en) Computer application development assistance
CN111488542B (en) Webpage output method, device, system and storage medium
CN115334161B (en) Access request processing method and device, storage medium and electronic equipment
CN112579220B (en) Modal popup window display method and device
WO2020123867A1 (en) Continuously calibrated network system
CN116225930A (en) Webpage debugging method and device, storage medium and electronic equipment
CN113282292A (en) Compiling method and system for software development

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