CN112769526B - Data packet retransmission method, system and storage medium - Google Patents

Data packet retransmission method, system and storage medium Download PDF

Info

Publication number
CN112769526B
CN112769526B CN202011453157.1A CN202011453157A CN112769526B CN 112769526 B CN112769526 B CN 112769526B CN 202011453157 A CN202011453157 A CN 202011453157A CN 112769526 B CN112769526 B CN 112769526B
Authority
CN
China
Prior art keywords
data packet
retransmission request
retransmission
receiving end
state
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
CN202011453157.1A
Other languages
Chinese (zh)
Other versions
CN112769526A (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.)
Bangyan Technology Co ltd
Original Assignee
Bangyan Technology 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 Bangyan Technology Co ltd filed Critical Bangyan Technology Co ltd
Priority to CN202011453157.1A priority Critical patent/CN112769526B/en
Publication of CN112769526A publication Critical patent/CN112769526A/en
Application granted granted Critical
Publication of CN112769526B publication Critical patent/CN112769526B/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/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/1607Details of the supervisory signal
    • 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
    • H04L1/1854Scheduling and prioritising arrangements
    • 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
    • H04L1/1858Transmission or retransmission of more than one copy of acknowledgement message

Abstract

The invention discloses a data packet retransmission method, a system and a storage medium, wherein the method comprises the following steps: detecting the state of the received data packet; when the data packet state is a loss state, starting a timer; when the calculated time length of the timer is greater than or equal to a first preset time length, generating a first retransmission request; sending a first retransmission request to a sending end, wherein the sending end retransmits lost data packets according to the first retransmission request; when the calculated time length of the timer is greater than or equal to a second preset time length and the data packet state is a lost state, generating a second retransmission request; and sending the second retransmission request to a sending end, and retransmitting the lost data packet by the sending end according to the second retransmission request. The invention can prevent the sending end from repeating the received data packet, and simultaneously can ensure that the sending end can retransmit the lost data packet in time, thereby preventing the audio and video from being blocked for a long time and effectively improving the experience of the user on the real-time video. The invention can be widely applied to the technical field of video communication.

Description

