WO2020125647A1 - Data retransmission method, device, and system - Google Patents

Data retransmission method, device, and system Download PDF

Info

Publication number
WO2020125647A1
WO2020125647A1 PCT/CN2019/126073 CN2019126073W WO2020125647A1 WO 2020125647 A1 WO2020125647 A1 WO 2020125647A1 CN 2019126073 W CN2019126073 W CN 2019126073W WO 2020125647 A1 WO2020125647 A1 WO 2020125647A1
Authority
WO
WIPO (PCT)
Prior art keywords
duration
retransmission
rtt
threshold
data storage
Prior art date
Application number
PCT/CN2019/126073
Other languages
French (fr)
Chinese (zh)
Inventor
张龙
黄凡夫
王兴鹤
Original Assignee
杭州海康威视数字技术股份有限公司
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 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Publication of WO2020125647A1 publication Critical patent/WO2020125647A1/en

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
    • H04L1/1671Details of the supervisory signal the supervisory signal being transmitted together with control information
    • H04L1/1678Details of the supervisory signal the supervisory signal being transmitted together with control information where the control information is for timing, e.g. time stamps
    • 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
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working
    • H04N7/15Conference systems

Definitions

  • the present disclosure relates to the field of data transmission technology, and in particular, to a method, device, and system for retransmitting data.
  • the sequence number of the lost data packet can be determined based on the sequence number of the received data packet.
  • the receiving end may send a retransmission request to the sending end, and the retransmission request carries the sequence number of the lost data packet.
  • the sending end can find whether there is a missing data packet in the cache based on the sequence number of the missing data packet, if there is a missing data packet in the cache, then obtain the missing data packet and send the missing data packet to the receiving end .
  • RTT Red-Trip Time
  • the RTT duration is calculated by the receiving end according to the current network condition and a preset estimation algorithm according to a preset period.
  • the value of the RTT duration indicates the expected duration of the retransmission request from the receiving end to the sending end and the sending end to return a lost packet one round trip. In the case of poor network conditions, the RTT duration is longer, in the case of better network conditions , RTT duration is shorter.
  • NPQ Network Protocol Quality, network protocol quality library
  • the receiving end will repeat the process described above until it receives a lost data packet or the value of the retransmission parameter corresponding to the same retransmission request exceeds the corresponding preset retransmission parameter threshold.
  • the retransmission parameters include the total retransmission time and the number of retransmissions.
  • the preset retransmission parameter threshold corresponding to the total retransmission time is the total retransmission time threshold, and the preset retransmission corresponds to the number of retransmissions.
  • the parameter threshold is the threshold of retransmission times.
  • the threshold for the total retransmission time duration can be a fixed value, or it can be the maximum length of time that you can wait for a lost packet when the network conditions are poor.
  • the threshold of the number of times of retransmission may also be a fixed value such as 10 times.
  • the threshold of the number of times of retransmission may also be a fixed value such as 10 times.
  • the RTT time is long and it is easy to lose packets.
  • the receiving end often requires a long total retransmission time to receive the lost packet returned, even in some cases, after the retransmission timeout , Still cannot receive the lost packet returned. Therefore, in the application scenarios of real-time data transmission, such as video conference application scenarios, using the above retransmission mechanism in the case of poor network conditions will cause a longer time to wait for the lost data packets, and the flexibility of data transmission is more difference.
  • a method for retransmitting data includes:
  • the RTT duration is updated, and the process of determining the retransmission parameter threshold based on the RTT duration is performed;
  • the retransmission parameters include the total retransmission time and/or the number of retransmissions
  • the threshold of the retransmission parameter corresponding to the total retransmission time is the threshold of the total retransmission time and the number of retransmissions
  • the corresponding threshold of the retransmission parameter is the threshold of the number of retransmissions.
  • the threshold value of the retransmission parameter is a threshold value of the total consumption time of the retransmission.
  • the acquiring the RTT duration and determining the threshold of the retransmission parameter based on the RTT duration includes:
  • the sum of the product and the preset reserved duration is determined as a total consumption duration threshold for retransmission.
  • the method further includes:
  • the threshold of the retransmission parameter is a threshold of the number of retransmissions
  • the acquiring the RTT duration, and determining the threshold of the retransmission parameter based on the RTT duration includes:
  • the RTT duration and determine the second reference retransmission number corresponding to the RTT duration range to which the acquired RTT duration belongs based on the correspondence relationship between the preset RTT duration range and the reference retransmission times, wherein, in the correspondence, the RTT duration range The larger the value, the fewer the retransmission times;
  • the threshold value of the retransmission times is determined.
  • the determining the threshold of the number of retransmissions based on the comparison result of the second reference number of retransmissions and the third reference number of retransmissions determined when the retransmission request was sent last time includes:
  • the second reference retransmission number is greater than or equal to the previously determined third reference retransmission number, determine the second reference retransmission number as the retransmission number threshold;
  • the retransmission number is determined as a threshold of retransmission times
  • the second reference retransmission count is determined as the retransmission count threshold.
  • the acquiring the RTT duration, based on the correspondence between the preset RTT duration range and the reference retransmission times, determining the second reference retransmission count corresponding to the RTT duration range to which the acquired RTT duration belongs includes:
  • the type of the data packet is in the preset type set, then based on the first correspondence between the preset RTT duration range and the reference retransmission times, determine the second reference weight corresponding to the RTT duration range to which the acquired RTT duration belongs Transmission times
  • the second corresponding to the RTT duration range to which the acquired RTT duration belongs Reference number of retransmissions where the number of reference retransmissions corresponding to the same RTT duration range in the first correspondence is greater than or equal to the number of reference retransmissions corresponding to the second correspondence.
  • a method for retransmitting data includes:
  • the RTT duration is obtained, and based on the RTT duration, the first data storage reference duration is determined;
  • the determining the data storage duration threshold based on the first data storage reference duration and the second data storage reference duration determined when the previous data packet was stored in the cache includes:
  • the data storage duration threshold is determined based on the first data storage reference duration, the second data storage reference duration determined when the previous data packet was stored in the cache, and the pre-acquired reservation duration.
  • the determining the data storage duration threshold based on the first data storage reference duration, the second data storage reference duration determined when the previous data packet was stored in the cache, and the pre-acquired reservation duration includes: :
  • the second data storage reference duration is obtained in advance
  • the sum of the reserved time is determined as the data storage time threshold
  • first data storage reference duration is less than or equal to the second data storage reference duration, and the time difference is greater than or equal to the second data storage reference duration, it is determined that the first data storage reference duration is equal to A duration difference between the second data storage reference durations, determining a product between the duration difference and a preset scale factor, and determining a sum between the product and the first data storage reference duration , The sum of the sum value and the reserved duration is determined as the data storage duration threshold;
  • the sum of the first data storage reference duration and the reserved duration is determined as a data storage duration threshold.
  • the method further includes:
  • the reserved duration is determined based on the frame rate of the video frame to which the data packet belongs.
  • an apparatus for retransmitting data includes:
  • the sending module is used to send a retransmission request for the lost data packet to the sending end when a packet loss event is detected;
  • the determining module is used to obtain the RTT duration, and determine the retransmission parameter threshold based on the RTT duration;
  • the update module is used to update the RTT duration when the data packet is not received when the retransmission request is reached after the retransmission request is sent, and go to the process of determining the retransmission parameter threshold based on the RTT duration;
  • the stopping module is configured to stop sending the retransmission request of the data packet if the value of the retransmission parameter reaches the corresponding threshold value of the retransmission parameter, if the data packet is not received.
  • the retransmission parameters include the total retransmission time and/or the number of retransmissions
  • the threshold of the retransmission parameter corresponding to the total retransmission time is the threshold of the total retransmission time and the number of retransmissions
  • the corresponding threshold of the retransmission parameter is the threshold of the number of retransmissions.
  • the threshold of the retransmission parameter is a threshold of the total retransmission duration
  • the determining module is configured to:
  • the sum of the product and the preset reserved duration is determined as a total consumption duration threshold for retransmission.
  • the determination module is also used to:
  • the threshold of the retransmission parameter is a threshold of the number of retransmissions
  • the determination module is configured to:
  • the RTT duration and determine the second reference retransmission number corresponding to the RTT duration range to which the acquired RTT duration belongs based on the correspondence relationship between the preset RTT duration range and the reference retransmission times, wherein, in the correspondence, the RTT duration range The larger the value, the fewer the retransmission times;
  • the threshold value of the retransmission times is determined.
  • the determination module is configured to:
  • the second reference retransmission number is greater than or equal to the previously determined third reference retransmission number, determine the second reference retransmission number as the retransmission number threshold;
  • the retransmission times are determined as a threshold of retransmission times
  • the second reference retransmission count is determined as the retransmission count threshold.
  • the determination module is configured to:
  • the type of the data packet is in the preset type set, then based on the first correspondence between the preset RTT duration range and the reference retransmission times, determine the second reference weight corresponding to the RTT duration range to which the acquired RTT duration belongs Transmission times
  • the second corresponding to the RTT duration range to which the acquired RTT duration belongs Reference number of retransmissions where the number of reference retransmissions corresponding to the same RTT duration range in the first correspondence is greater than or equal to the number of reference retransmissions corresponding to the second correspondence.
  • an apparatus for retransmitting data includes:
  • the determining module is used to obtain the RTT duration when it is detected that the data packet has been sent and stored in the cache, and determine the first data storage reference duration based on the RTT duration; based on the first data storage reference duration and the previous data packet storage The second data storage reference duration determined when entering the cache, to determine the data storage duration threshold;
  • a deletion module configured to delete a data packet that has been stored in the cache for more than the data storage duration threshold
  • the update module is used to update the RTT duration and go to the process of acquiring the RTT duration when it is detected that the data packet is sent and stored in the buffer.
  • the determination module is configured to:
  • the data storage duration threshold is determined based on the first data storage reference duration, the second data storage reference duration determined when the previous data packet was stored in the cache, and the pre-acquired reservation duration.
  • the determination module is configured to:
  • the second data storage reference duration is obtained in advance
  • the sum of the reserved time is determined as the data storage time threshold
  • first data storage reference duration is less than or equal to the second data storage reference duration, and the time difference is greater than or equal to the second data storage reference duration, it is determined that the first data storage reference duration is equal to A duration difference between the second data storage reference durations, determining a product between the duration difference and a preset scale factor, and determining a sum between the product and the first data storage reference duration , The sum of the sum value and the reserved duration is determined as the data storage duration threshold;
  • the sum of the first data storage reference duration and the reserved duration is determined as a data storage duration threshold.
  • the determination module is also used to:
  • the reserved duration is determined based on the frame rate of the video frame to which the data packet belongs.
  • a system for retransmitting data includes a sending end and a receiving end, where:
  • the receiving end is used to send a retransmission request of the lost data packet to the sending end when a packet loss event is detected; obtain the RTT duration, determine the retransmission parameter threshold based on the RTT duration; During the transmission time, if the data packet is not received, the RTT time is updated, and the process of determining the retransmission parameter threshold based on the RTT time is performed; when the value of the retransmission parameter reaches the corresponding retransmission parameter threshold, if If the data packet is not received, stop sending the retransmission request of the data packet;
  • the sending end is used to obtain the RTT duration when it is detected that the data packet has been sent and stored in the cache, and determine the first data storage reference duration based on the RTT duration; based on the first data storage reference duration and the previous data
  • the second data storage reference duration determined when the packet is stored in the cache to determine the data storage duration threshold; deleting the data packets that have been stored in the cache for longer than the data storage duration threshold; updating the RTT duration , Go to the process of acquiring the RTT duration when it is detected that the data packet has been sent and stored in the buffer.
  • a receiving end includes a processor, a communication interface, a memory, and a communication bus, wherein:
  • the processor, the communication interface, and the memory complete communication with each other through the communication bus;
  • the memory is used to store computer programs
  • the processor is configured to execute the program stored on the memory to implement the method provided in the first aspect.
  • a computer-readable storage medium in which a computer program is stored.
  • the computer program is executed by a processor, the method provided in the first aspect described above is implemented.
  • a sending end includes a processor, a communication interface, a memory, and a communication bus, wherein:
  • the processor, the communication interface, and the memory complete communication with each other through the communication bus;
  • the memory is used to store computer programs
  • the processor is configured to execute the program stored on the memory to implement the method provided in the second aspect.
  • a computer-readable storage medium in which a computer program is stored, and when the computer program is executed by a processor, the method provided in the second aspect described above is implemented.
  • the threshold value of the retransmission parameter is adjusted in real time according to the correlation between the RTT duration and the network status. Due to the high correlation between the RTT duration and the network status, the RTT duration is longer under poor network conditions, and the RTT duration is shorter under better network conditions. Therefore, the RTT duration reflects the network status and then passes
  • the method of adjusting the retransmission parameter threshold according to the RTT duration can achieve the purpose of adjusting the retransmission parameter threshold in real time according to the network conditions.
  • the retransmission parameter reaches the retransmission parameter threshold, it stops sending the retransmission request to the initiator in time. In this way, the total retransmission time can be adjusted in real time according to the network conditions. In the case of poor network conditions, it is easier to shorten the total retransmission time by using the method provided in this embodiment, and avoid using a longer time to wait for lost packets. The flexibility of data transmission is better.
  • Fig. 1 is a schematic flowchart of a method for retransmitting data according to an exemplary embodiment
  • FIG. 2 is a schematic flowchart of a method for retransmitting data according to an exemplary embodiment
  • Fig. 3 is a schematic structural diagram of an apparatus for retransmitting data according to an exemplary embodiment
  • Fig. 4 is a schematic structural diagram of an apparatus for retransmitting data according to an exemplary embodiment
  • Fig. 5 is a schematic structural diagram of a computer device according to an exemplary embodiment.
  • An exemplary embodiment of the present disclosure provides a method for retransmitting data. As shown in FIG. 1, the processing flow of the method may include the following steps:
  • Step S110 When the receiving end detects a packet loss event, it sends a retransmission request for the lost data packet to the sending end.
  • the receiving end may determine the sequence number of the lost data packet based on the sequence number of the received data packet.
  • the receiving end stores the received data packets in the cache, and sorts the received data packets in the cache.
  • the receiving end Whenever the receiving end receives a data packet, it can obtain the sequence number N1 of the data packet. If the sequence number N1 is equal to the sequence number N2 of the expected data packet, the data packet with the sequence number N1 can be directly output to the subsequent data packet processing module for subsequent Processing, such as decoding processing.
  • the data packet with the sequence number N1 is a late data packet and can be directly discarded.
  • sequence number N1 is greater than the sequence number N2 of the expected data packet, and the sequence number N1 is less than or equal to the maximum sequence number N3 of the data packets stored in the cache, it can be determined whether there is a data packet with the sequence number N1 in the cache, if it does not exist, the sequence number is The data packets of N1 are inserted into the corresponding positions in the cache in sequence. At the same time, the data packets with the sequence number N1 are retransmission data packets or out-of-sequence data packets. Pass the data packet with sequence number N1.
  • sequence number N1 is greater than the sequence number N2 of the expected data packet, and the sequence number N1 is equal to the maximum sequence number N3+1 of the data packets stored in the cache, it is determined whether there is a data packet with the sequence number N1 in the cache, if it does not exist, the sequence number is N1
  • the data packets are inserted into the corresponding locations in the cache in order.
  • sequence number N1 is greater than the sequence number N2 of the expected data packet, and the sequence number N1 is greater than the maximum sequence number N3+1 of the data packets stored in the cache, it is determined whether there is a data packet with the sequence number N1 in the cache, if it does not exist, the sequence number is N1
  • the data packets are inserted into the corresponding positions in the cache in order.
  • the data packets with the sequence numbers N3+1 to N1-1 are lost data packets.
  • the heavy packets with the sequence numbers N3+1 to N1-1 can be constructed. Pass the request. After constructing the retransmission request for the lost data packet at the receiving end, you can wait 10 ms to eliminate the out-of-order data packets. After waiting for 10 ms, you can send the retransmission request for the missing data packet to the sending end.
  • step S120 the receiving end obtains the RTT duration, and determines the threshold of the retransmission parameter based on the RTT duration.
  • the receiving end may calculate the RTT duration according to the current network condition and a preset estimation algorithm according to a preset period such as 1s.
  • the value of the RTT duration indicates the expected time required for the retransmission request to return from the receiving end to the sending end and the sending end one round trip. In the case of poor network conditions, the RTT duration is longer, and in the case of better network conditions The RTT duration is shorter, and the specific method for calculating the RTT duration is specified in NPQ. You can use 500ms as the dividing line. If the RTT duration is greater than 500ms, you can consider the network condition to be extremely poor.
  • the receiving end may calculate the RTT duration according to a preset period, and determine the retransmission parameter threshold based on the RTT duration. Due to the high correlation between the RTT duration and the network status, the RTT duration is longer under poor network conditions, and the RTT duration is shorter under better network conditions. Therefore, the current RTT duration can be used to determine The current network condition determines the retransmission parameter threshold according to the current network condition. In this way, the threshold value of the retransmission parameter can be adjusted according to the current network condition, and the real-time performance is better, avoiding the use of a fixed threshold value of the retransmission parameter, and improving the flexibility of the data transmission process.
  • the threshold of the retransmission parameter may include a threshold of total retransmission consumption duration and a threshold of the number of retransmissions.
  • Step S130 when the retransmission time is reached after the retransmission request is sent, if the receiving end does not receive the data packet, the retransmission request for the data packet is sent to the sending end, the RTT duration is updated, and the execution is determined based on the RTT duration. Handling of parameter thresholds.
  • the retransmission duration is determined based on the RTT duration.
  • the retransmission duration may be the RTT duration plus a preset error duration such as 10ms.
  • the error duration is used to eliminate errors caused by factors such as thread start-up time and non-corresponding system time.
  • the receiving end After the receiving end sends the retransmission request to the sending end, it can be timed. If the retransmission time exceeds the receiving end and the data packet returned by the sending end has not been received, the retransmission request may not be able to arrive smoothly due to network reasons. The sending end, or the data packets sent by the sending end cannot reach the receiving end smoothly. At this time, the retransmission request can be sent again.
  • steps S120-S130 can be repeatedly performed to update the RTT duration and re-determine the retransmission parameter threshold until a certain value is met. Conditions so far.
  • Step S140 When the value of the retransmission parameter reaches the corresponding threshold of the retransmission parameter, if the receiving end does not receive the data packet, it stops sending the retransmission request of the data packet.
  • the retransmission parameters may include the total retransmission time or the number of retransmissions, or the retransmission parameters may include the total retransmission time and the number of retransmissions.
  • the threshold of the retransmission parameter corresponding to the total retransmission time is the threshold of the total retransmission time
  • the threshold of the retransmission parameter corresponding to the number of retransmissions is the threshold of the number of retransmissions.
  • the receiving end may stop repeating steps S120-S130. Or, when the number of retransmissions reaches the threshold of the number of retransmissions, if the receiving end does not receive the data packet, it may stop repeating steps S120-S130. At this time, it can be considered that the retransmission process has failed. Since the real-time data transmission requires high real-time performance of the data transmission, if any lost data packet cannot successfully reach the receiving end within a short time, it will no longer continue to wait for the lost data Packets, directly handle other data packets.
  • the threshold of the retransmission parameter is the threshold of the total retransmission time.
  • the method for determining whether the retransmission timed out may include: obtaining the RTT duration, and determining the product of the retransmission duration and the first reference number of retransmissions; The sum of the product and the preset reserved duration is the threshold of the total retransmission consumption duration.
  • the first reference retransmission number may be a preset fixed reference retransmission number, such as 10 times, or may be a reference retransmission number determined based on a correspondence between a preset RTT duration range and a reference retransmission number.
  • the receiving end Under the current network conditions, it is expected that if the receiving end never receives the data packet, it needs to send a retransmission request of the first reference retransmission number to the sending end. After each retransmission request, it needs to wait for the length of the retransmission before receiving
  • the total time the terminal needs to wait is the product of the retransmission time and the first reference retransmission times. Due to the possibility of out-of-order data packets, 10ms can be reserved as the length of time to wait for out-of-order data packets. In addition, considering other circumstances, different time lengths can also be reserved, and all the reserved time lengths are added together as the default Reserve time.
  • the sum of the total duration of the product that the receiving end needs to wait and the preset reserved duration can be determined and used as the threshold of the total retransmission consumption duration. If the lost data packet is the expected data packet, and the receiving end has not received the data packet after exceeding the threshold of the total retransmission time after sending the retransmission request of the lost data packet for the first time, it can be judged that the retransmission timed out, indicating Retransmission processing failed.
  • the threshold of the total retransmission time duration determined through steps S120-S130 also changes, but no matter how the threshold of the total retransmission time duration changes, as long as the retransmission is checked for timeout, the receiving end is determined After the first retransmission request for the lost data packet is sent and the data packet is not received when the current total retransmission time threshold is exceeded, it can be judged that the retransmission timed out and the retransmission processing failed.
  • the judgment conditions for judging whether the retransmission timed out can be adjusted in real time according to the network conditions, to avoid poor network conditions and to wait for a long time for lost packets, and improve the flexibility of data transmission .
  • the receiving end can check whether a retransmission times out every time a data packet is stored in the cache. In order to save processing overhead, it is not necessary to set a timer for the retransmission request separately to count down.
  • the length of the packet with the smallest sequence number in the cache stays in the cache to help determine whether the retransmission timed out, because the packet with the lowest sequence number in the cache is in The length of time spent in the cache is approximately equal to the total time spent on retransmissions.
  • the receiving end may not request the sending end to retransmit any lost data packets, because even if the sending end retransmits the lost data packets, the success rate is low and time-consuming Longer, real-time data transmission is extremely poor. Therefore, it can be determined whether the RTT duration is greater than the preset duration threshold, such as 500ms.
  • the total retransmission consumption duration threshold is directly set to the preset duration, such as 10ms, because the total retransmission consumption duration threshold is shorter . Within the shorter total retransmission duration threshold, all the lost packets cannot be successfully retransmitted, that is, the retransmission of all lost packets will time out, and it can reach the automatic retransmission request to stop sending all the lost packets Effect. If the RTT duration is less than or equal to 500 ms, the product of the RTT duration and the first reference retransmission number is determined, and the sum of the product and the preset reserved duration is determined as the total consumption duration threshold for retransmission.
  • the minimum sequence number of the data packet in the cache may be determined as the sequence number of the expected data packet. After the minimum sequence number of the data packet in the cache is determined as the sequence number of the expected data packet, if a data packet smaller than the sequence number of the expected data packet can be received, the received data packet is a late data packet, and it is directly discarded. can.
  • the method provided by the embodiment of the present disclosure may further include: determining the RTT to which the acquired RTT duration belongs based on the correspondence between the preset RTT duration range and the reference retransmission times The number of first reference retransmissions corresponding to the duration range.
  • the correspondence between the preset RTT duration range and the reference retransmission times may be a reference retransmission times mapping table, as shown in Table 1:
  • the first reference retransmission times corresponding to the RTT duration range to which the acquired RTT duration belongs can be determined by looking up Table 1. For example, if the current RTT duration is 80 ms, the first reference retransmission times are 4 times. If the receiving end sends 4 retransmission requests to the sending end, the total waiting time is 320 ms.
  • the main consideration is that, first, the larger the value of the RTT duration range, the fewer the number of retransmissions. In this way, when the network is in poor condition, fewer retransmission requests are sent to the sender. retrieve lost packets by means of retransmission. Secondly, the larger the value of the RTT duration range, the greater the threshold of the total retransmission consumption duration. Lastly, the sum of the total retransmission consumption duration thresholds corresponding to any two RTT duration ranges is less than or equal to the RTT update period, such as 1s.
  • the retransmission request of the data packet should also be stopped when the number of retransmissions reaches the threshold of the number of retransmissions.
  • the threshold of the retransmission parameter is a threshold of the number of retransmissions
  • a method for determining whether the number of times of retransmissions reaches the threshold of the number of retransmissions may include: acquiring an RTT duration, and retransmitting based on a preset RTT duration range and reference Correspondence of times, determine the second reference retransmission times corresponding to the RTT duration range to which the acquired RTT duration belongs; based on the comparison result of the second reference retransmission times and the third reference retransmission times determined when the retransmission request was sent last time To determine the threshold of retransmission times.
  • the threshold value of the number of retransmission times may be determined based on the comparison result of the second reference retransmission number and the third reference retransmission number determined when the retransmission request was previously sent.
  • the correlation between the size of the reference retransmission times and the network status is also high, so the current network status can also be reflected by the size of the retransmission times. The greater the number of retransmissions, the better the network condition. Conversely, the fewer the retransmissions, the worse the network condition.
  • the second reference retransmission number is determined as the retransmission number threshold.
  • the second reference retransmission times are the currently determined reference retransmission times. If the second reference retransmission times are equal to the previously determined third reference retransmission times, it means that the current network condition remains unchanged and the second reference retransmission times can be changed. Determined as the threshold for the number of retransmissions. If the second reference retransmission number is greater than the previously determined third reference retransmission number, it indicates that the current network condition is getting better, and the second reference retransmission number can be determined as the threshold of the retransmission number.
  • the duration that the receiving end can wait for the data packet can be updated to: retransmission consumed time + (current RTT duration + error duration) ⁇ ( The second reference number of retransmissions-the current number of retransmissions).
  • the retransmitted count is determined as the retransmission count threshold.
  • the second reference retransmission count is less than the third reference retransmission count, indicating that the current network condition has deteriorated, and the current retransmission count is greater than or equal to the second reference retransmission count, indicating that the current retransmission request has been retransmitted many times.
  • the threshold for the number of retransmissions can be set to the number of retransmissions, and the length of time that the receiving end can wait for a data packet is set to the length of time spent for retransmission. Since the current number of retransmissions has definitely reached the threshold of the number of retransmissions, the receiving end can automatically stop sending the retransmission request of the data packet to the sending end.
  • the second reference retransmission count is determined as the retransmission count threshold.
  • the second reference retransmission count is less than the third reference retransmission count, indicating that the current network condition has deteriorated, and the current retransmission count is less than the second reference retransmission count, indicating that the current retransmission count is insufficient.
  • the terminal retransmits several retransmission requests, and the threshold of the number of retransmissions may be set as the second reference number of retransmissions.
  • the duration that the receiving end can wait for the data packet can be updated to: retransmission consumed time + (current RTT duration + error duration) ⁇ ( The second reference number of retransmissions-the current number of retransmissions).
  • the number of reference retransmissions in Table 1 may be increased or Keep the same, so that if important data packets are lost, you can transmit several more important data packet retransmission requests to ensure the reliability of data transmission.
  • the RTT duration can be obtained.
  • the second corresponding to the RTT duration range to which the acquired RTT duration belongs is determined based on the first correspondence between the preset RTT duration range and the reference retransmission times Refer to the number of retransmissions; if the type of the data packet is not within the preset type set, then based on the second correspondence between the preset RTT duration range and the reference retransmission times, determine the number corresponding to the RTT duration range to which the acquired RTT duration belongs 2. Refer to the number of retransmissions.
  • the set of preset types may include encoding information data packet types, I frame data packet types, frame start data packet types, and the like.
  • the number of reference retransmissions corresponding to the same RTT duration in the first correspondence is greater than or equal to the number of reference retransmissions in the second correspondence.
  • the lost data packet is not an important data packet, you can refer to Table 1 to query the reference retransmission times corresponding to the RTT duration range to which the current RTT duration belongs. If the lost data packet is an important data packet, you can refer to Table 2 To query the number of reference retransmissions corresponding to the RTT duration range to which the current RTT duration belongs.
  • the threshold value of the retransmission parameter is adjusted in real time according to the correlation between the RTT duration and the network status. Due to the high correlation between the RTT duration and the network status, the RTT duration is longer under poor network conditions, and the RTT duration is shorter under better network conditions. Therefore, the RTT duration reflects the network status and then passes
  • the method of adjusting the retransmission parameter threshold according to the RTT duration can achieve the purpose of adjusting the retransmission parameter threshold in real time according to the network conditions.
  • the retransmission parameter reaches the retransmission parameter threshold, it stops sending the retransmission request to the initiator in time. In this way, the total retransmission time can be adjusted in real time according to the network conditions. In the case of poor network conditions, it is easier to shorten the total retransmission time by using the method provided in this embodiment, and avoid using a longer time to wait for lost packets. The flexibility of data transmission is better.
  • An exemplary embodiment of the present disclosure provides a method for retransmitting data. As shown in FIG. 2, the processing flow of the method may include the following steps:
  • Step S210 when the sending end detects that the data packet has been sent and stored in the buffer, the RTT duration is obtained, and based on the RTT duration, the first data storage reference duration is determined.
  • the sending end When the sending end detects that the data packet has been sent, it can store the data packet in the cache, in case the data packet is lost during transmission, and the data packet needs to be retransmitted.
  • the sent data packets need to be cleaned according to certain conditions, but they need to be kept as much as possible and may need to be retransmitted.
  • Data packets to improve the hit rate of retransmission requests Specifically, the storage duration of the data packet can be adjusted according to the network condition and the mechanism of the retransmission request sent by the receiving end.
  • the RTT duration can be obtained, and the product of the RTT duration and the target reference retransmission times can be determined as the first data storage reference duration.
  • the target number of reference retransmissions may be a preset fixed number of reference retransmissions, such as 10 times, or a reference retransmission number determined based on a correspondence between a preset RTT duration range and a reference retransmission number.
  • the sending end may determine the target reference retransmission corresponding to the RTT duration range to which the acquired RTT duration belongs based on the correspondence between the preset RTT duration range and the number of reference retransmissions frequency.
  • the correspondence between the preset RTT duration range and the reference retransmission times may be a reference retransmission times mapping table, as shown in Table 3:
  • the target reference retransmission times corresponding to the RTT duration range to which the acquired RTT duration belongs can be determined by looking up Table 3. For example, if the current RTT duration is 80 ms, the target reference retransmission times are 4 times, and the first data storage reference duration is 320 ms.
  • the main consideration is that, first, the larger the value of the RTT duration range, the fewer the number of retransmissions. In this way, when the network condition is not good, fewer retransmission requests are sent to the sender. retrieve lost packets by means of retransmission. Secondly, the larger the value of the RTT duration range, the greater the threshold of the total retransmission consumption duration. Lastly, the sum of the total retransmission consumption duration thresholds corresponding to any two RTT duration ranges is less than or equal to the RTT update period, such as 1s.
  • Step S220 The sending end determines the data storage duration threshold based on the first data storage reference duration and the second data storage reference duration determined when the previous data packet was stored in the cache.
  • the sending end can obtain the current RTT duration, determine the first data storage reference duration based on the current RTT duration, and determine the first data storage reference duration based on the first data storage reference duration and the second data storage reference duration determined when the previous data packet was stored in the cache, determine Data storage duration threshold.
  • step S220 may include determining the data storage duration based on the first data storage reference duration, the second data storage reference duration determined when the previous packet was stored in the cache, and the pre-acquired reservation duration Threshold.
  • the reserved duration can be set according to the situation.
  • the reserved duration can include the out-of-order data packet waiting duration such as 10 ms, and can also include the frame interval duration.
  • the frame interval duration may be determined according to the code rate corresponding to the video frame to which the current data packet belongs. For example, the bit rate corresponding to the video frame to which the current data packet belongs is 25 frames per second, then 25 video frames need to be transmitted in one second, and the frame interval between each video frame is 40 ms. For packets belonging to video frames with a low frame rate, if the frame interval duration is taken into consideration within the data storage duration threshold, the hit rate of the retransmission request can be improved.
  • the step of determining the data storage duration threshold based on the first data storage reference duration, the second data storage reference duration determined when the previous data packet was stored in the cache, and the pre-acquired reservation duration may be Including: calculating the time difference between the time point when the current data packet is stored in the cache and the time point when the previous data packet is stored in the cache; if the first data storage reference duration is less than or equal to the second data storage reference duration, and the time difference If the value is less than the second data storage reference duration, the sum of the second data storage reference duration and the pre-obtained reserved duration is determined as the data storage duration threshold; if the first data storage reference duration is less than or equal to the second data storage reference duration , And the time difference is greater than or equal to the second data storage reference duration, determine the duration difference between the first data storage reference duration and the second data storage reference duration, and determine the difference between the duration difference and the preset scale factor Product, determine the sum of the product and the first data storage reference duration, and determine the sum of the sum and the
  • the first data storage reference duration is the data storage reference duration determined when the current data packet is stored in the cache
  • the second data storage reference duration is the data storage duration threshold determined when the previous data packet is stored in the cache. If the first data storage reference duration is less than or equal to the second data storage reference duration, and the time difference is less than the second data storage reference duration, that is, the data storage reference duration is unchanged or shortened, and the previous data packet is stored in the cache If the determined data storage duration is not exhausted, you can still use the data storage duration threshold determined when the previous packet was stored in the cache, and the data storage duration threshold can be maintained as the second data storage reference duration and the pre-acquired reservation The sum of time.
  • the shortened data storage reference duration may not be temporarily selected as the data storage duration threshold, so that as many data packets in the cache as possible can be retained as much as possible, which can improve retransmission The requested hit rate.
  • the first data storage reference duration is less than or equal to the second data storage reference duration, and the time difference is greater than or equal to the second data storage reference duration, that is, the data storage reference duration is unchanged or shortened, and the previous data packet is stored in the cache
  • the data storage duration determined when the previous packet is stored in the cache needs to be slowly reduced to the first data storage reference duration, and the first data storage reference duration and the second data can be determined
  • Store the duration difference between the reference durations determine the product of the duration difference and the preset scale factor, determine the sum of the product and the first data storage reference duration, and sum the sum with the reserved duration, Determined as the data storage duration threshold.
  • the first data storage reference duration is greater than the second data storage reference duration, that is, the data storage reference duration becomes longer, you can directly set the data storage duration threshold to the maximum data storage reference duration. You can set the first data storage reference duration to The sum of the reserved duration is determined as the threshold of the data storage duration.
  • Step S230 The sending end deletes the data packets that have been stored in the buffer for a time period that exceeds the data storage duration threshold.
  • the sending end can determine the current system time, subtract the data storage duration threshold from the current system time to obtain the data expiration time point, and delete all the data packets in the cache before the data expiration time point.
  • step S240 the sending end updates the RTT duration, and then proceeds to execute the process of acquiring the RTT duration when it is detected that the data packet has been sent and stored in the buffer.
  • the RTT duration is updated according to the period, so the RTT duration is not a fixed value, and the RTT duration can be updated each time a data packet is stored in the cache. You can obtain the current RTT duration to determine whether the current RTT duration is equal to the previous RTT duration. If the network status changes, the current RTT duration is not equal to the previous RTT duration. If the network status remains unchanged, the current RTT duration is equal to the previous RTT duration. After the RTT duration is updated, if the RTT duration changes, the first data storage reference duration also changes accordingly, so steps S210-S240 need to be repeated.
  • the storage duration of the data packet is adjusted according to the network condition and the mechanism of the retransmission request sent by the receiving end. In this way, the storage space of the cache can be appropriately saved, and at the same time, the hit rate of the retransmission request can be improved.
  • the apparatus includes:
  • the sending module 310 is configured to send a retransmission request for the lost data packet to the sending end when a packet loss event is detected;
  • the determining module 320 is used to obtain the RTT duration, and determine the threshold of the retransmission parameter based on the RTT duration;
  • the update module 330 is configured to send a retransmission request of the data packet to the sending end to update the RTT duration when the retransmission duration reaches the retransmission duration after the retransmission request is sent. To execute the process of determining the retransmission parameter threshold based on the RTT duration;
  • the stopping module 340 is configured to stop sending the retransmission request of the data packet if the value of the retransmission parameter reaches the corresponding threshold value of the retransmission parameter, if the data packet is not received.
  • the retransmission parameters include the total retransmission time and/or the number of retransmissions
  • the threshold of the retransmission parameter corresponding to the total retransmission time is the threshold of the total retransmission time and the number of retransmissions
  • the corresponding threshold of the retransmission parameter is the threshold of the number of retransmissions.
  • the threshold of the retransmission parameter is a threshold of total retransmission consumption duration
  • the determination module 320 is configured to:
  • the sum of the product and the preset reserved duration is determined as a total consumption duration threshold for retransmission.
  • the determination module 320 is also used to:
  • the threshold of the retransmission parameter is a threshold of the number of retransmissions
  • the determination module 320 is configured to:
  • the RTT duration and determine the second reference retransmission number corresponding to the RTT duration range to which the acquired RTT duration belongs based on the correspondence relationship between the preset RTT duration range and the reference retransmission times, wherein, in the correspondence, the RTT duration range The larger the value, the fewer the retransmission times;
  • the threshold value of the retransmission times is determined.
  • the determination module 320 is configured to:
  • the second reference retransmission number is greater than or equal to the previously determined third reference retransmission number, determine the second reference retransmission number as the retransmission number threshold;
  • the retransmission times are determined as a threshold of retransmission times
  • the second reference retransmission count is determined as the retransmission count threshold.
  • the determination module 320 is configured to:
  • the type of the data packet is in the preset type set, then based on the first correspondence between the preset RTT duration range and the reference retransmission times, determine the second reference weight corresponding to the RTT duration range to which the acquired RTT duration belongs Transmission times
  • the second corresponding to the RTT duration range to which the acquired RTT duration belongs Reference number of retransmissions where the number of reference retransmissions corresponding to the same RTT duration range in the first correspondence is greater than or equal to the number of reference retransmissions corresponding to the second correspondence.
  • the apparatus includes:
  • the determining module 410 is configured to obtain the RTT duration when it is detected that the data packet has been sent and stored in the cache, and determine the first data storage reference duration based on the RTT duration; based on the first data storage reference duration and the previous data packet The second data storage reference duration determined when stored in the cache, to determine the data storage duration threshold;
  • the deleting module 420 is configured to delete a data packet that has been stored in the cache for a duration that exceeds the data storage duration threshold;
  • the update module 430 is used to update the RTT duration and go to the process of acquiring the RTT duration when it is detected that the data packet has been sent and stored in the buffer.
  • the determination module 410 is configured to:
  • the data storage duration threshold is determined based on the first data storage reference duration, the second data storage reference duration determined when the previous data packet was stored in the cache, and the pre-acquired reservation duration.
  • the determination module 410 is configured to:
  • the second data storage reference duration is obtained in advance
  • the sum of the reserved time is determined as the data storage time threshold
  • first data storage reference duration is less than or equal to the second data storage reference duration, and the time difference is greater than or equal to the second data storage reference duration, it is determined that the first data storage reference duration is equal to A duration difference between the second data storage reference durations, determining a product between the duration difference and a preset scale factor, and determining a sum between the product and the first data storage reference duration , The sum of the sum value and the reserved duration is determined as the data storage duration threshold;
  • the sum of the first data storage reference duration and the reserved duration is determined as a data storage duration threshold.
  • the determination module 410 is also used to:
  • the reserved duration is determined based on the frame rate of the video frame to which the data packet belongs.
  • the threshold of the retransmission parameter is adjusted in real time according to the correlation between the RTT duration and the network status. Due to the high correlation between the RTT duration and the network status, the RTT duration is longer under poor network conditions, and the RTT duration is shorter under better network conditions. Therefore, the RTT duration reflects the network status and then passes
  • the method of adjusting the retransmission parameter threshold according to the RTT duration can achieve the purpose of adjusting the retransmission parameter threshold in real time according to the network conditions.
  • the retransmission parameter reaches the retransmission parameter threshold, it stops sending the retransmission request to the initiator in time. In this way, the total retransmission time can be adjusted in real time according to the network conditions. In the case of poor network conditions, it is easier to shorten the total retransmission time by using the device provided in this embodiment, avoiding the use of a longer time to wait for lost data packets. The flexibility of data transmission is better.
  • the device for retransmitting data provided in the above embodiments only uses the division of the above functional modules as an example for retransmission of data.
  • the above functions can be allocated by different functional modules as needed Completion means dividing the internal structure of the sending end and the receiving end into different functional modules to complete all or part of the functions described above.
  • the device for retransmitting data provided in the above embodiments and the method embodiment for retransmitting data belong to the same concept. For the specific implementation process, see the method embodiment, and details are not described here.
  • Yet another exemplary embodiment of the present disclosure provides a system for retransmitting data.
  • the system includes a sending end and a receiving end, where:
  • the receiving end is used to send a retransmission request of the lost data packet to the sending end when a packet loss event is detected; obtain the RTT duration, determine the retransmission parameter threshold based on the RTT duration; During the transmission time, if the data packet is not received, send a retransmission request of the data packet to the sending end, update the RTT duration, and proceed to perform the process of determining the retransmission parameter threshold based on the RTT duration; When the value of the retransmission parameter reaches the corresponding threshold of the retransmission parameter, if the data packet is not received, stop sending the retransmission request of the data packet;
  • the sending end is used to obtain the RTT duration when it is detected that the data packet has been sent and stored in the cache, and determine the first data storage reference duration based on the RTT duration; based on the first data storage reference duration and the previous data
  • the second data storage reference duration determined when the packet is stored in the cache to determine the data storage duration threshold; deleting the data packets that have been stored in the cache for longer than the data storage duration threshold; updating the RTT duration , Go to the process of acquiring the RTT duration when it is detected that the data packet has been sent and stored in the buffer.
  • FIG. 5 shows a schematic structural diagram of a computer device 1900 provided by an exemplary embodiment of the present disclosure.
  • the computer device 1900 may be a sending end or a receiving end in the foregoing embodiments, and may have a relatively large difference due to different configurations or performances, and may include one or more processors (central processing units 1910) and one or more The above memory 1920.
  • processors central processing units 1910
  • the above memory 1920 may include one or more processors (central processing units 1910) and one or more The above memory 1920.
  • processors central processing units 1910
  • the above memory 1920 wherein, at least one instruction is stored in the memory 1920, and the at least one instruction is loaded and executed by the processor 1910 to implement the method for retransmitting data described in the foregoing embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Communication Control (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)

