Data retransmission method, network device and computer-readable storage medium

Through the home gateway locally cache and retransmit video data from set-top box devices, the problem of packet loss of video signals during Internet transmission is solved, the multicast server load and network delay are reduced, and the video playback experience is improved.

CN113872916BActive Publication Date: 2024-12-17ZTE CORP
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202010614878.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-30
Publication Date
2024-12-17
Estimated Expiration
2040-06-30

AI Technical Summary

Technical Problem

During the Internet transmission process, video data is incomplete due to packet loss, especially in a wireless network environment, which affects the video playback experience, and multicast retransmission increases server and network load, which may cause network congestion.

Method used

The home gateway locally caches multicast data streams, set-top box devices preferentially request the gateway device to retransmit lost packets, and the gateway device finds and resends the lost packets, reducing the multicast server retransmission load and network delay.

Benefits of technology

It effectively reduces the retransmission load and network congestion of multicast servers, reduces video transmission delay, and improves video playback quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113872916B_ABST
    Figure CN113872916B_ABST
Patent Text Reader

Abstract

The present application proposes a data retransmission method, a network device and a computer-readable storage medium, the method comprising: receiving a first retransmission request from a set-top box device, the first retransmission request being used to request a home gateway to retransmit a lost data packet; searching for the lost data packet from data packets pre-cached by the home gateway, and sending a retransmission response message to the set-top box device, the retransmission response message carrying the found lost data packet.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a data retransmission method, a network device, and a computer-readable storage medium. Background Art

[0002] Video images are usually transmitted on demand and in multicast-based video streams. The transmission of multicast data streams generally adopts the packetization method of the User Datagram Protocol (UDP). However, the transmission of video signals based on the UDP protocol is not reliable. When the Internet network quality is poor, the loss of data packets leads to incomplete video data, which causes video packet loss and freezes, and the entire content of the video signal cannot be restored. Especially when transmitting multicast high-definition video services in a wireless Internet (Wireless Fidelity, WIFI) environment, video packet loss and freezes will seriously affect the user's video playback experience.

[0003] In order to solve the problem of incomplete video data during video transmission on the Internet, a cache area is usually established based on the video signal stream at the service source, the video signal stream is cached in the cache area, and the data packets with missing signal streams are requested to be resent to the cache area. However, multicast retransmission at the video server source will increase the load on the server and transmission network. When a large number of set-top box (STB) terminal devices concurrently request retransmission, it will cause network congestion in extreme cases, affecting user experience. Summary of the invention

[0004] The present application provides a data retransmission method, a network device, and a computer-readable storage medium.

[0005] In a first aspect, an embodiment of the present application provides a data retransmission method, comprising: receiving a first retransmission request from a set-top box device, the first retransmission request being used to request a home gateway to retransmit a lost data packet; searching for the lost data packet from data packets pre-cached by the home gateway, and sending a retransmission response message to the set-top box device, the retransmission response message carrying the found lost data packet.

[0006] In a second aspect, an embodiment of the present application provides a data retransmission method, comprising: when a packet loss is detected in a received multicast data packet, a first retransmission request is sent to a designated gateway device, wherein the first retransmission request is used to request the gateway device to retransmit the lost data packet; receiving a retransmission response message from the gateway device, and obtaining the lost data packet carried in the retransmission response message, wherein the lost data packet is a data packet found in the local cache of the gateway device.

[0007] In a third aspect, an embodiment of the present application provides a network device, comprising: one or more processors; a memory on which one or more programs are stored, and when the one or more programs are executed by one or more processors, the one or more processors implement the data retransmission method of the first aspect or the second aspect of the embodiment of the present application.