Data packet retransmission method, system and storage medium
Technical Field
The present invention relates to the field of video communication technologies, and in particular, to a method, a system, and a storage medium for retransmitting a data packet.
Background
With the popularization of real-time audio services and intelligent terminals, users have an increasing demand for real-time audio services in a weak network environment. And the data packet is easily lost in the weak network environment, thereby affecting the experience of real-time audio.
At present, a common method for solving the problem of packet loss adopts a TCP transmission protocol, which can solve the problem of packet loss well in a scene of a small amount of packet loss, but in a network environment where the packet loss rate is greater than a certain proportion, a retransmission mechanism of the TCP protocol cannot retransmit a lost packet in time, so that long-time blocking of audio and video is caused, and the user experience is reduced.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, the invention provides a data packet retransmission method, a data packet retransmission system and a storage medium, which can effectively improve the experience and the good feeling of a user on a real-time video.
A data packet retransmission method according to an embodiment of a first aspect of the present invention includes the following steps:
detecting the state of the received data packet;
when the data packet state is a loss state, starting a timer;
when the calculated time length of the timer is greater than or equal to a first preset time length, generating a first retransmission request;
sending the first retransmission request to a sending end, and retransmitting the lost data packet by the sending end according to the first retransmission request;
when the calculated time length of the timer is greater than or equal to a second preset time length and the data packet state is a lost state, generating a second retransmission request;
and sending the second retransmission request to a sending end, and retransmitting the lost data packet by the sending end according to the second retransmission request.
The data packet retransmission method according to the embodiment of the invention has at least the following beneficial effects: according to the embodiment of the invention, when the state of the data packet is detected to be a lost state, the timer is started, the first retransmission request is generated when the calculation time of the timer is longer than or equal to the first preset time, the sending end retransmits the lost data packet according to the first retransmission request, then the second retransmission request is generated when the calculation time of the timer is longer than or equal to the second preset time and the state of the lost data packet is still in a lost state, the sending end retransmits the lost data packet according to the second retransmission request, so that the sending end is prevented from repeatedly receiving the data packet, and meanwhile, the sending end can retransmit the lost data packet in time, and therefore, long-time blocking of audio and video is avoided, and the good experience of a user on real-time video is effectively improved.
According to some embodiments of the invention, the first retransmission request and the second retransmission request each include packet sequence number information, and the packet sequence number information of the first retransmission request and the second retransmission request is the same.
According to a second aspect of the invention, a data packet retransmission method comprises the following steps:
when a first retransmission request sent by a receiving end is received, retransmitting a data packet to the receiving end according to the first retransmission request, wherein the data packet is detected by the receiving end and is in a lost state;
when a second retransmission request sent by a receiving terminal is received, retransmitting a data packet to the receiving terminal according to the second retransmission request;
the first retransmission request is a retransmission request generated by the receiving end when detecting that the data packet state is a lost state and starting a timer, and the calculated time length of the timer is greater than or equal to a first preset time length; the second retransmission request is generated when the calculated time length of the timer is greater than or equal to a second preset time length and the state of the data packet detected by the receiving end is a lost state.
The data packet retransmission method according to the embodiment of the invention has at least the following beneficial effects: according to the embodiment of the invention, the timer started when the receiving end detects that the state of the data packet is the lost state is received, when the retransmission request generated when the calculation time length of the timer is more than or equal to the first preset time length, the data packet with the lost state is retransmitted to the receiving end according to the first retransmission request, and then when the retransmission request generated when the calculation time length of the timer is more than or equal to the second preset time length and the state of the data packet detected by the receiving end is the lost state is received, the data packet with the lost state is retransmitted to the receiving end according to the second retransmission request, so that the situation that the transmitting end repeats the received data packet is avoided, meanwhile, the transmitting end can retransmit the lost data packet in time, the long-time blocking of audio and video is avoided, and the experience of a user on real-time video is effectively improved.
According to some embodiments of the present invention, the retransmitting, when receiving a first retransmission request sent by a receiving end, a data packet to the receiving end according to the first retransmission request includes:
when a first retransmission request sent by a receiving end is received, acquiring the loss rate of a data packet;
when the data packet loss rate is in a first preset range, retransmitting a data packet to the receiving end once according to the first retransmission request;
and when the data packet loss rate is in a second preset range, retransmitting the data packet to the receiving end twice according to the first retransmission request.
According to some embodiments of the present invention, when receiving a second retransmission request sent by a receiving end, retransmitting a data packet to the receiving end according to the second retransmission request, where the retransmitting request includes:
and when a second retransmission request sent by a receiving end is received, retransmitting the data packet to the receiving end for a plurality of times according to the second retransmission request, wherein the plurality of times is more than two times.
According to some embodiments of the present invention, when two or more data packets are retransmitted to the receiving end, a time interval between two adjacent data packets is a preset time interval.
According to a third aspect of the invention, a data packet retransmission method comprises the following steps:
when detecting that the data packet state is a lost state, the receiving end starts a timer;
the receiving end determines that the calculation time length of the timer is greater than or equal to a first preset time length, and generates a first retransmission request;
the sending end retransmits the lost data packet to the receiving end according to the first retransmission request;
the receiving end calculates the time length of the timer to be more than or equal to a second preset time length, detects that the data packet state is a lost state, and generates a second retransmission request;
and the transmitting end retransmits the lost data packet to the receiving end according to the second retransmission request.
The data packet retransmission method according to the embodiment of the invention at least has the following beneficial effects: the embodiment of the invention starts a timer when a receiving end detects that the state of a data packet is a lost state, determines that the calculation time length of the timer is more than or equal to a first preset time length, and generates a first retransmission request; then the sending end retransmits the lost data packet to the receiving end according to the first retransmission request; and then the receiving end generates a second retransmission request when the calculated time length of the timer is more than or equal to a second preset time length and the state of the data packet is detected to be a lost state, so that the transmitting end retransmits the lost data packet to the receiving end according to the second retransmission request, the transmitting end is prevented from repeating the received data packet, and meanwhile, the transmitting end can retransmit the lost data packet in time, so that the long-time blocking of audio and video is avoided, and the experience of a user on real-time video is effectively improved.
A data packet retransmission system according to a fourth aspect of the present invention includes a receiving end and a transmitting end, where the receiving end includes:
the detection module is used for detecting the state of the received data packet;
the starting module is used for starting a timer when the data packet state is a lost state;
the first generation module is used for generating a first retransmission request when the calculation time length of the timer is greater than or equal to a first preset time length;
a first sending module, configured to send the first retransmission request to a sending end, where the sending end retransmits the lost data packet according to the first retransmission request;
the second generation module is used for generating a second retransmission request when the calculated time length of the timer is greater than or equal to a second preset time length and the data packet state is a lost state;
and the second sending module is used for sending the second retransmission request to a sending end, and the sending end retransmits the lost data packet according to the second retransmission request.
The data packet retransmission method according to the embodiment of the invention has at least the following beneficial effects: the embodiment of the present invention is a system embodiment corresponding to the method embodiment provided in the first aspect, and the system embodiment can be implemented with the beneficial effects of the method embodiment provided in the first aspect.
A data packet retransmission system according to a fifth embodiment of the present invention includes a receiving end and a transmitting end, where the transmitting end includes:
the first retransmission module is used for retransmitting a data packet to a receiving end according to a first retransmission request sent by the receiving end when the first retransmission request is received, wherein the data packet is detected by the receiving end and the data packet state is a lost state;
the second retransmission module is used for retransmitting the data packet to the receiving end according to a second retransmission request when receiving the second retransmission request sent by the receiving end;
the first retransmission request is a retransmission request generated by the receiving end when detecting that the data packet state is a lost state and starting a timer, and the calculated time length of the timer is greater than or equal to a first preset time length; the second retransmission request is generated when the calculated time length of the timer is greater than or equal to a second preset time length and the state of the data packet detected by the receiving end is a lost state.
The data packet retransmission method according to the embodiment of the invention has at least the following beneficial effects: the embodiment of the present invention is a system embodiment corresponding to the method embodiment provided in the embodiment of the second aspect, and the advantageous effects of the method embodiment provided in the embodiment of the second aspect can be achieved by the system embodiment.
A storage medium according to an embodiment of the sixth aspect of the present invention stores therein a program executable by a processor, the program being executed by the processor for implementing the above-described packet retransmission method.
The data packet retransmission method according to the embodiment of the invention has at least the following beneficial effects: the embodiments of the present invention achieve the above-mentioned data packet retransmission method when executed by a processor, and the effects achieved by the embodiments of the above-mentioned method can be achieved by the embodiments.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The invention is further described with reference to the following figures and examples, in which:
fig. 1 is a flowchart of a first data packet retransmission method according to an embodiment of the present invention;
fig. 2 is a flowchart of a second data packet retransmission method according to an embodiment of the present invention;
fig. 3 is a flowchart of a third data packet retransmission method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an out-of-order network packet receiving sequence according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a policy for determining packet loss according to an embodiment of the present invention;
fig. 6 is a diagram of a receiver-side retransmission request strategy in accordance with an embodiment.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention and are not to be construed as limiting the present invention.
In the description of the present invention, the meaning of a plurality is one or more, the meaning of a plurality is two or more, and the above, below, exceeding, etc. are understood as excluding the present numbers, and the above, below, within, etc. are understood as including the present numbers. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present invention, unless otherwise explicitly defined, terms such as setting, presetting and the like should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meaning of the terms in the present invention by combining the specific contents of the technical scheme.
In the description of the present invention, reference to the description of the terms "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Referring to fig. 1, an embodiment of the present invention provides a data packet retransmission method, which is applied to a receiving end in a data transmission process, where the receiving end may be a terminal, a platform, a processor corresponding to the platform, or a server. Wherein, the receiving end and the transmitting end can be in wireless communication. In the implementation process, the embodiment includes the following steps:
and S11, detecting the state of the received data packet. In the video data, the state of the data packet received by the receiving end comprises a loss state and a normal receiving state, and the timeliness of the subsequent processing process is ensured by detecting the state of the received data packet.
And S12, when the data packet state is the loss state, starting a timer. The timer may be a physical device or a certain program that is set in advance at the receiving end for timing. When the timer is started, the timer enters a timing state.
And S13, when the calculated time length of the timer is greater than or equal to a first preset time length, generating a first retransmission request. The first preset duration may be 1/2 of the round trip duration of the data from the receiving end to the transmitting end. That is, when the calculated time length is equal to or greater than 1/2 round trip time length, the receiving end generates a first retransmission request.
S14, sending the first retransmission request to the sender, so that the sender retransmits the lost data packet according to the first retransmission request, wherein the lost data packet is determined in step S12.
And S15, when the calculated time length of the timer is greater than or equal to a second preset time length and the data packet state is a lost state, generating a second retransmission request. The second preset duration may be a round-trip duration from the receiving end to the transmitting end, that is, when the calculated duration is greater than or equal to the round-trip duration, the receiving end generates a second retransmission request.
In some embodiments, the first retransmission request and the second retransmission request each include packet sequence number information, and the packet sequence number information of the first retransmission request and the packet sequence number information of the second retransmission request are the same, so as to avoid that the sending end triggers unnecessary retransmission to occupy extra bandwidth when receiving multiple identical retransmission requests.
In some embodiments, to ensure timeliness of retransmission, only two retransmissions can be requested for the same packet configuration.
And S16, sending the second retransmission request to the sending end, so that the sending end retransmits the lost data packet according to the second retransmission request, the situation that the sending end repeats the received data packet is avoided, meanwhile, the sending end can retransmit the lost data packet in time, the long-time blocking of audio and video is avoided, and the good experience of a user on real-time video is effectively improved.
Referring to fig. 2, an embodiment of the present invention provides a data packet retransmission method, and this embodiment is applied to a data sending end, where the sending end may be a terminal, a platform, a processor corresponding to the platform, or a server. Wherein, the receiving end and the transmitting end can be in wireless communication. In the implementation process, the embodiment includes the following steps:
s21, when receiving the first retransmission request sent by the receiving end, retransmitting the data packet to the receiving end according to the first retransmission request. The first retransmission request is a retransmission request generated by a timer started by a receiving end when the receiving end detects that the data packet is in a lost state, and the calculated time length of the timer is greater than or equal to a first preset time length. The first predetermined duration may be 1/2 of the round trip duration of the data from the receiving end to the sending end. That is, when the calculated time length is equal to or greater than 1/2 round trip time length, the receiving end generates a first retransmission request.
S22, when receiving a second retransmission request sent by the receiving terminal, retransmitting the data packet to the receiving terminal according to the second retransmission request; the second retransmission request is a retransmission request generated when the calculated time length of the timer is greater than or equal to a second preset time length and the state of the data packet detected by the receiving end is a lost state. The second preset duration may be a round-trip duration from the receiving end to the transmitting end, that is, when the calculated duration is greater than or equal to the round-trip duration, the receiving end generates a second retransmission request. The data packet is detected by the receiving end that the data packet state is the lost state.
In some embodiments, when receiving a first retransmission request sent by a receiving end, the step of retransmitting a data packet to the receiving end according to the first retransmission request may include the following steps:
when a first retransmission request sent by a receiving end is received, acquiring a data packet loss rate; the packet loss rate is determined by the original packet loss rate of the network.
When the data packet loss rate is in a first preset range, retransmitting the data packet to a receiving end once according to a first retransmission request;
and when the data packet loss rate is in a second preset range, retransmitting the data packet to the receiving end twice according to the first retransmission request.
In this embodiment, in order to reduce the influence of latency and bandwidth redundancy, the first preset range may be set to be less than 20%, and the second preset range may be set to be greater than or equal to 20%. Therefore, when the calculation time length of the timer is greater than or equal to a first preset time length and the data packet loss rate is less than 20%, the receiving end requests the transmitting end to retransmit the lost data packet once; and when the calculation time length of the timer is more than or equal to a first preset time length and the data packet loss rate is more than or equal to 20%, the receiving end requests the transmitting end to retransmit the data packets lost twice.
In other embodiments, when receiving the second retransmission request sent by the receiving end, the receiving end retransmits the data packet to the receiving end several times according to the second retransmission request, where the several times are greater than two times. Because the probability of exceeding the second preset duration is small, even if the data packet is retransmitted for many times, the bandwidth redundancy caused by the retransmission is not too large.
In some embodiments, in order to enable the retransmitted data packet to reach the receiving end as much as possible, a time interval between two adjacent retransmitted data packets is a preset time interval, and the preset time interval may be set to 5ms, and may specifically be adjusted according to an actual situation.
Referring to fig. 3, an embodiment of the present invention provides a data packet retransmission method. The embodiment is applied to the interactive process of the receiving end and the sending end. Specifically, the present embodiment includes the following steps:
s31, the receiving end starts a timer when detecting that the packet state is lost. In the video data, the state of the data packet received by the receiving end comprises a loss state and a normal receiving state, and the timeliness of the subsequent processing process is ensured by detecting the state of the received data packet. Meanwhile, when the timer is started, the timer enters a timing state.
S32, the receiving end determines that the calculation time length of the timer is larger than or equal to a first preset time length, and generates a first retransmission request. The first preset duration may be 1/2 of the round trip duration of the data from the receiving end to the transmitting end. That is, when the calculation duration is greater than or equal to the round trip duration of 1/2, the receiving end generates the first retransmission request, thereby avoiding the occurrence of the phenomenon of packet retransmission caused by the misjudgment of the receiving end on the lost packet.
And S33, the sending end retransmits the lost data packet to the receiving end according to the first retransmission request.
And S34, the receiving end generates a second retransmission request when the calculated time length of the timer is greater than or equal to a second preset time length and the state of the data packet is detected to be a lost state. The second preset duration may be a round-trip duration from the receiving end to the transmitting end, that is, when the calculated duration is greater than or equal to the round-trip duration, the receiving end generates a second retransmission request. In the step S33, the receiving end does not receive the data packet retransmitted by the transmitting end before executing the step.
And S35, the transmitting end retransmits the lost data packet to the receiving end according to the second retransmission request.
In some embodiments, when the embodiment shown in fig. 3 is applied to an actual application process, in order to ensure timeliness of retransmission of data packets, it is set that the same data packet requests at most two retransmissions. Specifically, the application process comprises the following steps:
step one, when a receiving end detects that a data packet is discontinuous, in order to prevent the data packet delay caused by disorder, a timer T0 is started, the data packet is waited to arrive, the time T0 is set as 1/2 round trip time RTT, wherein the RTT time is obtained by an RTCP protocol.
In this step, when the data packet is lost, the receiving end must be able to detect and initiate a retransmission request in time, so as to reduce the delay to the maximum extent. However, the method for detecting packet loss cannot simply consider that when the following sequence number is received, the previous sequence number is not received, and the previous sequence number is lost. This is because the out-of-order network packets as shown in fig. 4 may cause the receiving end to misunderstand that the data packets are lost. Therefore, in this step, by waiting for a time, if the waiting time has not been received, it is determined that the packet is lost. The waiting time is defined as T0, the initial length value is set to 10ms, and the RTT time is updated to 1/2RTT time according to the change of the RTT time detected in real time. Therefore, a method for determining packet loss is shown in fig. 5.
And step two, when the T0 is greater than or equal to 1/2RTT, that is, the data packet is considered to be lost, sending a first retransmission request to the sending end, starting a timer T1, and starting waiting for the arrival of the retransmitted data packet, wherein the first retransmission request can carry the sequence number information of a plurality of request packets.
And step three, in order to ensure that the retransmission request can reach the sending end, the receiving end repeatedly sends the retransmission request to the sending end until the data packet arrives or T1 is greater than or equal to RTT.
Wherein, the interval of the retransmission request is increased progressively according to a certain algorithm; meanwhile, in order to prevent the sending end from receiving a plurality of identical retransmission requests and triggering unnecessary retransmission to occupy extra bandwidth, a packet sequence number field is added to each retransmission request packet on the basis of the REMB message interface, and the packet sequence numbers of the same group of requests are identical; in order to ensure that the lost data packet is retransmitted more quickly, a transmitting end is requested to retransmit the data packet for n times continuously according to the packet loss rate, and a field is added to the information on an REMB message interface; and in order to prevent the received retransmitted data packet from being retransmitted by the sending end, the receiving end carries a confirmation field in the retransmission request to confirm the received retransmitted data packet.
And step four, when the sending end receives the retransmission request, judging whether the sequence number of the retransmission request is repeated, and if so, ignoring.
And step five, the transmitting end repeatedly retransmits the lost packet according to the retransmission times of the retransmission request, and the retransmission interval is fixed to be 5 milliseconds.
And step six, the transmitting end immediately stops the retransmission process according to the confirmation field.
And step seven, when the T1 is greater than or equal to the RTT, sending a second retransmission request to the sending end, and calculating reasonable retransmission times according to the packet loss rate to reduce the loss probability to 1/10000 in order to ensure that the packet is received as far as possible. Wherein, T1 is taken as the RTT of dynamic probe.
In some embodiments, since the time required for the retransmission request to reach the transmitting end and the retransmission response packet to reach the receiving end is RTT time, the larger the number of retransmission requests, the larger the delay is. In order to reduce the time delay as much as possible, the retransmission request can be set once, and the transmitting end continuously transmits for many times, thereby causing larger bandwidth redundancy.
In some embodiments, the effects of delay and bandwidth redundancy are considered comprehensively, and T0 is set to be overtime, the packet loss rate is less than 20%, the request sending end only sends the request once, the packet loss rate exceeds 20%, and the request is sent to the retransmission for 2 times. T1 times out requesting the sender to send n times. Since the probability of T1 timeout is small, even if there are multiple retransmissions, the resulting bandwidth redundancy is not too large. In an embodiment, assuming that the network packet loss rate is fixed w to 15%, the timeout probability of T1 is 2.25%.
The value of n is determined by the original packet loss rate w of the network, that is, the receiving end should count the current original packet loss rate in real time to determine the value of n. The calculation method of n is shown in formula 1:
Figure BDA0002832236460000081
i.e., the retransmission failure rate of T1 is reduced to one ten thousandth.
In some embodiments, the receiving-end retransmission request method shown in fig. 6 is applied to the case of different packet loss rates, so as to obtain the theoretical values of the retransmission times and the bandwidth redundancy case shown in table 1:
TABLE 1
Figure BDA0002832236460000091
Here, RDD is Pt0 × N1+ Pt1 × N2, Pt0 is T0 timeout probability, and Pt1 is T1 timeout probability.
In some embodiments, the sender needs to buffer a data packet for a certain period of time when the sender initially sends the data packet, so as to retransmit the data packet to the receiver when receiving a retransmission request. The length h of the data packet buffer space is calculated by adopting a formula 2:
Figure BDA0002832236460000092
where b is the coding rate, i.e. buffering 3s of video packets. Because the sequence number of the video data packet is automatically generated when the RTP protocol stack is packed, the receiving end frames according to the sequence number, and the sequence number of the retransmitted data packet cannot be changed. Therefore, the transmitting end buffers the complete RTP packet including the RTP packet header.
The sending end can carry out one-time retransmission when receiving the retransmission request, and if the retransmission times r in the retransmission request is more than 1, the sending end needs to send for many times. In order to ensure that the retransmitted packet reaches the receiving end as much as possible, the retransmitted packet cannot be continuously transmitted. The packet needs to be scanned and sent periodically by a separate thread until r times.
In some embodiments, the retransmission request packet and the I-frame request packet may also be lost during data transmission. The network overhead of these two packets is not large, but the resulting impact is severe. Therefore, the two packets are transmitted in a large redundancy mode, and the request packet is ensured not to be lost. The sender must therefore be able to identify redundant request packets to avoid additional overhead on the network in response to the same request. Each request may be tagged with a special label, and the same label may be the same for the same request, so that the sender may determine whether the request has been received, and if so, ignore it.
The embodiment of the invention provides a data packet retransmission system, which comprises a receiving end and a sending end, wherein the receiving end comprises:
the detection module is used for detecting the state of the received data packet;
the starting module is used for starting a timer when the data packet state is a lost state;
the first generation module is used for generating a first retransmission request when the calculation time length of the timer is greater than or equal to a first preset time length;
a first sending module, configured to send the first retransmission request to a sending end, where the sending end retransmits the lost data packet according to the first retransmission request;
the second generation module is used for generating a second retransmission request when the calculated time length of the timer is greater than or equal to a second preset time length and the data packet state is a lost state;
and the second sending module is used for sending the second retransmission request to a sending end, and the sending end retransmits the lost data packet according to the second retransmission request.
The contents of the embodiment of the method shown in fig. 1 of the present invention are all applicable to the embodiment of the present system, and the functions specifically implemented by the embodiment of the present system are the same as those of the embodiment of the method shown in fig. 1, and the advantageous effects achieved by the embodiment of the present system are also the same as those achieved by the method shown in fig. 1.
The embodiment of the invention provides a data packet retransmission system, which comprises a receiving end and a sending end, wherein the sending end comprises:
the first retransmission module is used for retransmitting a data packet to a receiving end according to a first retransmission request sent by the receiving end when the first retransmission request is received, wherein the data packet is detected by the receiving end and the data packet state is a lost state;
the second retransmission module is used for retransmitting the data packet to the receiving end according to a second retransmission request sent by the receiving end when the second retransmission request is received;
the first retransmission request is a retransmission request generated by a timer started by the receiving end when the receiving end detects that the data packet is in a lost state and the calculation time length of the timer is greater than or equal to a first preset time length; the second retransmission request is generated when the calculated time length of the timer is greater than or equal to a second preset time length and the state of the data packet detected by the receiving end is a lost state.
The contents of the embodiment of the method shown in fig. 2 of the present invention are all applicable to the embodiment of the present system, and the functions specifically implemented by the embodiment of the present system are the same as those of the embodiment of the method shown in fig. 2, and the beneficial effects achieved by the embodiment of the present system are also the same as those achieved by the method shown in fig. 2.
Furthermore, an embodiment of the present invention further provides a storage medium, in which a program executable by a processor is stored, and the program executable by the processor is used for implementing the above-mentioned data packet retransmission method when being executed by the processor.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention. Furthermore, the embodiments of the present invention and the features of the embodiments may be combined with each other without conflict.