Abstract

The present disclosure relates to a data retransmission method, a device and a system, belonging to the field of data transmission technology. Said method comprises: upon detection of a packet loss event, sending, to a sending end, a retransmission request for a lost data packet; acquiring an RTT, and determining, on the basis of the RTT, a retransmission parameter threshold; and when a retransmission duration has elapsed since the retransmission request was sent, if no data packet is received, sending, to the sending end, a retransmission request for the data packet, updating the RTT, and proceeding to the process of determining the retransmission parameter threshold on the basis of the RTT; and when the numerical value of the retransmission parameter reaches the corresponding retransmission parameter threshold, if no data packet is received, stopping sending a retransmission request for the data packet. The present disclosure can easily shorten the total time consumed by retransmission, avoiding a long wait time for a lost data packet, and improving the flexibility of data transmission.

Description

重传数据的方法、装置和系统Method, device and system for retransmitting data
本申请要求于2018年12月17日提交的申请号为201811544881.8、发明名称为“重传数据的方法、装置和系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application filed on December 17, 2018 with the application number 201811544881.8 and the invention titled "Method, Device and System for Retransmitting Data", the entire contents of which are incorporated by reference in this application.
技术领域Technical field
本公开是关于数据传输技术领域,尤其是关于一种重传数据的方法、装置和系统。The present disclosure relates to the field of data transmission technology, and in particular, to a method, device, and system for retransmitting data.
背景技术Background technique
在实时传输数据的过程中,由于网络的不稳定性,导致传输的数据包发生丢包事件。在接收端,可以基于接收到的数据包的序号,确定丢失数据包的序号。随后,接收端可以向发送端发送重传请求,重传请求中携带有丢失数据包的序号。发送端在接收到重传请求之后,可以基于丢失数据包的序号,在缓存中查找是否存在丢失数据包,如果在缓存中存在丢失数据包,则获取丢失数据包并向接收端发送丢失数据包。在上述过程中,由于网络的不稳定性,依然不能确定发送端一定能够接收到接收端发送的重传请求,同理也不能确定接收端一定能够接收到发送端返回的丢失数据包,最终可能接收端发送出重传请求之后,得不到回应。In the process of transmitting data in real time, due to the instability of the network, a packet loss event occurs in the transmitted data packet. At the receiving end, the sequence number of the lost data packet can be determined based on the sequence number of the received data packet. Subsequently, the receiving end may send a retransmission request to the sending end, and the retransmission request carries the sequence number of the lost data packet. After receiving the retransmission request, the sending end can find whether there is a missing data packet in the cache based on the sequence number of the missing data packet, if there is a missing data packet in the cache, then obtain the missing data packet and send the missing data packet to the receiving end . In the above process, due to the instability of the network, it is still not certain that the sending end will be able to receive the retransmission request sent by the receiving end. Similarly, it cannot be sure that the receiving end will be able to receive the lost data packet returned by the sending end. After the receiver sends the retransmission request, no response is received.
因此,对于接收端,不能在发送出重传请求之后,无限制地等待发送端返回的丢失数据包。在实际应用中,接收端发送出重传请求之后,如果等待RTT(Round-Trip Time,往返时延)时长之后还未接收到丢失数据包,则会再次向接收端发送重传请求。其中,RTT时长是接收端按照预设的周期根据当前的网络状况、预设的估计算法计算得到的。RTT时长的值表示预计重传请求从接收端到发送端以及发送端返回丢失数据包一个来回所需时长,在网络状况不佳的情况下,RTT时长较长,在网络状况较佳的情况下,RTT时长较短。NPQ(Network Protocol Quality,网络协议质量库)中规定了计算RTT时长的具体方式。Therefore, for the receiving end, after sending out the retransmission request, it cannot wait for the lost data packet returned by the sending end indefinitely. In practical applications, after the receiver sends a retransmission request, if it has not received a lost packet after waiting for RTT (Round-Trip Time), it will send a retransmission request to the receiver again. The RTT duration is calculated by the receiving end according to the current network condition and a preset estimation algorithm according to a preset period. The value of the RTT duration indicates the expected duration of the retransmission request from the receiving end to the sending end and the sending end to return a lost packet one round trip. In the case of poor network conditions, the RTT duration is longer, in the case of better network conditions , RTT duration is shorter. NPQ (Network Protocol Quality, network protocol quality library) specifies the specific method of calculating the RTT duration.
接收端会重复执行上面所述的过程,直到接收到丢失数据包或者同一重传请求对应的重传参数的数值超过对应的预设的重传参数阈值。其中,重传参数 包括重传总消耗时长以及已重传次数,重传总消耗时长对应的预设的重传参数阈值为重传总消耗时长阈值,已重传次数对应的预设的重传参数阈值为重传次数阈值。重传总消耗时长阈值可以是固定值,可以是在网络状况不佳的情况下,最长可以等待丢失数据包的时长。重传次数阈值也可以是固定值如10次。当同一重传请求对应的重传总消耗时长大于重传总消耗时长阈值,或者同一重传请求对应的已重传次数超过重传次数阈值时,可以停止继续向接收端发送该重传请求。The receiving end will repeat the process described above until it receives a lost data packet or the value of the retransmission parameter corresponding to the same retransmission request exceeds the corresponding preset retransmission parameter threshold. Among them, the retransmission parameters include the total retransmission time and the number of retransmissions. The preset retransmission parameter threshold corresponding to the total retransmission time is the total retransmission time threshold, and the preset retransmission corresponds to the number of retransmissions. The parameter threshold is the threshold of retransmission times. The threshold for the total retransmission time duration can be a fixed value, or it can be the maximum length of time that you can wait for a lost packet when the network conditions are poor. The threshold of the number of times of retransmission may also be a fixed value such as 10 times. When the total retransmission consumption duration corresponding to the same retransmission request is greater than the total retransmission consumption duration threshold, or the number of retransmissions corresponding to the same retransmission request exceeds the threshold of the number of retransmissions, it may stop continuing to send the retransmission request to the receiving end.
在实现本公开的过程中,发明人发现至少存在以下问题:In the process of implementing the present disclosure, the inventor found that there are at least the following problems:
在网络状况不佳的情况下,RTT时长较长且易丢包,接收端经常需要较长的重传总消耗时长才能接收到返回的丢失数据包,甚至在一些情况下,在重传超时之后,仍然不能接收到返回的丢失数据包。因此,在实时传输数据的应用场景如视频会议的应用场景中,在网络状况不佳的情况下采用上述重传机制,会导致使用较长的时长去等待丢失数据包,数据传输的灵活性较差。In the case of poor network conditions, the RTT time is long and it is easy to lose packets. The receiving end often requires a long total retransmission time to receive the lost packet returned, even in some cases, after the retransmission timeout , Still cannot receive the lost packet returned. Therefore, in the application scenarios of real-time data transmission, such as video conference application scenarios, using the above retransmission mechanism in the case of poor network conditions will cause a longer time to wait for the lost data packets, and the flexibility of data transmission is more difference.
发明内容Summary of the invention
为了克服相关技术中存在的问题,本公开提供了以下技术方案:In order to overcome the problems in the related art, the present disclosure provides the following technical solutions:
根据本公开实施例的第一方面,提供一种重传数据的方法,所述方法包括:According to a first aspect of an embodiment of the present disclosure, a method for retransmitting data is provided. The method includes:
当检测到发生丢包事件时,向发送端发送丢失的数据包的重传请求;When a packet loss event is detected, a retransmission request for the lost data packet is sent to the sender;
获取RTT时长,基于RTT时长确定重传参数阈值;Obtain the RTT duration and determine the retransmission parameter threshold based on the RTT duration;
当发送重传请求后达到重传时长时,如果未接收到所述数据包,则对RTT时长进行更新,转至执行基于RTT时长确定重传参数阈值的处理;When the retransmission duration is reached after the retransmission request is sent, if the data packet is not received, the RTT duration is updated, and the process of determining the retransmission parameter threshold based on the RTT duration is performed;
当重传参数的数值达到对应的重传参数阈值时,如果未接收到所述数据包,则停止发送所述数据包的重传请求。When the value of the retransmission parameter reaches the corresponding threshold of the retransmission parameter, if the data packet is not received, stop sending the retransmission request of the data packet.
可选地,所述重传参数包括重传总消耗时长和/或已重传次数,所述重传总消耗时长对应的重传参数阈值为重传总消耗时长阈值,所述已重传次数对应的重传参数阈值为重传次数阈值。Optionally, the retransmission parameters include the total retransmission time and/or the number of retransmissions, and the threshold of the retransmission parameter corresponding to the total retransmission time is the threshold of the total retransmission time and the number of retransmissions The corresponding threshold of the retransmission parameter is the threshold of the number of retransmissions.
可选地,所述重传参数阈值为重传总消耗时长阈值,所述获取RTT时长,基于RTT时长确定重传参数阈值,包括:Optionally, the threshold value of the retransmission parameter is a threshold value of the total consumption time of the retransmission. The acquiring the RTT duration and determining the threshold of the retransmission parameter based on the RTT duration includes:
获取RTT时长,确定RTT时长对应的重传时长,确定RTT时长对应的重传时长与第一参考重传次数的乘积;Obtain the RTT duration, determine the retransmission duration corresponding to the RTT duration, and determine the product of the retransmission duration corresponding to the RTT duration and the first reference number of retransmissions;
确定所述乘积与预设的预留时长的和值,为重传总消耗时长阈值。The sum of the product and the preset reserved duration is determined as a total consumption duration threshold for retransmission.
可选地,在获取RTT时长之后,所述方法还包括:Optionally, after obtaining the RTT duration, the method further includes:
基于预设的RTT时长范围与参考重传次数的对应关系,确定获取的RTT时长所属的RTT时长范围对应的第一参考重传次数,其中,在所述对应关系中RTT时长范围数值越大对应的重传次数越少。Based on the correspondence relationship between the preset RTT duration range and the reference retransmission times, determine the first reference retransmission times corresponding to the RTT duration range to which the acquired RTT duration belongs, wherein in the correspondence, the larger the value of the RTT duration range corresponds to The fewer the number of retransmissions.
可选地,所述重传参数阈值为重传次数阈值,所述获取RTT时长,基于RTT时长确定重传参数阈值,包括:Optionally, the threshold of the retransmission parameter is a threshold of the number of retransmissions, and the acquiring the RTT duration, and determining the threshold of the retransmission parameter based on the RTT duration includes:
获取RTT时长,基于预设的RTT时长范围与参考重传次数的对应关系,确定获取的RTT时长所属的RTT时长范围对应的第二参考重传次数,其中,在所述对应关系中RTT时长范围数值越大对应的重传次数越少;Obtain the RTT duration, and determine the second reference retransmission number corresponding to the RTT duration range to which the acquired RTT duration belongs based on the correspondence relationship between the preset RTT duration range and the reference retransmission times, wherein, in the correspondence, the RTT duration range The larger the value, the fewer the retransmission times;
基于所述第二参考重传次数以及前一次发送重传请求时确定的第三参考重传次数的比较结果,确定重传次数阈值。Based on the comparison result of the second reference retransmission times and the third reference retransmission times determined when the retransmission request was sent last time, the threshold value of the retransmission times is determined.
可选地,所述基于所述第二参考重传次数以及前一次发送重传请求时确定的第三参考重传次数的比较结果,确定重传次数阈值,包括:Optionally, the determining the threshold of the number of retransmissions based on the comparison result of the second reference number of retransmissions and the third reference number of retransmissions determined when the retransmission request was sent last time includes:
如果所述第二参考重传次数大于或者等于前一次确定的第三参考重传次数,则将所述第二参考重传次数确定为重传次数阈值;If the second reference retransmission number is greater than or equal to the previously determined third reference retransmission number, determine the second reference retransmission number as the retransmission number threshold;
如果所述第二参考重传次数小于所述第三参考重传次数且已重传次数大于或者等于所述第二参考重传次数,则将所述已重传次数确定为重传次数阈值;If the second reference retransmission number is less than the third reference retransmission number and the retransmission number is greater than or equal to the second reference retransmission number, the retransmission number is determined as a threshold of retransmission times;
如果所述第二参考重传次数小于所述第三参考重传次数且已重传次数小于所述第二参考重传次数,则将所述第二参考重传次数确定为重传次数阈值。If the second reference retransmission count is less than the third reference retransmission count and the retransmitted count is less than the second reference retransmission count, then the second reference retransmission count is determined as the retransmission count threshold.
可选地,所述获取RTT时长,基于预设的RTT时长范围与参考重传次数的对应关系,确定获取的RTT时长所属的RTT时长范围对应的第二参考重传次数,包括:Optionally, the acquiring the RTT duration, based on the correspondence between the preset RTT duration range and the reference retransmission times, determining the second reference retransmission count corresponding to the RTT duration range to which the acquired RTT duration belongs includes:
获取RTT时长;Get RTT duration;
如果所述数据包的类型在预设类型集合内,则基于预设的RTT时长范围与参考重传次数的第一对应关系,确定与获取的RTT时长所属的RTT时长范围对应的第二参考重传次数;If the type of the data packet is in the preset type set, then based on the first correspondence between the preset RTT duration range and the reference retransmission times, determine the second reference weight corresponding to the RTT duration range to which the acquired RTT duration belongs Transmission times
如果所述数据包的类型不在所述预设类型集合内,则基于预设的RTT时长范围与参考重传次数的第二对应关系,确定与获取的RTT时长所属的RTT时长范围对应的第二参考重传次数,其中,相同的RTT时长范围在所述第一对应关 系中对应的参考重传次数大于或等于在所述第二对应关系中对应的参考重传次数。If the type of the data packet is not in the preset type set, based on the second correspondence between the preset RTT duration range and the reference retransmission times, determine the second corresponding to the RTT duration range to which the acquired RTT duration belongs Reference number of retransmissions, where the number of reference retransmissions corresponding to the same RTT duration range in the first correspondence is greater than or equal to the number of reference retransmissions corresponding to the second correspondence.
根据本公开实施例的第二方面,提供一种重传数据的方法,所述方法包括:According to a second aspect of the embodiments of the present disclosure, a method for retransmitting data is provided. The method includes:
当检测到数据包发送完毕并存入缓存中时,获取RTT时长,基于RTT时长,确定第一数据存储参考时长;When it is detected that the data packet has been sent and stored in the buffer, the RTT duration is obtained, and based on the RTT duration, the first data storage reference duration is determined;
基于所述第一数据存储参考时长以及前一次数据包存入所述缓存中时确定的第二数据存储参考时长,确定数据存储时长阈值;Determine a data storage duration threshold based on the first data storage reference duration and the second data storage reference duration determined when the previous data packet was stored in the cache;
对所述缓存中已存储时长超过所述数据存储时长阈值的数据包进行删除处理;Delete data packets that have been stored in the cache for longer than the data storage duration threshold;
对RTT时长进行更新,转至执行当检测到数据包发送完毕并存入缓存中时获取RTT时长的处理。Update the RTT duration and go to the process of acquiring the RTT duration when it is detected that the data packet has been sent and stored in the buffer.
可选地,所述基于所述第一数据存储参考时长以及前一次数据包存入所述缓存中时确定的第二数据存储参考时长,确定数据存储时长阈值,包括:Optionally, the determining the data storage duration threshold based on the first data storage reference duration and the second data storage reference duration determined when the previous data packet was stored in the cache includes:
基于所述第一数据存储参考时长、前一次数据包存入所述缓存中时确定的第二数据存储参考时长以及预先获取的预留时长,确定数据存储时长阈值。The data storage duration threshold is determined based on the first data storage reference duration, the second data storage reference duration determined when the previous data packet was stored in the cache, and the pre-acquired reservation duration.
可选地,所述基于所述第一数据存储参考时长、前一次数据包存入所述缓存中时确定的第二数据存储参考时长以及预先获取的预留时长,确定数据存储时长阈值,包括:Optionally, the determining the data storage duration threshold based on the first data storage reference duration, the second data storage reference duration determined when the previous data packet was stored in the cache, and the pre-acquired reservation duration includes: :
计算当前数据包存入所述缓存的时间点和前一次数据包存入所述缓存的时间点之间的时间差值;Calculating the time difference between the time point when the current data packet is stored in the cache and the time point when the previous data packet is stored in the cache;
如果所述第一数据存储参考时长小于或者等于所述第二数据存储参考时长,且所述时间差值小于所述第二数据存储参考时长,则将所述第二数据存储参考时长与预先获取的预留时长之和,确定为数据存储时长阈值;If the first data storage reference duration is less than or equal to the second data storage reference duration, and the time difference is less than the second data storage reference duration, the second data storage reference duration is obtained in advance The sum of the reserved time is determined as the data storage time threshold;
如果所述第一数据存储参考时长小于或者等于所述第二数据存储参考时长,且所述时间差值大于或者等于所述第二数据存储参考时长,则确定所述第一数据存储参考时长与所述第二数据存储参考时长之间的时长差值,确定所述时长差值与预设的比例系数之间的乘积,确定所述乘积与所述第一数据存储参考时长之间的和值,将所述和值与所述预留时长之和,确定为数据存储时长阈值;If the first data storage reference duration is less than or equal to the second data storage reference duration, and the time difference is greater than or equal to the second data storage reference duration, it is determined that the first data storage reference duration is equal to A duration difference between the second data storage reference durations, determining a product between the duration difference and a preset scale factor, and determining a sum between the product and the first data storage reference duration , The sum of the sum value and the reserved duration is determined as the data storage duration threshold;
如果所述第一数据存储参考时长大于所述第二数据存储参考时长,则将所 述第一数据存储参考时长与所述预留时长之和,确定为数据存储时长阈值。If the first data storage reference duration is greater than the second data storage reference duration, the sum of the first data storage reference duration and the reserved duration is determined as a data storage duration threshold.
可选地,所述方法还包括:Optionally, the method further includes:
基于数据包所属的视频帧的帧率,确定预留时长。The reserved duration is determined based on the frame rate of the video frame to which the data packet belongs.
根据本公开实施例的第三方面,提供一种重传数据的装置,所述装置包括:According to a third aspect of the embodiments of the present disclosure, an apparatus for retransmitting data is provided. The apparatus includes:
发送模块,用于当检测到发生丢包事件时,向发送端发送丢失的数据包的重传请求;The sending module is used to send a retransmission request for the lost data packet to the sending end when a packet loss event is detected;
确定模块,用于获取RTT时长,基于RTT时长确定重传参数阈值;The determining module is used to obtain the RTT duration, and determine the retransmission parameter threshold based on the RTT duration;
更新模块,用于当发送重传请求后达到重传时长时,如果未接收到所述数据包,则对RTT时长进行更新,转至执行基于RTT时长确定重传参数阈值的处理;The update module is used to update the RTT duration when the data packet is not received when the retransmission request is reached after the retransmission request is sent, and go to the process of determining the retransmission parameter threshold based on the RTT duration;
停止模块,用于当重传参数的数值达到对应的重传参数阈值时,如果未接收到所述数据包,则停止发送所述数据包的重传请求。The stopping module is configured to stop sending the retransmission request of the data packet if the value of the retransmission parameter reaches the corresponding threshold value of the retransmission parameter, if the data packet is not received.
可选地,所述重传参数包括重传总消耗时长和/或已重传次数,所述重传总消耗时长对应的重传参数阈值为重传总消耗时长阈值,所述已重传次数对应的重传参数阈值为重传次数阈值。Optionally, the retransmission parameters include the total retransmission time and/or the number of retransmissions, and the threshold of the retransmission parameter corresponding to the total retransmission time is the threshold of the total retransmission time and the number of retransmissions The corresponding threshold of the retransmission parameter is the threshold of the number of retransmissions.
可选地,所述重传参数阈值为重传总消耗时长阈值,所述确定模块,用于:Optionally, the threshold of the retransmission parameter is a threshold of the total retransmission duration, and the determining module is configured to:
获取RTT时长,确定RTT时长对应的重传时长,确定RTT时长对应的重传时长与第一参考重传次数的乘积;Obtain the RTT duration, determine the retransmission duration corresponding to the RTT duration, and determine the product of the retransmission duration corresponding to the RTT duration and the first reference number of retransmissions;
确定所述乘积与预设的预留时长的和值,为重传总消耗时长阈值。The sum of the product and the preset reserved duration is determined as a total consumption duration threshold for retransmission.
可选地,所述确定模块,还用于:Optionally, the determination module is also used to:
基于预设的RTT时长范围与参考重传次数的对应关系,确定获取的RTT时长所属的RTT时长范围对应的第一参考重传次数,其中,在所述对应关系中RTT时长范围数值越大对应的重传次数越少。Based on the correspondence relationship between the preset RTT duration range and the reference retransmission times, determine the first reference retransmission times corresponding to the RTT duration range to which the acquired RTT duration belongs, wherein in the correspondence, the larger the value of the RTT duration range corresponds to The fewer the number of retransmissions.
可选地,所述重传参数阈值为重传次数阈值,所述确定模块,用于:Optionally, the threshold of the retransmission parameter is a threshold of the number of retransmissions, and the determination module is configured to:
获取RTT时长,基于预设的RTT时长范围与参考重传次数的对应关系,确定获取的RTT时长所属的RTT时长范围对应的第二参考重传次数,其中,在所述对应关系中RTT时长范围数值越大对应的重传次数越少;Obtain the RTT duration, and determine the second reference retransmission number corresponding to the RTT duration range to which the acquired RTT duration belongs based on the correspondence relationship between the preset RTT duration range and the reference retransmission times, wherein, in the correspondence, the RTT duration range The larger the value, the fewer the retransmission times;
基于所述第二参考重传次数以及前一次发送重传请求时确定的第三参考重传次数的比较结果,确定重传次数阈值。Based on the comparison result of the second reference retransmission times and the third reference retransmission times determined when the retransmission request was sent last time, the threshold value of the retransmission times is determined.
可选地,所述确定模块,用于:Optionally, the determination module is configured to:
如果所述第二参考重传次数大于或者等于前一次确定的第三参考重传次数,则将所述第二参考重传次数确定为重传次数阈值;If the second reference retransmission number is greater than or equal to the previously determined third reference retransmission number, determine the second reference retransmission number as the retransmission number threshold;
如果所述第二参考重传次数小于所述第三参考重传次数且已重传次数大于或者等于所述第二参考重传次数,则将所述已重传次数确定为重传次数阈值;If the second reference retransmission times are less than the third reference retransmission times and the retransmission times are greater than or equal to the second reference retransmission times, the retransmission times are determined as a threshold of retransmission times;
如果所述第二参考重传次数小于所述第三参考重传次数且已重传次数小于所述第二参考重传次数,则将所述第二参考重传次数确定为重传次数阈值。If the second reference retransmission count is less than the third reference retransmission count and the retransmitted count is less than the second reference retransmission count, then the second reference retransmission count is determined as the retransmission count threshold.
可选地,所述确定模块,用于:Optionally, the determination module is configured to:
获取RTT时长;Get RTT duration;
如果所述数据包的类型在预设类型集合内,则基于预设的RTT时长范围与参考重传次数的第一对应关系,确定与获取的RTT时长所属的RTT时长范围对应的第二参考重传次数;If the type of the data packet is in the preset type set, then based on the first correspondence between the preset RTT duration range and the reference retransmission times, determine the second reference weight corresponding to the RTT duration range to which the acquired RTT duration belongs Transmission times
如果所述数据包的类型不在所述预设类型集合内,则基于预设的RTT时长范围与参考重传次数的第二对应关系,确定与获取的RTT时长所属的RTT时长范围对应的第二参考重传次数,其中,相同的RTT时长范围在所述第一对应关系中对应的参考重传次数大于或等于在所述第二对应关系中对应的参考重传次数。If the type of the data packet is not in the preset type set, based on the second correspondence between the preset RTT duration range and the reference retransmission times, determine the second corresponding to the RTT duration range to which the acquired RTT duration belongs Reference number of retransmissions, where the number of reference retransmissions corresponding to the same RTT duration range in the first correspondence is greater than or equal to the number of reference retransmissions corresponding to the second correspondence.
根据本公开实施例的第四方面,提供一种重传数据的装置,所述装置包括:According to a fourth aspect of the embodiments of the present disclosure, an apparatus for retransmitting data is provided. The apparatus includes:
确定模块,用于当检测到数据包发送完毕并存入缓存中时,获取RTT时长,基于RTT时长,确定第一数据存储参考时长;基于所述第一数据存储参考时长以及前一次数据包存入所述缓存中时确定的第二数据存储参考时长,确定数据存储时长阈值;The determining module is used to obtain the RTT duration when it is detected that the data packet has been sent and stored in the cache, and determine the first data storage reference duration based on the RTT duration; based on the first data storage reference duration and the previous data packet storage The second data storage reference duration determined when entering the cache, to determine the data storage duration threshold;
删除模块,用于对所述缓存中已存储时长超过所述数据存储时长阈值的数据包进行删除处理;A deletion module, configured to delete a data packet that has been stored in the cache for more than the data storage duration threshold;
更新模块,用于对RTT时长进行更新,转至执行当检测到数据包发送完毕并存入缓存中时获取RTT时长的处理。The update module is used to update the RTT duration and go to the process of acquiring the RTT duration when it is detected that the data packet is sent and stored in the buffer.
可选地,所述确定模块,用于:Optionally, the determination module is configured to:
基于所述第一数据存储参考时长、前一次数据包存入所述缓存中时确定的第二数据存储参考时长以及预先获取的预留时长,确定数据存储时长阈值。The data storage duration threshold is determined based on the first data storage reference duration, the second data storage reference duration determined when the previous data packet was stored in the cache, and the pre-acquired reservation duration.
可选地,所述确定模块,用于:Optionally, the determination module is configured to:
计算当前数据包存入所述缓存的时间点和前一次数据包存入所述缓存的时 间点之间的时间差值;Calculating the time difference between the time point when the current data packet is stored in the cache and the time point when the previous data packet is stored in the cache;
如果所述第一数据存储参考时长小于或者等于所述第二数据存储参考时长,且所述时间差值小于所述第二数据存储参考时长,则将所述第二数据存储参考时长与预先获取的预留时长之和,确定为数据存储时长阈值;If the first data storage reference duration is less than or equal to the second data storage reference duration, and the time difference is less than the second data storage reference duration, the second data storage reference duration is obtained in advance The sum of the reserved time is determined as the data storage time threshold;
如果所述第一数据存储参考时长小于或者等于所述第二数据存储参考时长,且所述时间差值大于或者等于所述第二数据存储参考时长,则确定所述第一数据存储参考时长与所述第二数据存储参考时长之间的时长差值,确定所述时长差值与预设的比例系数之间的乘积,确定所述乘积与所述第一数据存储参考时长之间的和值,将所述和值与所述预留时长之和,确定为数据存储时长阈值;If the first data storage reference duration is less than or equal to the second data storage reference duration, and the time difference is greater than or equal to the second data storage reference duration, it is determined that the first data storage reference duration is equal to A duration difference between the second data storage reference durations, determining a product between the duration difference and a preset scale factor, and determining a sum between the product and the first data storage reference duration , The sum of the sum value and the reserved duration is determined as the data storage duration threshold;
如果所述第一数据存储参考时长大于所述第二数据存储参考时长,则将所述第一数据存储参考时长与所述预留时长之和,确定为数据存储时长阈值。If the first data storage reference duration is greater than the second data storage reference duration, the sum of the first data storage reference duration and the reserved duration is determined as a data storage duration threshold.
可选地,所述确定模块,还用于:Optionally, the determination module is also used to:
基于数据包所属的视频帧的帧率,确定预留时长。The reserved duration is determined based on the frame rate of the video frame to which the data packet belongs.
根据本公开实施例的第五方面,提供一种重传数据的系统,所述系统包括发送端和接收端,其中:According to a fifth aspect of the embodiments of the present disclosure, a system for retransmitting data is provided. The system includes a sending end and a receiving end, where:
所述接收端,用于当检测到发生丢包事件时,向发送端发送丢失的数据包的重传请求;获取RTT时长,基于RTT时长确定重传参数阈值;当发送重传请求后达到重传时长时,如果未接收到所述数据包,则对RTT时长进行更新,转至执行基于RTT时长确定重传参数阈值的处理;当重传参数的数值达到对应的重传参数阈值时,如果未接收到所述数据包,则停止发送所述数据包的重传请求;The receiving end is used to send a retransmission request of the lost data packet to the sending end when a packet loss event is detected; obtain the RTT duration, determine the retransmission parameter threshold based on the RTT duration; During the transmission time, if the data packet is not received, the RTT time is updated, and the process of determining the retransmission parameter threshold based on the RTT time is performed; when the value of the retransmission parameter reaches the corresponding retransmission parameter threshold, if If the data packet is not received, stop sending the retransmission request of the data packet;
所述发送端,用于当检测到数据包发送完毕并存入缓存中时,获取RTT时长,基于RTT时长,确定第一数据存储参考时长;基于所述第一数据存储参考时长以及前一次数据包存入所述缓存中时确定的第二数据存储参考时长,确定数据存储时长阈值;对所述缓存中已存储时长超过所述数据存储时长阈值的数据包进行删除处理;对RTT时长进行更新,转至执行当检测到数据包发送完毕并存入缓存中时获取RTT时长的处理。The sending end is used to obtain the RTT duration when it is detected that the data packet has been sent and stored in the cache, and determine the first data storage reference duration based on the RTT duration; based on the first data storage reference duration and the previous data The second data storage reference duration determined when the packet is stored in the cache to determine the data storage duration threshold; deleting the data packets that have been stored in the cache for longer than the data storage duration threshold; updating the RTT duration , Go to the process of acquiring the RTT duration when it is detected that the data packet has been sent and stored in the buffer.
根据本公开实施例的第六方面,提供一种接收端,所述接收端包括处理器、通信接口、存储器和通信总线,其中:According to a sixth aspect of the embodiments of the present disclosure, there is provided a receiving end, the receiving end includes a processor, a communication interface, a memory, and a communication bus, wherein:
所述处理器、所述通信接口和所述存储器通过所述通信总线完成相互间的通信;The processor, the communication interface, and the memory complete communication with each other through the communication bus;
所述存储器,用于存放计算机程序;The memory is used to store computer programs;
所述处理器,用于执行所述存储器上所存放的程序,以实现上述第一面提供的方法。The processor is configured to execute the program stored on the memory to implement the method provided in the first aspect.
根据本公开实施例的第七方面,提供一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述第一面提供的方法。According to a seventh aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium in which a computer program is stored. When the computer program is executed by a processor, the method provided in the first aspect described above is implemented.
根据本公开实施例的第八方面,提供一种发送端,所述发送端包括处理器、通信接口、存储器和通信总线,其中:According to an eighth aspect of an embodiment of the present disclosure, there is provided a sending end, the sending end includes a processor, a communication interface, a memory, and a communication bus, wherein:
所述处理器、所述通信接口和所述存储器通过所述通信总线完成相互间的通信;The processor, the communication interface, and the memory complete communication with each other through the communication bus;
所述存储器,用于存放计算机程序;The memory is used to store computer programs;
所述处理器,用于执行所述存储器上所存放的程序,以实现上述第二面提供的方法。The processor is configured to execute the program stored on the memory to implement the method provided in the second aspect.
根据本公开实施例的第九方面,提供一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述第二面提供的方法。According to a ninth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium in which a computer program is stored, and when the computer program is executed by a processor, the method provided in the second aspect described above is implemented.
本公开的实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
通过本公开实施例提供的方法,根据RTT时长与网络状况的相关性,实时调整重传参数阈值。由于RTT时长与网络状况的相关性很高,在网络状况不佳的情况下,RTT时长较长,在网络状况较佳的情况下,RTT时长较短,因此RTT时长反应了网络状况,进而通过根据RTT时长调整重传参数阈值的方式可以达到根据网络状况实时调整重传参数阈值的目的,在重传参数达到重传参数阈值时,及时停止向发动端发送重传请求。这样,可以根据网络状况实时调整重传总耗时,在网络状况不佳的情况下,采用本实施例提供的方法更易缩短重传总耗时,避免使用较长的时长去等待丢失数据包,数据传输的灵活性较好。Through the method provided by the embodiment of the present disclosure, the threshold value of the retransmission parameter is adjusted in real time according to the correlation between the RTT duration and the network status. Due to the high correlation between the RTT duration and the network status, the RTT duration is longer under poor network conditions, and the RTT duration is shorter under better network conditions. Therefore, the RTT duration reflects the network status and then passes The method of adjusting the retransmission parameter threshold according to the RTT duration can achieve the purpose of adjusting the retransmission parameter threshold in real time according to the network conditions. When the retransmission parameter reaches the retransmission parameter threshold, it stops sending the retransmission request to the initiator in time. In this way, the total retransmission time can be adjusted in real time according to the network conditions. In the case of poor network conditions, it is easier to shorten the total retransmission time by using the method provided in this embodiment, and avoid using a longer time to wait for lost packets. The flexibility of data transmission is better.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the present disclosure.
附图说明BRIEF DESCRIPTION
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。在附图中:The drawings herein are incorporated into and constitute a part of this specification, show embodiments consistent with this disclosure, and are used together with the specification to explain the principles of this disclosure. In the drawings:
图1是根据一示例性实施例示出的一种重传数据的方法的流程示意图;Fig. 1 is a schematic flowchart of a method for retransmitting data according to an exemplary embodiment;
图2是根据一示例性实施例示出的一种重传数据的方法的流程示意图;Fig. 2 is a schematic flowchart of a method for retransmitting data according to an exemplary embodiment;
图3是根据一示例性实施例示出的一种重传数据的装置的结构示意图;Fig. 3 is a schematic structural diagram of an apparatus for retransmitting data according to an exemplary embodiment;
图4是根据一示例性实施例示出的一种重传数据的装置的结构示意图;Fig. 4 is a schematic structural diagram of an apparatus for retransmitting data according to an exemplary embodiment;
图5是根据一示例性实施例示出的一种计算机设备的结构示意图。Fig. 5 is a schematic structural diagram of a computer device according to an exemplary embodiment.
通过上述附图,已示出本公开明确的实施例,后文中将有更详细的描述。这些附图和文字描述并不是为了通过任何方式限制本公开构思的范围,而是通过参考特定实施例为本领域技术人员说明本公开的概念。Through the above drawings, a clear embodiment of the present disclosure has been shown, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the concept of the present disclosure in any way, but to explain the concept of the present disclosure to those skilled in the art by referring to specific embodiments.
具体实施方式detailed description
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail here, examples of which are shown in the drawings. When referring to the drawings below, unless otherwise indicated, the same numerals in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
本公开一示例性实施例提供了一种重传数据的方法,如图1所示,该方法的处理流程可以包括如下的步骤:An exemplary embodiment of the present disclosure provides a method for retransmitting data. As shown in FIG. 1, the processing flow of the method may include the following steps:
步骤S110,当接收端检测到发生丢包事件时,向发送端发送丢失的数据包的重传请求。Step S110: When the receiving end detects a packet loss event, it sends a retransmission request for the lost data packet to the sending end.
接收端可以基于接收到的数据包的序号,确定丢失数据包的序号。接收端会将接收到的数据包存储到缓存中,在缓存中对接收到的数据包进行排序。The receiving end may determine the sequence number of the lost data packet based on the sequence number of the received data packet. The receiving end stores the received data packets in the cache, and sorts the received data packets in the cache.
每当接收端接收到一个数据包时,可以获取数据包的序号N1,如果序号N1等于期望数据包的序号N2,则可以直接将序号为N1的数据包输出到后续的数据包处理模块进行后续处理,如解码处理。Whenever the receiving end receives a data packet, it can obtain the sequence number N1 of the data packet. If the sequence number N1 is equal to the sequence number N2 of the expected data packet, the data packet with the sequence number N1 can be directly output to the subsequent data packet processing module for subsequent Processing, such as decoding processing.
如果序号N1小于期望数据包的序号N2,则序号为N1的数据包为迟到的数据包,可以直接进行丢弃。If the sequence number N1 is less than the sequence number N2 of the expected data packet, the data packet with the sequence number N1 is a late data packet and can be directly discarded.
如果序号N1大于期望数据包的序号N2,且序号N1小于或者等于缓存中存储的数据包的最大序号N3,则可以确定缓存中是否存在序号为N1的数据包,如果不存在,则将序号为N1的数据包按序插入到缓存中对应的位置上,同时,序号为N1的数据包为重传数据包或者乱序数据包,可以将所有重传请求中的序号N1删除,不再请求重传序号为N1的数据包。If the sequence number N1 is greater than the sequence number N2 of the expected data packet, and the sequence number N1 is less than or equal to the maximum sequence number N3 of the data packets stored in the cache, it can be determined whether there is a data packet with the sequence number N1 in the cache, if it does not exist, the sequence number is The data packets of N1 are inserted into the corresponding positions in the cache in sequence. At the same time, the data packets with the sequence number N1 are retransmission data packets or out-of-sequence data packets. Pass the data packet with sequence number N1.
如果序号N1大于期望数据包的序号N2,且序号N1等于缓存中存储的数据包的最大序号N3+1,则确定缓存中是否存在序号为N1的数据包,如果不存在,则将序号为N1的数据包按序插入到缓存中对应的位置上。If the sequence number N1 is greater than the sequence number N2 of the expected data packet, and the sequence number N1 is equal to the maximum sequence number N3+1 of the data packets stored in the cache, it is determined whether there is a data packet with the sequence number N1 in the cache, if it does not exist, the sequence number is N1 The data packets are inserted into the corresponding locations in the cache in order.
如果序号N1大于期望数据包的序号N2,且序号N1大于缓存中存储的数据包的最大序号N3+1,则确定缓存中是否存在序号为N1的数据包,如果不存在,则将序号为N1的数据包按序插入到缓存中对应的位置上,同时,序号为N3+1至N1-1的数据包为丢失的数据包,可以构造序号为N3+1至N1-1的数据包的重传请求。在接收端构造丢失的数据包的重传请求之后,可以等待10ms以消除存在乱序数据包的情况,在等待10ms之后,可以向发送端发送丢失的数据包的重传请求。If the sequence number N1 is greater than the sequence number N2 of the expected data packet, and the sequence number N1 is greater than the maximum sequence number N3+1 of the data packets stored in the cache, it is determined whether there is a data packet with the sequence number N1 in the cache, if it does not exist, the sequence number is N1 The data packets are inserted into the corresponding positions in the cache in order. At the same time, the data packets with the sequence numbers N3+1 to N1-1 are lost data packets. The heavy packets with the sequence numbers N3+1 to N1-1 can be constructed. Pass the request. After constructing the retransmission request for the lost data packet at the receiving end, you can wait 10 ms to eliminate the out-of-order data packets. After waiting for 10 ms, you can send the retransmission request for the missing data packet to the sending end.
步骤S120,接收端获取RTT时长,基于RTT时长确定重传参数阈值。In step S120, the receiving end obtains the RTT duration, and determines the threshold of the retransmission parameter based on the RTT duration.
接收端可以按照预设的周期如1s根据当前的网络状况、预设的估计算法计算RTT时长。RTT时长的值表示预计重传请求从接收端到发送端以及发送端返回丢失数据包一个来回所需时长,在网络状况不佳的情况下,RTT时长较长,在网络状况较佳的情况下,RTT时长较短,NPQ中规定了计算RTT时长的具体方式。可以以500ms为分界线,如果RTT时长大于500ms,则可以认为网络状况极差。The receiving end may calculate the RTT duration according to the current network condition and a preset estimation algorithm according to a preset period such as 1s. The value of the RTT duration indicates the expected time required for the retransmission request to return from the receiving end to the sending end and the sending end one round trip. In the case of poor network conditions, the RTT duration is longer, and in the case of better network conditions The RTT duration is shorter, and the specific method for calculating the RTT duration is specified in NPQ. You can use 500ms as the dividing line. If the RTT duration is greater than 500ms, you can consider the network condition to be extremely poor.
接收端可以按照预设的周期计算RTT时长,基于RTT时长确定重传参数阈值。由于RTT时长与网络状况的相关性很高,在网络状况不佳的情况下,RTT时长较长,在网络状况较佳的情况下,RTT时长较短,因此,可以通过当前的RTT时长,确定当前的网络状况,根据当前的网络状况确定重传参数阈值。这样,就可以根据当前的网络状况调整重传参数阈值,实时性较好,避免了使用固定的重传参数阈值,提高了传输数据的过程的灵活性。The receiving end may calculate the RTT duration according to a preset period, and determine the retransmission parameter threshold based on the RTT duration. Due to the high correlation between the RTT duration and the network status, the RTT duration is longer under poor network conditions, and the RTT duration is shorter under better network conditions. Therefore, the current RTT duration can be used to determine The current network condition determines the retransmission parameter threshold according to the current network condition. In this way, the threshold value of the retransmission parameter can be adjusted according to the current network condition, and the real-time performance is better, avoiding the use of a fixed threshold value of the retransmission parameter, and improving the flexibility of the data transmission process.
其中,重传参数阈值可以包括重传总消耗时长阈值、重传次数阈值。The threshold of the retransmission parameter may include a threshold of total retransmission consumption duration and a threshold of the number of retransmissions.
步骤S130,当发送重传请求后达到重传时长时,如果接收端未接收到数据 包,则向发送端发送数据包的重传请求,对RTT时长进行更新,转至执行基于RTT时长确定重传参数阈值的处理。Step S130, when the retransmission time is reached after the retransmission request is sent, if the receiving end does not receive the data packet, the retransmission request for the data packet is sent to the sending end, the RTT duration is updated, and the execution is determined based on the RTT duration. Handling of parameter thresholds.
其中,重传时长是基于RTT时长确定的。重传时长可以为RTT时长加上预设的误差时长如10ms。误差时长用于消除线程启动耗时、系统时间不对应等因素产生的误差。Among them, the retransmission duration is determined based on the RTT duration. The retransmission duration may be the RTT duration plus a preset error duration such as 10ms. The error duration is used to eliminate errors caused by factors such as thread start-up time and non-corresponding system time.
在接收端向发送端发送重传请求之后,可以进行计时,如果超过重传时长,接收端还未接收到发送端返回的数据包,则可能由于网络的原因,重传请求并未能够顺利到达发送端,或者发送端发送的数据包不能顺利到达接收端,此时,可以再次发送重传请求。After the receiving end sends the retransmission request to the sending end, it can be timed. If the retransmission time exceeds the receiving end and the data packet returned by the sending end has not been received, the retransmission request may not be able to arrive smoothly due to network reasons. The sending end, or the data packets sent by the sending end cannot reach the receiving end smoothly. At this time, the retransmission request can be sent again.
除了再次发送重传请求之外,当发送重传请求后达到重传时长,且接收端未接收到数据包时,可以获取当前的RTT时长,确定当前的RTT时长是否等于前一次获取的RTT时长。如果网络状况发生改变,当前的RTT时长则不等于前一次获取的RTT时长,如果网络状况维持不变,当前的RTT时长则等于前一次获取的RTT时长。在对RTT时长进行更新处理之后,如果RTT时长发生变化,则重传参数阈值也对应发生变化,因此可以重复执行步骤S120-步骤S130对RTT时长进行更新,重新确定重传参数阈值,直到满足一定条件为止。In addition to sending the retransmission request again, when the retransmission request reaches the retransmission duration and the receiving end does not receive the data packet, you can obtain the current RTT duration to determine whether the current RTT duration is equal to the previous RTT duration . If the network status changes, the current RTT duration is not equal to the previous RTT duration. If the network status remains unchanged, the current RTT duration is equal to the previous RTT duration. After the RTT duration is updated, if the RTT duration changes, the retransmission parameter threshold also changes accordingly. Therefore, steps S120-S130 can be repeatedly performed to update the RTT duration and re-determine the retransmission parameter threshold until a certain value is met. Conditions so far.
步骤S140,当重传参数的数值达到对应的重传参数阈值时,如果接收端未接收到数据包,则停止发送数据包的重传请求。Step S140: When the value of the retransmission parameter reaches the corresponding threshold of the retransmission parameter, if the receiving end does not receive the data packet, it stops sending the retransmission request of the data packet.
其中,在一种可能的实现方式中,重传参数可以包括重传总消耗时长或者已重传次数,或者,重传参数可以包括重传总消耗时长和已重传次数。重传总消耗时长对应的重传参数阈值为重传总消耗时长阈值,已重传次数对应的重传参数阈值为重传次数阈值。In a possible implementation manner, the retransmission parameters may include the total retransmission time or the number of retransmissions, or the retransmission parameters may include the total retransmission time and the number of retransmissions. The threshold of the retransmission parameter corresponding to the total retransmission time is the threshold of the total retransmission time, and the threshold of the retransmission parameter corresponding to the number of retransmissions is the threshold of the number of retransmissions.
当重传总消耗时长超过重传总消耗时长阈值时,如果接收端未接收到数据包,则可以停止重复执行步骤S120-步骤S130。或者,当已重传次数达到重传次数阈值时,如果接收端未接收到数据包,则可以停止重复执行步骤S120-步骤S130。此时,可以认为重传处理失败,由于实时数据传输对数据传输的实时性要求较高,因此如果任一丢失的数据包在短时间内不能成功到达接收端,则不再继续等待丢失的数据包,直接处理其他数据包。如果继续等待丢失的数据包,如在视频会议的场景中,就会出现视频直播画面卡顿的现象,并且卡顿的现象会一直持续一段时间,而视频会议的场景对实时性的要求较高,因此接收端如 果在短时间内不能成功接收任一丢失的数据包,则可以直接放弃使用该丢失的数据包绘制视频帧。When the total retransmission consumption time exceeds the total retransmission consumption time threshold, if the receiving end does not receive the data packet, it may stop repeating steps S120-S130. Or, when the number of retransmissions reaches the threshold of the number of retransmissions, if the receiving end does not receive the data packet, it may stop repeating steps S120-S130. At this time, it can be considered that the retransmission process has failed. Since the real-time data transmission requires high real-time performance of the data transmission, if any lost data packet cannot successfully reach the receiving end within a short time, it will no longer continue to wait for the lost data Packets, directly handle other data packets. If you continue to wait for the lost data packets, such as in the video conference scene, there will be a phenomenon of video live video stuck, and the stuck phenomenon will continue for a period of time, and the video conference scene has high requirements for real-time Therefore, if the receiving end cannot successfully receive any lost data packet within a short time, it can directly give up using the lost data packet to draw the video frame.
在一种可能的实现方式中,重传参数阈值为重传总消耗时长阈值,判断重传是否超时的方法可以包括:获取RTT时长,确定重传时长与第一参考重传次数的乘积;确定乘积与预设的预留时长的和值,为重传总消耗时长阈值。In a possible implementation, the threshold of the retransmission parameter is the threshold of the total retransmission time. The method for determining whether the retransmission timed out may include: obtaining the RTT duration, and determining the product of the retransmission duration and the first reference number of retransmissions; The sum of the product and the preset reserved duration is the threshold of the total retransmission consumption duration.
其中,第一参考重传次数可以是预设的固定的参考重传次数,如10次,也可以是基于预设的RTT时长范围与参考重传次数的对应关系确定的参考重传次数。The first reference retransmission number may be a preset fixed reference retransmission number, such as 10 times, or may be a reference retransmission number determined based on a correspondence between a preset RTT duration range and a reference retransmission number.
在当前的网络状况下,预计如果接收端一直接收不到数据包,需要向发送端发送第一参考重传次数的重传请求,每次发出重传请求之后,需要等待重传时长,进而接收端需要等待的总时长为重传时长与第一参考重传次数的乘积。由于可能存在数据包乱序的情况,可以预留10ms作为等待乱序数据包的时长,另外,考虑到其他情况,还可以预留不同的时长,将所有预留时长相加,作为预设的预留时长。继而,可以确定接收端需要等待的乘积总时长与预设的预留时长的和值,将其作为重传总消耗时长阈值。如果丢失的数据包是期望数据包,且接收端在第一次发送丢失的数据包的重传请求后超过重传总消耗时长阈值时还未接收到数据包,则可以判断重传超时,表示重传处理失败。Under the current network conditions, it is expected that if the receiving end never receives the data packet, it needs to send a retransmission request of the first reference retransmission number to the sending end. After each retransmission request, it needs to wait for the length of the retransmission before receiving The total time the terminal needs to wait is the product of the retransmission time and the first reference retransmission times. Due to the possibility of out-of-order data packets, 10ms can be reserved as the length of time to wait for out-of-order data packets. In addition, considering other circumstances, different time lengths can also be reserved, and all the reserved time lengths are added together as the default Reserve time. Then, the sum of the total duration of the product that the receiving end needs to wait and the preset reserved duration can be determined and used as the threshold of the total retransmission consumption duration. If the lost data packet is the expected data packet, and the receiving end has not received the data packet after exceeding the threshold of the total retransmission time after sending the retransmission request of the lost data packet for the first time, it can be judged that the retransmission timed out, indicating Retransmission processing failed.
由于网络状况一般是变化的,通过步骤S120-步骤S130确定出的重传总消耗时长阈值也是变化的,但是无论重传总消耗时长阈值如何变化,只要在检查重传是否超时时,确定接收端在第一次发送丢失的数据包的重传请求后超过当前的重传总消耗时长阈值时还未接收到数据包,就可以判断重传超时,重传处理失败。由于重传总消耗时长阈值可以根据网络状况变化,因此可以根据网络状况实时调整判断重传是否超时的判断条件,避免网络状况不佳还长时间等待丢失的数据包,提高了数据传输的灵活性。Since the network condition generally changes, the threshold of the total retransmission time duration determined through steps S120-S130 also changes, but no matter how the threshold of the total retransmission time duration changes, as long as the retransmission is checked for timeout, the receiving end is determined After the first retransmission request for the lost data packet is sent and the data packet is not received when the current total retransmission time threshold is exceeded, it can be judged that the retransmission timed out and the retransmission processing failed. Since the threshold for the total retransmission time consumption can be changed according to the network conditions, the judgment conditions for judging whether the retransmission timed out can be adjusted in real time according to the network conditions, to avoid poor network conditions and to wait for a long time for lost packets, and improve the flexibility of data transmission .
接收端可以在每次向缓存中存入一个数据包时,就检查一次重传是否超时。为了节省处理开销,可以不单独为重传请求设立定时器进行倒计时,可以通过缓存中序号最小的数据包在缓存中停留的时长来辅助判断重传是否超时,因为缓存中序号最小的数据包在缓存中停留的时长与重传总消耗时长近似相等。通过不单独为重传请求设立定时器进行倒计时,而是使用缓存中序号最小的数据包在缓存中停留的时长来辅助判断重传是否超时,可以节省为判断重传是否超 时而产生的计算量。The receiving end can check whether a retransmission times out every time a data packet is stored in the cache. In order to save processing overhead, it is not necessary to set a timer for the retransmission request separately to count down. The length of the packet with the smallest sequence number in the cache stays in the cache to help determine whether the retransmission timed out, because the packet with the lowest sequence number in the cache is in The length of time spent in the cache is approximately equal to the total time spent on retransmissions. By not setting a timer for the retransmission request separately for countdown, but using the length of the packet with the smallest sequence number in the cache to stay in the cache to assist in determining whether the retransmission has timed out, it can save the amount of calculations for determining whether the retransmission has timed out .
在一种可能的实现方式中,如果网络状况较差,则接收端可以不向发送端请求重传任何丢失的数据包,因为即使发送端重传丢失的数据包,成功率低且耗时也较长,数据传输的实时性极差。因此,可以确定RTT时长是否大于预设的时长阈值如500ms,如果RTT时长大于500ms,则直接将重传总消耗时长阈值设置为预设的时长如10ms,这样由于重传总消耗时长阈值较短,在较短的重传总消耗时长阈值内所有丢失的数据包都无法成功进行重传,即所有丢失的数据包的重传都会超时,可以达到自动停止发送所有丢失的数据包的重传请求的效果。而如果RTT时长小于或者等于500ms,则确定RTT时长与第一参考重传次数的乘积,确定乘积与预设的预留时长的和值,为重传总消耗时长阈值。如果接收端在第一次发送丢失的数据包的重传请求后超过重传总消耗时长阈值时还未接收到数据包,则可以将缓存中数据包的最小序号确定为期望数据包的序号。在将缓存中数据包的最小序号确定为期望数据包的序号之后,如果还能接收到小于期望数据包的序号的数据包,则接收到的数据包为迟到的数据包,直接将其丢弃即可。In a possible implementation, if the network condition is poor, the receiving end may not request the sending end to retransmit any lost data packets, because even if the sending end retransmits the lost data packets, the success rate is low and time-consuming Longer, real-time data transmission is extremely poor. Therefore, it can be determined whether the RTT duration is greater than the preset duration threshold, such as 500ms. If the RTT duration is greater than 500ms, the total retransmission consumption duration threshold is directly set to the preset duration, such as 10ms, because the total retransmission consumption duration threshold is shorter , Within the shorter total retransmission duration threshold, all the lost packets cannot be successfully retransmitted, that is, the retransmission of all lost packets will time out, and it can reach the automatic retransmission request to stop sending all the lost packets Effect. If the RTT duration is less than or equal to 500 ms, the product of the RTT duration and the first reference retransmission number is determined, and the sum of the product and the preset reserved duration is determined as the total consumption duration threshold for retransmission. If the receiving end does not receive the data packet after the first time it sends a retransmission request for the lost data packet and exceeds the total retransmission time threshold, the minimum sequence number of the data packet in the cache may be determined as the sequence number of the expected data packet. After the minimum sequence number of the data packet in the cache is determined as the sequence number of the expected data packet, if a data packet smaller than the sequence number of the expected data packet can be received, the received data packet is a late data packet, and it is directly discarded. can.
下面介绍一种基于预设的RTT时长范围与参考重传次数的对应关系确定第一参考重传次数的方式。在一种可能的实现方式中,在获取RTT时长之后,本公开实施例提供的方法还可以包括:基于预设的RTT时长范围与参考重传次数的对应关系,确定获取的RTT时长所属的RTT时长范围对应的第一参考重传次数。The following describes a method for determining the first reference retransmission number based on the correspondence between the preset RTT duration range and the reference retransmission number. In a possible implementation, after acquiring the RTT duration, the method provided by the embodiment of the present disclosure may further include: determining the RTT to which the acquired RTT duration belongs based on the correspondence between the preset RTT duration range and the reference retransmission times The number of first reference retransmissions corresponding to the duration range.
其中,在对应关系中RTT时长范围数值越大对应的重传次数越少。预设的RTT时长范围与参考重传次数的对应关系可以是参考重传次数映射表,如表1:In the correspondence, the larger the value of the RTT duration range, the fewer the number of retransmissions. The correspondence between the preset RTT duration range and the reference retransmission times may be a reference retransmission times mapping table, as shown in Table 1:
表1Table 1
Figure PCTCN2019126073-appb-000001
Figure PCTCN2019126073-appb-000001
可以通过查询表1,确定获取的RTT时长所属的RTT时长范围对应的第一参考重传次数。例如,当前的RTT时长为80ms,则第一参考重传次数为4次,进而如果接收端向发送端发送4次重传请求,则需要等待的总时长为320ms。The first reference retransmission times corresponding to the RTT duration range to which the acquired RTT duration belongs can be determined by looking up Table 1. For example, if the current RTT duration is 80 ms, the first reference retransmission times are 4 times. If the receiving end sends 4 retransmission requests to the sending end, the total waiting time is 320 ms.
在设计表1时,主要考虑的是,首先,RTT时长范围数值越大对应的重传次数越少,这样当网络状况不佳时,少向发送端发送几次重传请求,即不倾向于通过重传的方式来获取丢失的数据包。其次,RTT时长范围数值越大对应的重传总消耗时长阈值越大。最次,任何两个RTT时长范围对应的重传总消耗时长阈值的和值小于或者等于RTT的更新周期如1s。When designing Table 1, the main consideration is that, first, the larger the value of the RTT duration range, the fewer the number of retransmissions. In this way, when the network is in poor condition, fewer retransmission requests are sent to the sender. Retrieve lost packets by means of retransmission. Secondly, the larger the value of the RTT duration range, the greater the threshold of the total retransmission consumption duration. Lastly, the sum of the total retransmission consumption duration thresholds corresponding to any two RTT duration ranges is less than or equal to the RTT update period, such as 1s.
除了在重传超时的情况下,停止发送数据包的重传请求之外,在已重传次数达到重传次数阈值的情况下,也要停止发送数据包的重传请求。在一种可能的实现方式中,重传参数阈值为重传次数阈值,判断已重传次数是否达到重传次数阈值的方式可以包括:获取RTT时长,基于预设的RTT时长范围与参考重传次数的对应关系,确定获取的RTT时长所属的RTT时长范围对应的第二参考重传次数;基于第二参考重传次数以及前一次发送重传请求时确定的第三参考重传次数的比较结果,确定重传次数阈值。In addition to stopping the retransmission request of the data packet when the retransmission timed out, the retransmission request of the data packet should also be stopped when the number of retransmissions reaches the threshold of the number of retransmissions. In a possible implementation manner, the threshold of the retransmission parameter is a threshold of the number of retransmissions, and a method for determining whether the number of times of retransmissions reaches the threshold of the number of retransmissions may include: acquiring an RTT duration, and retransmitting based on a preset RTT duration range and reference Correspondence of times, determine the second reference retransmission times corresponding to the RTT duration range to which the acquired RTT duration belongs; based on the comparison result of the second reference retransmission times and the third reference retransmission times determined when the retransmission request was sent last time To determine the threshold of retransmission times.
其中,在对应关系中RTT时长范围数值越大对应的重传次数越少。In the correspondence, the larger the value of the RTT duration range, the fewer the number of retransmissions.
仍然可以参见表1来确定获取的RTT时长所属的RTT时长范围对应的第二参考重传次数,具体确定的方式可以参见前面相关部分的描述。在确定第二参考重传次数之后,可以基于第二参考重传次数以及前一次发送重传请求时确定的第三参考重传次数的比较结果,确定重传次数阈值。参考重传次数的大小和网络状况的相关性也较高,因此也可以通过重传次数的大小反应当前的网络状况。重传次数越大,网络状况越佳,相反,重传次数越少,网络状况越差。You can still refer to Table 1 to determine the second reference retransmission times corresponding to the RTT duration range to which the acquired RTT duration belongs. For the specific determination method, please refer to the description in the related part above. After determining the second reference retransmission number, the threshold value of the number of retransmission times may be determined based on the comparison result of the second reference retransmission number and the third reference retransmission number determined when the retransmission request was previously sent. The correlation between the size of the reference retransmission times and the network status is also high, so the current network status can also be reflected by the size of the retransmission times. The greater the number of retransmissions, the better the network condition. Conversely, the fewer the retransmissions, the worse the network condition.
如果第二参考重传次数大于或者等于前一次确定的第三参考重传次数,则将第二参考重传次数确定为重传次数阈值。第二参考重传次数为当前确定的参考重传次数,如果第二参考重传次数等于前一次确定的第三参考重传次数,表示当前网络状况保持不变,可以将第二参考重传次数确定为重传次数阈值。如果第二参考重传次数大于前一次确定的第三参考重传次数,表示当前网络状况变好,可以将第二参考重传次数确定为重传次数阈值。由于重传次数阈值由第三参考重传次数变为第二参考重传次数,接收端可以等待数据包的时长可以更新为:重传已消耗时长+(当前的RTT时长+误差时长)×(第二参考重传次数 -当前的已重传次数)。If the second reference retransmission number is greater than or equal to the previously determined third reference retransmission number, the second reference retransmission number is determined as the retransmission number threshold. The second reference retransmission times are the currently determined reference retransmission times. If the second reference retransmission times are equal to the previously determined third reference retransmission times, it means that the current network condition remains unchanged and the second reference retransmission times can be changed. Determined as the threshold for the number of retransmissions. If the second reference retransmission number is greater than the previously determined third reference retransmission number, it indicates that the current network condition is getting better, and the second reference retransmission number can be determined as the threshold of the retransmission number. Since the threshold of the number of retransmissions changes from the third reference retransmission number to the second reference retransmission number, the duration that the receiving end can wait for the data packet can be updated to: retransmission consumed time + (current RTT duration + error duration) × ( The second reference number of retransmissions-the current number of retransmissions).
如果第二参考重传次数小于第三参考重传次数且已重传次数大于或者等于第二参考重传次数,则将已重传次数确定为重传次数阈值。第二参考重传次数小于第三参考重传次数,表示当前网络状况变差,并且当前的已重传次数大于或者等于第二参考重传次数,表示当前已经重传很多次重传请求了,重传的次数足够多了,可以将重传次数阈值设置为已重传次数,将接收端可以等待数据包的时长设置为重传已消耗时长。由于当前的已重传次数肯定达到了重传次数阈值,因此可以使得接收端自动停止向发送端发送数据包的重传请求。If the second reference retransmission count is less than the third reference retransmission count and the retransmitted count is greater than or equal to the second reference retransmission count, the retransmitted count is determined as the retransmission count threshold. The second reference retransmission count is less than the third reference retransmission count, indicating that the current network condition has deteriorated, and the current retransmission count is greater than or equal to the second reference retransmission count, indicating that the current retransmission request has been retransmitted many times. If the number of retransmissions is sufficient, the threshold for the number of retransmissions can be set to the number of retransmissions, and the length of time that the receiving end can wait for a data packet is set to the length of time spent for retransmission. Since the current number of retransmissions has definitely reached the threshold of the number of retransmissions, the receiving end can automatically stop sending the retransmission request of the data packet to the sending end.
如果第二参考重传次数小于第三参考重传次数且已重传次数小于第二参考重传次数,则将第二参考重传次数确定为重传次数阈值。第二参考重传次数小于第三参考重传次数,表示当前网络状况变差,并且当前的已重传次数小于第二参考重传次数,表示当前已重传次数还不足,还可以再让接收端再重传几次重传请求,可以将重传次数阈值设置为第二参考重传次数。由于重传次数阈值由第三参考重传次数变为第二参考重传次数,接收端可以等待数据包的时长可以更新为:重传已消耗时长+(当前的RTT时长+误差时长)×(第二参考重传次数-当前的已重传次数)。If the second reference retransmission count is less than the third reference retransmission count and the retransmitted count is less than the second reference retransmission count, the second reference retransmission count is determined as the retransmission count threshold. The second reference retransmission count is less than the third reference retransmission count, indicating that the current network condition has deteriorated, and the current retransmission count is less than the second reference retransmission count, indicating that the current retransmission count is insufficient. The terminal retransmits several retransmission requests, and the threshold of the number of retransmissions may be set as the second reference number of retransmissions. Since the threshold of the number of retransmissions changes from the third reference retransmission number to the second reference retransmission number, the duration that the receiving end can wait for the data packet can be updated to: retransmission consumed time + (current RTT duration + error duration) × ( The second reference number of retransmissions-the current number of retransmissions).
在一种可能的实现方式中,如果数据包是重要的数据包,如编码信息数据包、I帧数据包、帧起始数据包等,则可以将表1中的参考重传次数调大或者保持不变,这样,如果重要的数据包丢失,则可以多传几次重要的数据包的重传请求,以保证数据传输的可靠性。可以获取RTT时长如果数据包的类型在预设类型集合内,则基于预设的RTT时长范围与参考重传次数的第一对应关系,确定与获取的RTT时长所属的RTT时长范围对应的第二参考重传次数;如果数据包的类型不在预设类型集合内,则基于预设的RTT时长范围与参考重传次数的第二对应关系,确定与获取的RTT时长所属的RTT时长范围对应的第二参考重传次数。In a possible implementation, if the data packet is an important data packet, such as an encoded information data packet, an I frame data packet, a frame start data packet, etc., the number of reference retransmissions in Table 1 may be increased or Keep the same, so that if important data packets are lost, you can transmit several more important data packet retransmission requests to ensure the reliability of data transmission. The RTT duration can be obtained. If the type of the data packet is in the preset type set, the second corresponding to the RTT duration range to which the acquired RTT duration belongs is determined based on the first correspondence between the preset RTT duration range and the reference retransmission times Refer to the number of retransmissions; if the type of the data packet is not within the preset type set, then based on the second correspondence between the preset RTT duration range and the reference retransmission times, determine the number corresponding to the RTT duration range to which the acquired RTT duration belongs 2. Refer to the number of retransmissions.
其中,预设类型集合可以包括编码信息数据包类型、I帧数据包类型、帧起始数据包类型等。相同的RTT时长范围在第一对应关系中对应的参考重传次数大于或等于在第二对应关系中对应的参考重传次数。Wherein, the set of preset types may include encoding information data packet types, I frame data packet types, frame start data packet types, and the like. The number of reference retransmissions corresponding to the same RTT duration in the first correspondence is greater than or equal to the number of reference retransmissions in the second correspondence.
如果丢失的数据包不是重要的数据包,则可以参见表1来查询当前的RTT时长所属的RTT时长范围对应的参考重传次数,如果丢失的数据包是重要的数 据包,则可以参见表2来查询当前的RTT时长所属的RTT时长范围对应的参考重传次数。If the lost data packet is not an important data packet, you can refer to Table 1 to query the reference retransmission times corresponding to the RTT duration range to which the current RTT duration belongs. If the lost data packet is an important data packet, you can refer to Table 2 To query the number of reference retransmissions corresponding to the RTT duration range to which the current RTT duration belongs.
表2Table 2
Figure PCTCN2019126073-appb-000002
Figure PCTCN2019126073-appb-000002
通过本公开实施例提供的方法,根据RTT时长与网络状况的相关性,实时调整重传参数阈值。由于RTT时长与网络状况的相关性很高,在网络状况不佳的情况下,RTT时长较长,在网络状况较佳的情况下,RTT时长较短,因此RTT时长反应了网络状况,进而通过根据RTT时长调整重传参数阈值的方式可以达到根据网络状况实时调整重传参数阈值的目的,在重传参数达到重传参数阈值时,及时停止向发动端发送重传请求。这样,可以根据网络状况实时调整重传总耗时,在网络状况不佳的情况下,采用本实施例提供的方法更易缩短重传总耗时,避免使用较长的时长去等待丢失数据包,数据传输的灵活性较好。Through the method provided by the embodiment of the present disclosure, the threshold value of the retransmission parameter is adjusted in real time according to the correlation between the RTT duration and the network status. Due to the high correlation between the RTT duration and the network status, the RTT duration is longer under poor network conditions, and the RTT duration is shorter under better network conditions. Therefore, the RTT duration reflects the network status and then passes The method of adjusting the retransmission parameter threshold according to the RTT duration can achieve the purpose of adjusting the retransmission parameter threshold in real time according to the network conditions. When the retransmission parameter reaches the retransmission parameter threshold, it stops sending the retransmission request to the initiator in time. In this way, the total retransmission time can be adjusted in real time according to the network conditions. In the case of poor network conditions, it is easier to shorten the total retransmission time by using the method provided in this embodiment, and avoid using a longer time to wait for lost packets. The flexibility of data transmission is better.
本公开一示例性实施例提供了一种重传数据的方法,如图2所示,该方法的处理流程可以包括如下的步骤:An exemplary embodiment of the present disclosure provides a method for retransmitting data. As shown in FIG. 2, the processing flow of the method may include the following steps:
步骤S210,当发送端检测到数据包发送完毕并存入缓存中时,获取RTT时长,基于RTT时长,确定第一数据存储参考时长。Step S210, when the sending end detects that the data packet has been sent and stored in the buffer, the RTT duration is obtained, and based on the RTT duration, the first data storage reference duration is determined.
当发送端检测到数据包发送完毕,可以将该数据包存储到缓存中,以备该数据包在传输的过程中丢失,需要重传该数据包。但是由于缓存的存储空间有限,不能让所有发送完毕的数据包无时间限制的一直存储在缓存中,因此需要根据一定的条件清理发送完毕的数据包,但是又需要尽可能的保留可能需要重传的数据包,提高重传请求的命中率。具体可以根据网络状况、接收端发送重传请求的机制来调整数据包的存储时长。When the sending end detects that the data packet has been sent, it can store the data packet in the cache, in case the data packet is lost during transmission, and the data packet needs to be retransmitted. However, due to the limited storage space of the cache, all the sent data packets cannot be stored in the cache without time limit. Therefore, the sent data packets need to be cleaned according to certain conditions, but they need to be kept as much as possible and may need to be retransmitted. Data packets to improve the hit rate of retransmission requests. Specifically, the storage duration of the data packet can be adjusted according to the network condition and the mechanism of the retransmission request sent by the receiving end.
可以获取RTT时长,确定RTT时长与目标参考重传次数的乘积,作为第一 数据存储参考时长。目标参考重传次数可以是预设的固定的参考重传次数,如10次,也可以是基于预设的RTT时长范围与参考重传次数的对应关系确定的参考重传次数。在一种可能的实现方式中,在获取RTT时长之后,发送端可以基于预设的RTT时长范围与参考重传次数的对应关系,确定获取的RTT时长所属的RTT时长范围对应的目标参考重传次数。The RTT duration can be obtained, and the product of the RTT duration and the target reference retransmission times can be determined as the first data storage reference duration. The target number of reference retransmissions may be a preset fixed number of reference retransmissions, such as 10 times, or a reference retransmission number determined based on a correspondence between a preset RTT duration range and a reference retransmission number. In a possible implementation, after acquiring the RTT duration, the sending end may determine the target reference retransmission corresponding to the RTT duration range to which the acquired RTT duration belongs based on the correspondence between the preset RTT duration range and the number of reference retransmissions frequency.
其中,在对应关系中RTT时长范围数值越大对应的重传次数越少。In the correspondence, the larger the value of the RTT duration range, the fewer the number of retransmissions.
预设的RTT时长范围与参考重传次数的对应关系可以是参考重传次数映射表,如表3:The correspondence between the preset RTT duration range and the reference retransmission times may be a reference retransmission times mapping table, as shown in Table 3:
表3table 3
Figure PCTCN2019126073-appb-000003
Figure PCTCN2019126073-appb-000003
可以通过查询表3,确定获取的RTT时长所属的RTT时长范围对应的目标参考重传次数。例如,当前的RTT时长为80ms,则目标参考重传次数为4次,进而第一数据存储参考时长为320ms。The target reference retransmission times corresponding to the RTT duration range to which the acquired RTT duration belongs can be determined by looking up Table 3. For example, if the current RTT duration is 80 ms, the target reference retransmission times are 4 times, and the first data storage reference duration is 320 ms.
在设计表3时,主要考虑的是,首先,RTT时长范围数值越大对应的重传次数越少,这样当网络状况不佳时,少向发送端发送几次重传请求,即不倾向于通过重传的方式来获取丢失的数据包。其次,RTT时长范围数值越大对应的重传总消耗时长阈值越大。最次,任何两个RTT时长范围对应的重传总消耗时长阈值的和值小于或者等于RTT的更新周期如1s。When designing Table 3, the main consideration is that, first, the larger the value of the RTT duration range, the fewer the number of retransmissions. In this way, when the network condition is not good, fewer retransmission requests are sent to the sender. Retrieve lost packets by means of retransmission. Secondly, the larger the value of the RTT duration range, the greater the threshold of the total retransmission consumption duration. Lastly, the sum of the total retransmission consumption duration thresholds corresponding to any two RTT duration ranges is less than or equal to the RTT update period, such as 1s.
步骤S220,发送端基于第一数据存储参考时长以及前一次数据包存入缓存中时确定的第二数据存储参考时长,确定数据存储时长阈值。Step S220: The sending end determines the data storage duration threshold based on the first data storage reference duration and the second data storage reference duration determined when the previous data packet was stored in the cache.
发送端可以获取当前的RTT时长,基于当前的RTT时长,确定第一数据存储参考时长,基于第一数据存储参考时长以及前一次数据包存入缓存中时确定的第二数据存储参考时长,确定数据存储时长阈值。The sending end can obtain the current RTT duration, determine the first data storage reference duration based on the current RTT duration, and determine the first data storage reference duration based on the first data storage reference duration and the second data storage reference duration determined when the previous data packet was stored in the cache, determine Data storage duration threshold.
在一种可能的实现方式中,步骤S220可以包括基于第一数据存储参考时长、 前一次数据包存入缓存中时确定的第二数据存储参考时长以及预先获取的预留时长,确定数据存储时长阈值。In a possible implementation, step S220 may include determining the data storage duration based on the first data storage reference duration, the second data storage reference duration determined when the previous packet was stored in the cache, and the pre-acquired reservation duration Threshold.
预留时长可以根据情况进行设定,预留时长可以包括乱序数据包等待时长如10ms,还可以包括帧间隔时长。帧间隔时长可以是根据当前的数据包所属的视频帧对应的码率确定的。例如,当前的数据包所属的视频帧对应的码率为25帧每秒,则在一秒内需要传输25个视频帧,每个视频帧之间的帧间隔时长为40ms。对于属于低帧率的视频帧的数据包,如果将帧间隔时长考虑到数据存储时长阈值之内,可以提高重传请求的命中率。The reserved duration can be set according to the situation. The reserved duration can include the out-of-order data packet waiting duration such as 10 ms, and can also include the frame interval duration. The frame interval duration may be determined according to the code rate corresponding to the video frame to which the current data packet belongs. For example, the bit rate corresponding to the video frame to which the current data packet belongs is 25 frames per second, then 25 video frames need to be transmitted in one second, and the frame interval between each video frame is 40 ms. For packets belonging to video frames with a low frame rate, if the frame interval duration is taken into consideration within the data storage duration threshold, the hit rate of the retransmission request can be improved.
在一种可能的实现方式中,基于第一数据存储参考时长、前一次数据包存入缓存中时确定的第二数据存储参考时长以及预先获取的预留时长,确定数据存储时长阈值的步骤可以包括:计算当前数据包存入缓存的时间点和前一次数据包存入缓存的时间点之间的时间差值;如果第一数据存储参考时长小于或者等于第二数据存储参考时长,且时间差值小于第二数据存储参考时长,则将第二数据存储参考时长与预先获取的预留时长之和,确定为数据存储时长阈值;如果第一数据存储参考时长小于或者等于第二数据存储参考时长,且时间差值大于或者等于第二数据存储参考时长,则确定第一数据存储参考时长与第二数据存储参考时长之间的时长差值,确定时长差值与预设的比例系数之间的乘积,确定乘积与第一数据存储参考时长之间的和值,将和值与预留时长之和,确定为数据存储时长阈值;如果第一数据存储参考时长大于第二数据存储参考时长,则将第一数据存储参考时长与预留时长之和,确定为数据存储时长阈值。In a possible implementation, the step of determining the data storage duration threshold based on the first data storage reference duration, the second data storage reference duration determined when the previous data packet was stored in the cache, and the pre-acquired reservation duration may be Including: calculating the time difference between the time point when the current data packet is stored in the cache and the time point when the previous data packet is stored in the cache; if the first data storage reference duration is less than or equal to the second data storage reference duration, and the time difference If the value is less than the second data storage reference duration, the sum of the second data storage reference duration and the pre-obtained reserved duration is determined as the data storage duration threshold; if the first data storage reference duration is less than or equal to the second data storage reference duration , And the time difference is greater than or equal to the second data storage reference duration, determine the duration difference between the first data storage reference duration and the second data storage reference duration, and determine the difference between the duration difference and the preset scale factor Product, determine the sum of the product and the first data storage reference duration, and determine the sum of the sum and the reserved duration as the data storage duration threshold; if the first data storage reference duration is greater than the second data storage reference duration, then The sum of the first data storage reference duration and the reserved duration is determined as the data storage duration threshold.
第一数据存储参考时长是当期的数据包存入缓存中时确定的数据存储参考时长,第二数据存储参考时长是前一次数据包存入缓存中时确定的数据存储时长阈值。如果第一数据存储参考时长小于或者等于第二数据存储参考时长,且时间差值小于第二数据存储参考时长,即数据存储参考时长不变或者变短,且前一次数据包存入缓存中时确定的数据存储时长还没消耗完,则可以仍然使用前一次数据包存入缓存中时确定的数据存储时长阈值,可以将数据存储时长阈值保持为第二数据存储参考时长与预先获取的预留时长之和。通过上述方式,在数据存储参考时长变短时,可以暂时不选用变短的数据存储参考时长作为数据存储时长阈值,这样可以尽可能的多保留一会缓存中的数据包,进而可以提高重传请求的命中率。The first data storage reference duration is the data storage reference duration determined when the current data packet is stored in the cache, and the second data storage reference duration is the data storage duration threshold determined when the previous data packet is stored in the cache. If the first data storage reference duration is less than or equal to the second data storage reference duration, and the time difference is less than the second data storage reference duration, that is, the data storage reference duration is unchanged or shortened, and the previous data packet is stored in the cache If the determined data storage duration is not exhausted, you can still use the data storage duration threshold determined when the previous packet was stored in the cache, and the data storage duration threshold can be maintained as the second data storage reference duration and the pre-acquired reservation The sum of time. In the above manner, when the data storage reference duration becomes shorter, the shortened data storage reference duration may not be temporarily selected as the data storage duration threshold, so that as many data packets in the cache as possible can be retained as much as possible, which can improve retransmission The requested hit rate.
如果第一数据存储参考时长小于或者等于第二数据存储参考时长,且时间差值大于或者等于第二数据存储参考时长,即数据存储参考时长不变或者变短,且前一次数据包存入缓存中时确定的数据存储时长已消耗完毕,则需要将前一次数据包存入缓存中时确定的数据存储时长缓慢下降为第一数据存储参考时长,可以确定第一数据存储参考时长与第二数据存储参考时长之间的时长差值,确定时长差值与预设的比例系数之间的乘积,确定乘积与第一数据存储参考时长之间的和值,将和值与预留时长之和,确定为数据存储时长阈值。If the first data storage reference duration is less than or equal to the second data storage reference duration, and the time difference is greater than or equal to the second data storage reference duration, that is, the data storage reference duration is unchanged or shortened, and the previous data packet is stored in the cache When the data storage duration determined by Zhongshi has been exhausted, the data storage duration determined when the previous packet is stored in the cache needs to be slowly reduced to the first data storage reference duration, and the first data storage reference duration and the second data can be determined Store the duration difference between the reference durations, determine the product of the duration difference and the preset scale factor, determine the sum of the product and the first data storage reference duration, and sum the sum with the reserved duration, Determined as the data storage duration threshold.
如果第一数据存储参考时长大于第二数据存储参考时长,即数据存储参考时长变长,则可以直接将数据存储时长阈值参照最大的数据存储参考时长进行设置,可以将第一数据存储参考时长与预留时长之和,确定为数据存储时长阈值。If the first data storage reference duration is greater than the second data storage reference duration, that is, the data storage reference duration becomes longer, you can directly set the data storage duration threshold to the maximum data storage reference duration. You can set the first data storage reference duration to The sum of the reserved duration is determined as the threshold of the data storage duration.
步骤S230,发送端对缓存中已存储时长超过数据存储时长阈值的数据包进行删除处理。Step S230: The sending end deletes the data packets that have been stored in the buffer for a time period that exceeds the data storage duration threshold.
发送端可以确定当前的系统时间,将当前的系统时间减去数据存储时长阈值,得到数据过期时间点,将缓存中存储时间点先于数据过期时间点的所有数据包进行删除处理。The sending end can determine the current system time, subtract the data storage duration threshold from the current system time to obtain the data expiration time point, and delete all the data packets in the cache before the data expiration time point.
步骤S240,发送端对RTT时长进行更新,转至执行当检测到数据包发送完毕并存入缓存中时获取RTT时长的处理。In step S240, the sending end updates the RTT duration, and then proceeds to execute the process of acquiring the RTT duration when it is detected that the data packet has been sent and stored in the buffer.
RTT时长是按照周期进行更新的,因此RTT时长不是固定值,在每次检测到缓存中存入一个数据包时,都可以对RTT时长进行更新。可以获取当前的RTT时长,确定当前的RTT时长是否等于前一次获取的RTT时长。如果网络状况发生改变,当前的RTT时长则不等于前一次获取的RTT时长,如果网络状况维持不变,当前的RTT时长则等于前一次获取的RTT时长。在对RTT时长进行更新处理之后,如果RTT时长发生变化,则第一数据存储参考时长也对应发生变化,因此需要重复执行步骤S210-步骤S240。The RTT duration is updated according to the period, so the RTT duration is not a fixed value, and the RTT duration can be updated each time a data packet is stored in the cache. You can obtain the current RTT duration to determine whether the current RTT duration is equal to the previous RTT duration. If the network status changes, the current RTT duration is not equal to the previous RTT duration. If the network status remains unchanged, the current RTT duration is equal to the previous RTT duration. After the RTT duration is updated, if the RTT duration changes, the first data storage reference duration also changes accordingly, so steps S210-S240 need to be repeated.
通过本公开实施例提供的方法,根据网络状况、接收端发送重传请求的机制来调整数据包的存储时长。这样,可以适当的节省缓存的存储空间,同时又能提高重传请求的命中率。According to the method provided by the embodiment of the present disclosure, the storage duration of the data packet is adjusted according to the network condition and the mechanism of the retransmission request sent by the receiving end. In this way, the storage space of the cache can be appropriately saved, and at the same time, the hit rate of the retransmission request can be improved.
本公开又一示例性实施例提供了一种重传数据的装置,如图3所示,该装 置包括:Yet another exemplary embodiment of the present disclosure provides an apparatus for retransmitting data. As shown in FIG. 3, the apparatus includes:
发送模块310,用于当检测到发生丢包事件时,向发送端发送丢失的数据包的重传请求;The sending module 310 is configured to send a retransmission request for the lost data packet to the sending end when a packet loss event is detected;
确定模块320,用于获取RTT时长,基于RTT时长确定重传参数阈值;The determining module 320 is used to obtain the RTT duration, and determine the threshold of the retransmission parameter based on the RTT duration;
更新模块330,用于当发送重传请求后达到重传时长时,如果未接收到所述数据包,则向所述发送端发送所述数据包的重传请求,对RTT时长进行更新,转至执行基于RTT时长确定重传参数阈值的处理;The update module 330 is configured to send a retransmission request of the data packet to the sending end to update the RTT duration when the retransmission duration reaches the retransmission duration after the retransmission request is sent. To execute the process of determining the retransmission parameter threshold based on the RTT duration;
停止模块340,用于当重传参数的数值达到对应的重传参数阈值时,如果未接收到所述数据包,则停止发送所述数据包的重传请求。The stopping module 340 is configured to stop sending the retransmission request of the data packet if the value of the retransmission parameter reaches the corresponding threshold value of the retransmission parameter, if the data packet is not received.
可选地,所述重传参数包括重传总消耗时长和/或已重传次数,所述重传总消耗时长对应的重传参数阈值为重传总消耗时长阈值,所述已重传次数对应的重传参数阈值为重传次数阈值。Optionally, the retransmission parameters include the total retransmission time and/or the number of retransmissions, and the threshold of the retransmission parameter corresponding to the total retransmission time is the threshold of the total retransmission time and the number of retransmissions The corresponding threshold of the retransmission parameter is the threshold of the number of retransmissions.
可选地,所述重传参数阈值为重传总消耗时长阈值,所述确定模块320,用于:Optionally, the threshold of the retransmission parameter is a threshold of total retransmission consumption duration, and the determination module 320 is configured to:
获取RTT时长,确定RTT时长对应的重传时长,确定RTT时长对应的重传时长与第一参考重传次数的乘积;Obtain the RTT duration, determine the retransmission duration corresponding to the RTT duration, and determine the product of the retransmission duration corresponding to the RTT duration and the first reference number of retransmissions;
确定所述乘积与预设的预留时长的和值,为重传总消耗时长阈值。The sum of the product and the preset reserved duration is determined as a total consumption duration threshold for retransmission.
可选地,所述确定模块320,还用于:Optionally, the determination module 320 is also used to:
基于预设的RTT时长范围与参考重传次数的对应关系,确定获取的RTT时长所属的RTT时长范围对应的第一参考重传次数,其中,在所述对应关系中RTT时长范围数值越大对应的重传次数越少。Based on the correspondence relationship between the preset RTT duration range and the reference retransmission times, determine the first reference retransmission times corresponding to the RTT duration range to which the acquired RTT duration belongs, wherein in the correspondence, the larger the value of the RTT duration range corresponds to The fewer the number of retransmissions.
可选地,所述重传参数阈值为重传次数阈值,所述确定模块320,用于:Optionally, the threshold of the retransmission parameter is a threshold of the number of retransmissions, and the determination module 320 is configured to:
获取RTT时长,基于预设的RTT时长范围与参考重传次数的对应关系,确定获取的RTT时长所属的RTT时长范围对应的第二参考重传次数,其中,在所述对应关系中RTT时长范围数值越大对应的重传次数越少;Obtain the RTT duration, and determine the second reference retransmission number corresponding to the RTT duration range to which the acquired RTT duration belongs based on the correspondence relationship between the preset RTT duration range and the reference retransmission times, wherein, in the correspondence, the RTT duration range The larger the value, the fewer the retransmission times;
基于所述第二参考重传次数以及前一次发送重传请求时确定的第三参考重传次数的比较结果,确定重传次数阈值。Based on the comparison result of the second reference retransmission times and the third reference retransmission times determined when the retransmission request was sent last time, the threshold value of the retransmission times is determined.
可选地,所述确定模块320,用于:Optionally, the determination module 320 is configured to:
如果所述第二参考重传次数大于或者等于前一次确定的第三参考重传次数,则将所述第二参考重传次数确定为重传次数阈值;If the second reference retransmission number is greater than or equal to the previously determined third reference retransmission number, determine the second reference retransmission number as the retransmission number threshold;
如果所述第二参考重传次数小于所述第三参考重传次数且已重传次数大于或者等于所述第二参考重传次数,则将所述已重传次数确定为重传次数阈值;If the second reference retransmission times are less than the third reference retransmission times and the retransmission times are greater than or equal to the second reference retransmission times, the retransmission times are determined as a threshold of retransmission times;
如果所述第二参考重传次数小于所述第三参考重传次数且已重传次数小于所述第二参考重传次数,则将所述第二参考重传次数确定为重传次数阈值。If the second reference retransmission count is less than the third reference retransmission count and the retransmitted count is less than the second reference retransmission count, then the second reference retransmission count is determined as the retransmission count threshold.
可选地,所述确定模块320,用于:Optionally, the determination module 320 is configured to:
获取RTT时长;Get RTT duration;
如果所述数据包的类型在预设类型集合内,则基于预设的RTT时长范围与参考重传次数的第一对应关系,确定与获取的RTT时长所属的RTT时长范围对应的第二参考重传次数;If the type of the data packet is in the preset type set, then based on the first correspondence between the preset RTT duration range and the reference retransmission times, determine the second reference weight corresponding to the RTT duration range to which the acquired RTT duration belongs Transmission times
如果所述数据包的类型不在所述预设类型集合内,则基于预设的RTT时长范围与参考重传次数的第二对应关系,确定与获取的RTT时长所属的RTT时长范围对应的第二参考重传次数,其中,相同的RTT时长范围在所述第一对应关系中对应的参考重传次数大于或等于在所述第二对应关系中对应的参考重传次数。If the type of the data packet is not in the preset type set, based on the second correspondence between the preset RTT duration range and the reference retransmission times, determine the second corresponding to the RTT duration range to which the acquired RTT duration belongs Reference number of retransmissions, where the number of reference retransmissions corresponding to the same RTT duration range in the first correspondence is greater than or equal to the number of reference retransmissions corresponding to the second correspondence.
本公开又一示例性实施例提供了一种重传数据的装置,如图4所示,该装置包括:Yet another exemplary embodiment of the present disclosure provides an apparatus for retransmitting data. As shown in FIG. 4, the apparatus includes:
确定模块410,用于当检测到数据包发送完毕并存入缓存中时,获取RTT时长,基于RTT时长,确定第一数据存储参考时长;基于所述第一数据存储参考时长以及前一次数据包存入所述缓存中时确定的第二数据存储参考时长,确定数据存储时长阈值;The determining module 410 is configured to obtain the RTT duration when it is detected that the data packet has been sent and stored in the cache, and determine the first data storage reference duration based on the RTT duration; based on the first data storage reference duration and the previous data packet The second data storage reference duration determined when stored in the cache, to determine the data storage duration threshold;
删除模块420,用于对所述缓存中已存储时长超过所述数据存储时长阈值的数据包进行删除处理;The deleting module 420 is configured to delete a data packet that has been stored in the cache for a duration that exceeds the data storage duration threshold;
更新模块430,用于对RTT时长进行更新,转至执行当检测到数据包发送完毕并存入缓存中时获取RTT时长的处理。The update module 430 is used to update the RTT duration and go to the process of acquiring the RTT duration when it is detected that the data packet has been sent and stored in the buffer.
可选地,所述确定模块410,用于:Optionally, the determination module 410 is configured to:
基于所述第一数据存储参考时长、前一次数据包存入所述缓存中时确定的第二数据存储参考时长以及预先获取的预留时长,确定数据存储时长阈值。The data storage duration threshold is determined based on the first data storage reference duration, the second data storage reference duration determined when the previous data packet was stored in the cache, and the pre-acquired reservation duration.
可选地,所述确定模块410,用于:Optionally, the determination module 410 is configured to:
计算当前数据包存入所述缓存的时间点和前一次数据包存入所述缓存的时 间点之间的时间差值;Calculating the time difference between the time point when the current data packet is stored in the cache and the time point when the previous data packet is stored in the cache;
如果所述第一数据存储参考时长小于或者等于所述第二数据存储参考时长,且所述时间差值小于所述第二数据存储参考时长,则将所述第二数据存储参考时长与预先获取的预留时长之和,确定为数据存储时长阈值;If the first data storage reference duration is less than or equal to the second data storage reference duration, and the time difference is less than the second data storage reference duration, the second data storage reference duration is obtained in advance The sum of the reserved time is determined as the data storage time threshold;
如果所述第一数据存储参考时长小于或者等于所述第二数据存储参考时长,且所述时间差值大于或者等于所述第二数据存储参考时长,则确定所述第一数据存储参考时长与所述第二数据存储参考时长之间的时长差值,确定所述时长差值与预设的比例系数之间的乘积,确定所述乘积与所述第一数据存储参考时长之间的和值,将所述和值与所述预留时长之和,确定为数据存储时长阈值;If the first data storage reference duration is less than or equal to the second data storage reference duration, and the time difference is greater than or equal to the second data storage reference duration, it is determined that the first data storage reference duration is equal to A duration difference between the second data storage reference durations, determining a product between the duration difference and a preset scale factor, and determining a sum between the product and the first data storage reference duration , The sum of the sum value and the reserved duration is determined as the data storage duration threshold;
如果所述第一数据存储参考时长大于所述第二数据存储参考时长,则将所述第一数据存储参考时长与所述预留时长之和,确定为数据存储时长阈值。If the first data storage reference duration is greater than the second data storage reference duration, the sum of the first data storage reference duration and the reserved duration is determined as a data storage duration threshold.
可选地,所述确定模块410,还用于:Optionally, the determination module 410 is also used to:
基于数据包所属的视频帧的帧率,确定预留时长。The reserved duration is determined based on the frame rate of the video frame to which the data packet belongs.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment related to the method, and will not be elaborated here.
通过本公开实施例提供的装置,根据RTT时长与网络状况的相关性,实时调整重传参数阈值。由于RTT时长与网络状况的相关性很高,在网络状况不佳的情况下,RTT时长较长,在网络状况较佳的情况下,RTT时长较短,因此RTT时长反应了网络状况,进而通过根据RTT时长调整重传参数阈值的方式可以达到根据网络状况实时调整重传参数阈值的目的,在重传参数达到重传参数阈值时,及时停止向发动端发送重传请求。这样,可以根据网络状况实时调整重传总耗时,在网络状况不佳的情况下,采用本实施例提供的装置更易缩短重传总耗时,避免使用较长的时长去等待丢失数据包,数据传输的灵活性较好。With the apparatus provided by the embodiment of the present disclosure, the threshold of the retransmission parameter is adjusted in real time according to the correlation between the RTT duration and the network status. Due to the high correlation between the RTT duration and the network status, the RTT duration is longer under poor network conditions, and the RTT duration is shorter under better network conditions. Therefore, the RTT duration reflects the network status and then passes The method of adjusting the retransmission parameter threshold according to the RTT duration can achieve the purpose of adjusting the retransmission parameter threshold in real time according to the network conditions. When the retransmission parameter reaches the retransmission parameter threshold, it stops sending the retransmission request to the initiator in time. In this way, the total retransmission time can be adjusted in real time according to the network conditions. In the case of poor network conditions, it is easier to shorten the total retransmission time by using the device provided in this embodiment, avoiding the use of a longer time to wait for lost data packets. The flexibility of data transmission is better.
需要说明的是:上述实施例提供的重传数据的装置在重传数据时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将发送端、接收端的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的重传数据的装置与重传数据的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that the device for retransmitting data provided in the above embodiments only uses the division of the above functional modules as an example for retransmission of data. In practical applications, the above functions can be allocated by different functional modules as needed Completion means dividing the internal structure of the sending end and the receiving end into different functional modules to complete all or part of the functions described above. In addition, the device for retransmitting data provided in the above embodiments and the method embodiment for retransmitting data belong to the same concept. For the specific implementation process, see the method embodiment, and details are not described here.
本公开再一示例性实施例提供了一种重传数据的系统,所述系统包括发送端和接收端,其中:Yet another exemplary embodiment of the present disclosure provides a system for retransmitting data. The system includes a sending end and a receiving end, where:
所述接收端,用于当检测到发生丢包事件时,向发送端发送丢失的数据包的重传请求;获取RTT时长,基于RTT时长确定重传参数阈值;当发送重传请求后达到重传时长时,如果未接收到所述数据包,则向所述发送端发送所述数据包的重传请求,对RTT时长进行更新,转至执行基于RTT时长确定重传参数阈值的处理;当重传参数的数值达到对应的重传参数阈值时,如果未接收到所述数据包,则停止发送所述数据包的重传请求;The receiving end is used to send a retransmission request of the lost data packet to the sending end when a packet loss event is detected; obtain the RTT duration, determine the retransmission parameter threshold based on the RTT duration; During the transmission time, if the data packet is not received, send a retransmission request of the data packet to the sending end, update the RTT duration, and proceed to perform the process of determining the retransmission parameter threshold based on the RTT duration; When the value of the retransmission parameter reaches the corresponding threshold of the retransmission parameter, if the data packet is not received, stop sending the retransmission request of the data packet;
所述发送端,用于当检测到数据包发送完毕并存入缓存中时,获取RTT时长,基于RTT时长,确定第一数据存储参考时长;基于所述第一数据存储参考时长以及前一次数据包存入所述缓存中时确定的第二数据存储参考时长,确定数据存储时长阈值;对所述缓存中已存储时长超过所述数据存储时长阈值的数据包进行删除处理;对RTT时长进行更新,转至执行当检测到数据包发送完毕并存入缓存中时获取RTT时长的处理。The sending end is used to obtain the RTT duration when it is detected that the data packet has been sent and stored in the cache, and determine the first data storage reference duration based on the RTT duration; based on the first data storage reference duration and the previous data The second data storage reference duration determined when the packet is stored in the cache to determine the data storage duration threshold; deleting the data packets that have been stored in the cache for longer than the data storage duration threshold; updating the RTT duration , Go to the process of acquiring the RTT duration when it is detected that the data packet has been sent and stored in the buffer.
关于上述实施例中的系统,其中发送端、接收端执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the system in the above embodiments, the specific manners in which the sending end and the receiving end perform operations have been described in detail in the embodiments of the method, and will not be elaborated here.
图5示出了本公开一个示例性实施例提供的计算机设备1900的结构示意图。该计算机设备1900可以是上述实施例中的发送端、接收端,可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central processing units,CPU)1910和一个或一个以上的存储器1920。其中,所述存储器1920中存储有至少一条指令,所述至少一条指令由所述处理器1910加载并执行以实现上述实施例所述的重传数据的方法。FIG. 5 shows a schematic structural diagram of a computer device 1900 provided by an exemplary embodiment of the present disclosure. The computer device 1900 may be a sending end or a receiving end in the foregoing embodiments, and may have a relatively large difference due to different configurations or performances, and may include one or more processors (central processing units 1910) and one or more The above memory 1920. Wherein, at least one instruction is stored in the memory 1920, and the at least one instruction is loaded and executed by the processor 1910 to implement the method for retransmitting data described in the foregoing embodiment.
本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由权利要求指出。Those skilled in the art will easily think of other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptive changes of the present disclosure that follow the general principles of the present disclosure and include common general knowledge or common technical means in the technical field not disclosed in the present disclosure . The description and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are pointed out by the claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the precise structure that has been described above and shown in the drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (27)

  1. 一种重传数据的方法,其特征在于,所述方法包括:A method for retransmitting data, characterized in that the method includes:
    当检测到发生丢包事件时,向发送端发送丢失的数据包的重传请求;When a packet loss event is detected, a retransmission request for the lost data packet is sent to the sender;
    获取RTT时长,基于RTT时长确定重传参数阈值;Obtain the RTT duration and determine the retransmission parameter threshold based on the RTT duration;
    当发送重传请求后达到重传时长时,如果未接收到所述数据包,则向所述发送端发送所述数据包的重传请求,对RTT时长进行更新,转至执行基于RTT时长确定重传参数阈值的处理;When the retransmission time is reached after the retransmission request is sent, if the data packet is not received, the retransmission request of the data packet is sent to the sending end, the RTT duration is updated, and the execution proceeds to the determination based on the RTT duration Retransmission parameter threshold processing;
    当重传参数的数值达到对应的重传参数阈值时,如果未接收到所述数据包,则停止发送所述数据包的重传请求。When the value of the retransmission parameter reaches the corresponding threshold of the retransmission parameter, if the data packet is not received, stop sending the retransmission request of the data packet.
  2. 根据权利要求1所述的方法,其特征在于,所述重传参数包括重传总消耗时长和/或已重传次数,所述重传总消耗时长对应的重传参数阈值为重传总消耗时长阈值,所述已重传次数对应的重传参数阈值为重传次数阈值。The method according to claim 1, wherein the retransmission parameters include a total retransmission consumption duration and/or the number of retransmissions, and the threshold of the retransmission parameter corresponding to the total retransmission consumption duration is the total retransmission consumption Duration threshold, the threshold of the retransmission parameter corresponding to the number of retransmissions is the threshold of the number of retransmissions.
  3. 根据权利要求2所述的方法,其特征在于,所述重传参数阈值为重传总消耗时长阈值,所述获取RTT时长,基于RTT时长确定重传参数阈值,包括:The method according to claim 2, wherein the threshold of the retransmission parameter is a threshold of total retransmission duration, and the acquiring RTT duration and determining the threshold of the retransmission parameter based on the RTT duration include:
    获取RTT时长,确定RTT时长对应的重传时长,确定RTT时长对应的重传时长与第一参考重传次数的乘积;Obtain the RTT duration, determine the retransmission duration corresponding to the RTT duration, and determine the product of the retransmission duration corresponding to the RTT duration and the first reference number of retransmissions;
    确定所述乘积与预设的预留时长的和值,为重传总消耗时长阈值。The sum of the product and the preset reserved duration is determined as a total consumption duration threshold for retransmission.
  4. 根据权利要求3所述的方法,其特征在于,在获取RTT时长之后,所述方法还包括:The method according to claim 3, wherein after obtaining the RTT duration, the method further comprises:
    基于预设的RTT时长范围与参考重传次数的对应关系,确定获取的RTT时长所属的RTT时长范围对应的第一参考重传次数,其中,在所述对应关系中RTT时长范围数值越大对应的重传次数越少。Based on the correspondence relationship between the preset RTT duration range and the reference retransmission times, determine the first reference retransmission times corresponding to the RTT duration range to which the acquired RTT duration belongs, wherein in the correspondence, the larger the value of the RTT duration range corresponds to The fewer the number of retransmissions.
  5. 根据权利要求2所述的方法,其特征在于,所述重传参数阈值为重传次数阈值,所述获取RTT时长,基于RTT时长确定重传参数阈值,包括:The method according to claim 2, wherein the threshold of the retransmission parameter is a threshold of the number of retransmissions, and the obtaining the RTT duration, and determining the threshold of the retransmission parameter based on the RTT duration includes:
    获取RTT时长,基于预设的RTT时长范围与参考重传次数的对应关系,确定获取的RTT时长所属的RTT时长范围对应的第二参考重传次数,其中,在所述对应关系中RTT时长范围数值越大对应的重传次数越少;Obtain the RTT duration, and determine the second reference retransmission number corresponding to the RTT duration range to which the acquired RTT duration belongs based on the correspondence relationship between the preset RTT duration range and the reference retransmission times, wherein, in the correspondence, the RTT duration range The larger the value, the fewer the retransmission times;
    基于所述第二参考重传次数以及前一次发送重传请求时确定的第三参考重传次数的比较结果,确定重传次数阈值。Based on the comparison result of the second reference retransmission times and the third reference retransmission times determined when the retransmission request was sent last time, the threshold value of the retransmission times is determined.
  6. 根据权利要求5所述的方法,其特征在于,所述基于所述第二参考重传次数以及前一次发送重传请求时确定的第三参考重传次数的比较结果,确定重传次数阈值,包括:The method according to claim 5, wherein the threshold value of the number of retransmissions is determined based on a comparison result of the second reference number of retransmissions and the third reference number of retransmissions determined when the retransmission request was sent last time, include:
    如果所述第二参考重传次数大于或者等于前一次确定的第三参考重传次数,则将所述第二参考重传次数确定为重传次数阈值;If the second reference retransmission number is greater than or equal to the previously determined third reference retransmission number, determine the second reference retransmission number as the retransmission number threshold;
    如果所述第二参考重传次数小于所述第三参考重传次数且已重传次数大于或者等于所述第二参考重传次数,则将所述已重传次数确定为重传次数阈值;If the second reference retransmission times are less than the third reference retransmission times and the retransmission times are greater than or equal to the second reference retransmission times, the retransmission times are determined as a threshold of retransmission times;
    如果所述第二参考重传次数小于所述第三参考重传次数且已重传次数小于所述第二参考重传次数,则将所述第二参考重传次数确定为重传次数阈值。If the second reference retransmission count is less than the third reference retransmission count and the retransmitted count is less than the second reference retransmission count, then the second reference retransmission count is determined as the retransmission count threshold.
  7. 根据权利要求5所述的方法,其特征在于,所述获取RTT时长,基于预设的RTT时长范围与参考重传次数的对应关系,确定获取的RTT时长所属的RTT时长范围对应的第二参考重传次数,包括:The method according to claim 5, wherein the acquiring RTT duration determines the second reference corresponding to the RTT duration range to which the acquired RTT duration belongs based on the correspondence between the preset RTT duration range and the number of reference retransmissions Number of retransmissions, including:
    获取RTT时长;Get RTT duration;
    如果所述数据包的类型在预设类型集合内,则基于预设的RTT时长范围与参考重传次数的第一对应关系,确定与获取的RTT时长所属的RTT时长范围对应的第二参考重传次数;If the type of the data packet is in the preset type set, then based on the first correspondence between the preset RTT duration range and the reference retransmission times, determine the second reference weight corresponding to the RTT duration range to which the acquired RTT duration belongs Transmission times
    如果所述数据包的类型不在所述预设类型集合内,则基于预设的RTT时长范围与参考重传次数的第二对应关系,确定与获取的RTT时长所属的RTT时长范围对应的第二参考重传次数,其中,相同的RTT时长范围在所述第一对应关系中对应的参考重传次数大于或等于在所述第二对应关系中对应的参考重传次数。If the type of the data packet is not in the preset type set, based on the second correspondence between the preset RTT duration range and the reference retransmission times, determine the second corresponding to the RTT duration range to which the acquired RTT duration belongs Reference number of retransmissions, where the number of reference retransmissions corresponding to the same RTT duration range in the first correspondence is greater than or equal to the number of reference retransmissions corresponding to the second correspondence.
  8. 一种重传数据的方法,其特征在于,所述方法包括:A method for retransmitting data, characterized in that the method includes:
    当检测到数据包发送完毕并存入缓存中时,获取RTT时长,基于RTT时长,确定第一数据存储参考时长;When it is detected that the data packet has been sent and stored in the buffer, the RTT duration is obtained, and based on the RTT duration, the first data storage reference duration is determined;
    基于所述第一数据存储参考时长以及前一次数据包存入所述缓存中时确定的第二数据存储参考时长,确定数据存储时长阈值;Determine a data storage duration threshold based on the first data storage reference duration and the second data storage reference duration determined when the previous data packet was stored in the cache;
    对所述缓存中已存储时长超过所述数据存储时长阈值的数据包进行删除处理;Delete data packets that have been stored in the cache for longer than the data storage duration threshold;
    对RTT时长进行更新,转至执行当检测到数据包发送完毕并存入缓存中时 获取RTT时长的处理。Update the RTT duration and go to the process of acquiring the RTT duration when it is detected that the data packet has been sent and stored in the buffer.
  9. 根据权利要求8所述的方法,其特征在于,所述基于所述第一数据存储参考时长以及前一次数据包存入所述缓存中时确定的第二数据存储参考时长,确定数据存储时长阈值,包括:The method according to claim 8, wherein the data storage duration threshold is determined based on the first data storage reference duration and the second data storage reference duration determined when the previous data packet is stored in the cache ,include:
    基于所述第一数据存储参考时长、前一次数据包存入所述缓存中时确定的第二数据存储参考时长以及预先获取的预留时长,确定数据存储时长阈值。The data storage duration threshold is determined based on the first data storage reference duration, the second data storage reference duration determined when the previous data packet was stored in the cache, and the pre-acquired reservation duration.
  10. 根据权利要求9所述的方法,其特征在于,所述基于所述第一数据存储参考时长、前一次数据包存入所述缓存中时确定的第二数据存储参考时长以及预先获取的预留时长,确定数据存储时长阈值,包括:The method according to claim 9, wherein the second data storage reference duration determined when the previous data packet is stored in the cache based on the first data storage reference duration and the pre-acquired reservation Duration, determine the data storage duration threshold, including:
    计算当前数据包存入所述缓存的时间点和前一次数据包存入所述缓存的时间点之间的时间差值;Calculating the time difference between the time point when the current data packet is stored in the cache and the time point when the previous data packet is stored in the cache;
    如果所述第一数据存储参考时长小于或者等于所述第二数据存储参考时长,且所述时间差值小于所述第二数据存储参考时长,则将所述第二数据存储参考时长与预先获取的预留时长之和,确定为数据存储时长阈值;If the first data storage reference duration is less than or equal to the second data storage reference duration, and the time difference is less than the second data storage reference duration, the second data storage reference duration is obtained in advance The sum of the reserved time is determined as the data storage time threshold;
    如果所述第一数据存储参考时长小于或者等于所述第二数据存储参考时长,且所述时间差值大于或者等于所述第二数据存储参考时长,则确定所述第一数据存储参考时长与所述第二数据存储参考时长之间的时长差值,确定所述时长差值与预设的比例系数之间的乘积,确定所述乘积与所述第一数据存储参考时长之间的和值,将所述和值与所述预留时长之和,确定为数据存储时长阈值;If the first data storage reference duration is less than or equal to the second data storage reference duration, and the time difference is greater than or equal to the second data storage reference duration, it is determined that the first data storage reference duration is equal to A duration difference between the second data storage reference durations, determining a product between the duration difference and a preset scale factor, and determining a sum between the product and the first data storage reference duration , The sum of the sum value and the reserved duration is determined as the data storage duration threshold;
    如果所述第一数据存储参考时长大于所述第二数据存储参考时长,则将所述第一数据存储参考时长与所述预留时长之和,确定为数据存储时长阈值。If the first data storage reference duration is greater than the second data storage reference duration, the sum of the first data storage reference duration and the reserved duration is determined as a data storage duration threshold.
  11. 根据权利要求9或10所述的方法,其特征在于,所述方法还包括:The method according to claim 9 or 10, wherein the method further comprises:
    基于数据包所属的视频帧的帧率,确定预留时长。The reserved duration is determined based on the frame rate of the video frame to which the data packet belongs.
  12. 一种重传数据的装置,其特征在于,所述装置包括:An apparatus for retransmitting data, characterized in that the apparatus includes:
    发送模块,用于当检测到发生丢包事件时,向发送端发送丢失的数据包的重传请求;The sending module is used to send a retransmission request for the lost data packet to the sending end when a packet loss event is detected;
    确定模块,用于获取RTT时长,基于RTT时长确定重传参数阈值;The determining module is used to obtain the RTT duration, and determine the retransmission parameter threshold based on the RTT duration;
    更新模块,用于当发送重传请求后达到重传时长时,如果未接收到所述数 据包,则向所述发送端发送所述数据包的重传请求,对RTT时长进行更新,转至执行基于RTT时长确定重传参数阈值的处理;The update module is used to send a retransmission request of the data packet to the sending end to update the RTT time when the retransmission time reaches the retransmission time after the retransmission request is sent, and go to Perform the process of determining the threshold of retransmission parameters based on the RTT duration;
    停止模块,用于当重传参数的数值达到对应的重传参数阈值时,如果未接收到所述数据包,则停止发送所述数据包的重传请求。The stopping module is configured to stop sending the retransmission request of the data packet if the value of the retransmission parameter reaches the corresponding threshold value of the retransmission parameter, if the data packet is not received.
  13. 根据权利要求12所述的装置,其特征在于,所述重传参数包括重传总消耗时长和/或已重传次数,所述重传总消耗时长对应的重传参数阈值为重传总消耗时长阈值,所述已重传次数对应的重传参数阈值为重传次数阈值。The apparatus according to claim 12, wherein the retransmission parameters include a total retransmission consumption duration and/or the number of retransmissions, and the threshold of the retransmission parameter corresponding to the total retransmission consumption duration is the total retransmission consumption Duration threshold, the threshold of the retransmission parameter corresponding to the number of retransmissions is the threshold of the number of retransmissions.
  14. 根据权利要求13所述的装置,其特征在于,所述重传参数阈值为重传总消耗时长阈值,所述确定模块,用于:The apparatus according to claim 13, wherein the threshold of the retransmission parameter is a threshold of total retransmission duration, and the determination module is configured to:
    获取RTT时长,确定RTT时长对应的重传时长,确定RTT时长对应的重传时长与第一参考重传次数的乘积;Obtain the RTT duration, determine the retransmission duration corresponding to the RTT duration, and determine the product of the retransmission duration corresponding to the RTT duration and the first reference number of retransmissions;
    确定所述乘积与预设的预留时长的和值,为重传总消耗时长阈值。The sum of the product and the preset reserved duration is determined as a total consumption duration threshold for retransmission.
  15. 根据权利要求14所述的装置,其特征在于,所述确定模块,还用于:The apparatus according to claim 14, wherein the determination module is further used to:
    基于预设的RTT时长范围与参考重传次数的对应关系,确定获取的RTT时长所属的RTT时长范围对应的第一参考重传次数,其中,在所述对应关系中RTT时长范围数值越大对应的重传次数越少。Based on the correspondence relationship between the preset RTT duration range and the reference retransmission times, determine the first reference retransmission times corresponding to the RTT duration range to which the acquired RTT duration belongs, wherein in the correspondence, the larger the value of the RTT duration range corresponds to The fewer the number of retransmissions.
  16. 根据权利要求13所述的装置,其特征在于,所述重传参数阈值为重传次数阈值,所述确定模块,用于:The apparatus according to claim 13, wherein the threshold of the retransmission parameter is a threshold of the number of retransmissions, and the determination module is configured to:
    获取RTT时长,基于预设的RTT时长范围与参考重传次数的对应关系,确定获取的RTT时长所属的RTT时长范围对应的第二参考重传次数,其中,在所述对应关系中RTT时长范围数值越大对应的重传次数越少;Obtain the RTT duration, and determine the second reference retransmission number corresponding to the RTT duration range to which the acquired RTT duration belongs based on the correspondence relationship between the preset RTT duration range and the reference retransmission times, wherein, in the correspondence, the RTT duration range The larger the value, the fewer the retransmission times;
    基于所述第二参考重传次数以及前一次发送重传请求时确定的第三参考重传次数的比较结果,确定重传次数阈值。Based on the comparison result of the second reference retransmission times and the third reference retransmission times determined when the retransmission request was sent last time, the threshold value of the retransmission times is determined.
  17. 根据权利要求16所述的装置,其特征在于,所述确定模块,用于:The apparatus according to claim 16, wherein the determination module is configured to:
    如果所述第二参考重传次数大于或者等于前一次确定的第三参考重传次数,则将所述第二参考重传次数确定为重传次数阈值;If the second reference retransmission number is greater than or equal to the previously determined third reference retransmission number, determine the second reference retransmission number as the retransmission number threshold;
    如果所述第二参考重传次数小于所述第三参考重传次数且已重传次数大于或者等于所述第二参考重传次数,则将所述已重传次数确定为重传次数阈值;If the second reference retransmission times are less than the third reference retransmission times and the retransmission times are greater than or equal to the second reference retransmission times, the retransmission times are determined as a threshold of retransmission times;
    如果所述第二参考重传次数小于所述第三参考重传次数且已重传次数小于所述第二参考重传次数,则将所述第二参考重传次数确定为重传次数阈值。If the second reference retransmission count is less than the third reference retransmission count and the retransmitted count is less than the second reference retransmission count, then the second reference retransmission count is determined as the retransmission count threshold.
  18. 根据权利要求16所述的装置,其特征在于,所述确定模块,用于:The apparatus according to claim 16, wherein the determination module is configured to:
    获取RTT时长;Get RTT duration;
    如果所述数据包的类型在预设类型集合内,则基于预设的RTT时长范围与参考重传次数的第一对应关系,确定与获取的RTT时长所属的RTT时长范围对应的第二参考重传次数;If the type of the data packet is in the preset type set, then based on the first correspondence between the preset RTT duration range and the reference retransmission times, determine the second reference weight corresponding to the RTT duration range to which the acquired RTT duration belongs Transmission times
    如果所述数据包的类型不在所述预设类型集合内,则基于预设的RTT时长范围与参考重传次数的第二对应关系,确定与获取的RTT时长所属的RTT时长范围对应的第二参考重传次数,其中,相同的RTT时长范围在所述第一对应关系中对应的参考重传次数大于或等于在所述第二对应关系中对应的参考重传次数。If the type of the data packet is not in the preset type set, based on the second correspondence between the preset RTT duration range and the reference retransmission times, determine the second corresponding to the RTT duration range to which the acquired RTT duration belongs Reference number of retransmissions, where the number of reference retransmissions corresponding to the same RTT duration range in the first correspondence is greater than or equal to the number of reference retransmissions corresponding to the second correspondence.
  19. 一种重传数据的装置,其特征在于,所述装置包括:An apparatus for retransmitting data, characterized in that the apparatus includes:
    确定模块,用于当检测到数据包发送完毕并存入缓存中时,获取RTT时长,基于RTT时长,确定第一数据存储参考时长;基于所述第一数据存储参考时长以及前一次数据包存入所述缓存中时确定的第二数据存储参考时长,确定数据存储时长阈值;The determining module is used to obtain the RTT duration when it is detected that the data packet has been sent and stored in the cache, and determine the first data storage reference duration based on the RTT duration; based on the first data storage reference duration and the previous data packet storage The second data storage reference duration determined when entering the cache, to determine the data storage duration threshold;
    删除模块,用于对所述缓存中已存储时长超过所述数据存储时长阈值的数据包进行删除处理;A deletion module, configured to delete a data packet that has been stored in the cache for more than the data storage duration threshold;
    更新模块,用于对RTT时长进行更新,转至执行当检测到数据包发送完毕并存入缓存中时获取RTT时长的处理。The update module is used to update the RTT duration and go to the process of acquiring the RTT duration when it is detected that the data packet is sent and stored in the buffer.
  20. 根据权利要求19所述的装置,其特征在于,所述确定模块,用于:The apparatus according to claim 19, wherein the determination module is configured to:
    基于所述第一数据存储参考时长、前一次数据包存入所述缓存中时确定的第二数据存储参考时长以及预先获取的预留时长,确定数据存储时长阈值。The data storage duration threshold is determined based on the first data storage reference duration, the second data storage reference duration determined when the previous data packet was stored in the cache, and the pre-acquired reservation duration.
  21. 根据权利要求20所述的装置,其特征在于,所述确定模块,用于:The apparatus according to claim 20, wherein the determination module is configured to:
    计算当前数据包存入所述缓存的时间点和前一次数据包存入所述缓存的时间点之间的时间差值;Calculating the time difference between the time point when the current data packet is stored in the cache and the time point when the previous data packet is stored in the cache;
    如果所述第一数据存储参考时长小于或者等于所述第二数据存储参考时长,且所述时间差值小于所述第二数据存储参考时长,则将所述第二数据存储参考时长与预先获取的预留时长之和,确定为数据存储时长阈值;If the first data storage reference duration is less than or equal to the second data storage reference duration, and the time difference is less than the second data storage reference duration, the second data storage reference duration is obtained in advance The sum of the reserved time is determined as the data storage time threshold;
    如果所述第一数据存储参考时长小于或者等于所述第二数据存储参考时 长,且所述时间差值大于或者等于所述第二数据存储参考时长,则确定所述第一数据存储参考时长与所述第二数据存储参考时长之间的时长差值,确定所述时长差值与预设的比例系数之间的乘积,确定所述乘积与所述第一数据存储参考时长之间的和值,将所述和值与所述预留时长之和,确定为数据存储时长阈值;If the first data storage reference duration is less than or equal to the second data storage reference duration, and the time difference is greater than or equal to the second data storage reference duration, it is determined that the first data storage reference duration is equal to A duration difference between the second data storage reference durations, determining a product between the duration difference and a preset scale factor, and determining a sum between the product and the first data storage reference duration , The sum of the sum and the reserved duration is determined as a threshold of the data storage duration;
    如果所述第一数据存储参考时长大于所述第二数据存储参考时长,则将所述第一数据存储参考时长与所述预留时长之和,确定为数据存储时长阈值。If the first data storage reference duration is greater than the second data storage reference duration, the sum of the first data storage reference duration and the reserved duration is determined as a data storage duration threshold.
  22. 根据权利要求20或21所述的装置,其特征在于,所述确定模块,还用于:The apparatus according to claim 20 or 21, wherein the determination module is further used to:
    基于数据包所属的视频帧的帧率,确定预留时长。The reserved duration is determined based on the frame rate of the video frame to which the data packet belongs.
  23. 一种重传数据的系统,其特征在于,所述系统包括发送端和接收端,其中:A system for retransmitting data, characterized in that the system includes a sending end and a receiving end, wherein:
    所述接收端,用于当检测到发生丢包事件时,向所述发送端发送丢失的数据包的重传请求;获取RTT时长,基于RTT时长确定重传参数阈值;当发送重传请求后达到重传时长时,如果未接收到所述数据包,则向所述发送端发送所述数据包的重传请求,对RTT时长进行更新,转至执行基于RTT时长确定重传参数阈值的处理;当重传参数的数值达到对应的重传参数阈值时,如果未接收到所述数据包,则停止发送所述数据包的重传请求;The receiving end is used to send a retransmission request for a lost data packet to the sending end when a packet loss event is detected; obtain the RTT duration, and determine the retransmission parameter threshold based on the RTT duration; after sending the retransmission request When the retransmission duration is reached, if the data packet is not received, a retransmission request for the data packet is sent to the sending end, the RTT duration is updated, and the process of determining the retransmission parameter threshold based on the RTT duration is performed ; When the value of the retransmission parameter reaches the corresponding threshold of the retransmission parameter, if the data packet is not received, stop sending the retransmission request of the data packet;
    所述发送端,用于当检测到数据包发送完毕并存入缓存中时,获取RTT时长,基于RTT时长,确定第一数据存储参考时长;基于所述第一数据存储参考时长以及前一次数据包存入所述缓存中时确定的第二数据存储参考时长,确定数据存储时长阈值;对所述缓存中已存储时长超过所述数据存储时长阈值的数据包进行删除处理;对RTT时长进行更新,转至执行当检测到数据包发送完毕并存入缓存中时获取RTT时长的处理。The sending end is used to obtain the RTT duration when it is detected that the data packet has been sent and stored in the cache, and determine the first data storage reference duration based on the RTT duration; based on the first data storage reference duration and the previous data The second data storage reference duration determined when the packet is stored in the cache to determine the data storage duration threshold; deleting the data packets that have been stored in the cache for longer than the data storage duration threshold; updating the RTT duration , Go to the process of acquiring the RTT duration when it is detected that the data packet has been sent and stored in the buffer.
  24. 一种接收端,其特征在于,所述接收端包括处理器、通信接口、存储器和通信总线,其中:A receiving end, characterized in that the receiving end includes a processor, a communication interface, a memory, and a communication bus, wherein:
    所述处理器、所述通信接口和所述存储器通过所述通信总线完成相互间的通信;The processor, the communication interface, and the memory complete communication with each other through the communication bus;
    所述存储器,用于存放计算机程序;The memory is used to store computer programs;
    所述处理器,用于执行所述存储器上所存放的程序,以实现权利要求1-7任一所述的方法步骤。The processor is configured to execute the program stored on the memory to implement the method steps of any one of claims 1-7.
  25. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-7任一所述的方法步骤。A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method steps of any one of claims 1-7 are realized.
  26. 一种发送端,其特征在于,所述发送端包括处理器、通信接口、存储器和通信总线,其中:A sending end, characterized in that the sending end includes a processor, a communication interface, a memory, and a communication bus, wherein:
    所述处理器、所述通信接口和所述存储器通过所述通信总线完成相互间的通信;The processor, the communication interface, and the memory complete communication with each other through the communication bus;
    所述存储器,用于存放计算机程序;The memory is used to store computer programs;
    所述处理器,用于执行所述存储器上所存放的程序,以实现权利要求8-11任一所述的方法步骤。The processor is configured to execute the program stored on the memory to implement the method steps of any one of claims 8-11.
  27. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求8-11任一所述的方法步骤。A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method steps of any one of claims 8-11 are realized.
