Packet loss processing method and device in multicast scene, equipment and storage medium
Through the collaborative retransmission mechanism between terminals within the multicast group, the problem of UDP packet loss in OTT network TV live broadcast is solved, the reliability and stability of live video broadcast is improved, the user experience is improved, and the network burden is reduced.
Patent Information
- Application Number
- CN202410147296.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-01
- Publication Date
- 2025-08-01
AI Technical Summary
In OTT network TV live broadcast, video packet loss caused by the multicast transmission layer protocol is UDP cannot be recovered, which affects the user's viewing experience. The existing solutions increase network construction costs or server pressure, and the retransmission quality is unstable.
Coordinately retransmit lost packets between terminals in the multicast group, and by generating retransmission requests and obtaining lost packets from other terminals for playback processing, the collaborative retransmission mechanism in the LAN can reduce network overhead and delay.
Improve the reliability and stability of live video broadcasts, improve user viewing experience, reduce network overhead and delay, reduce operational costs, and avoid network congestion and server pressure.
Smart Images

Figure CN120416614A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of television live broadcast, and in particular to a method, device, equipment and storage medium for packet loss processing in a multicast scenario. Background Art
[0002] Currently, in OTT (Over The Top) network television live broadcast, IP multicast is usually used for video stream replication and transmission. If the network is unstable, especially the network fluctuation in the last kilometer of household access, it will cause packet loss of video live broadcast data, resulting in a decline in the user viewing experience. At the same time, since the multicast transport layer protocol is UDP (User Datagram Protocol), it does not guarantee the reliability of communication, and packet loss cannot be recovered when it occurs, resulting in decoding failure at the user end and abnormal phenomena such as mosaic and pause, seriously affecting the viewing effect. At the same time, the OTT network television service shares the broadband access network with the original Internet service, and instantaneous packet loss is inevitable. After the client accesses the live broadcast channel, it joins the multicast group to receive the multicast stream, and establishes TCP (Transmission Control Protocol) and UDP connections with the streaming media server. When the client detects multicast packet loss, it directly requests the live broadcast server to retransmit the lost data packets through the TCP connection. Currently, there are mainly three solutions to solve the problem of multicast packet loss: increasing the line bandwidth at the physical layer, forward error control scheme, and establishing a dedicated TCP channel for packet loss retransmission.
[0003] The solution of increasing the line bandwidth at the physical layer can improve the reliability of data transmission, but it increases the network construction cost and cannot fundamentally solve the problem. In particular, packet loss may still occur during peak playback. Although the forward error correction scheme can increase redundant data for data recovery, the bandwidth increases significantly, and the recovery ability is limited, especially in the case of continuous packet loss. The solution of establishing a dedicated TCP channel for packet loss retransmission can request packet loss retransmission through the TCP channel, improving the error correction ability. However, a large number of long connections on the client increase the pressure on the server, and the retransmission recovery quality is very sensitive to the transmission delay. The long-distance transmission delay is uncontrollable, and it increases the vertical network traffic, which may increase the network load again and exacerbate network congestion. Summary of the Invention
[0004] The present invention provides a method, device, equipment and storage medium for packet loss processing in a multicast scenario to solve the defects in the foregoing prior art.
[0005] The present invention provides a method for packet loss processing in a multicast scenario, including:
[0006] Receive a video stream data packet. If packet loss is detected, determine first identification information corresponding to a first lost data packet based on the video stream data packet, and generate a first retransmission request according to the first identification information;
[0007] Send the first retransmission request to other terminals within the multicast group corresponding to the current terminal, so that the other terminals return the first lost data packet according to the first retransmission request; wherein, the other terminals are terminals other than the current terminal within the multicast group;
[0008] Receive the first lost data packet returned by the other terminals, and perform playback processing on the first lost data packet.
[0009] According to a packet loss processing method in a multicast scenario provided by the present invention, the method further includes:
[0010] If a second retransmission request sent by the other terminals is received, determine second identification information corresponding to the second retransmission request;
[0011] Detect whether there is historical identification information matching the second identification information in the local cache;
[0012] If there is, use the historical original data packet corresponding to the matching historical identification information in the local cache as a second lost data packet, and send the second lost data packet to the other terminal corresponding to the second retransmission request.
[0013] According to a packet loss processing method in a multicast scenario provided by the present invention, the generating the first retransmission request according to the first identification information includes:
[0014] Obtain the channel information and video format corresponding to the video stream data packet;
[0015] Combine the channel information, the video format, and the first identification information corresponding to at least one of the first lost data packets to generate the first retransmission request.
[0016] According to a packet loss processing method in a multicast scenario provided by the present invention, after receiving the video stream data packet, the method further includes:
[0017] Decapsulate the video stream data packet, and read the identification information in the video stream data packet;
[0018] Obtain the historical identification information in the previous received historical video stream data packet currently received, and detect whether the identification information is continuous with the historical identification information;
[0019] If it is detected that they are not continuous, determine that packet loss has occurred.
[0020] A method for handling packet loss in a multicast scenario provided by the present invention further includes:
[0021] Periodically receiving node information sent by the other terminals; and
[0022] Periodically sending node information of the current terminal to the other terminals; wherein, the node information includes node IP address information and channel information.
[0023] A method for handling packet loss in a multicast scenario provided by the present invention, after receiving the video stream data packet, the method further includes:
[0024] If no packet loss is detected, read the identification information and the original data packet in the video stream data packet;
[0025] Cache the identification information and the original data packet in the form of a hash.
[0026] A method for handling packet loss in a multicast scenario provided by the present invention, the step of sending the first retransmission request to other terminals in the multicast group corresponding to the current terminal includes:
[0027] Randomly determine one of the other terminals in the multicast group as the target terminal;
[0028] Send the first retransmission request to the target terminal.
[0029] The present invention further provides a packet loss handling device in a multicast scenario, including:
[0030] A first receiving module, configured to receive video stream data packets, if packet loss is detected, determine first identification information corresponding to the first lost data packet based on the video stream data packet, and generate a first retransmission request according to the first identification information;
[0031] A sending module, configured to send the first retransmission request to other terminals in the multicast group corresponding to the current terminal, so that the other terminals return the first lost data packet according to the first retransmission request; wherein, the other terminals are terminals in the multicast group other than the current terminal;
[0032] A second receiving module, configured to receive the first lost data packet returned by the other terminals and perform playback processing on the first lost data packet.
[0033] The present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, it implements the method for handling packet loss in a multicast scenario as described in any one of the above.
[0034] 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, it implements the packet loss handling method in any of the above-mentioned multicast scenarios.
[0035] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the packet loss handling method in any of the above-mentioned multicast scenarios.
[0036] A packet loss handling method, device, equipment and storage medium in a multicast scenario provided by the present invention. The current terminal receives video stream data packets. After detecting packet loss, it determines the first identification information corresponding to the first lost data packet based on the video stream data packets, then generates a first retransmission request according to the first identification information, and sends the generated first retransmission request to other terminals in the multicast group corresponding to the current terminal. After receiving the first retransmission request, the other terminals return the corresponding first lost data packets. The current terminal receives the first lost data packets returned by the other terminals and performs playback processing on the first lost data packets. According to the technical solution provided by the present invention, when packet loss occurs, it requests the first lost data packets from other terminals in the multicast group, realizes cooperative retransmission among the terminals in the multicast group, can efficiently recover video live data in a weak network environment, improve the reliability and stability of video live broadcast, improve the user viewing experience, and increase the user retention rate. At the same time, the cooperative retransmission among the terminals in the multicast group is carried out within the local area network. While realizing packet loss recovery, it reduces the network overhead and delay. And since it does not involve punching through holes, it effectively avoids problems such as punching failure and reduces the occupation of public network IP ports. The establishment of the network channel and data transmission are also more stable and convenient. The technical solution provided by the present invention realizes the effect of resisting weak network through cooperative retransmission between end-side horizontal traffic without involving network transformation and without adding additional pressure on the server and gateway, greatly reducing the weak network retransmission delay and network vertical traffic, and reducing the bandwidth requirement and operation cost of the broadband access network. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0038] Figure 1 is one of the schematic flowcharts of the packet loss handling method in the multicast scenario provided by the present invention;
[0039] Figure 2 is a schematic diagram of the data protocol structure of the video stream data packet provided by the present invention;
[0040] Figure 3 It is the second schematic flow chart of the packet loss handling method in the multicast scenario provided by the present invention;
[0041] Figure 4 It is the schematic flow chart of step 110 in the embodiment provided by the present invention;
[0042] Figure 5 It is the schematic diagram of the request protocol format of the retransmission request provided by the present invention;
[0043] Figure 6 It is the third schematic flow chart of the packet loss handling method in the multicast scenario provided by the present invention;
[0044] Figure 7 It is the schematic diagram of information interaction between terminals within the multicast group provided by the present invention;
[0045] Figure 8 It is the fourth schematic flow chart of the packet loss handling method in the multicast scenario provided by the present invention;
[0046] Figure 9 It is the schematic flow chart of step 120 in the embodiment provided by the present invention;
[0047] Figure 10 It is the schematic structural diagram of the packet loss handling device in the multicast scenario provided by the present invention;
[0048] Figure 11 It is the schematic structural diagram of the electronic device provided by the present invention. Detailed implementation manners
[0049] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without creative efforts shall fall within the protection scope of the present invention.
[0050] Below, in conjunction with Figures 1-9 Describe the packet loss handling method in the multicast scenario of the present invention.
[0051] Figure 1 It is the flow chart of a packet loss handling method in a multicast scenario shown according to an exemplary embodiment. As Figure 1 shown, in an exemplary embodiment, the packet loss handling method in a multicast scenario includes steps 110 to 130, which are introduced in detail as follows:
[0052] Step 110: Receive video stream data packets. If packet loss is detected, determine the first identification information corresponding to the first lost data packet based on the video stream data packets, and generate a first retransmission request according to the first identification information.
[0053] In the embodiment of the present invention, the video source generates a video stream from the live content and sends the generated video stream to the streaming media server. The streaming media server receives the video stream, encodes and slices the video content to generate video stream data packets, and uniformly encodes the video stream data packets. The method of using the channel ID + video format + identification information is used to uniquely identify each video stream data packet, where the identification information is consecutive numbers, which not only ensures the uniqueness of each video stream data packet but also facilitates the detection of problems such as packet loss or out-of-order. The data protocol structure of the video stream data packet is as Figure 2 shown, including an Ethernet packet header, an IP packet header, a UDP packet header, and a data part. The data part includes channel information, video format, identification information, and the original data packet, and the channel information is the channel ID of the corresponding live content.
[0054] After the streaming media server generates the video stream data packets, it transmits the video stream data packets to the cell gateway in the form of multicast, and the cell gateway then sends the received video stream data packets to the terminal in the form of multicast. Before receiving the video stream data packets, the terminal needs to join the corresponding multicast group, and the multicast group is composed of terminals listening to the same live content.
[0055] The current terminal receives the video stream data packets forwarded by the cell gateway, and then detects whether packet loss occurs according to the received video stream data packets.
[0056] In the embodiment of the present invention, after it is determined that packet loss has occurred according to the received video stream data packets, the first identification information corresponding to the first lost data packet is determined based on the video stream data packets, and a first retransmission request is generated according to the first identification information.
[0057] Step 120: Send the first retransmission request to other terminals within the multicast group corresponding to the current terminal, so that the other terminals return the first lost data packet according to the first retransmission request; where the other terminals are terminals other than the current terminal within the multicast group.
[0058] In the embodiment of the present invention, the set-top box of the current terminal machine looks up the address information of other terminals within the multicast group in the local data table, and then sends the first retransmission request to other terminals within the multicast group corresponding to the current terminal. The other terminals are terminals other than the current terminal within the multicast group. After receiving the first retransmission request, the other terminals use the data packet corresponding to the first identification information in the first retransmission request in the local cache as the first lost data packet and return it to the current terminal.
[0059] Step 130: Receive the first lost data packet returned by the other terminal, and perform playback processing on the first lost data packet.
[0060] In an embodiment of the present invention, after the current terminal receives the first lost data packet sent by the other terminal, subsequent processing such as decoding, rendering, and playing is performed on the received first lost data packet.
[0061] In an embodiment of the present invention, the current terminal receives video stream data packets. After detecting packet loss, the first identification information corresponding to the first lost data packet is determined based on the video stream data packets, and then a first retransmission request is generated according to the first identification information. The generated first retransmission request is sent to other terminals within the multicast group corresponding to the current terminal. After receiving the first retransmission request, the other terminals return the corresponding first lost data packet. The current terminal receives the first lost data packet returned by the other terminal and performs playback processing on the first lost data packet. According to the technical solution provided by the present invention, when packet loss occurs, the first lost data packet is requested from other terminals within the multicast group, realizing cooperative retransmission among the terminals within the multicast group. Video live data can be efficiently restored in a weak network environment, improving the reliability and stability of video live broadcast, enhancing the user viewing experience, and increasing the user retention rate. At the same time, the cooperative retransmission among the terminals within the multicast group is carried out within the local area network, reducing the network overhead and latency while realizing packet loss recovery. And since it does not involve hole punching, problems such as hole punching failure and reduction of public network IP port occupation are effectively avoided, and the establishment of the network channel and data transmission are also more stable and convenient. The technical solution provided by the present invention realizes anti-weak network through lateral traffic on the terminal side without involving network transformation and without increasing the additional pressure on the server and gateway, greatly reducing the weak network retransmission latency and network vertical traffic, reducing the bandwidth requirement and operating cost of the broadband access network.
[0062] In an exemplary embodiment of the present invention, please refer to Figure 3 , the method further includes steps 310 to 330, which are introduced in detail as follows:
[0063] Step 310: If a second retransmission request sent by the other terminal is received, determine the second identification information corresponding to the second retransmission request.
[0064] In an embodiment of the present invention, if the current terminal receives a second retransmission request sent by another terminal within the multicast group, it determines the second identification information corresponding to the second retransmission request.
[0065] Step 320: Detect whether there is historical identification information matching the second identification information in the local cache.
[0066] In an embodiment of the present invention, the video stream data packets received by the current terminal under normal circumstances are stored in the local cache. The identification information in the video stream data packets cached in the local cache is used as historical identification information, and at the same time, the original data packets in the video stream data packets are used as historical data packets. The identification information and the original data packets in the same video stream data packet correspond to each other.
[0067] After the current terminal receives the second retransmission request, it traverses all the historical identification information in the local cache to detect whether there is historical identification information that matches the second identification information in the received second retransmission request.
[0068] Step 330, if there is a match, use the historical original data packet corresponding to the matching historical identification information in the local cache as the second lost data packet, and send the second lost data packet to the other terminal corresponding to the second retransmission request.
[0069] In an embodiment of the present invention, after detecting that there is historical identification information in the local cache that matches the second identification information in the received second retransmission request, use the historical original data packet corresponding to the matching historical identification information as the second lost data packet, and then send the second lost data packet to the other terminal that sent the second retransmission request.
[0070] In an embodiment of the present invention, if no historical identification information that matches the second identification information in the received second retransmission request is detected in the local cache, inform the other terminal that sent the second retransmission request to request again from other terminals, so as to achieve multi-terminal collaborative retransmission.
[0071] In an exemplary embodiment of the present invention, please refer to Figure 4 , in step 110 of generating the first retransmission request according to the first identification information, it includes steps 410 to 420, which are introduced in detail as follows:
[0072] Step 410, obtain the channel information and video format corresponding to the video stream data packet.
[0073] In an embodiment of the present invention, the data format of the video stream data packet is as Figure 2 shown. The video stream data packet is unpacked, and the channel information and video format are read out from it.
[0074] Step 420, combine the channel information, the video format, and the first identification information corresponding to at least one of the first lost data packets to generate the first retransmission request.
[0075] In an embodiment of the present invention, channel information, video format, and first identification information of at least one first lost data packet are combined to obtain a first retransmission request. The request protocol formats of the first retransmission request and the second retransmission request in the embodiments of the present invention are both as Figure 5 shown.
[0076] In an embodiment of the present invention, the retransmission request supports obtaining one or more lost data packets at a time. Since these retransmission requests are carried out within a multicast group, that is, within a local area network, network overhead and latency can be reduced.
[0077] In an exemplary embodiment of the present invention, please refer to Figure 6 , after receiving the video stream data packet in step 110, the method further includes steps 610 to 630, which are introduced in detail as follows:
[0078] Step 610, de-encapsulate the video stream data packet and read the identification information in the video stream data packet.
[0079] In an embodiment of the present invention, the received video stream data packet is de-encapsulated and the identification information in the video stream data packet is read.
[0080] Step 620, obtain the historical identification information in the previous received historical video stream data packet currently received, and detect whether the identification information is continuous with the historical identification information.
[0081] In an embodiment of the present invention, the previous received historical video stream data packet currently received is obtained, and then the corresponding historical identification information is read from the previous received historical video stream data packet, and it is detected whether the identification information is continuous with the historical identification information. As described above, the identification information is consecutive numbers. For example, if the current identification information is 13 and the historical identification information is 11, then the two are not continuous, indicating that the video stream data packet with the identification information of 12 is lost. Otherwise, no packet loss occurs. When it is determined that packet loss occurs, the original data packet of the lost video stream data packet is used as the first lost data packet, and the corresponding identification information is used as the first identification information.
[0082] Step 630, if discontinuity is detected, determine that packet loss has occurred.
[0083] In an embodiment of the present invention, when it is detected that the identification information in the currently received video stream data packet is not continuous with the historical identification information in the previous received historical video stream data packet, it can be determined that packet loss has occurred.
[0084] In an exemplary embodiment of the present invention, the method further includes one or more of the following, which are introduced in detail as follows:
[0085] Periodically receive the node information sent by the other terminal;
[0086] Periodically send the node information of the current terminal to the other terminals; wherein, the node information includes node IP address information and channel information.
[0087] In an embodiment of the present invention, after the current terminal joins the corresponding multicast group, it simultaneously enables the listening of 2 ports. One port is used to receive video stream data packets, and one port is used to receive the node information synchronously sent by other terminals at regular intervals. Each terminal in the multicast group acts as a node, and the node IP address information is the IP address information corresponding to the terminal. After the current terminal receives the node information of other terminals in the multicast group, it needs to record it locally to facilitate subsequent sending of retransmission requests to other terminals according to the node IP address information. The current terminal starts a timing task and sends its own node information to other terminals in the multicast group at regular intervals.
[0088] Specifically, the process of information interaction between terminals in the multicast group is as Figure 7 shown. Terminal A periodically sends the corresponding node information in the form of multicast. The gateway forwards the corresponding multicast packet to Terminal B. After Terminal B receives the corresponding multicast packet, it updates the node information of other terminals stored locally in the local data table. At the same time, Terminal B periodically sends the corresponding node information in the form of multicast. The gateway forwards the corresponding multicast packet to Terminal A. After Terminal A receives the corresponding multicast packet, it updates the node information of other terminals stored locally in the local data table.
[0089] In an exemplary embodiment of the present invention, please refer to Figure 8 , after receiving the video stream data packets in step 110, the method further includes steps 810 to 820, which are introduced in detail as follows:
[0090] Step 810, if no packet loss is detected, read the identification information and the original data packet in the video stream data packet.
[0091] In an embodiment of the present invention, if no packet loss is detected according to the video stream data packet, the video stream data packet is unpacked, and the identification information and the original data packet in the video stream data packet are read.
[0092] Step 820, cache the identification information and the original data packet in the form of hash.
[0093] In an embodiment of the present invention, the obtained video stream data packets are cached, and the cache time can be determined according to terminal configuration and requirements such as anti-poor network delay. Specifically, cache in the form of hash (hash), where the key is the identification information and the value is the original data packet.
[0094] In the embodiment of the present invention, the obtained original data packets are cached locally, so that after receiving the second retransmission request, the corresponding original data packets can be found from the local cache for lost packet retransmission. Through the cooperative retransmission between the local cache and the set-top box of the terminal, the video live broadcast data can be efficiently restored in a weak network environment, improving the user viewing experience.
[0095] In an exemplary embodiment of the present invention, please refer to Figure 9 , in step 120 of sending the first retransmission request to other terminals within the multicast group corresponding to the current terminal, it includes steps 910 to 920, which are introduced in detail as follows:
[0096] Step 920, randomly determine one of the other terminals within the multicast group as the target terminal.
[0097] In the embodiment of the present invention, there are usually multiple users watching the same live broadcast content. Therefore, there are multiple terminals within the multicast group. When the current terminal needs to perform lost packet retransmission, randomly determine one of the other terminals within the multicast group as the target terminal.
[0098] Step 920, send the first retransmission request to the target terminal.
[0099] In the embodiment of the present invention, the first retransmission request is directly sent to the target terminal. In an embodiment of the present invention, when the target terminal returns that its corresponding local cache does not have the corresponding historical original data packets, then determine one of the other terminals as the target terminal again, and send the first retransmission request to the newly determined target terminal, and so on, until a target terminal returns the corresponding historical original data packets. If after traversing all other terminals within the multicast group, none of them have the corresponding historical original data packets, then send the first retransmission request to the streaming media server, and the streaming media server realizes lost packet retransmission.
[0100] Next, the lost packet processing device in the multicast scenario provided by the present invention will be described. The lost packet processing device in the multicast scenario described below can be correspondingly referred to the multicast scenario lost packet processing method described above. It should be noted that the device provided in the following embodiments and the method provided in the above embodiments belong to the same concept. The specific ways in which each module and unit perform operations have been described in detail in the method embodiments, and will not be repeated here.
[0101] In an exemplary embodiment of the present invention, please refer to Figure 10 , Figure 10 is a lost packet processing device in a multicast scenario shown according to an exemplary embodiment, including:
[0102] The first receiving module 1010 is configured to receive video stream data packets. If packet loss is detected, it determines first identification information corresponding to the first lost data packet based on the video stream data packets, and generates a first retransmission request according to the first identification information;
[0103] The sending module 1020 is configured to send the first retransmission request to other terminals within the multicast group corresponding to the current terminal, so that the other terminals return the first lost data packet according to the first retransmission request; wherein, the other terminals are terminals other than the current terminal within the multicast group;
[0104] The second receiving module 1030 is configured to receive the first lost data packet returned by the other terminals, and perform playback processing on the first lost data packet.
[0105] In an exemplary embodiment of the present invention, the packet loss handling device in the multicast scenario further includes:
[0106] The determination module is configured to, if receiving a second retransmission request sent by the other terminal, determine second identification information corresponding to the second retransmission request;
[0107] The detection module is configured to detect whether there is historical identification information matching the second identification information in the local cache;
[0108] The acting module is configured to, if there is, use the historical original data packet corresponding to the matching historical identification information in the local cache as the second lost data packet, and send the second lost data packet to the other terminal corresponding to the second retransmission request.
[0109] In an exemplary embodiment of the present invention, the first receiving module 1010 includes:
[0110] The acquisition sub-module is configured to acquire the channel information and video format corresponding to the video stream data packets;
[0111] The combination sub-module is configured to combine the channel information, the video format, and the first identification information corresponding to at least one of the first lost data packets to generate the first retransmission request.
[0112] In an exemplary embodiment of the present invention, the packet loss handling device in the multicast scenario further includes:
[0113] The de-encapsulation sub-module is configured to de-encapsulate the video stream data packets and read the identification information in the video stream data packets;
[0114] The detection sub-module is configured to obtain the historical identification information in the historical video stream data packet received previously and currently, and detect whether the identification information is continuous with the historical identification information;
[0115] The determination sub-module is configured to determine that a packet loss has occurred if discontinuity is detected.
[0116] In an exemplary embodiment of the present invention, the packet loss handling device in the multicast scenario further includes:
[0117] The timing reception module is configured to receive the node information sent by the other terminals at regular intervals; and
[0118] The timing transmission module is configured to send the node information of the current terminal to the other terminals at regular intervals; wherein, the node information includes node IP address information and channel information.
[0119] In an exemplary embodiment of the present invention, the packet loss handling device in the multicast scenario further includes:
[0120] The reading module is configured to read the identification information and the original data packet in the video stream data packet if no packet loss is detected;
[0121] The caching module is configured to cache the identification information and the original data packet in the form of a hash.
[0122] In an exemplary embodiment of the present invention, the sending module 1020 includes:
[0123] The random determination sub-module is configured to randomly determine one of the other terminals in the multicast group as the target terminal;
[0124] The sending sub-module is configured to send the first retransmission request to the target terminal.
[0125] Figure 11 Illustrates a schematic diagram of the physical structure of an electronic device, as Figure 11 shown, the electronic device may include: a processor 1110, a communication interface 1120, a memory 1130, and a communication bus 1140. Among them, the processor 1110, the communication interface 1120, and the memory 1130 complete mutual communication through the communication bus 1140. The processor 1110 can call the logical instructions in the memory 1130 to execute the packet loss handling method in the multicast scenario, and this method includes:
[0126] Receive a video stream data packet. If a packet loss is detected, determine first identification information corresponding to a first lost data packet based on the video stream data packet, and generate a first retransmission request according to the first identification information;
[0127] Send the first retransmission request to other terminals within the multicast group corresponding to the current terminal, so that the other terminals return the first lost data packet according to the first retransmission request; wherein, the other terminals are terminals other than the current terminal within the multicast group;
[0128] Receive the first lost data packet returned by the other terminals, and perform playback processing on the first lost data packet.
[0129] In addition, when the logic instructions in the above-mentioned memory 1130 are implemented in the form of a software functional unit and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0130] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program that 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 packet loss processing method in the multicast scenario provided by the above-mentioned various methods. The method includes:
[0131] Receive a video stream data packet. If a packet loss is detected, determine first identification information corresponding to a first lost data packet based on the video stream data packet, and generate a first retransmission request according to the first identification information;
[0132] Send the first retransmission request to other terminals within the multicast group corresponding to the current terminal, so that the other terminals return the first lost data packet according to the first retransmission request; wherein, the other terminals are terminals other than the current terminal within the multicast group;
[0133] Receive the first lost data packet returned by the other terminals, and perform playback processing on the first lost data packet.
[0134] In another aspect, 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, it implements a packet loss processing method in a multicast scenario provided by the above-mentioned various methods. The method includes:
[0135] Receiving a video stream data packet. If it is detected that a packet loss occurs, determining first identification information corresponding to a first lost data packet based on the video stream data packet, and generating a first retransmission request according to the first identification information;
[0136] Sending the first retransmission request to other terminals within the multicast group corresponding to the current terminal, so that the other terminals return the first lost data packet according to the first retransmission request; wherein, the other terminals are terminals other than the current terminal within the multicast group;
[0137] Receiving the first lost data packet returned by the other terminals, and performing playback processing on the first lost data packet.
[0138] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative labor.
[0139] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., and includes several instructions for causing 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.
[0140] 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 foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present invention.
Claims
1. A method for handling packet loss in a multicast scenario, characterized in that, Including: Receiving a video stream data packet. If a packet loss is detected, determining first identification information corresponding to a first lost data packet based on the video stream data packet, and generating a first retransmission request according to the first identification information; Sending the first retransmission request to other terminals within a multicast group corresponding to the current terminal, so that the other terminals return the first lost data packet according to the first retransmission request; wherein, the other terminals are terminals other than the current terminal within the multicast group; Receiving the first lost data packet returned by the other terminals, and performing playback processing on the first lost data packet.
2. The packet loss handling method in the multicast scenario according to claim 1, wherein The method further includes: If a second retransmission request sent by the other terminals is received, determining second identification information corresponding to the second retransmission request; Detecting whether there is historical identification information matching the second identification information in the local cache; If it exists, using the historical original data packet corresponding to the matching historical identification information in the local cache as a second lost data packet, and sending the second lost data packet to the other terminal corresponding to the second retransmission request.
3. The packet loss handling method in the multicast scenario according to claim 1, characterized in that The generating the first retransmission request according to the first identification information includes: Obtaining channel information and video format corresponding to the video stream data packet; Combining the channel information, the video format, and the first identification information corresponding to at least one of the first lost data packets to generate the first retransmission request.
4. The packet loss handling method in the multicast scenario according to claim 1, wherein After receiving the video stream data packet, the method further includes: Decapsulating the video stream data packet, and reading the identification information in the video stream data packet; Obtaining historical identification information in a previous received historical video stream data packet currently received, and detecting whether the identification information is continuous with the historical identification information; If it is detected that they are not continuous, determining that a packet loss has occurred.
5. The method for handling packet loss in a multicast scenario according to claim 1, wherein The method further includes: Receiving node information sent by the other terminals at regular intervals; and Sending node information of the current terminal to the other terminals at regular intervals; wherein, the node information includes node IP address information and channel information.
6. The packet loss handling method in the multicast scenario according to claim 1, characterized in that, After receiving the video stream data packet, the method further includes: If no packet loss is detected, reading the identification information and the original data packet in the video stream data packet; Caching the identification information and the original data packet in a hash form.
7. The packet loss handling method in the multicast scenario according to any one of claims 1 to 6, characterized in that, The sending the first retransmission request to other terminals within a multicast group corresponding to the current terminal includes: Randomly determining one of the other terminals within the multicast group as a target terminal; Sending the first retransmission request to the target terminal.
8. A packet loss handling device in a multicast scenario, characterized in that, Including: A first receiving module, configured to receive a video stream data packet. If a packet loss is detected, determining first identification information corresponding to a first lost data packet based on the video stream data packet, and generating a first retransmission request; A sending module, configured to send the first retransmission request to other terminals within the multicast group corresponding to the current terminal, so that the other terminals return the first lost data packet according to the first retransmission request; wherein, the other terminals are terminals within the multicast group other than the current terminal; A second receiving module, configured to receive the first lost data packet returned by the other terminals and perform playback processing on the first lost data packet.
9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the lost packet processing method in the multicast scenario according to any one of claims 1 to 7.
10. 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, it implements the lost packet processing method in the multicast scenario according to any one of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the lost packet processing method in the multicast scenario according to any one of claims 1 to 7.