Audio and video data packet loss retransmission method and device, equipment and storage medium
By detecting the arrival status of audio and video data packets in real time and generating retransmission signaling requests, it solves the problem of packet loss in audio and video data transmission, improves the reliability and quality of transmission, and ensures the integrity and real-time nature of audio and video data.
Patent Information
- Application Number
- CN202411199257.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-10-01
AI Technical Summary
When existing audio and video data transmission protocols face the complexity and instability of the network environment, it is easy to cause packet loss, affecting transmission quality and user experience. The TCP protocol has high latency and UDP lacks a reliable packet loss processing mechanism.
By obtaining the audio and video data packets to be detected, determining their arrival status, determining the request retransmission list, and generating a retransmission signaling request, real-time detection and rapid retransmission of audio and video data packets are achieved to ensure data integrity.
It improves the reliability and quality of audio and video data transmission, shortens the recovery time after data packet loss, improves system response speed, and reduces the problem of audio and video quality degradation caused by data loss.
Smart Images

Figure CN118740338A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to a method, device, equipment and storage medium for retransmitting lost audio and video data. Background Art
[0002] With the rapid development of Internet technology and multimedia technology, audio and video data transmission is increasingly used in daily life and work. From live broadcasting and video conferencing to online education and telemedicine, audio and video data transmission has become an important means of modern information exchange. However, during the transmission of audio and video data, packet loss often occurs due to the complexity and instability of the network environment, which seriously affects the transmission quality and user experience of audio and video.
[0003] Traditional audio and video data transmission protocols such as TCP and UDP each have their own advantages and disadvantages. Although the TCP protocol can ensure the reliability of data transmission, its strict confirmation mechanism and retransmission strategy can easily lead to increased transmission delays and is not suitable for audio and video data transmission with high real-time requirements. Although the UDP protocol has the advantages of fast transmission speed and high real-time performance, it lacks a reliable packet loss processing mechanism, which can easily cause audio and video data loss and quality degradation.
[0004] In summary, the defects existing in the prior art need to be solved urgently. Summary of the invention
[0005] The present invention provides a method, device, equipment and storage medium for retransmitting audio and video data packet loss, which are used to solve the defects in the prior art and improve the reliability and quality of audio and video data transmission.
[0006] The present invention provides a method for retransmitting audio and video data packet loss, comprising: Acquire audio and video data to be detected, wherein the audio and video data to be detected includes a plurality of audio and video data packets; Determining the arrival status of the audio and video data packets; Determine a retransmission request list according to the arrival status, wherein the retransmission request list includes audio and video data packets that need to be retransmitted; A retransmission signaling request is generated according to the retransmission request list.
[0007] According to a method for retransmitting audio and video data packets after packet loss provided by the present invention, the audio and video data packets include sequence numbers, and the step of determining the arrival status of the audio and video data packets specifically includes: When the sequence number of the first audio and video data packet is not continuous with the sequence number of the second audio and video data packet, determining the size relationship between the sequence number of the first audio and video data packet and the sequence number of the second audio and video data packet, the first audio and video data packet is sent before the second audio and video data packet; If the sequence number of the first audio and video data packet is less than the sequence number of the second audio and video data packet, the sequence number of the missing audio and video data packet is marked as a packet loss state; If the sequence number of the first audio and video data packet is greater than the sequence number of the second audio and video data packet, the second audio and video data packet is marked as an out-of-order arrival state.
[0008] According to a method for retransmitting audio and video data packets after packet loss provided by the present invention, the audio and video data packets include a sending time, and the step of determining the arrival status of the audio and video data packets specifically includes: When the sequence numbers of the first audio and video data packet and the second audio and video data packet are continuous, and the sending time of the first audio and video data packet and the sending time interval of the second audio and video data packet exceed the current network transmission delay, the second audio and video data packet is marked as a retransmission arrival state.
[0009] According to a method for retransmitting lost audio and video data packets provided by the present invention, the step of determining a request retransmission list according to the arrival status specifically includes: Add the sequence number of the packet loss state to the list to be retransmitted; Remove the sequence numbers of the out-of-order arrival state and the sequence numbers of the retransmission arrival state from the to-be-retransmitted list; Removing expired sequence numbers from the list to be retransmitted according to the sending time and the storage capacity of the list to be retransmitted; A retransmission request list is determined according to the elements in the to-be-retransmitted list that have not triggered a retransmission instruction.
[0010] According to a method for retransmitting audio and video data packet loss provided by the present invention, the storage capacity of the to-be-retransmitted list is determined by the following steps: The number of sequence numbers received within a preset time is counted, and the number of sequence numbers is used as the storage capacity of the to-be-retransmitted list.
[0011] According to a method for retransmitting audio and video data packet loss provided by the present invention, the step of generating a retransmission signaling request according to the request retransmission list includes: When a sequence number in a packet loss state is detected, extracting sequence number information in the request retransmission list; Constructing a retransmission list data packet according to the sequence number information; The retransmission list data packet is sent to a peer device, so that the peer device can retransmit the audio and video data packets according to the retransmission list data packet.
[0012] According to a method for retransmitting audio and video data packet loss provided by the present invention, the step of generating a retransmission signaling request according to the request retransmission list includes: Extracting sequence number information from the request retransmission list; Constructing a retransmission list data packet according to the sequence number information; The retransmission list data packet is sent to the opposite-end device according to a preset sending interval, so that the opposite-end device can retransmit the audio and video data packets according to the retransmission list data packet.
[0013] The present invention also provides an audio and video data packet loss retransmission device, comprising: A data acquisition module, used to acquire audio and video data to be detected, wherein the audio and video data to be detected includes a plurality of audio and video data packets; A status judgment module, used to judge the arrival status of the audio and video data packets; A list determination module, used to determine a request retransmission list according to the arrival status, wherein the request retransmission list contains audio and video data packets that need to be retransmitted; The request generating module is used to generate a retransmission signaling request according to the request retransmission list.
[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for retransmitting audio and video data packet loss as described above is implemented.
[0015] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for retransmitting audio and video data packet loss as described in any one of the above is implemented.
[0016] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for retransmitting audio and video data packet loss.
[0017] The audio and video data packet loss retransmission method, device, equipment and storage medium provided by the present invention obtain the audio and video data to be detected, wherein the audio and video data to be detected includes a plurality of audio and video data packets; determine the arrival status of the audio and video data packets; determine a request retransmission list according to the arrival status, wherein the request retransmission list includes audio and video data packets that need to be retransmitted; and generate a retransmission signaling request according to the request retransmission list. The present invention obtains the audio and video data to be detected in real time, and instantly determines the arrival status of the audio and video data packets, thereby quickly determining the data packets that need to be retransmitted, shortening the recovery time after data packet loss and improving the response speed of the system. In addition, the generated retransmission signaling request can effectively request the retransmission of the lost packet data, ensure the integrity of the audio and video data, and reduce the problem of audio and video quality degradation caused by data loss. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 It is a flow chart of the method for retransmitting audio and video data packet loss provided by the present invention; Figure 2 It is a structural schematic diagram of the audio and video data packet loss retransmission device provided by the present invention; Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] In order to solve the problems in the prior art, the present invention proposes a method for retransmitting audio and video data packet loss to improve the reliability of audio and video transmission. The following describes the method for retransmitting audio and video data packet loss. Figure 1 As shown, including but not limited to the following steps: Step 110: Acquire audio and video data to be detected, where the audio and video data to be detected includes a plurality of audio and video data packets.
[0022] In step 110, it is necessary to obtain the audio and video data to be detected. Specifically, the receiving end device includes an audio and video receiving module, a cache module and a data processing module. The audio and video receiving module is responsible for receiving audio and video data packets from the sending end and passing them to the cache module for temporary storage. The data processing module is responsible for subsequent packet loss detection and retransmission request generation. When the receiving end device is started and connected to the network, the audio and video receiving module starts to monitor and receive audio and video data packets transmitted from the sending end. The audio and video data packets can be transmitted via a real-time transport protocol (such as RTP) or other protocols suitable for audio and video data transmission. The audio and video receiving module stores each received audio and video data packet in the cache module. The cache module can be a first-in-first-out (FIFO) data structure for temporarily storing received audio and video data packets for subsequent processing. The cache module also records the sequence number, reception time and data content of each audio and video data packet.
[0023] Step 120: Determine the arrival status of the audio and video data packets.
[0024] In step 120, it is necessary to determine the arrival status of each data packet based on the sequence number, timestamp and other identification information of the audio and video data packet. Specifically, whenever an audio and video data packet arrives, its sequence number and reception time are analyzed. Check whether the sequence numbers of the data packets in the cache are continuous one by one. If it is found that a data packet corresponding to an expected sequence number does not exist in the cache, it is determined to be a packet loss state. If it is found that the order in which the data packets are received is inconsistent with the sequence number sequence, it is determined to be an out-of-order arrival state. If the sequence number of the received data packet matches the sequence number in the retransmission request list, it is determined to be a retransmission arrival state.
[0025] Step 130: Determine a retransmission request list according to the arrival status, wherein the retransmission request list includes audio and video data packets that need to be retransmitted.
[0026] In step 130, a request retransmission list needs to be constructed. Specifically, based on step 120, the system initializes an empty retransmission request list to store the sequence numbers and other relevant information of the audio and video data packets that need to be retransmitted. The lost data packet information is read one by one from the packet loss list obtained in step 120. The sequence number, timestamp and other information of each lost data packet are added to the retransmission request list. It is determined whether there are data packets that arrive out of order or are retransmitted and can be recovered by other data packets in the cache. For example, if there are data packets that arrive out of order or are retransmitted and already exist in the cache, there is no need to retransmit.
[0027] Step 140: Generate a retransmission signaling request according to the request retransmission list.
[0028] Specifically, the audio and video data packet information that needs to be retransmitted is obtained from the request retransmission list generated in step 130. The request retransmission list includes the sequence number, timestamp and other relevant information of each data packet that needs to be retransmitted. The generated retransmission signaling request message is sent to the sending end device to notify the sending end to retransmit the data packet. During the sending process, it is necessary to ensure the reliable transmission of the request message, and a retransmission mechanism or a confirmation mechanism can be used.
[0029] It is understandable that for consecutively lost data packets, a batch retransmission request can be generated to reduce signaling overhead. For example, if the sequence number of the data packets in the request retransmission list is [1001, 1002, 1003, 1004], a retransmission request with a request range of 1001-1004 can be generated. The priority can also be set to sort the retransmission requests according to the priority information in the request retransmission list, and give priority to the retransmission requests of data packets with higher importance.
[0030] The audio and video data packet loss retransmission method provided by the present invention obtains the audio and video data to be detected, wherein the audio and video data to be detected includes a plurality of audio and video data packets; determines the arrival status of the audio and video data packets; determines a request retransmission list according to the arrival status, wherein the request retransmission list includes audio and video data packets that need to be retransmitted; and generates a retransmission signaling request according to the request retransmission list. The present invention obtains the audio and video data to be detected in real time, and instantly determines the arrival status of the audio and video data packets, thereby quickly determining the data packets that need to be retransmitted, shortening the recovery time after data packet loss and improving the response speed of the system. In addition, the generated retransmission signaling request can effectively request the retransmission of the packet loss data, ensure the integrity of the audio and video data, and reduce the problem of audio and video quality degradation caused by data loss.
[0031] As a further optional embodiment, the audio and video data packet includes a sequence number, and the step of determining the arrival status of the audio and video data packet specifically includes: When the sequence number of the first audio and video data packet is not continuous with the sequence number of the second audio and video data packet, determining the size relationship between the sequence number of the first audio and video data packet and the sequence number of the second audio and video data packet, the first audio and video data packet is sent before the second audio and video data packet; If the sequence number of the first audio and video data packet is less than the sequence number of the second audio and video data packet, the sequence number of the missing audio and video data packet is marked as a packet loss state; If the sequence number of the first audio and video data packet is greater than the sequence number of the second audio and video data packet, the second audio and video data packet is marked as an out-of-order arrival state.
[0032] In this embodiment, it is necessary to determine the arrival status of the audio and video data packets according to the sequence number in the audio and video data packets. Specifically, two adjacent audio and video data packets are taken out in sequence and recorded as the first audio and video data packet and the second audio and video data packet respectively. The sequence numbers of the first audio and video data packet and the second audio and video data packet are compared to determine whether they are continuous. When the sequence number of the first audio and video data packet is not continuous with the sequence number of the second audio and video data packet, the size relationship of the sequence numbers of the two is determined. Since the first audio and video data packet is sent before the second audio and video data packet, the sequence number should be increased in the order of sending.
[0033] If the sequence number of the first audio and video data packet plus the increment is less than the sequence number of the second audio and video data packet, it means that there are one or more lost data packets between the two. The sequence number of the missing audio and video data packet is marked as a packet loss state and added to the packet loss list. For example, if the sequence number of the first audio and video data packet is 1001 and the sequence number of the second audio and video data packet is 1003, the data packet with sequence number 1002 should be marked as a packet loss state.
[0034] If the sequence number of the first audio and video data packet is greater than the sequence number of the second audio and video data packet, it means that the second audio and video data packet arrived out of order. The second audio and video data packet is marked as arriving out of order and added to the out of order list. For example, if the sequence number of the first audio and video data packet is 1003 and the sequence number of the second audio and video data packet is 1001, the second audio and video data packet should be marked as arriving out of order.
[0035] As a further optional embodiment, the audio and video data packet includes a sending time, and the step of determining the arrival status of the audio and video data packet specifically includes: When the sequence numbers of the first audio and video data packet and the second audio and video data packet are continuous, and the sending time of the first audio and video data packet and the sending time interval of the second audio and video data packet exceed the current network transmission delay, the second audio and video data packet is marked as a retransmission arrival state.
[0036] In this embodiment, it is necessary to judge the arrival status of the audio and video data packet according to the sending time of the audio and video data packet. Specifically, two adjacent audio and video data packets are taken out in sequence, and are recorded as the first audio and video data packet and the second audio and video data packet respectively. Compare the sequence numbers of the first audio and video data packet and the second audio and video data packet to determine whether they are continuous. If continuous, proceed to the next step of checking; otherwise, process the packet loss state or the disorderly arrival state according to the previous process. Then, obtain the sending time of the first audio and video data packet and the second audio and video data packet respectively. Calculate the sending time interval of the first audio and video data packet and the second audio and video data packet. Obtain the average value or maximum value of the current network transmission delay as a reference value. The current network transmission delay can also be determined by real-time monitoring of the network status or preset value. Compare the sending time interval between the first audio and video data packet and the second audio and video data packet with the current network transmission delay. If the sending time of the first audio and video data packet and the sending time interval of the second audio and video data packet exceed the current network transmission delay, it is determined that the second audio and video data packet is in the retransmission arrival state.
[0037] As a further optional embodiment, the step of determining a request retransmission list according to the arrival status specifically includes: Add the sequence number of the packet loss state to the list to be retransmitted; Remove the sequence numbers of the out-of-order arrival state and the sequence numbers of the retransmission arrival state from the to-be-retransmitted list; Removing expired sequence numbers from the list to be retransmitted according to the sending time and the storage capacity of the list to be retransmitted; A retransmission request list is determined according to the elements in the to-be-retransmitted list that have not triggered a retransmission instruction.
[0038] In this embodiment, an empty to-be-retransmitted list can be initialized in the state detection module to store the sequence numbers and related information of the audio and video data packets that need to be retransmitted. The sequence numbers of all audio and video data packets marked as packet loss status are obtained from the packet loss list. The sequence number of each lost data packet is added to the to-be-retransmitted list. Next, the sequence numbers of the out-of-order arrival status and the retransmission arrival status are removed from the to-be-retransmitted list, and these data packets no longer require retransmission requests. Subsequently, the sending time of the audio and video data packets and the storage capacity of the current to-be-retransmitted list are compared. According to the sending time and the storage capacity setting of the to-be-retransmitted list, the sequence numbers with long storage time or exceeding the capacity limit are removed. These sequence numbers may correspond to too old packet loss status, and retransmission requests are no longer required.
[0039] Finally, the sequence numbers of the audio and video data packets that have not triggered the retransmission instruction are searched from the waiting retransmission list. This can be achieved by recording the retransmission instruction triggering status. The sequence numbers of these data packets that have not triggered the retransmission instruction are added to the final request retransmission list to ensure that only the data packets that have not been retransmitted are requested.
[0040] As a further optional embodiment, the storage capacity of the to-be-retransmitted list is determined by the following steps: The number of sequence numbers received within a preset time is counted, and the number of sequence numbers is used as the storage capacity of the to-be-retransmitted list.
[0041] In this embodiment, a preset time window is first defined, for example, 200ms. Within the preset time window, the number of sequence numbers of all received audio and video data packets is counted. These sequence numbers reflect the data packet transmission situation and traffic load in the network environment. The number of sequence numbers received within the preset time is used as the storage capacity of the list to be retransmitted. In this way, the storage capacity can be dynamically adjusted according to the actual data packet reception situation and network load to meet the data packet transmission needs in different time periods. By reasonably setting the storage capacity, it is ensured that the system can effectively process retransmission requests under high load, while avoiding resource waste and excessive storage. Through the above steps, the system can dynamically determine and optimize the storage capacity of the to-be-retransmitted list based on the actual number of audio and video data packets received, so as to ensure effective management and processing of retransmission requests under various network environments and load conditions, and ensure the stability and efficiency of audio and video data transmission.
[0042] Preferably, the capacity value of the request retransmission list is obtained through learning. When each received packet arrives sequentially, the sequence numbers of the packets received cumulatively within 200ms can be counted. When it is determined that there is packet loss, the learning process is stopped, and a range is scaled based on this value. The final value is applied to the list as the capacity value, which can effectively control the delay in the event of packet loss within 200ms and prevent the network from retransmitting more packets beyond 200ms, resulting in excessive delay and waste of bandwidth.
[0043] The above-mentioned scaling of the value within a certain range requires a scaling coefficient, which is recorded as the frag variable. The last_rtt variable represents the network round-trip transmission delay value when there is no packet loss, and now_rtt represents the network round-trip transmission delay value when the coefficient is currently calculated.
[0044] The coefficient is calculated as: frag = min{ last_rtt / now_rtt, 0.3}. This expression reflects the situation when packet loss occurs. If the rtt value of the current network when packet loss occurs is doubled compared to when there is no packet loss, the coefficient value is 0.5, and the capacity value is halved. In order to avoid extreme data due to network jitter, a minimum limit of 0.3 is added.
[0045] As a further optional embodiment, the step of generating a retransmission signaling request according to the request retransmission list includes: When a sequence number in a packet loss state is detected, extracting sequence number information in the request retransmission list; Constructing a retransmission list data packet according to the sequence number information; The retransmission list data packet is sent to a peer device, so that the peer device can retransmit the audio and video data packets according to the retransmission list data packet.
[0046] In this embodiment, when it is determined that the input data packet is in a packet loss state, a request retransmission list will be output. Specifically, based on the trigger when packet loss occurs, it is determined that the input packet state is a packet loss state. When a packet is received, it is determined whether packet loss occurs. If packet loss occurs, a retransmission is triggered, and a request retransmission list is immediately output and added to the list to be retransmitted. In this way, all sequence numbers will only trigger a retransmission request once when packet loss occurs.
[0047] As a further optional embodiment, the step of generating a retransmission signaling request according to the request retransmission list includes: Extracting sequence number information from the request retransmission list; Constructing a retransmission list data packet according to the sequence number information; The retransmission list data packet is sent to the opposite-end device according to a preset sending interval, so that the opposite-end device can retransmit the audio and video data packets according to the retransmission list data packet.
[0048] In this embodiment, the request retransmission list can be triggered and outputted at a fixed time. Since packet loss may continue to occur during the process of triggering retransmission based on packet loss, the timer needs to be enabled to continue traversing the list of packets to be retransmitted if the packet has not been retransmitted by the other end after requesting a retransmission. Select the elements that meet the current time rule from the list of packets to be retransmitted, and output a request retransmission list. Each time the timer is triggered, it is determined whether all sequence numbers have triggered retransmission. If so, it is determined whether the time between the sequence number and the last time the retransmission was triggered is greater than the round-trip transmission delay of a network.
[0049] The following is a description of the audio and video data packet loss retransmission device provided by the present invention. Figure 2 As shown, the apparatus for retransmitting audio and video data packet loss described below and the method for retransmitting audio and video data packet loss described above can refer to each other.
[0050] An audio and video data packet loss retransmission device, comprising: The data acquisition module 210 is used to acquire the audio and video data to be detected, wherein the audio and video data to be detected includes a plurality of audio and video data packets; A status determination module 220, configured to determine the arrival status of the audio and video data packets; A list determination module 230, configured to determine a retransmission request list according to the arrival status, wherein the retransmission request list includes audio and video data packets that need to be retransmitted; The request generating module 240 is configured to generate a retransmission signaling request according to the retransmission request list.
[0051] Figure 3 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the audio and video data packet loss retransmission method, which includes: Acquire audio and video data to be detected, wherein the audio and video data to be detected includes a plurality of audio and video data packets; Determining the arrival status of the audio and video data packets; Determine a retransmission request list according to the arrival status, wherein the retransmission request list includes audio and video data packets that need to be retransmitted; A retransmission signaling request is generated according to the retransmission request list.
[0052] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0053] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the audio and video data packet loss retransmission method provided by the above methods, the method includes: Acquire audio and video data to be detected, wherein the audio and video data to be detected includes a plurality of audio and video data packets; Determining the arrival status of the audio and video data packets; Determine a retransmission request list according to the arrival status, wherein the retransmission request list includes audio and video data packets that need to be retransmitted; A retransmission signaling request is generated according to the retransmission request list.
[0054] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for retransmitting audio and video data packet loss provided by the above methods is implemented, and the method includes: Acquire audio and video data to be detected, wherein the audio and video data to be detected includes a plurality of audio and video data packets; Determining the arrival status of the audio and video data packets; Determine a retransmission request list according to the arrival status, wherein the retransmission request list includes audio and video data packets that need to be retransmitted; A retransmission signaling request is generated according to the retransmission request list.
[0055] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0056] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0057] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for retransmitting audio and video data packet loss, characterized in that: include: Acquire audio and video data to be detected, wherein the audio and video data to be detected includes a plurality of audio and video data packets; Determining the arrival status of the audio and video data packets; Determine a retransmission request list according to the arrival status, wherein the retransmission request list includes audio and video data packets that need to be retransmitted; Generate a retransmission signaling request according to the request retransmission list; The audio and video data packet includes a sequence number, and the step of determining the arrival status of the audio and video data packet specifically includes: When the sequence number of the first audio and video data packet is not continuous with the sequence number of the second audio and video data packet, determining the size relationship between the sequence number of the first audio and video data packet and the sequence number of the second audio and video data packet, the first audio and video data packet is sent before the second audio and video data packet; If the sequence number of the first audio and video data packet is less than the sequence number of the second audio and video data packet, the sequence number of the missing audio and video data packet is marked as a packet loss state; If the sequence number of the first audio and video data packet is greater than the sequence number of the second audio and video data packet, marking the second audio and video data packet as an out-of-order arrival state; The audio and video data packet includes a sending time, and the step of determining the arrival status of the audio and video data packet specifically includes: When the sequence numbers of the first audio and video data packet and the second audio and video data packet are continuous, and the sending time of the first audio and video data packet and the sending time interval of the second audio and video data packet exceed the current network transmission delay, the second audio and video data packet is marked as a retransmission arrival state.
2. The method for retransmitting audio and video data packet loss according to claim 1, characterized in that: The step of determining the request retransmission list according to the arrival status specifically includes: Add the sequence number of the packet loss state to the list to be retransmitted; Remove the sequence numbers of the out-of-order arrival state and the sequence numbers of the retransmission arrival state from the to-be-retransmitted list; Removing expired sequence numbers from the list to be retransmitted according to the sending time and the storage capacity of the list to be retransmitted; A retransmission request list is determined according to the elements in the to-be-retransmitted list that have not triggered a retransmission instruction.
3. The method for retransmitting audio and video data packet loss according to claim 2, characterized in that: The storage capacity of the to-be-retransmitted list is determined by the following steps: The number of sequence numbers received within a preset time is counted, and the number of sequence numbers is used as the storage capacity of the to-be-retransmitted list.
4. The method for retransmitting audio and video data packet loss according to claim 1, characterized in that: The step of generating a retransmission signaling request according to the request retransmission list includes: When a sequence number in a packet loss state is detected, extracting sequence number information in the request retransmission list; Constructing a retransmission list data packet according to the sequence number information; The retransmission list data packet is sent to a peer device, so that the peer device can retransmit the audio and video data packets according to the retransmission list data packet.
5. The method for retransmitting audio and video data packet loss according to claim 1, characterized in that: The step of generating a retransmission signaling request according to the request retransmission list includes: Extracting sequence number information from the request retransmission list; Constructing a retransmission list data packet according to the sequence number information; The retransmission list data packet is sent to the opposite-end device according to a preset sending interval, so that the opposite-end device can retransmit the audio and video data packets according to the retransmission list data packet.
6. An audio and video data packet loss retransmission device, characterized in that: include: A data acquisition module, used to acquire audio and video data to be detected, wherein the audio and video data to be detected includes a plurality of audio and video data packets; A status judgment module, used to judge the arrival status of the audio and video data packets; A list determination module, used to determine a request retransmission list according to the arrival status, wherein the request retransmission list contains audio and video data packets that need to be retransmitted; The request generating module is used to generate a retransmission signaling request according to the request retransmission list.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for retransmitting audio and video data packet loss as described in any one of claims 1 to 5 is implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for retransmitting audio and video data packet loss as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Packet loss retransmission method for achieving flow control
CN104768081A
Video data transmission method and device
CN106792262A
Audio and video communication method, terminal, server, computer equipment and storage medium
CN113497792A
Cited By
Wireless multicast audio transmission method, device and system
CN121485878A