PCT/CN2019/126073 2018-12-17 2019-12-17 Data retransmission method, device, and system WO2020125647A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811544881.8A CN111327402B (en) 2018-12-17 2018-12-17 Method, device and system for retransmitting data
CN201811544881.8 2018-12-17

Publications (1)

Publication Number Publication Date
WO2020125647A1 true WO2020125647A1 (en) 2020-06-25

Family

ID=71102554

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/126073 WO2020125647A1 (en) 2018-12-17 2019-12-17 Data retransmission method, device, and system

Country Status (2)

Country Link
CN (1) CN111327402B (en)
WO (1) WO2020125647A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112769526A (en) * 2020-12-11 2021-05-07 邦彦技术股份有限公司 Data packet retransmission method, system and storage medium
CN113014547A (en) * 2021-01-29 2021-06-22 深圳市风云实业有限公司 Sequencing mapping-based direct data transmission system and method
CN113392667A (en) * 2021-08-17 2021-09-14 深圳市成为信息技术有限公司 Data transmission method of reader-writer, data receiver and storage medium
CN113422923A (en) * 2021-06-22 2021-09-21 苏州市科远软件技术开发有限公司 Method and device for determining retransmission times, electronic equipment and storage medium
CN113839830A (en) * 2021-07-15 2021-12-24 腾讯科技(深圳)有限公司 Method, device and storage medium for predicting data packet multiple generation parameters
CN114531210A (en) * 2022-02-03 2022-05-24 百果园技术(新加坡)有限公司 Data retransmission method and device, electronic equipment and storage medium
CN115276916A (en) * 2022-07-22 2022-11-01 上海百家云科技有限公司 Discarded data determining method and device, electronic equipment and storage medium
CN116137560A (en) * 2023-04-14 2023-05-19 海马云(天津)信息技术有限公司 Method and device for processing retransmission request, data transmitting end equipment and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114095796A (en) * 2020-07-30 2022-02-25 中国移动通信集团终端有限公司 Invalid retransmission packet reduction method, device, equipment and computer storage medium
CN112887063B (en) * 2021-01-19 2023-04-07 网易(杭州)网络有限公司 Data packet transmission method and device, storage medium and electronic equipment
CN117318898B (en) * 2023-11-24 2024-02-09 合肥奎芯集成电路设计有限公司 Method for processing repeated data packet in high-speed serial interface

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101146341A (en) * 2006-09-12 2008-03-19 华为技术有限公司 A method and device for avoiding duplicate transaction execution in media independent switching
CN101222311A (en) * 2008-01-29 2008-07-16 杭州华三通信技术有限公司 Real-time packet loss recovery method, system and receiving terminal unit
WO2016115916A1 (en) * 2015-01-23 2016-07-28 中兴通讯股份有限公司 Data packet retransmission method and apparatus

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101321116A (en) * 2007-06-05 2008-12-10 华为技术有限公司 Terminal unit and method for scheduling data according to authorization
CN101252425B (en) * 2008-04-09 2010-10-27 杭州华三通信技术有限公司 Loss package error correcting method and system of self-adapting network
US20160094462A1 (en) * 2014-09-26 2016-03-31 Telefonaktiebolaget L M Ericsson (Publ) Method and apparatus for dynamically adjusting retransmission timing in a transport layer
CN106130693B (en) * 2016-07-08 2019-04-23 浙江工业大学 A kind of method for reliable transmission based on UDP
CN108540273B (en) * 2017-03-01 2021-08-13 杭州海康威视数字技术股份有限公司 Method and device for retransmitting data packet
CN107147481A (en) * 2017-07-19 2017-09-08 北京数码视讯科技股份有限公司 Packet loss repeating method, device and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101146341A (en) * 2006-09-12 2008-03-19 华为技术有限公司 A method and device for avoiding duplicate transaction execution in media independent switching
CN101222311A (en) * 2008-01-29 2008-07-16 杭州华三通信技术有限公司 Real-time packet loss recovery method, system and receiving terminal unit
WO2016115916A1 (en) * 2015-01-23 2016-07-28 中兴通讯股份有限公司 Data packet retransmission method and apparatus

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112769526A (en) * 2020-12-11 2021-05-07 邦彦技术股份有限公司 Data packet retransmission method, system and storage medium
CN113014547B (en) * 2021-01-29 2022-11-01 深圳市风云实业有限公司 Sequencing mapping-based direct data transmission system and method
CN113014547A (en) * 2021-01-29 2021-06-22 深圳市风云实业有限公司 Sequencing mapping-based direct data transmission system and method
CN113422923A (en) * 2021-06-22 2021-09-21 苏州市科远软件技术开发有限公司 Method and device for determining retransmission times, electronic equipment and storage medium
CN113839830A (en) * 2021-07-15 2021-12-24 腾讯科技(深圳)有限公司 Method, device and storage medium for predicting data packet multiple generation parameters
CN113839830B (en) * 2021-07-15 2023-10-24 腾讯科技(深圳)有限公司 Method, device and storage medium for predicting multiple data packet parameters
CN113392667A (en) * 2021-08-17 2021-09-14 深圳市成为信息技术有限公司 Data transmission method of reader-writer, data receiver and storage medium
CN113392667B (en) * 2021-08-17 2021-11-30 深圳市成为信息技术有限公司 Data transmission method of reader-writer, data receiver and storage medium
CN114531210A (en) * 2022-02-03 2022-05-24 百果园技术(新加坡)有限公司 Data retransmission method and device, electronic equipment and storage medium
CN114531210B (en) * 2022-02-03 2024-01-26 百果园技术(新加坡)有限公司 Data retransmission method, device, electronic equipment and storage medium
CN115276916A (en) * 2022-07-22 2022-11-01 上海百家云科技有限公司 Discarded data determining method and device, electronic equipment and storage medium
CN116137560A (en) * 2023-04-14 2023-05-19 海马云(天津)信息技术有限公司 Method and device for processing retransmission request, data transmitting end equipment and storage medium
CN116137560B (en) * 2023-04-14 2023-06-30 海马云(天津)信息技术有限公司 Method and device for processing retransmission request, data transmitting end equipment and storage medium