[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, any one of the data retransmission methods in the embodiments of the present application is implemented.

[0009] According to the data retransmission method, network device and computer-readable storage medium of the first aspect of the embodiment of the present application, when the home gateway receives a retransmission request directly initiated to the home gateway when packet loss occurs in the set-top box device, the home gateway searches for the lost data requested to be retransmitted by the set-top box device through the multicast code stream pre-cached locally, and resends the data packet found in the local cache to the set-top box device, effectively reducing the retransmission message load of the multicast server and reducing the network retransmission delay.

[0010] According to the data retransmission method, network device and computer-readable storage medium of the second aspect of the embodiment of the present application, after the set-top box device detects packet loss, it initiates a retransmission request to the home gateway, receives the lost data message retransmitted by the gateway device and resends it to the set-top box, thereby obtaining a complete multicast data packet after assembly. In this data retransmission method, compared with sending a retransmission request to the multicast server after detecting packet loss, it can effectively reduce the multicast server load, retransmission delay and network congestion.

[0011] With regard to the above embodiments and other aspects of the present application and their implementation, further description is provided in the accompanying drawings, detailed description and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 A schematic diagram showing the process of multicast retransmission of a traditional set-top box device.

[0013] Figure 2 A schematic flow chart of a data retransmission method according to an embodiment of the present application is shown.

[0014] Figure 3 A schematic diagram showing a process of caching multicast stream data by a gateway device according to an embodiment of the present application is shown.

[0015] Figure 4 A schematic diagram of the process of data retransmission in a multicast to unicast scenario according to an embodiment of the present application is shown.

[0016] Figure 5 A schematic diagram showing the message format of a gateway device retransmission response packet frame format according to an embodiment of the present application.

[0017] Figure 6 A schematic diagram showing a flow chart of a gateway device processing a retransmission request sent by a set-top box according to an embodiment of the present application.

[0018] Figure 7 A schematic flow chart showing a data retransmission method according to another embodiment of the present application is shown.

[0019] Figure 8 A schematic diagram showing the packet message format of a set-top box feedback message according to an embodiment of the present application is shown.

[0020] Fig. 9 Show Figure 8 Schematic diagram of the message format of the specific load of the set-top box feedback message.

[0021] Fig.10 A flow chart showing a data retransmission method according to yet another embodiment of the present application is shown.

[0022] Fig.11 A schematic flow chart showing a data retransmission method according to another embodiment of the present application is shown.

[0023] Fig.12 It is a flowchart of implementing multicast data stream retransmission of a set-top box device through a home gateway according to an exemplary embodiment of the present application.

[0024] Fig.13 A schematic structural diagram of a data retransmission device provided by an embodiment of the present invention is shown.

[0025] Fig.14 A schematic structural diagram of a data retransmission device provided by an embodiment of the present invention is shown.

[0026] Fig.15 A schematic structural diagram of a data retransmission device provided by an embodiment of the present invention is shown.

[0027] Fig.16 A schematic structural diagram of a data retransmission device provided by an embodiment of the present invention is shown.

[0028] Fig.17 is a structural diagram showing an exemplary hardware architecture of a computing device capable of implementing the data retransmission method and apparatus according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the present application more clear, the embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other arbitrarily without conflict.

[0030] Figure 1 FIG. 2 is a flow chart showing a conventional set-top box device multicast retransmission method. Figure 1 As shown, the multicast retransmission method may include the following steps.

[0031] S101, such as Figure 1 As shown in “Multicast Join” in FIG. 1 , the set-top box device sends a multicast join message to the multicast server.

[0032] In this step, the home gateway may transparently transmit the multicast join message through a layer 2 bridging manner, or forward the corresponding multicast join message to the multicast server as a layer 3 multicast routing agent.

[0033] S102, such as Figure 1 As shown in “Sending Multicast Code Stream”, the multicast server sends the Real Time Protocol (RTP) multicast code stream of the corresponding multicast group to the set-top box device and the multicast packet loss retransmission server.

[0034] S103, such as Figure 1 As shown in "Save Code Stream", the multicast packet loss retransmission server synchronously saves the multicast data stream of the corresponding channel.

[0035] S104, such as Figure 1 As shown in “Packet loss is found, retransmission is requested”, the set-top box device receives the multicast data stream and performs a packet loss check. When it is found that the received multicast data stream has packet loss, it requests the multicast packet loss retransmission server to retransmit the lost data packet.

[0036] S105, such as Figure 1 As shown in “Retransmitting Lost Packets” in FIG. 1 , the multicast packet loss retransmission server receives a retransmission message request and retransmits the corresponding lost multicast data packet.

[0037] S106, such as Figure 1 As shown in "Complete assembly, decoding, output and playback", the set-top box can reassemble the currently received retransmitted packets and the previously received normal packets, and then decode and output them to the TV for playback.

[0038] Through the above steps S101-S105, a cache area is established on the multicast retransmission server side, and the video signal stream received from the multicast server is cached in the cache area. The set-top box device can request to resend the data packets with missing sequence numbers during the signal stream transmission process to the cache area of ​​the multicast retransmission server to solve the problem of incomplete video data due to network problems during the video transmission on the Internet.

[0039] In this multicast retransmission method, when a large number of set-top box terminal devices concurrently request retransmission, the retransmission request issued to the video server source (such as the multicast retransmission server) will increase the load on the server and the transmission network, and in extreme cases will cause network congestion and affect the user experience.

[0040] The embodiment of the present application provides a data retransmission method, which can cache the multicast data stream locally on the gateway device, and the set-top box device preferentially requests retransmission from the gateway device, which can effectively reduce the retransmission message load of the multicast server and reduce the network retransmission delay.

[0041] Figure 2 A schematic diagram showing the flow of the data retransmission method according to an embodiment of the present application is shown. Figure 1 As shown, the data retransmission method in the embodiment of the present application can be applied to a home gateway and may include the following steps.

[0042] S210, receiving a first retransmission request from a set-top box device, where the first retransmission request is used to request the home gateway to retransmit a lost data packet.

[0043] S220, searching for the lost data packet from the data packets pre-cached in the home gateway, and sending a retransmission response message to the set-top box device, where the retransmission response message carries the found lost data packet.

[0044] According to the data retransmission method of the embodiment of the present application, the gateway device locally caches the multicast data, and the set-top box device preferentially requests the gateway device to retransmit the lost data packets, which can effectively reduce the load of the multicast server retransmission message and reduce the network retransmission delay.

[0045] In one embodiment, the data packets in the cache of the home gateway, according to different networking modes and video playback services, the WAN side multicast data stream, include a first original code stream data packet and a second original code stream data packet, wherein the first original code stream data packet and the second original code stream data packet are multicast data packets carrying header information based on the real-time transport protocol RTP, and the first original code stream data packet comes from the Internet TV (Over The Top, OTT) accessed through a routing manner, which is a multicast service plane that carries multicast services through an Internet routing access channel for the home gateway, and the second original code stream data packet comes from the Internet Protocol TV (Internet Protocol TV, IPTV) private network multicast service plane accessed through a bridging manner.

[0046] In an embodiment of the present application, when the home gateway forwards the received downstream multicast data stream to the set-top box device, the multicast data stream learned by the multicast is synchronously cached and stored locally in the form of multicast address and destination port number. In specific implementation, the gateway pre-configures and sends the corresponding multicast virtual local area network (VLAN) to the kernel according to business needs. When the gateway receives the STB uplink join message, it adds a multicast learning entry according to the received uplink join message and the multicast VLAN configuration. The added multicast learning entry includes information such as the multicast VLAN, multicast group, and message source port. The subsequent received downstream multicast stream is hashed according to the multicast group, and forwarded to the corresponding source port according to the multicast entry information learned upstream, and the RTP header part information after the UDP data packet header corresponding to the multicast group is recorded at the same time. The cached data packet can be targeted to cache only the multicast data stream with the RTP packet header, and support caching of multiple different multicast group program sources.

[0047] In an embodiment of the present application, the gateway device can be a home gateway device, and the optical network unit (Optical Network Unit, ONU) is used as the home gateway device for STB access. While forwarding basic multicast protocol messages and data messages, it has the function of a small content distribution network (Content Distribution Network, CDN). Since the home gateway device is the closest gateway device to the set-top box, it is preferentially requested to retransmit lost data packets locally on the home gateway device, which can effectively reduce the network load of the video server, reduce network congestion, and improve the video transmission quality during wireless 4K access.

[0048] In one embodiment, before step S210, the method further includes: S11, when receiving different service request messages from a set-top box device, sending the different service request messages to a corresponding multicast server; S12, locally at the home gateway, caching and forwarding the downlink data packets received from the corresponding multicast server in a predetermined manner, wherein the predetermined manner corresponds to the different service request messages and the playback mode of the set-top box device.

[0049] Figure 3 A schematic diagram showing the process of caching multicast stream data in a gateway device according to an embodiment of the present application. Figure 3 In the embodiment, the set-top box bridges the multicast data stream of the multicast server at the IPTV network side through a wired local area network (LAN) port or a wireless WLAN port. The process of caching the multicast stream data may specifically include the following steps.

[0050] S301, the set-top box device sends an uplink multicast protocol join message through the wireless WLAN port.

[0051] In this step, the set-top box device can access the IPTV network-side multicast server in a bridging manner through a wired LAN port or a wireless WLAN port.

[0052] S302, the home gateway device learns the multicast group and source port to join according to the uplink multicast protocol join message, and forwards it to the multicast server on the IPTV bridge WAN connection network side.

[0053] In this step, the home gateway can listen to the uplink multicast protocol join message of the set-top box device through the Internet Group Management Protocol (IGMP) multicast snooping module.

[0054] S303, the home gateway device receives the downlink multicast data stream sent by the WAN side server, and distinguishes the multicast group and the RTP destination port number to perform local multicast data stream cache.

[0055] In this step, when the home gateway packet loss pre-detection submodule finds that the RTP packet sequence number is discontinuous, it can actively request pre-retransmission from the server.

[0056] S304, the home gateway device forwards the received downlink multicast data stream to the set-top box terminal device of the wireless WLAN port.

[0057] In this step, the home gateway device can forward the downlink multicast data stream to the corresponding LAN port or wireless WLAN port according to the learned uplink rule, and then forward it to the set-top box terminal device.

[0058] Through the above steps S301-S304, the home gateway device can forward the received uplink multicast join message requested by the set-top box device to the multicast server, and send the received downlink multicast data packets of the corresponding multicast group to the set-top box device, and can synchronously cache the received multicast data packets of different multicast groups into the home gateway.

[0059] In this embodiment, after the home gateway receives the downlink multicast data stream and forwards it to the set-top box device, it can distinguish the multicast group and the destination port number for local cache, so as to search from the local cache and send the lost data packet to the set-top box device based on the retransmission request received from the set-top box device.

[0060] It can be known from the above description that if the service request message is a multicast join message, the above S11 may specifically include: S11-01, according to the received multicast join message of the set-top box device, the corresponding multicast group information, message source port device information, and multicast VLAN information pre-configured in the home gateway are added as corresponding multicast learning entries; S11-02, according to the networking of the home gateway and the deployment information of the Internet Protocol Television IPTV service plane, the multicast join message is forwarded to the corresponding multicast server of the bridging service plane or the multicast server of the routing service plane. The above step S12 may specifically include: S12-01, sending the received downlink multicast data packet to the set-top box device; S12-02, caching the downlink multicast data packet in the preset cache queue of the home gateway in a circular overlay manner according to different multicast addresses and destination port numbers based on the real-time transport protocol RTP.

[0061] In one embodiment, if the first retransmission request is a non-confirmation NACK feedback message based on the Real-time Transport Control Protocol (RTCP) sent by the set-top box device, and the data packets pre-cached by the home gateway are multicast data packets cached according to different multicast groups, RTP destination port numbers and original packet sequence numbers.

[0062] In this embodiment, in the above step S220, the step of searching for lost data packets from the data packets pre-cached by the home gateway may specifically include: S221, parsing the RTCP-based NACK feedback message to obtain the multicast group information, the destination port number, the sequence number of the lost data packet and the packet loss sequence mask carried in the NACK feedback message, and the packet loss sequence mask is used to determine whether a packet loss occurs in the set-top box device; S222, searching for lost data packets from the multicast data packets locally cached by the gateway device according to the multicast group information, the destination port number and the sequence number of the lost data packet carried in the NACK feedback message.

[0063] Accordingly, in this embodiment, the retransmission response message carries a retransmission packet identifier, and the retransmission packet identifier is used to identify the retransmission response message; in the above-mentioned step S220, the step of sending a retransmission response message to the set-top box device may specifically include S223, generating a retransmission response message according to the lost data packet found, the retransmission response message carrying RTP-based header information, the original packet sequence number of the lost data packet, and the payload of the lost data packet in the original RTP data packet, and the payload is used to obtain the original content of the lost data packet; S224, sending the retransmission response message to the set-top box device through the RTP data retransmission channel between the home gateway and the set-top box device.

[0064] In this embodiment, the retransmission message is sent using an RTCP message. Once the set-top box device finds that there is packet loss, it will use immediate feedback to actively report. After receiving the RTCP-based NACK retransmission request message sent by the set-top box device, the home gateway parses the received RTCP retransmission message to obtain the corresponding multicast group, RTP port number, packet loss sequence number and packet loss sequence mask information, so as to use the parsed information to query the multicast data packet in the local cache.

[0065] In the embodiment of the present application, the cache size of the gateway device is the cache size required for a fixed duration according to the video rate of the specified resolution video, for example, the cache space required for 2 seconds of cache according to the 4K video rate of 25-35Mbps. In actual application scenarios, the cache size can be appropriately expanded according to actual business needs and the storage configuration capabilities of the home gateway.

[0066] In an embodiment of the present application, after step S11, the method also includes: S13, when it is detected that the sequence number of the received downlink multicast data packet is discontinuous, sending a pre-retransmission request to a designated packet loss retransmission server, the pre-retransmission request is used to request the packet loss retransmission server to retransmit the multicast data packet corresponding to the received discontinuous sequence number; S04, receiving the multicast data packet corresponding to the discontinuous sequence number sent by the packet loss retransmission server.

[0067] In this embodiment, when transmitting by wired mode, it is generally believed that the packet loss rate is small. Therefore, the present application can propose a multicast retransmission method for gateway and set-top box devices in wireless access mode. When the home gateway packet loss pre-detection submodule finds that the RTP packet sequence number is discontinuous, it can actively request pre-retransmission from the server to improve data retransmission efficiency.

[0068] In this embodiment, the home gateway device and the set-top box device can adopt multicast or unicast communication mode. If the set-top box device is a pure unicast business scenario, it is sent on demand. The gateway generally performs NAT conversion in bridging transparent transmission or routing mode. Pure unicast application scenarios are not within the scope of the embodiments of the present invention.

[0069] Figure 4 A schematic diagram of the process of data retransmission in a multicast to unicast scenario according to an embodiment of the present application is shown. Figure 4 In the process, the set-top box accesses the multicast data stream of the multicast server on the OTT network side through a wired local area network (LAN) port or a wireless WLAN port and a routing device.

[0070] like Figure 4 As shown, in one embodiment, the data retransmission method may include the following steps.

[0071] S401, the set-top box device sends an HTTP request message carrying multicast program address information through the wireless WLAN port.

[0072] In this step, the multicast screen projection command reference of the HTTP request message is given as an example, for example:

[0073] http: / / 192.168.1.1:9090 / IGMP:224.1.1.2:2024

[0074] and http: / / 192.168.1.1:9090 / RTP:224.1.1.2:2024

[0075] The home gateway can implement the multicast-to-unicast proxy udpxy module, and can extract "IGMP:224.1.1.2:2024" and "RTP:224.1.1.2:2024" from the multicast screen projection command reference, and generate a multicast join message based on the multicast protocol corresponding to the HTTP request message according to the extracted content.

[0076] S402, the udpxy module in the home gateway for implementing the multicast-to-unicast proxy function translates the above HTTP request message into a multicast join message and sends it to the OTT multicast server of the Interente routing WAN connection plane.

[0077] In this step, when the home gateway device receives a multicast join message sent from the LAN side or the WLAN side, it can also act as a proxy to forward the multicast join message through the IGMP multicast proxy module.

[0078] S403, for the multicast to unicast playback mode, the home gateway receives the OTT multicast data stream on the WAN side, strips off the header of the Point-to-Point Protocol over Ethernet (PPPoE), and obtains the corresponding UDP multicast data stream.

[0079] S404, the home gateway locally slices and stores the received UDP multicast data stream.

[0080] S405, the home gateway converts the received WAN-side multicast data stream into a Transmission Control Protocol (TCP) unicast data stream.

[0081] S406: The home gateway forwards the unicast data stream to the set-top box device on the WLAN side.

[0082] In this step, when the normal multicast stream is not converted to unicast, the forwarding process is that the home gateway forwards it to the corresponding br0 bridge device port (i.e., the source port) according to the three-layer multicast routing of the protocol stack learned upstream, and the home gateway forwards the received downstream multicast data stream to the corresponding learned LAN side set-top box wired and wireless access bridge port (i.e., the destination port).

[0083] In one embodiment, the udpxy module receives the multicast data stream to the udpxy process according to the UDP destination port number, and the udpxy user-mode process caches the RTP multicast stream, and further converts the multicast data stream into a unicast stream of the TCP protocol and forwards it to the LAN side set-top box.

[0084] Through the above steps S401-S406, in the multicast-to-unicast application scenario, the home gateway supports the WAN-side multicast data stream to be converted into a LAN-side TCP unicast stream, and may include a multicast-to-unicast udpxy playback method or an HTTP proxy HLS playback method. The home gateway device retransmits data according to the set-top box TCP unicast retransmission request.

[0085] In another application scenario of the present application, the set-top box device can adopt the playback method of streaming media (HTTP Live Streaming, HLS) based on the HTTP protocol. In this application scenario, the home gateway can convert the received HTTP request message carrying the multicast program address information into a multicast join message; and obtain the transport stream TS media file from the downlink media file data packet received from the multicast server of the corresponding routing service plane, and forward the TS media file to the set-top box device through the HTTP proxy; based on the multimedia data processing service MTS, the TS media file is sliced ​​and stored locally.

[0086] In the application scenario of the HLS playback method of streaming media based on the HTTP protocol, HLS is a real-time streaming transmission protocol implemented based on the HTTP protocol. The transmission content may include two parts. One part is a description file, such as an extended M3U playlist (Extended M3U Playlist, M3U8) description file, where M3U represents a list file of audio files; the other part is a TS media file. Therefore, for the HLS method, the home gateway can cache the TS media file locally and store it in slices through the MTS method.

[0087] It can be seen from the above description that, in one embodiment, if the service request message is a Hypertext Transfer Protocol HTTP request message, the above step S11 may specifically include: S11-11, converting the received HTTP request message carrying the multicast program address information into a multicast join message; S11-12, sending the converted multicast join message to the multicast server of the routing service plane corresponding to the multicast program address information.

[0088] When the set-top box device adopts the multicast-to-unicast playback mode, the above-mentioned step S12 may specifically include: S12-11, converting the downlink multicast data packet received from the multicast server of the corresponding routing service plane into a TCP unicast data packet, and sending the TCP unicast data packet to the set-top box device; S12-12, removing the Ethernet Point-to-Point Protocol PPPoE header and the Internet Protocol (IP) header from the downlink multicast data packet, obtaining the corresponding UDP multicast data stream, and locally slicing and storing the UDP multicast data packet.

[0089] If the set-top box device adopts a playback method based on HTTP protocol proxy streaming media, the above step S12 may specifically include: S12-21, obtaining the transport stream TS media file from the downlink media file data packet received from the multicast server of the corresponding routing service plane, and forwarding the TS media file to the set-top box device through the HTTP proxy; S12-22, based on the multimedia data processing service MTS, slicing and storing the TS media file locally.

[0090] In the above embodiments, for the application scenario of multicast to unicast playback and the application scenario of HLS playback based on HTTP protocol, the home gateway and the set-top box device communicate through TCP protocol and can implement unicast retransmission based on TCP.

[0091] Specifically, in the application scenario of multicast to unicast playback, the first retransmission request sent by the set-top box device to the gateway device can be a unicast retransmission request based on the TCP protocol. The data packets pre-cached by the home gateway are UDP data packets stored in the local slice. In the above step S220, the step of searching for lost data packets from the data packets pre-cached by the home gateway specifically refers to searching for lost data packets from the UDP multicast data stream and retransmitting them to the set-top box device via TCP unicast.

[0092] Specifically, in the application scenario of HLS playback based on the HTTP protocol, the first retransmission request sent by the set-top box device to the gateway device can be a unicast retransmission request based on the TCP protocol. The data packets pre-cached by the home gateway are TS media files stored in local slices. In the above step S220, the step of searching for lost data packets from the data packets pre-cached by the home gateway specifically refers to searching for lost data packets from the TS media file and retransmitting them to the set-top box device via TCP unicast.

[0093] Figure 5 A schematic diagram showing the message format of the gateway device retransmission response packet frame format of an embodiment of the present application. Figure 5 It can be seen that the message format of the retransmission response message between the home gateway and the set-top box device can adopt a private message extension method, and carry the RTP header information, the original packet sequence number of the lost data packet, and the effective load of the lost data packet in the original RTP data packet in the retransmission response message. In a specific implementation, the multicast port (MulticastPort) contained in the response message is the destination port number of the multicast RTP stream minus 1 (the RTP port number and the RTCP port number are generally a pair).

[0094] In one embodiment, if the search for lost data packets from the multicast data packets pre-cached by the home gateway fails, the method also includes: S230, sending a second retransmission request to a designated packet loss retransmission server, the second retransmission request being used to request the packet loss retransmission server to retransmit the lost data packet; S231, receiving the lost data packet sent by the packet loss retransmission server.

[0095] In this embodiment, if the local cache of this home gateway does not find the lost data packet requested for retransmission by the set-top box device, the home gateway acts as a proxy to continue requesting retransmission to the upper-layer multicast retransmission server, so as to achieve the purpose of smooth playback of 4K video under WIFI access, and at the same time reduce the load of the video server.

[0096] Figure 6 FIG. 1 is a flow chart showing a gateway device processing a retransmission request sent by a set-top box according to an embodiment of the present application. Figure 6 As shown, the gateway device may process the retransmission request sent by the set-top box by including the following steps.

[0097] S601: The gateway device receives an RTCP retransmission request message sent by the set-top box device.

[0098] S602: The gateway device parses the received RTCP retransmission to obtain the corresponding multicast group, RTP port number, packet loss sequence number, and packet loss sequence mask information.

[0099] In this step, the packet ID (PID) can be used as the packet loss number to indicate the starting number of the currently lost packet; the bit mask of the subsequent lost packets (BLP), BLT can be 16 bits; BLP allows the loss of any of the subsequent 16 RTP packets to be reported immediately after the RTP packet indicated by the PID. That is, the subsequent retransmission lost packet number is calculated based on the starting number of the currently lost packet and BLP. The set-top box retransmits a request, and the home gateway can respond to multiple data packets.

[0100] S603: The gateway device obtains the multicast RTP original code stream data packet in the local kernel layer 2 or layer 3 cache.

[0101] S604: If the local cache of the gateway device fails to search for the lost packet sequence number, the gateway device acts as a proxy to request the multicast lost packet retransmission server to retransmit the lost packet.

[0102] S605, the gateway device re-encapsulates the RTP packet according to the frame format for communicating with the set-top box device and responds to the STB client.

[0103] Through the above S601-S605, a method for retransmission control of multicast RTP data stream is implemented through a home gateway. This method can effectively reduce the multicast server load, retransmission delay and network congestion.

[0104] According to the data retransmission method of the embodiment of the present application, when the home gateway receives a retransmission request directly initiated to the home gateway when packet loss occurs in the set-top box device, the home gateway searches for the lost data requested to be retransmitted by the set-top box device through the multicast code stream pre-cached locally, and resends the data packet found in the local cache to the set-top box device, effectively reducing the RTCP retransmission message load of the multicast server and reducing the network retransmission delay.

[0105] Figure 7 FIG. 2 is a flow chart showing a data retransmission method according to another embodiment of the present invention. The data retransmission method can be applied to a set-top box device, such as Figure 7 As shown, the method may include the following steps.

[0106] S710: When it is detected that a received multicast data packet is lost, a first retransmission request is sent to a designated gateway device, where the first retransmission request is used to request the gateway device to retransmit the lost data packet.

[0107] S720, receiving a retransmission response message from the gateway device, and obtaining a lost data packet carried in the retransmission response message, wherein the lost data packet is a data packet found in a local cache of the gateway device.

[0108] In this embodiment, when the set-top box device detects that a received downlink multicast data packet is lost, it directly sends a retransmission request to the gateway device, thereby obtaining the lost data packet found by the gateway device in the local cache.

[0109] In one embodiment, the first retransmission request is a non-confirmation NACK feedback message based on the real-time transport control protocol RTCP. In this embodiment, S710 may specifically include: when it is detected that packet loss occurs in the received multicast data packet and the packet loss rate is within a predetermined packet loss rate range, a NACK feedback message based on RTCP is sent to a designated gateway device, wherein the NACK feedback message carries the designated multicast group, destination port number and sequence number of the lost data packet.

[0110] In this embodiment, if the set-top box device STB multicast channel data detects packet loss through the packet loss retransmission module, and the packet loss rate is within a predetermined packet loss rate range, an RTCP NACK retransmission request message is sent to the home gateway; after the home gateway receives the NACK retransmission request message, it replies to the retransmitted data packet through a data retransmission channel, such as an RTP channel.

[0111] In this embodiment, the transmission communication mode of retransmitting data packets between the gateway and the STB is, for example, communication in a connectionless UDP mode through a specified IP and private port number.

[0112] The communication between the home gateway and the STB can be carried out in a connectionless manner using UDP. As an example, for example, the fixed IP is 192.168.1.1 and a specified private port. Generally, the set-top box adopts such a solution in the OTT access scenario corresponding to the IGMP Proxy routing proxy mode. At this time, the set-top box obtains the small network address (i.e., the small network segment address, such as 192.168.1.x) assigned by the gateway;

[0113] As another example, for the scenario where the set-top box and bridging method are used to access the IPTV server, the set-top box can use two virtual MACs, one of which is a virtual media access control (MAC) address that communicates with the gateway using the above-mentioned UDP method, and the other virtual MAC address obtains the large network address (i.e., large network segment address) of the IPTV private network service plane.

[0114] Below through Figure 8 and Fig. 9 A schematic diagram describing the message format of a feedback message sent by a set-top box device. Figure 8 A schematic diagram showing the packet format of a set-top box feedback message according to an embodiment of the present application; Fig. 9 Show Figure 8 Schematic diagram of the message format of the specific load of the set-top box feedback message.

[0115] exist Figure 8 In the RTCP message, the retransmission request message of the set-top box device is sent using RTCP message. Once the set-top box device finds that there is packet loss, it can immediately feedback to the gateway device through the retransmission request message. In the RTCP header of the retransmission request message, FMT and PT can be used to determine the type of message, and the feedback control information (FCI) is the specific load of the type of message. As an example, Figure 8 As shown, when FMT=1 and PT=205, it means that the message is a NACK message.

[0116] exist Fig. 9 The NACK message indicated by FCI includes: a packet sequence number (Packet ID, PID), which is used to indicate the sequence number of the lost packet; a packet loss sequence mask (Bitmask Of Following Lost Packets, BLP), which is a mask of 16 packets starting from PID. If BLP is 1, it indicates that packet loss has occurred in the set-top box device. If BLP is 0, it means that the set-top box device has not reported packet loss.

[0117] In this embodiment, when the set-top box device finds packet loss, Figure 8 and Fig. 9 The set-top box device shown sends a feedback message in a message format, sends a retransmission request to the gateway device, and carries the sequence number of the lost packet and the packet loss sequence mask in the retransmission request.

[0118] In one embodiment, before step S710, before detecting packet loss of the received multicast data packet, the method further includes: S11, sending a multicast join message to the gateway device, the multicast join message is used to request to join the multicast group, and the multicast join message carries the multicast source port device information and the multicast group information requested to join; S12, receiving the multicast data packet of the multicast group requested to join sent by the gateway device.

[0119] In one embodiment, if the set-top box device adopts a multicast-to-unicast udpxy playback method or a HTTP protocol-based proxy streaming media playback method, the step of receiving a retransmission response message from the gateway device in S720 may specifically include: receiving a unicast data packet based on the Transmission Control Protocol TCP forwarded by the gateway device through a Hypertext Transfer Protocol HTTP proxy, and obtaining the lost data packet carried in the TCP unicast data packet.

[0120] In this embodiment, in the application scenario where the set-top box adopts a multicast-to-unicast playback method, the home gateway can convert the downlink multicast data stream into a TCP unicast data stream through the udpxy module, and send the converted TCP unicast data stream to the set-top box device, so as to realize direct TCP unicast retransmission between the gateway and the set-top box; in the application scenario where the set-top box device adopts a playback method based on the HTTP protocol proxy streaming media, the TS media file is forwarded to the set-top box device through the HTTP proxy. In these two scenarios, direct TCP unicast retransmission between the gateway and the set-top box can be supported without the need for direct retransmission between the set-top box and the multicast server.

[0121] In one embodiment, the retransmission response message is a message received through the RTP data channel between the set-top box device and the gateway device, and the retransmission response message carries a retransmission packet identifier, which is used to identify the retransmission response message; in this embodiment, after step S720, the method may also include: S730, obtaining the header information based on the real-time transport protocol RTP, the original packet sequence number of the lost data packet, and the effective load of the lost data packet in the original RTP data packet carried in the retransmission response message; S731, parsing the RTP-based header information, if the header information contains the retransmission packet identifier, parsing the retransmitted lost data packet from the effective load in the original packet; S732, assembling the currently received lost data packet and the received non-lost data packet to obtain an assembled data packet, decoding the assembled data packet to play the decoded data.

[0122] According to the data retransmission method of the embodiment of the present application, after the set-top box device detects packet loss, it initiates a retransmission request to the home gateway, and receives the lost data message retransmitted by the gateway device and resends it to the set-top box, thereby obtaining a complete multicast data packet after assembly. In this data retransmission method, compared with sending a retransmission request to the multicast server after detecting packet loss, it can effectively reduce the multicast server load, retransmission delay and network congestion.

[0123] Fig.10 FIG. 2 is a flow chart showing a data retransmission method according to another embodiment of the present application. The data retransmission method can be applied to a multicast server, such as Fig.10 As shown, the data retransmission method may include the following steps.

[0124] S810, receiving a multicast join message sent by a designated gateway device, where the multicast join message is a multicast join message sent by a set-top box device to a gateway device, or a multicast join message obtained by converting a request message based on a hypertext transfer protocol HTTP sent by the set-top box device;

[0125] S820, sending a multicast data packet of the multicast group requested to be joined to a designated packet loss retransmission server and a gateway device, wherein the sent multicast data packet is locally cached in the gateway device, and the sent multicast data packet is used in the gateway device to retransmit the lost data of the set-top box device to the set-top box device.

[0126] In the data retransmission method, when the home gateway receives a multicast join message from a set-top box device requesting to join a multicast group, it obtains the corresponding multicast group and message source port device information, and adds corresponding multicast learning entries according to the multicast VLAN configured by the current gateway, and further forwards the multicast join message to the corresponding bridging or routing service plane, such as the bridging B plane (corresponding to the IPTV private network) or the Internet routing A plane (corresponding to the OTT application scenario) according to the networking of the home gateway and the deployment of the IPTV service plane. As an example, the source port can be determined according to the device identifier corresponding to the buffer area (Structsk_buffer, skb) of the kernel packet reception, such as Ethernet port eth0 or wireless LAN port wlan0.

[0127] After receiving the multicast join message sent by the gateway device, the multicast server sends the downlink multicast data packet of the corresponding multicast group to the packet loss retransmission server and the gateway device, so that the gateway device locally caches the downlink multicast data packet and uses it to retransmit the data packet lost by the set-top box device to the set-top box device. Therefore, when packet loss occurs on the set-top box device side, the gateway device retransmits the lost data packet to the set-top box device without receiving and processing a large number of data retransmission requests through the multicast server, thereby effectively reducing the multicast server load, retransmission delay and network congestion.

[0128] It should be clear that the present invention is not limited to the specific configurations and processes described in the above embodiments and shown in the figures. For the convenience and brevity of description, a detailed description of the known methods is omitted here, and the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, which will not be repeated here.

[0129] Fig.11 FIG. 2 is a flow chart showing a data retransmission method according to another embodiment of the present application. The data retransmission method can be applied to a multicast retransmission server, such as Fig.11 As shown, the data retransmission method may include the following steps.

[0130] S910: Receive and save a multicast data packet sent by a multicast server.

[0131] S920, receiving a second retransmission request sent by a designated gateway device, where the second retransmission request is used to request a packet loss retransmission server to retransmit a data packet lost by a designated set-top box device, and the multicast data packets currently cached locally by the gateway device do not include the data packet lost by the set-top box device.

[0132] S930: Search for and send the lost data packet from the stored multicast data packets to the multicast server. The lost data packet is forwarded to the set-top box device in the multicast server.

[0133] In the data retransmission method, when the multicast packet loss retransmission server receives a retransmission request from a gateway device requesting retransmission of a data packet lost by a specified set-top box device, the lost data packet is sent to the multicast server. Since the retransmission request is issued when the multicast data packet currently cached locally by the gateway device does not include the data packet lost by the set-top box device, the multicast packet loss retransmission server will receive and process the retransmission request sent by the set-top box device every time the set-top box device loses a packet, thereby reducing the network delay of the retransmission and reducing the multicast server load and network congestion.

[0134] It should be clear that the present invention is not limited to the specific configurations and processes described in the above embodiments and shown in the figures. For the convenience and brevity of description, a detailed description of the known methods is omitted here, and the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, which will not be repeated here.

[0135] Fig.12 1 is a flow chart of implementing STB multicast data stream retransmission through a home gateway according to an exemplary embodiment of the present application. In this embodiment, the method includes the following steps.

[0136] S1001-a, the set-top box sends a multicast join message.

[0137] S1001-b, the home gateway transparently transmits the corresponding multicast join message to the multicast server by bridging or as a multicast routing agent.

[0138] S1002: The multicast server sends the RTP data stream corresponding to the multicast group to the home gateway and the multicast packet loss retransmission server.

[0139] S1003: The multicast packet loss retransmission server synchronously stores the multicast data stream of the corresponding channel.

[0140] S1004, the home gateway device receives the downlink multicast data stream, forwards it to the LAN side set-top box and performs local buffering.

[0141] In this step, the set-top box in the embodiment of the present application can use a wireless or wired access method, and the data stream retransmission method can mainly target the wireless access method of the set-top box.

[0142] In this step, the home gateway device may perform local caching according to the differentiated multicast groups and RTP destination port numbers.

[0143] S1005, after receiving the multicast data stream, the set-top box device detects packet loss and initiates an RTCP request to the local home gateway to retransmit the lost data packets.

[0144] In this step, the set-top box device performs an RTP packet loss check. If it is a multicast with FEC (forward error correction) function, FEC recovery is performed first. When FEC cannot be recovered and it is confirmed that there is packet loss in the code stream, an RTCP request is initiated to the local home gateway to retransmit the lost data packet, whose content carries the RTCP standard header and privately defined extended field frame format content.

[0145] S1006: The home gateway device receives the RTCP retransmission message request and sends the lost multicast data packet found in the local cache to the set-top box device.

[0146] In this step, the home gateway device obtains the multicast group data packet in the local kernel layer 2 or layer 3 cache. If the acquisition is successful, it retransmits the corresponding lost multicast data packet to the set-top box according to the private frame format of the retransmission response packet defined between the home gateway device and the set-top box.

[0147] S1007: If the local cache fails to find the lost packet sequence number, the home gateway device, as a local agent of the multicast server, continues to request the multicast lost packet retransmission server to retransmit the lost packet.

[0148] S1008, the multicast packet loss retransmission server receives the retransmission message request and retransmits the corresponding lost multicast data packet to the home gateway.

[0149] S1009: The home gateway device receives the retransmitted packet of the service response, decodes it, and retransmits it to the set-top box device according to the private frame format of the response packet defined by the set-top box device.

[0150] S1010, the set-top box device reassembles the currently received retransmitted packet and the previously received normal packet, decodes and outputs the packet to the TV for playback.

[0151] Through the above steps S1001-S1010, the multicast data stream is cached locally in the home gateway. When the set-top box device detects packet loss, it preferentially requests RTCP retransmission from the home gateway. The retransmission delay is small, and the RTCP retransmission message load of the multicast server can be effectively reduced and the network retransmission delay can be reduced.

[0152] The following is a detailed description of a data retransmission device according to an embodiment of the present application in conjunction with the accompanying drawings. Fig.13 FIG. 2 is a schematic diagram showing the structure of a data retransmission device provided by an embodiment of the present invention. Fig.13 As shown, the data retransmission device can be applied to a home gateway device and includes the following modules.

[0153] A first retransmission request receiving module 1110, configured to receive a first retransmission request from a set-top box device, wherein the first retransmission request is used to request the home gateway to retransmit a lost data packet;

[0154] The lost packet retransmission module 1120 is used to search for lost data packets from the data packets pre-cached in the home gateway, and send a retransmission response message to the set-top box device, where the retransmission response message carries the found lost data packets.

[0155] In a specific implementation scheme of the present application, a solution may be adopted in which multicast data packets are processed in the CPU chip, and subsequently the data packets may be cached and forwarded at the kernel layer 2 or layer 3. For some chips, multicast data packets are not processed in the CPU, but may directly use the chip's hard acceleration forwarding solution, resulting in higher transmission efficiency.

[0156] In one embodiment, the data retransmission device in the home gateway device may also include: a service request forwarding module, which is used to send different service request messages to the corresponding multicast server when different service request messages are received from the set-top box device before receiving the first retransmission request from the set-top box device; a message caching and forwarding module, which is used to cache and forward the downlink data packets received from the corresponding multicast server in a predetermined manner locally at the home gateway, wherein the predetermined manner corresponds to different service request messages and the playback mode of the set-top box device.

[0157] In one embodiment, if the service request message is a multicast join message, the service request forwarding module is specifically used to add the corresponding multicast group information, message source port device information, and multicast VLAN information pre-configured in the home gateway as corresponding multicast learning entries according to the multicast join message received from the set-top box device; forward the multicast join message to the corresponding multicast server of the bridging service plane or the multicast server of the routing service plane according to the networking and Internet Protocol Television IPTV service plane deployment information of the home gateway; the message caching and forwarding module is specifically used to send the received downlink multicast data packet to the set-top box device; cache the downlink multicast data packet in a preset cache queue of the home gateway in a circular overlay manner according to different multicast addresses and destination port numbers based on the real-time transport protocol RTP.

[0158] In one embodiment, the size of the cache storage space is pre-determined based on the service requirements corresponding to the received multicast data packets, and the service requirements are determined by the resolution, transmission rate and cache time of the video data in the transmitted multicast data packets.

[0159] In one embodiment, the service request message is a Hypertext Transfer Protocol HTTP request message, and the service request forwarding module is specifically used to convert the received HTTP request message carrying the multicast program address information into a multicast join message; and send the converted multicast join message to the multicast server of the routing service plane corresponding to the multicast program address information.

[0160] In one embodiment, the data retransmission device in the home gateway device may also include: a pre-retransmission request sending module, which is used to send a pre-retransmission request to a designated packet loss retransmission server when it is detected that the sequence number of the received downlink multicast data packet is discontinuous after forwarding the multicast join message according to the multicast source port in the multicast join message, and the pre-retransmission request is used to request the packet loss retransmission server to retransmit the received multicast data packet corresponding to the discontinuous sequence number; a pre-retransmission data packet receiving module, which is used to receive the multicast data packet corresponding to the discontinuous sequence number sent by the packet loss retransmission server.

[0161] In one embodiment, if the set-top box device adopts the multicast-to-unicast udpxy playback method, the message caching and forwarding module in the home gateway device is specifically used to: convert the downlink multicast data packet received from the multicast server of the corresponding routing service plane into a TCP unicast data packet, and send the TCP unicast data packet to the set-top box device; remove the Ethernet Point-to-Point Protocol PPPoE header and IP header from the downlink multicast data packet to obtain the corresponding UDP multicast data stream, and locally slice and store the UDP multicast data packet.

[0162] In one embodiment, if the set-top box device adopts a playback method based on HTTP protocol proxy streaming media, the message caching and forwarding module in the home gateway device is specifically used to: obtain the transport stream TS media file from the downlink media file data packet received from the multicast server of the corresponding routing service plane, and forward the TS media file to the set-top box device through HTTP proxy; based on the multimedia data processing service MTS, slice and store the TS media file locally.

[0163] In one embodiment, the first retransmission request is a non-confirmation NACK feedback message based on the real-time transport control protocol RTCP sent by the set-top box device, and the multicast data packets pre-cached by the home gateway are multicast data packets cached according to different multicast groups, destination port numbers and original packet sequence numbers.

[0164] In this embodiment, the lost packet retransmission module 1120 in the home gateway device is specifically used to: parse the RTCP-based NACK feedback message to obtain the multicast group information, destination port number, sequence number of the lost data packet and packet loss sequence mask carried in the NACK feedback message, and the packet loss sequence mask is used to determine whether packet loss occurs in the set-top box device; according to the multicast group information, destination port number and sequence number of the lost data packet carried in the NACK feedback message, search for the lost data packet from the multicast data packets locally cached by the gateway device.

[0165] In one embodiment, the retransmission response message carries a retransmission packet identifier, which is used to identify the retransmission response message; the lost packet retransmission module 1120 in the home gateway device is specifically used to generate a retransmission response message based on the lost data packet found, and the retransmission response message carries header information based on the real-time transport protocol RTP, the original packet sequence number of the lost data packet, and the effective load of the lost data packet in the original RTP data packet; the retransmission response message is sent to the set-top box device through the RTP data retransmission channel between the home gateway and the set-top box device.

[0166] In one embodiment, if the first retransmission request is a unicast retransmission request based on the TCP protocol, and the set-top box device adopts a multicast-to-unicast playback method, the lost packet retransmission module 1120 in the home gateway device is specifically used to search for lost data packets from the UDP multicast data packets pre-cached by the home gateway; and, if the first retransmission request is a unicast retransmission request based on the TCP protocol, and the set-top box device adopts a HTTP protocol proxy streaming media playback method, the lost packet retransmission module 1120 in the home gateway device is specifically used to: search for lost data packets from the TS media files pre-cached by the home gateway.

[0167] In one embodiment, the data retransmission device in the home gateway device may also include: a second retransmission request sending module, which is used to send a second retransmission request to a designated packet loss retransmission server if the search for the lost data packet from the multicast data packet pre-cached by the home gateway fails, and the second retransmission request is used to request the packet loss retransmission server to retransmit the lost data packet; a lost data packet receiving module, which receives the lost data packet sent by the packet loss retransmission server.

[0168] According to the data retransmission device of the embodiment of the present application, when the home gateway receives a retransmission request directly initiated to the home gateway when packet loss occurs in the set-top box device, it searches for the lost data requested to be retransmitted by the set-top box device through the multicast code stream pre-cached locally, and resends the data packet found in the local cache to the set-top box device, effectively reducing the RTCP retransmission message load of the multicast server and reducing the network retransmission delay.

[0169] The data retransmission device according to the embodiment of the present invention is described in detail below with reference to the accompanying drawings. Fig.14 FIG. 2 is a schematic diagram showing the structure of a data retransmission device provided by an embodiment of the present invention. Fig.14 As shown, the data retransmission device can be applied to a set-top box device, and includes the following modules.

[0170] The retransmission request sending module 1210 is used to send a first retransmission request to a designated gateway device when a packet loss occurs in a received multicast data packet, wherein the first retransmission request is used to request the gateway device to retransmit the lost data packet;

[0171] The lost packet receiving module 1220 is used to receive the retransmission response message of the gateway device and obtain the lost data packet carried in the retransmission response message, wherein the lost data packet is the data packet found in the local cache of the gateway device.

[0172] In one embodiment, the first retransmission request is a non-confirmation NACK feedback message based on the real-time transport control protocol RTCP, and the retransmission request sending module 1210 is specifically used to: when it is detected that packet loss occurs in the received multicast data packet and the packet loss rate is within a predetermined packet loss rate range, send a NACK feedback message based on RTCP to the designated gateway device, wherein the NACK feedback message carries the designated multicast group, destination port number and sequence number of the lost data packet.

[0173] In one embodiment, if the multicast data packet received by the set-top box device carries forward error correction FEC code, the retransmission request sending module 1210 is specifically used to detect that packet loss occurs in the received multicast data packet. It is specifically used to: perform FEC decoding according to the FEC code carried by the multicast data to recover the lost data packet; if the recovery of the lost data packet fails, it is determined that the received downlink multicast data packet has packet loss.

[0174] In one embodiment, the data retransmission device in the set-top box device may also include: a multicast join message sending module, which is used to send a multicast join message to the gateway device before detecting that a packet loss occurs in the received multicast data packet, and the multicast join message is used to request to join the multicast group, and the multicast join message carries the multicast source port and the multicast group requested to join; a multicast data packet receiving module, which is used to receive a multicast data packet of the multicast group requested to join sent by the gateway device.

[0175] In one embodiment, if the set-top box device adopts a multicast-to-unicast udpxy playback method or a HTTP protocol-based proxy streaming media playback method, the lost packet receiving module 1220 in the set-top box device, when used to receive the retransmission response message of the gateway device, is specifically used to: receive the unicast data packet based on the transmission control protocol TCP forwarded by the gateway device through the hypertext transfer protocol HTTP proxy, and obtain the lost data packet carried in the TCP unicast data packet.

[0176] In this embodiment, in the application scenario where the set-top box adopts the multicast-to-unicast playback method and in the application scenario where the HTTP protocol-based proxy streaming media playback method is adopted, direct TCP unicast retransmission between the gateway and the set-top box can be supported without the need for direct retransmission between the set-top box and the multicast server.

[0177] In one embodiment, the retransmission response message received by the set-top box device is a message received through the RTP data channel between the set-top box device and the gateway device, and the retransmission response message carries a retransmission packet identifier, which is used to identify the retransmission response message.

[0178] In this embodiment, the data retransmission device in the set-top box device may also include: a message information acquisition module, used to obtain the header information based on the real-time transport protocol RTP, the original packet sequence number of the lost data packet, and the effective load of the lost data packet in the original RTP data packet carried in the retransmission response message; a header information parsing module, used to parse the RTP-based header information, if the parsed RTP-based header information contains a retransmission packet identifier, the retransmitted lost data packet is parsed from the effective load in the original packet; a data packet assembling module, used to assemble the currently received lost data packet and the received non-lost data packet to obtain an assembled data packet, and decode the assembled data packet to play the decoded data.

[0179] According to the data retransmission device of the embodiment of the present application, after the set-top box device detects packet loss, it initiates a retransmission request to the home gateway, and receives the lost data message retransmitted by the gateway device and resends it to the set-top box, thereby obtaining a complete multicast data packet after assembly. In this data retransmission method, compared with sending a retransmission request to the multicast server after detecting packet loss, it can effectively reduce the multicast server load, retransmission delay and network congestion.

[0180] The data retransmission device according to the embodiment of the present invention is described in detail below with reference to the accompanying drawings. Fig.15 FIG. 2 is a schematic diagram showing the structure of a data retransmission device provided by an embodiment of the present invention. Fig.15 As shown, the data retransmission device can be applied to a multicast server and includes the following modules.

[0181] The multicast join message receiving module 1310 is used to receive a multicast join message sent by a designated gateway device. The multicast join message is a multicast join message sent by a set-top box device to a gateway device, or a multicast join message converted from a request message based on the Hypertext Transfer Protocol HTTP sent by a set-top box device.

[0182] The multicast data packet sending module 1320 is used to send multicast data packets of the multicast group requested to be joined to the designated packet loss retransmission server and gateway device, wherein the sent multicast data packets are locally cached in the gateway device, and the sent multicast data packets are used in the gateway device to retransmit the data packets lost by the set-top box device to the set-top box device.

[0183] According to the data retransmission device of the embodiment of the present application, after receiving the multicast join message sent by the gateway device, the multicast server sends the downlink multicast data packet of the corresponding multicast group to the packet loss retransmission server and the gateway device, so that the gateway device locally caches the downlink multicast data packet and uses it to retransmit the data packet lost by the set-top box device to the set-top box device. Therefore, when packet loss occurs on the set-top box device side, the gateway device retransmits the lost data packet to the set-top box device without receiving and processing a large number of data retransmission requests through the multicast server, thereby effectively reducing the multicast server load, retransmission delay and network congestion.

[0184] The data retransmission device according to the embodiment of the present invention is described in detail below with reference to the accompanying drawings. Fig.16 FIG. 2 is a schematic diagram showing the structure of a data retransmission device provided by an embodiment of the present invention. Fig.16 As shown, the data retransmission device can be applied to a multicast retransmission server and can include the following modules.

[0185] The multicast data packet receiving module 1410 is used to receive and save the multicast data packets sent by the multicast server;

[0186] A second retransmission request receiving module 1420 is used to receive a second retransmission request sent by a designated gateway device, where the second retransmission request is used to request retransmission of a data packet lost by a designated set-top box device, and the multicast data packets currently cached locally by the gateway device do not include the data packet lost by the set-top box device;

[0187] The lost packet sending module 1430 is used to search for and send lost data packets from the stored multicast data packets to the gateway device, and the lost data packets are forwarded to the set-top box device in the gateway device.

[0188] In one embodiment, the data retransmission device may also include: a pre-retransmission request receiving module, used to receive a pre-retransmission request sent by a gateway device, the pre-retransmission request is used to request retransmission of multicast data packets corresponding to discontinuous sequence numbers received by the gateway device; a pre-retransmission data receiving module, used to send the multicast data packets corresponding to the discontinuous sequence numbers found from the saved multicast data packets to the gateway device.

[0189] According to the data retransmission device of the embodiment of the present application, when the packet loss retransmission server receives a retransmission request from the gateway device requesting the retransmission of the data packet lost by the specified set-top box device, the lost data packet is sent to the multicast server. Since the retransmission request is issued when the multicast data packet currently cached locally by the gateway device does not include the data packet lost by the set-top box device, the packet loss retransmission server will receive and process the retransmission request sent by the set-top box device every time the set-top box device loses a packet, thereby reducing the network delay of the retransmission and reducing the multicast server load and network congestion.

[0190] It should be clear that the present invention is not limited to the specific configurations and processes described in the above embodiments and shown in the figures. For the convenience and brevity of description, a detailed description of the known methods is omitted here, and the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, which will not be repeated here.

[0191] Fig.17 is a structural diagram showing an exemplary hardware architecture of a computing device capable of implementing the data retransmission method and apparatus according to an embodiment of the present invention.

[0192] like Fig.17 As shown, the computing device 1500 includes an input device 1501, an input interface 1502, a central processing unit 1503, a memory 1504, an output interface 1505, and an output device 1506. The input interface 1502, the central processing unit 1503, the memory 1504, and the output interface 1505 are connected to each other via a bus 1510, and the input device 1501 and the output device 1506 are connected to the bus 1510 via the input interface 1502 and the output interface 1505, respectively, and then connected to other components of the computing device 1500.

[0193] Specifically, the input device 1501 receives input information from the outside and transmits the input information to the central processing unit 1503 through the input interface 1502; the central processing unit 1503 processes the input information based on the computer executable instructions stored in the memory 1504 to generate output information, temporarily or permanently stores the output information in the memory 1504, and then transmits the output information to the output device 1506 through the output interface 1505; the output device 1506 outputs the output information to the outside of the computing device 1500 for user use.

[0194] In one embodiment, Fig.17 The computing device shown may be implemented as a gateway device, which may include: a memory configured to store a program; and a processor configured to run the program stored in the memory to execute the data retransmission method described in the above embodiment.

[0195] In one embodiment, Fig.17 The computing device shown may be implemented as a set-top box device, which may include: a memory configured to store a program; and a processor configured to run the program stored in the memory to execute the data retransmission method described in the above embodiment.

[0196] In one embodiment, Fig.17 The computing device shown may be implemented as a multicast server, which may include: a memory configured to store a program; and a processor configured to run the program stored in the memory to execute the data retransmission method described in the above embodiment.

[0197] In one embodiment, Fig.17 The computing device shown can be implemented as a multicast packet loss retransmission server, which may include: a memory configured to store a program; a processor configured to run the program stored in the memory to execute the data retransmission method described in the above embodiment.

[0198] The above is only an exemplary embodiment of the present application and is not intended to limit the scope of protection of the present application. In general, various embodiments of the present application can be implemented in hardware or special circuits, software, logic or any combination thereof. For example, some aspects can be implemented in hardware, while other aspects can be implemented in firmware or software that can be executed by a controller, a microprocessor or other computing device, although the present application is not limited thereto.

[0199] Embodiments of the present application may be implemented by executing computer program instructions by a data processor of a mobile device, for example in a processor entity, or by hardware, or by a combination of software and hardware. The computer program instructions may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages.

[0200] The block diagram of any logic flow in the accompanying drawings of the present application can represent program steps, or can represent interconnected logic circuits, modules and functions, or can represent a combination of program steps and logic circuits, modules and functions. The computer program can be stored on a memory. The memory can have any type suitable for the local technical environment and can be implemented using any suitable data storage technology, such as but not limited to read-only memory (ROM), random access memory (RAM), optical memory device and system (digital versatile disc DVD or CD disc), etc. Computer-readable media may include non-transient storage media. The data processor can be any type suitable for the local technical environment, such as but not limited to a general-purpose computer, a special-purpose computer, a microprocessor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a programmable logic device (FGPA) and a processor based on a multi-core processor architecture.

[0201] By way of exemplary and non-limiting examples, a detailed description of exemplary embodiments of the present application has been provided above. However, various modifications and adjustments to the above embodiments will be apparent to those skilled in the art when considered in conjunction with the accompanying drawings and claims, but will not depart from the scope of the present invention. Therefore, the proper scope of the present invention will be determined according to the claims.

Claims

1. A data retransmission method, characterized in that: The method comprises: When receiving different service request messages from a set-top box device, sending the different service request messages to the corresponding multicast server; Locally at the home gateway, cache and forward the downlink data packets received from the corresponding multicast server in a predetermined manner, wherein the predetermined manner corresponds to the different service request messages and the playing mode of the set-top box device; When detecting that the sequence number of the received downlink multicast data packet is discontinuous, sending a pre-retransmission request to a designated packet loss retransmission server, wherein the pre-retransmission request is used to request the packet loss retransmission server to retransmit the received multicast data packet corresponding to the discontinuous sequence number; Receiving the multicast data packet corresponding to the discontinuous sequence number sent by the packet loss retransmission server; receiving a first retransmission request from a set-top box device, wherein the first retransmission request is used to request the home gateway to retransmit a lost data packet; Searching for the lost data packet from the data packets pre-cached by the home gateway, and sending a retransmission response message to the set-top box device, wherein the retransmission response message carries the found lost data packet; If the first retransmission request is a unicast retransmission request based on the TCP protocol, and the set-top box device adopts a multicast-to-unicast playback mode, searching for the lost data packet from the data packets pre-cached by the home gateway includes: searching for the lost data packet from the UDP multicast data packets pre-cached by the home gateway; If the first retransmission request is a unicast retransmission request based on the TCP protocol, and the set-top box device uses the HTTP protocol to proxy the streaming media playback mode, searching for the lost data packet from the data packets pre-cached by the home gateway, including: searching for the lost data packet from the TS media file pre-cached by the home gateway; If the lost data packet cannot be found in the multicast data packets pre-cached by the home gateway, a second retransmission request is sent to the designated packet loss retransmission server, wherein the second retransmission request is used to request the packet loss retransmission server to retransmit the lost data packet; and the lost data packet is received from the packet loss retransmission server.

2. The method according to claim 1, characterized in that If the service request message is a multicast join message, when receiving different service request messages from a set-top box device, sending the different service request messages to a corresponding multicast server includes: According to the received multicast joining message of the set-top box device, the corresponding multicast group information, message source port device information, and multicast virtual local area network VLAN information pre-configured in the home gateway are added as corresponding multicast learning entries; According to the networking of the home gateway and the deployment information of the Internet Protocol Television (IPTV) service plane, the multicast join message is forwarded to the corresponding multicast server of the bridging service plane or the multicast server of the routing service plane; The method of caching and forwarding the downlink data packets received from the corresponding multicast server in a predetermined manner at the local home gateway includes: Sending the received downlink multicast data packet to the set-top box device; The downlink multicast data packets are cached in a preset cache queue of the home gateway in a circular overlay manner according to different multicast addresses and destination port numbers based on the real-time transport protocol RTP.

3. The method according to claim 1, characterized in that If the service request message is a Hypertext Transfer Protocol HTTP request message, when receiving different service request messages from a set-top box device, sending the different service request messages to a corresponding multicast server includes: Convert the received HTTP request message carrying the multicast program address information into a multicast join message; The converted multicast join message is sent to the multicast server of the routing service plane corresponding to the multicast program address information.

4. The method according to claim 3, characterized in that If the set-top box device adopts the multicast-to-unicast udpxy playback mode, then the downlink data packets received from the corresponding multicast server are cached and forwarded in a predetermined manner locally at the home gateway, including: Converting a downlink multicast data packet received from a multicast server of a corresponding routing service plane into a Transmission Control Protocol TCP unicast data packet, and sending the TCP unicast data packet to the set-top box device; From the downlink multicast data packet, remove the Ethernet transmission point-to-point protocol PPPoE header and the Internet protocol IP header to obtain the corresponding UDP multicast data stream, and locally slice and store the UDP multicast data packet.

5. The method according to claim 3, characterized in that: If the set-top box device adopts the playing mode of the streaming media based on the HTTP protocol proxy, then the downlink data packets received from the corresponding multicast server are cached and forwarded in a predetermined manner locally at the home gateway, including: Obtaining a transport stream TS media file from a downlink media file data packet received by a multicast server of a corresponding routing service plane, and forwarding the TS media file to the set-top box device by way of an HTTP proxy; Based on the multimedia data processing service MTS, the TS media file is sliced ​​and stored locally.

6. The method according to claim 1, characterized in that If the first retransmission request is a non-confirmation NACK feedback message based on the real-time transport control protocol RTCP sent by the set-top box device; then searching for the lost data packet from the data packets pre-cached by the home gateway includes: Parsing the RTCP-based NACK feedback message to obtain multicast group information, a destination port number, a sequence number of lost data packets, and a packet loss sequence mask carried in the NACK feedback message, wherein the packet loss sequence mask is used to determine whether packet loss occurs in the set-top box device; According to the multicast group information, the destination port number and the sequence number of the lost data packet carried in the NACK feedback message, the lost data packet is searched from the multicast data packets locally cached by the gateway device.

7. The method according to claim 6, characterized in that The retransmission response message carries a retransmission packet identifier, and the retransmission packet identifier is used to identify the retransmission response message; and sending the retransmission response message to the set-top box device includes: Generate a retransmission response message according to the found lost data packet, the retransmission response message carries RTP-based header information, the original packet sequence number of the lost data packet, and the payload of the lost data packet in the original RTP data packet, the payload is used to obtain the original content of the lost data packet; The retransmission response message is sent to the set-top box device through the RTP data retransmission channel between the home gateway and the set-top box device.

8. A network device comprising: one or more processors; A memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the data retransmission method according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the data retransmission method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method and device for realizing multicast service configuration of home gateway

    CN101827036A

  • Method and system for transmitting wireless multicast data

    CN101917670A

  • Method and device in video conference, multi-point control device and video conference system

    CN102938833A

  • Method for improving QoS (Quality of Service) of backhaul network based on LTE (Long Term Evolution) Femto system

    CN103179618A

  • Transmission method, device and system for receiving mobile network multicast data

    CN103458370A