Claims (10)

1. A method for retransmitting a data packet, comprising the steps of:
detecting the state of the received data packet;
when the data packet state is a loss state, starting a timer;
when the calculated time length of the timer is greater than or equal to a first preset time length, generating a first retransmission request;
sending the first retransmission request to a sending end, and retransmitting the lost data packet by the sending end according to the first retransmission request;
when the calculated time length of the timer is greater than or equal to a second preset time length and the data packet state is a lost state, generating a second retransmission request;
sending the second retransmission request to a sending end, and retransmitting the lost data packet by the sending end according to the second retransmission request;
the first retransmission request and the second retransmission request are repeatedly sent until the data packet arrives or a correspondingly started timer T1 is greater than or equal to RTT; the time interval of the retransmission is increased progressively according to a preset algorithm; the first retransmission request and the second retransmission request both comprise data packet sequence number information, and the data packet sequence number information of the first retransmission request and the data packet sequence number information of the second retransmission request are the same; and carrying confirmation fields in the first retransmission request and the second retransmission request, and confirming the received retransmission packet so as to stop the retransmission data packet which is already received from being retransmitted by the transmitting end continuously.
2. The method according to claim 1, wherein the first predetermined duration is 1/2 of a round trip duration of data from the receiving end to the transmitting end; the second preset time is a round-trip time, and the round-trip time is acquired by an RTCP protocol.
3. A method for retransmitting a data packet, comprising the steps of:
when a first retransmission request sent by a receiving end is received, retransmitting a data packet to the receiving end according to the first retransmission request, wherein the data packet is detected by the receiving end and is in a lost state;
when a second retransmission request sent by a receiving terminal is received, retransmitting a data packet to the receiving terminal according to the second retransmission request; the first retransmission request is a retransmission request generated by the receiving end when detecting that the data packet state is a lost state and starting a timer, and the calculated time length of the timer is greater than or equal to a first preset time length; the second retransmission request is generated when the calculated time length of the timer is greater than or equal to a second preset time length and the state of the data packet detected by the receiving end is a lost state;
the first retransmission request and the second retransmission request are repeatedly sent until the data packet arrives or a correspondingly started timer T1 is greater than or equal to RTT; the time interval of the retransmission is increased progressively according to a preset algorithm; the first retransmission request and the second retransmission request both comprise data packet sequence number information, and the data packet sequence number information of the first retransmission request and the data packet sequence number information of the second retransmission request are the same; and the first retransmission request and the second retransmission request carry confirmation fields, and the received retransmission packets are confirmed so as to stop the retransmission data packets which are received and retransmitted from continuing to be retransmitted by the transmitting end.
4. The method as claimed in claim 3, wherein the retransmitting, when receiving a first retransmission request sent by a receiving end, the data packet to the receiving end according to the first retransmission request comprises:
when a first retransmission request sent by a receiving end is received, acquiring the loss rate of a data packet;
when the data packet loss rate is in a first preset range, retransmitting a data packet to the receiving end once according to the first retransmission request;
and when the data packet loss rate is in a second preset range, retransmitting the data packet to the receiving end twice according to the first retransmission request.
5. The method according to claim 4, wherein when receiving a second retransmission request sent by a receiving end, the method for retransmitting the data packet to the receiving end according to the second retransmission request specifically comprises:
and when a second retransmission request sent by a receiving end is received, retransmitting the data packet to the receiving end for a plurality of times according to the second retransmission request, wherein the plurality of times is equal to the retransmission times calculated by the receiving end according to the packet loss rate.
6. The method as claimed in claim 5, wherein when the data packet is retransmitted to the receiving end twice or more, the time interval between two adjacent retransmitted data packets is a predetermined time interval.
7. A method for retransmitting a data packet, comprising the steps of:
when detecting that the data packet state is a lost state, the receiving end starts a timer;
the receiving end determines that the calculated time length of the timer is greater than or equal to a first preset time length, and generates a first retransmission request;
the sending end retransmits the lost data packet to the receiving end according to the first retransmission request;
the receiving end calculates the time length of the timer to be more than or equal to a second preset time length, detects that the data packet state is a lost state, and generates a second retransmission request;
the sending end retransmits the lost data packet to the receiving end according to the second retransmission request;
the first retransmission request and the second retransmission request are repeatedly sent until the data packet arrives or a correspondingly started timer T1 is greater than or equal to RTT; the time interval of the retransmission is increased progressively according to a preset algorithm; the first retransmission request and the second retransmission request both comprise data packet sequence number information, and the data packet sequence number information of the first retransmission request and the data packet sequence number information of the second retransmission request are the same; and carrying confirmation fields in the first retransmission request and the second retransmission request, and confirming the received retransmission packet so as to stop the retransmission data packet which is already received from being retransmitted by the transmitting end continuously.
8. A data packet retransmission system is characterized by comprising a receiving end and a transmitting end, wherein the receiving end comprises:
the detection module is used for detecting the state of the received data packet;
the starting module is used for starting a timer when the data packet state is a lost state;
the first generation module is used for generating a first retransmission request when the calculation time length of the timer is greater than or equal to a first preset time length;
a first sending module, configured to send the first retransmission request to a sending end, where the sending end retransmits the lost data packet according to the first retransmission request;
the second generation module is used for generating a second retransmission request when the calculated time length of the timer is greater than or equal to a second preset time length and the data packet state is a lost state;
a second sending module, configured to send the second retransmission request to a sending end, where the sending end retransmits the lost data packet according to the second retransmission request;
the first retransmission request and the second retransmission request are repeatedly sent until the data packet arrives or a correspondingly started timer T1 is greater than or equal to RTT; the time interval of the retransmission is increased progressively according to a preset algorithm; the first retransmission request and the second retransmission request both comprise data packet sequence number information, and the data packet sequence number information of the first retransmission request and the data packet sequence number information of the second retransmission request are the same; and carrying confirmation fields in the first retransmission request and the second retransmission request, and confirming the received retransmission packet so as to stop the retransmission data packet which is already received from being retransmitted by the transmitting end continuously.
9. A data packet retransmission system is characterized by comprising a receiving end and a transmitting end, wherein the transmitting end comprises:
the first retransmission module is used for retransmitting a data packet to a receiving end according to a first retransmission request sent by the receiving end when the first retransmission request is received, wherein the data packet is detected by the receiving end and the data packet state is a lost state;
the second retransmission module is used for retransmitting the data packet to the receiving end according to a second retransmission request sent by the receiving end when the second retransmission request is received;
the first retransmission request is a retransmission request generated by the receiving end when detecting that the data packet state is a lost state and starting a timer, and the calculated time length of the timer is greater than or equal to a first preset time length; the second retransmission request is generated when the calculated time length of the timer is greater than or equal to a second preset time length and the state of the data packet detected by the receiving end is a lost state, and the first retransmission request and the second retransmission request are both repeatedly sent until the data packet arrives or the correspondingly started timer T1 is greater than or equal to RTT; the time interval of the retransmission is increased progressively according to a preset algorithm; the first retransmission request and the second retransmission request both comprise data packet sequence number information, and the data packet sequence number information of the first retransmission request and the data packet sequence number information of the second retransmission request are the same; and carrying confirmation fields in the first retransmission request and the second retransmission request, and confirming the received retransmission packet so as to stop the retransmission data packet which is already received from being retransmitted by the transmitting end continuously.
10. A storage medium having stored therein a processor-executable program, wherein the processor-executable program, when executed by a processor, is configured to implement the method for packet retransmission according to any of claims 1-7.
CN202011453157.1A 2020-12-11 2020-12-11 Data packet retransmission method, system and storage medium Active CN112769526B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011453157.1A CN112769526B (en) 2020-12-11 2020-12-11 Data packet retransmission method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011453157.1A CN112769526B (en) 2020-12-11 2020-12-11 Data packet retransmission method, system and storage medium