Also Published As

Publication number Publication date
CN111327402A (en) 2020-06-23
CN111327402B (en) 2021-12-31

Similar Documents

Publication Publication Date Title
WO2020125647A1 (en) Data retransmission method, device, and system
CN109936510B (en) Multi-path RDMA transport
KR102109021B1 (en) Data transmission method, transmitting node, receiving node and data transmission system
CN109120383B (en) Unmanned aerial vehicle, ground station thereof and data transmission method
CN111786748B (en) Data retransmission method and system, network card, device, server and storage medium
JP4932008B2 (en) Method, system, and computer program code for reliable packet transmission to reduce congestion (reliable transport packet to reduce congestion)
CN108234087B (en) Data transmission method and sending end
US9197373B2 (en) Method, apparatus, and system for retransmitting data packet in quick path interconnect system
CN103957169A (en) Reliable UDP achievement method based on reserve request
CN110247736B (en) Data transmission method and device
CN112261142B (en) RDMA network data retransmission method, device and FPGA
CN113014505A (en) Transmission control method for time delay differentiation in high dynamic topology satellite network
WO2023147772A1 (en) Data retransmission method and apparatus, and device and storage medium
CN114390054A (en) Core network acceleration method, electronic equipment and computer storage medium
CN109586931B (en) Multicast method and terminal equipment
EP3749043A1 (en) Method and apparatus for detecting link packet loss, storage medium, and processor
CN111314961A (en) TCP transmission method, device and system
US9525629B2 (en) Method and apparatus for transmitting data packets
CN116318545A (en) Video data transmission method, device, equipment and storage medium
US9172654B2 (en) Transfer device and transfer method
CN113852445B (en) Method, system, equipment and storage medium for improving data transmission reliability
CN111385069A (en) Data transmission method and computer equipment
US11424864B2 (en) Data packet retransmission method and apparatus
CN115001632A (en) Information transmission method and device, electronic equipment and readable storage medium
CN117938980B (en) Data transmission method, device, equipment and medium applied to content distribution network

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19900353

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19900353

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04.01.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19900353

Country of ref document: EP

Kind code of ref document: A1