Publications (2)

Publication Number Publication Date
CN112769526A CN112769526A (en) 2021-05-07
CN112769526B true CN112769526B (en) 2022-06-21

Family

ID=75693643

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011453157.1A Active CN112769526B (en) 2020-12-11 2020-12-11 Data packet retransmission method, system and storage medium

Country Status (1)

Country Link
CN (1) CN112769526B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116137560B (en) * 2023-04-14 2023-06-30 海马云(天津)信息技术有限公司 Method and device for processing retransmission request, data transmitting end equipment and storage medium
CN117061070B (en) * 2023-09-15 2024-03-29 深圳旷世科技有限公司 Wireless audio transmission method, audio device and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020007084A1 (en) * 2018-07-02 2020-01-09 华为技术有限公司 Method for controlling retransmission, communication interface, and electronic device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5108244B2 (en) * 2006-03-30 2012-12-26 株式会社エヌ・ティ・ティ・ドコモ Communication terminal and retransmission control method
CN101252425B (en) * 2008-04-09 2010-10-27 杭州华三通信技术有限公司 Loss package error correcting method and system of self-adapting network
CN111327402B (en) * 2018-12-17 2021-12-31 杭州海康威视数字技术股份有限公司 Method, device and system for retransmitting data
CN111740808B (en) * 2019-03-25 2022-07-22 华为技术有限公司 Data transmission method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020007084A1 (en) * 2018-07-02 2020-01-09 华为技术有限公司 Method for controlling retransmission, communication interface, and electronic device

Also Published As

Publication number Publication date
CN112769526A (en) 2021-05-07

Similar Documents

Publication Publication Date Title
CN110995697B (en) Big data transmission method and system
US11664932B2 (en) Disabling, using a designated process, hybrid automatic repeat request (HARQ) acknowledgments for packets for which acknowledgements are supported at network or higher layer
US20220014312A1 (en) Data transmission method and apparatus
CN103269260A (en) Data transmission method, data receiving terminal, data sending terminal and data transmission system
CN112769526B (en) Data packet retransmission method, system and storage medium
EP2396943B1 (en) Controlling bandwidth share
CN114024914B (en) Video data transmission method and device and electronic equipment
WO2004051954A2 (en) A method for enhancing transmission quality of streaming media
JP5170798B2 (en) Transmission rate control device and transmission rate control method
WO2015083919A1 (en) Method and apparatus for reducing packet loss in wireless communication
CN112436924B (en) Data transmission method and electronic equipment
CN109981385B (en) Method, device and system for realizing packet loss detection
CN111163362B (en) Video receiving method and system capable of self-adapting retransmission waiting time
CN101695067B (en) Data processing method and device based on TCP and digital TV receiver terminal and system
CN110602568B (en) Video stream transmission packet loss retransmission method, device and storage device based on RTP
CN111092907B (en) UDP (user Datagram protocol) -based data stream fast transmission method, system and medium
CA2372023A1 (en) Overload control method for a packet-switched network
KR100529931B1 (en) Server system communicating through the wireless network
US7154850B1 (en) Wireless data transmission using time out control
JP3848222B2 (en) Resending method
CN114640724B (en) RUDP-based data transmission method, device, equipment and computer storage medium
CN111917525B (en) Data transmission method, device, equipment and readable storage medium
Hurtig et al. SCTP: designed for timely message delivery?
JP3594196B1 (en) Data transmission device and data transmission method
CN112738096A (en) Efficient and reliable data transmission method and system

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
CB02 Change of applicant information

Address after: 518000 2101, No. 100, Zhihe Road, Dakang community, Yuanshan street, Longgang District, Shenzhen, Guangdong

Applicant after: BANGYAN TECHNOLOGY Co.,Ltd.

Address before: 518000 room 901, block B, building 5, Shenzhen software industry base, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: BANGYAN TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant