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

Data retransmission method, network device, and computer readable storage medium Download PDF

Info

Publication number
WO2022002043A1
WO2022002043A1 PCT/CN2021/103090 CN2021103090W WO2022002043A1 WO 2022002043 A1 WO2022002043 A1 WO 2022002043A1 CN 2021103090 W CN2021103090 W CN 2021103090W WO 2022002043 A1 WO2022002043 A1 WO 2022002043A1
Authority
WO
WIPO (PCT)
Prior art keywords
multicast
retransmission
packet
top box
data packet
Prior art date
Application number
PCT/CN2021/103090
Other languages
French (fr)
Chinese (zh)
Inventor
邬立保
武云飞
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2022002043A1 publication Critical patent/WO2022002043A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • H04L65/611Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for multicast or broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/15Flow control; Congestion control in relation to multipoint traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2183Cache memory
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/222Secondary servers, e.g. proxy server, cable television Head-end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/222Secondary servers, e.g. proxy server, cable television Head-end
    • H04N21/2223Secondary servers, e.g. proxy server, cable television Head-end being a public access point, e.g. for downloading to or uploading from clients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/637Control signals issued by the client directed to the server or network components
    • H04N21/6375Control signals issued by the client directed to the server or network components for requesting retransmission, e.g. of data packets lost or corrupted during transmission from server

Definitions

  • Video images are usually transmitted by on-demand and multicast-based video streams.
  • the transmission of multicast data streams generally uses the User Datagram Protocol (UDP) packetization method, but the transmission of video signals based on the UDP protocol is not reliable.
  • UDP User Datagram Protocol
  • the loss of data packets will cause the video data to be incomplete, resulting in video packet loss and stuck, unable to restore the full content of the video signal, especially when the multicast HD is transmitted in the wireless Internet (Wireless Fidelity, WIFI) environment.
  • WIFI Wireless Fidelity
  • the present disclosure provides a data retransmission method, comprising: receiving a first retransmission request from a set-top box device, where the first retransmission request is used to request a home gateway to retransmit a lost data packet;
  • the gateway searches for the lost data packet in the data packets pre-cached, and sends a retransmission response message to the set-top box device, where the retransmission response message carries the found lost data packet.
  • FIG. 2 shows a schematic flowchart of the data retransmission method of the present disclosure.
  • FIG. 3 shows a schematic flowchart of the gateway device of the present disclosure caching multicast stream data.
  • FIG. 4 shows a schematic flowchart of data retransmission in the multicast-to-unicast scenario of the present disclosure.
  • FIG. 6 shows a schematic flowchart of a gateway device of the present disclosure processing a retransmission request sent by a set-top box.
  • FIG. 7 shows a schematic flowchart of the data retransmission method of the present disclosure.
  • FIG. 8 shows a schematic diagram of a pass-through packet format of a set-top box feedback message of the present disclosure.
  • FIG. 9 shows a schematic diagram of the message format of the specific payload of the set-top box feedback message in FIG. 8 .
  • FIG. 10 shows a schematic flowchart of the data retransmission method of the present disclosure.
  • FIG. 11 shows a schematic flowchart of the data retransmission method of the present disclosure.
  • FIG. 12 is a schematic flowchart of the implementation of multicast data stream retransmission of a set-top box device through a home gateway according to the present disclosure.
  • FIG. 13 shows a schematic structural diagram of a data retransmission apparatus provided by the present disclosure.
  • FIG. 14 shows a schematic structural diagram of a data retransmission apparatus provided by the present disclosure.
  • FIG. 15 shows a schematic structural diagram of a data retransmission apparatus provided by the present disclosure.
  • FIG. 16 shows a schematic structural diagram of a data retransmission apparatus provided by the present disclosure.
  • 17 is a block diagram illustrating an exemplary hardware architecture of a computing device capable of implementing the data retransmission method and apparatus according to the present disclosure.
  • Video images are usually transmitted by on-demand and multicast-based video streams.
  • the transmission of multicast data streams generally uses the User Datagram Protocol (UDP) packetization method, but the transmission of video signals based on the UDP protocol is not reliable.
  • UDP User Datagram Protocol
  • the loss of data packets will cause the video data to be incomplete, resulting in video packet loss and stuck, unable to restore the full content of the video signal, especially when the multicast HD is transmitted in the wireless Internet (Wireless Fidelity, WIFI) environment.
  • WIFI Wireless Fidelity
  • a cache area is usually established at the service source based on the video signal stream, and the video signal stream is cached in the cache area.
  • the packet is re-requested to the cache area to be resent.
  • multicast retransmission at the source end of the video server will increase the load on the server and the transmission network.
  • STB Set-Top-Box
  • FIG. 1 shows a schematic flowchart of a traditional set-top box device multicast retransmission method.
  • the multicast retransmission method may include the following steps S101 to S106.
  • step S101 as shown in "multicast join" in FIG. 1, the set-top box device sends a multicast join message to the multicast server.
  • the home gateway can transparently transmit the multicast join message through the Layer 2 bridging mode, or forward the corresponding multicast join message to the multicast server as a Layer 3 multicast routing agent.
  • step S102 as shown in "Send Multicast Stream" in Fig. 1, the multicast server sends the Real Time Transport Protocol (RTP) multicast stream corresponding to the multicast group to the set-top box device and multicast packet loss transfer server.
  • RTP Real Time Transport Protocol
  • step S103 as shown in "Save stream” in Fig. 1, the multicast packet loss retransmission server synchronously saves the multicast data stream of the corresponding channel.
  • step S104 as shown in Figure 1 as "found packet loss, request retransmission"
  • the set-top box device receives the multicast data stream and performs packet loss check. Request retransmission of lost packets from the multicast packet loss retransmission server.
  • step S105 as shown in "Retransmit Lost Packet" in FIG. 1, the multicast packet loss retransmission server receives the packet retransmission request, and retransmits the corresponding lost multicast data packet.
  • step S106 as shown in "completely assembled, decoded and outputted for playback" in Fig. 1, the set-top box can be completely reassembled according to the currently received retransmission packet and the previously received normal packet, and decoded and outputted to the TV for playback.
  • a buffer area is established on the multicast retransmission server side, and the video signal stream received from the multicast server is buffered in the buffer area.
  • the data packets are retransmitted to the cache area of the multicast retransmission server, so as to solve the problem that the video data is incomplete due to network problems during the transmission of the video in the Internet.
  • the retransmission request issued by the source end of the video server (for example, the multicast retransmission server) will increase the load of the server and the transmission network. In extreme cases, it will cause network congestion and affect user experience.
  • the present disclosure provides a data retransmission method, which can cache the multicast data stream locally in the gateway device, and the set-top box device preferentially requests retransmission from the gateway device, which can effectively reduce the load of retransmitted packets by the multicast server and reduce network retransmission. time delay.
  • FIG. 2 shows a schematic flowchart of the data retransmission method of the present disclosure.
  • the data retransmission method in the present disclosure may be applied to a home gateway, and may include the following steps S210 and S220.
  • step S210 a first retransmission request from the set-top box device is received, and the first retransmission request is used to request the home gateway to retransmit the lost data packet.
  • step S220 the lost data packet is searched from the data packets pre-cached by the home gateway, and a retransmission response message is sent to the set-top box device, and the retransmission response message carries the found lost data packet.
  • the gateway device caches the multicast data locally, and the set-top box device preferentially requests the gateway device to retransmit lost data packets, which can effectively reduce the load of the multicast server retransmitted packets and reduce network retransmission. time delay.
  • the data packets in the cache of the home gateway according to the different networking methods and video playback services, the wide area network (Wide Area Network, WAN) side multicast data stream, including the first original code stream data packet and the third Two original code stream data packets, wherein the first original code stream data packet and the second original code stream data packet are multicast data packets carrying real-time transmission protocol-based RTP header information, and the first original code stream data packet comes from
  • the Internet TV (Over The Top, OTT) connected by routing is a multicast service plane that carries multicast services through the Internet routing channel for home gateways.
  • Internet Protocol TV Internet Protocol TV, IPTV
  • the multicast data stream learned by multicast is synchronously cached locally according to the multicast address and destination port number.
  • the gateway locally pre-configures and delivers the corresponding multicast virtual local area network (Virtual Local Area Network, VLAN) to the kernel according to the needs of the business.
  • VLAN Virtual Local Area Network
  • the gateway receives the STB uplink join message, it will This multicast learning entry includes multicast VLAN, multicast group, packet source port and other information. Subsequent received downlink multicast streams are hashed according to the multicast group.
  • Hash operation forward to the corresponding source port according to the multicast entry information learned from the upstream, and record the RTP header part information after the UDP packet header corresponding to the multicast group at the same time. It can buffer the multicast data stream of the department, and supports the buffering of multiple different multicast groups at the same time.
  • the gateway device may be a home gateway device, and an optical network unit (Optical Network Unit, ONU) is used as a home gateway device accessed by an STB, and while forwarding basic multicast protocol packets and data packets, It has the function of a small content distribution network (CDN). Since the home gateway device is the latest gateway device connected to the set-top box, the home gateway device is given priority to request retransmission of lost data packets locally, which can effectively reduce the network of the video server. load, reduce network congestion, and improve video transmission quality during wireless 4K access.
  • CDN small content distribution network
  • the method before step S210, further includes: step S11, when receiving different service request messages from the set-top box device, sending different service request messages to the corresponding multicast server; step S12, Locally, the home gateway caches and forwards the downlink data packets received from the corresponding multicast server in a predetermined manner, wherein the predetermined manner corresponds to different service request messages and playback modes of the set-top box device.
  • FIG. 3 shows a schematic flowchart of the gateway device of the present disclosure caching multicast stream data.
  • the set-top box bridges the multicast data stream of the IPTV network-side multicast server through a wired local area network (Local Area Network, LAN) port or a wireless WLAN port, and the process of caching the multicast stream data may specifically include the following steps S301 to S304.
  • LAN Local Area Network
  • step S301 the set-top box device sends an uplink multicast protocol join message through the wireless WLAN port.
  • 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.
  • step S302 the home gateway device learns the added multicast group and source port according to the uplink multicast protocol join message, and forwards it to the IPTV bridge WAN to connect to the network side multicast server.
  • the home gateway can listen to the Snooping module through the Internet Group Management Protocol (The Internet Group Management Protocol, IGMP) multicast, and listen to the uplink multicast protocol join message of the set-top box device.
  • IGMP Internet Group Management Protocol
  • step S303 the home gateway device receives the downlink multicast data stream sent by the WAN side server, and distinguishes the packet group and the RTP destination port number for local multicast data stream caching.
  • the packet loss pre-detection sub-module of the home gateway finds that the sequence numbers of the RTP packets are discontinuous, it can actively request the server for pre-retransmission.
  • step S304 the home gateway device forwards the received downlink multicast data stream to the set-top box terminal device of the wireless WLAN port.
  • the home gateway device may forward the downstream multicast data stream to the corresponding LAN port or wireless WLAN port according to the learned upstream rule, so as to forward it to the set-top box terminal device.
  • the home gateway device can send the received multicast data packet of the downstream corresponding multicast group to the set-top box device, And it can synchronously cache the received multicast data packets of different multicast groups into the home gateway.
  • the home gateway after receiving the downlink multicast data stream and forwarding it to the set-top box device, the home gateway can distinguish the packet group and the destination port number for local caching, so as to be used for subsequent retransmission requests according to the received set-top box device, Find and send the missing packet from the local cache to the set-top box device.
  • the above step S11 may specifically include: step 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; step S11-02, according to the home gateway's networking and network protocol TV IPTV service Plane deployment information to forward the multicast join message to the corresponding multicast server of the bridging service plane or the multicast server of the routing service plane.
  • step S12 may specifically include: step S12-01, sending the received downlink multicast data packet to the set-top box device; step S12-02, sending the downlink multicast data packet according to different multicast addresses and based on real-time transmission protocol RTP.
  • the destination port number is cached in the preset cache queue of the home gateway by means of cyclic coverage.
  • the data packets pre-cached by the home gateway are Multicast packets buffered by different multicast groups, RTP destination port numbers and original packet sequence numbers.
  • RTCP Real-time Transport Control Protocol
  • the step of searching for lost data packets from the data packets pre-cached by the home gateway may include: step S221, parsing the RTCP-based NACK feedback message, and obtaining the NACK feedback message carried in the NACK feedback message. Multicast group information, destination port number, serial number of the lost data packet and packet loss sequence mask, the packet loss sequence mask is used to determine that the set-top box device has packet loss; step S222, according to the multicast group carried in the NACK feedback message information, destination port number, and sequence number of the lost packet, and find the lost packet from the multicast packets cached locally by the gateway device.
  • the retransmission response packet carries the retransmission packet identifier, and the retransmission packet identifier is used to identify the retransmission response packet; in the above step S220, the step of sending the retransmission response packet to the set-top box device, Step S223 may be included, generating a retransmission response message according to the found lost data packet, the retransmission response message carrying the RTP-based header information, the original packet sequence number of the lost data packet, and the lost data packet in the original RTP data.
  • the payload in the packet is used to obtain the original content of the lost data packet; in step S224, a 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.
  • the retransmission message is sent by an RTCP message.
  • the set-top box device finds that there is a packet loss, it will use immediate feedback to actively report it.
  • the home gateway receives the RTCP-based NACK retransmission request message sent by the set-top box device, Analyze the received RTCP retransmission message, obtain the corresponding multicast group, RTP port number, packet loss sequence number, and packet loss sequence mask information, and use the parsed information to query the multicast data packets in the local cache.
  • the cache size of the gateway device is the size of the cache space required to perform caching for a fixed duration according to the video rate of the specified resolution video, for example, the size of the cache space required for 2-second caching according to the 4K video rate of 25-35 Mbps.
  • the cache size can be appropriately expanded according to actual business requirements and the storage configuration capability of the home gateway.
  • the method further includes: step S13, when it is detected that the sequence numbers of the received downlink multicast data packets are discontinuous, sending a pre-retransmission to a designated packet loss retransmission server request, the pre-retransmission request is used to request the packet loss retransmission server to retransmit the multicast data packets corresponding to the received discontinuous sequence numbers; step S14, receive the discontinuous sequence sent by the packet loss retransmission server The multicast data packet corresponding to the number.
  • the packet loss rate is small when transmitting in a wired manner. Therefore, the present disclosure can propose a method for multicast retransmission in a wireless access manner for gateways and set-top box devices.
  • the packet loss pre-detection sub-module of the home gateway finds that the sequence numbers of the RTP packets are discontinuous, it can actively request pre-retransmission from the server to improve the efficiency of data retransmission.
  • the home gateway device and the set-top box device can use multicast or unicast communication mode. If the set-top box device is a pure unicast service scenario, it is sent in the way of on-demand, and the gateway generally bridges the transparent transmission or routing mode. For NAT translation, pure unicast application scenarios are not within the scope of the embodiments of the present disclosure.
  • FIG. 4 shows a schematic flowchart of data retransmission in the multicast-to-unicast scenario of the present disclosure.
  • the set-top box accesses the multicast data stream of the OTT network side multicast server through a wired local area network (Local Area Network, LAN) port or a wireless WLAN port and through a routing device.
  • LAN Local Area Network
  • the data retransmission method may include the following steps S401 to S406.
  • step S401 the set-top box device sends an HTTP (Hypertext Transfer Protocol, Hypertext Transfer Protocol) request message carrying the address information of the multicast program through the wireless WLAN port.
  • HTTP Hypertext Transfer Protocol, Hypertext Transfer Protocol
  • the multicast screen projection command reference of the HTTP request message is exemplarily given, for example:
  • 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 HTTP according to the extracted content.
  • the multicast join message based on the multicast protocol corresponding to the request message.
  • step S402 the udpxy module in the home gateway for realizing the multicast-to-unicast proxy function translates the HTTP request message into a multicast join message and sends it to the OTT multicast server of the Internet routing WAN connection plane.
  • the home gateway device when the home gateway device receives the multicast join message sent by 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 Proxy module.
  • step 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 flow.
  • PPPoE Point-to-Point Protocol over Ethernet
  • step S404 the home gateway performs local slice storage on the received UDP multicast data stream.
  • step S405 the home gateway converts the received WAN side multicast data stream into a Transmission Control Protocol (Transmission Control Protocol, TCP) unicast data stream.
  • TCP Transmission Control Protocol
  • step S406 the home gateway forwards the unicast data stream to the set-top box device on the WLAN side.
  • the forwarding process is that the home gateway forwards the protocol stack Layer 3 multicast route learned upstream to the corresponding br0 bridge device port (ie the source port), and, The home gateway forwards the received downlink multicast data stream to the corresponding learned wired and wireless access bridge ports (ie, destination ports) of the LAN-side set-top box.
  • the udpxy module receives packets of the multicast data stream to the udpxy process according to the UDP destination port number, and the udpxy user mode process performs RTP multicast stream caching, and further converts the multicast data stream into the unicast of the TCP protocol.
  • the stream is forwarded to the LAN side set-top box.
  • the home gateway converts the device-supported multicast data stream on the WAN side to the TCP unicast stream on the LAN side, and may include multicast-to-unicast udpxy playback methods or HLS playback through HTTP proxy.
  • the home gateway device performs data retransmission according to the set-top box TCP unicast retransmission request.
  • the set-top box device can adopt the streaming media (HTTP Live Streaming, HLS) playback mode based on the HTTP protocol.
  • the home gateway can carry the received multicast program address information.
  • the HTTP request message is converted into a multicast join message; and from the downstream media file data packet received by the multicast server of the corresponding routing service plane, the transport stream TS media file is obtained, and the TS is forwarded through HTTP proxy.
  • the media files are sent to the set-top box device; based on the multimedia data processing service MTS, the TS media files are locally sliced and stored.
  • HLS is a real-time streaming transmission protocol based on HTTP protocol.
  • M3U represents a list file of audio files; the other part is TS media files, so for HLS mode, the home gateway can cache TS media files locally, and store them in slices through MTS mode.
  • the above step S11 may include: step S11-11, which carries the address information of the multicast program in the received message.
  • the HTTP request message is converted into a multicast join message; step S11-12, the converted multicast join message is sent to the multicast server of the routing service plane corresponding to the multicast program address information.
  • step S12 may include: step S12-11, converting the downlink multicast data packet received from the multicast server of the corresponding routing service plane into a TCP unicast broadcast data packets, and send the TCP unicast data packets to the set-top box device; step S12-12, remove the Ethernet transmission point-to-point protocol PPPoE header and the Internet Protocol (Internet Protocol, IP) header from the downlink multicast data packets, and obtain the corresponding UDP group UDP multicast data streams are stored locally in slices.
  • step S12-11 converting the downlink multicast data packet received from the multicast server of the corresponding routing service plane into a TCP unicast broadcast data packets, and send the TCP unicast data packets to the set-top box device
  • step S12-12 remove the Ethernet transmission point-to-point protocol PPPoE header and the Internet Protocol (Internet Protocol, IP) header from the downlink multicast data packets, and obtain the corresponding UDP group UDP multicast data streams are stored locally in slices.
  • IP Internet Protocol
  • step S12 may include: step S12-21, obtaining the transport stream from the downstream media file data packets received by the multicast server of the corresponding routing service plane
  • the TS media file is forwarded to the set-top box device by means of HTTP proxy; step S12-22, based on the multimedia data processing service MTS, the TS media file is locally sliced and stored.
  • the home gateway and the set-top box device communicate through the TCP protocol, and the TCP-based unicast can be implemented. replay.
  • the first retransmission request sent by the set-top box device to the gateway device may be a unicast retransmission request based on the TCP protocol, and the data packets pre-cached by the home gateway are local Slicing the stored UDP data packets, in the above step S220, the step of searching for the lost data packets from the data packets pre-buffered by the home gateway specifically refers to searching for the lost data packets from the UDP multicast data stream, and sending the data packets through the TCP Unicast retransmission to the set-top box device.
  • the first retransmission request sent by the set-top box device to the gateway device may be a unicast retransmission request based on the TCP protocol, and the data packet pre-cached by the home gateway
  • the step of searching for the lost data packet from the data packet pre-cached by the home gateway specifically refers to searching for the lost data packet from the TS media file, and by TCP unicast retransmission to the set-top box device.
  • FIG. 5 shows a schematic diagram of the packet format of the frame format of the retransmission response packet of the gateway device of the present disclosure.
  • the message format of the retransmission response message between the home gateway and the set-top box device can be extended by defining a private message, and the retransmission response message carries the RTP header information and the missing data packet The original packet sequence number and the payload of the lost packet in the original RTP packet.
  • the multicast port (Multicast Port) 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).
  • the method further includes: step S230, sending a second retransmission request to a designated packet loss retransmission server, The second retransmission request is used to request the packet loss retransmission server to retransmit the lost data packet; step S231, receive the lost packet sent by the packet loss retransmission server.
  • the home gateway acts as a proxy to continue to request retransmission to the upper-layer multicast retransmission server, so as to achieve WIFI connection Enter the purpose of playing 4K video smoothly, and at the same time can reduce the load of the video server.
  • FIG. 6 shows a schematic flowchart of a gateway device of the present disclosure processing a retransmission request sent by a set-top box.
  • the gateway device processing the retransmission request sent by the set-top box may include the following steps S601 to S605.
  • step S601 the gateway device receives the RTCP retransmission request message sent by the set-top box device.
  • step S602 the gateway device parses the received RTCP retransmission, and obtains the corresponding multicast group, RTP port number, packet loss sequence number, and packet loss sequence mask information.
  • the packet sequence number (Packet ID, PID), as the packet loss sequence number, can be used to indicate the start sequence number of the currently lost packet;
  • the bitmask of the subsequent lost packets (Bitmask of Lost Packets, BLP), BLT can be 16 bits (bits);
  • BLP allows the loss of any of the following 16 RTP packets to be reported immediately after the RTP packet indicated by the PID. That is, according to the starting sequence number of the currently lost packet and the BLP, the subsequent packet loss sequence number for retransmission is calculated, and the set-top box requests a retransmission, and the home gateway can respond to multiple data packets.
  • step S603 the gateway device obtains the multicast RTP original code stream data packets buffered at the local kernel layer 2 or layer 3.
  • step S604 if the local cache of the gateway device fails to find the sequence number of the lost packet, it acts as a proxy to request retransmission of the lost packet from the multicast packet loss retransmission server.
  • step S605 the gateway device performs RTP packets again according to the frame format communicated with the set-top box device and responds to the STB client.
  • the home gateway when receiving a retransmission request directly initiated by the set-top box device to the home gateway when packet loss occurs, the home gateway searches for the loss of retransmission requested by the set-top box device through the locally cached multicast stream in advance
  • the data includes and resends the data packets found in the local cache to the set-top box device, effectively reducing the RTCP retransmission packet load of the multicast server and reducing the network retransmission delay.
  • FIG. 7 shows a schematic flowchart of the data retransmission method of the present disclosure.
  • the data retransmission method can be applied to a set-top box device. As shown in FIG. 7 , the method can include the following steps S710 and S720.
  • step S710 when it is detected that the received multicast data packet is lost, a first retransmission request is sent to the designated gateway device, and the first retransmission request is used to request the gateway device to retransmit the lost data packet.
  • step S720 the retransmission response message of the gateway device is received, and the lost data packet carried in the retransmission response message is obtained, wherein the lost data packet is the data packet found in the local cache of the gateway device.
  • the set-top box device when the set-top box device detects that the received downlink multicast data packet is lost, it directly sends a retransmission request to the gateway device, thereby obtaining the lost data packet found in the local cache by the gateway device.
  • the first retransmission request is an unacknowledged NACK feedback message based on the real-time transmission control protocol RTCP.
  • step S710 may specifically include: detecting that the received multicast data packet is lost, and When the packet loss rate is within the predetermined packet loss rate range, send an RTCP-based NACK feedback message to the specified gateway device, where the NACK feedback message carries the specified multicast group, destination port number and the sequence number of the lost data packet .
  • the STB multicast channel data of the set-top box device detects packet loss through the packet loss retransmission module, and the packet loss rate is within the predetermined packet loss rate range, it sends an RTCP NACK retransmission request message to the home gateway. message; after receiving the NACK retransmission request message, the home gateway replies to the retransmitted data packet through a data retransmission channel such as an RTP channel.
  • a data retransmission channel such as an RTP channel.
  • the transmission communication mode for retransmitting data packets between the gateway and the STB such as communication by specifying IP and private port number UDP connectionless mode.
  • the communication between the home gateway and the STB can use UDP to communicate in a connectionless mode.
  • the fixed IP is 192.168.1.1 and a specified private port.
  • the set-top box accesses the OTT corresponding to the IGMP Proxy routing proxy mode. In this scenario, the set-top box obtains the small network address (ie the small network segment address, such as 192.168.1.x) assigned by the gateway;
  • the set-top box may use two virtual MACs, one of which is a virtual Media Access Control (MAC) address and the gateway to communicate in the above-mentioned UDP manner, and the other virtual MAC address.
  • the MAC address obtained is the large network address (that is, the large network segment address) of the IPTV private network service plane.
  • FIG. 8 shows a schematic diagram of a packet format of a set-top box feedback message according to an embodiment of the present disclosure
  • FIG. 9 shows a schematic diagram of a packet format of a specific payload of the set-top box feedback message in FIG. 8 .
  • the retransmission request message of the set-top box device is sent by using an RTCP message.
  • the set-top box device finds that there is packet loss, it can immediately feed back the retransmission request message to the gateway device.
  • FMT and PT can be used to determine the type of the message, and the feedback control information (Feedback control Information, FCI) is the specific payload of this type of message.
  • FCI Feedback control Information
  • the NACK message indicated by the FCI includes: the packet sequence number (Packet ID, PID), which is used to indicate the sequence number of the lost packet; the packet loss sequence mask, (Bitmask Of Following Lost Packets, BLP), It is a mask of 16 packets starting from the PID.
  • the BLP is 1, which indicates that the set-top box device has lost packets.
  • the BLP is 0, which means that the set-top box device has not reported packet loss.
  • the set-top box device when it finds packet loss, it sends a retransmission request to the gateway device through the packet format of the feedback message sent by the set-top box device shown in Figures 8 and 9, and the retransmission request carries the lost packet.
  • the sequence number of the packet and the packet loss sequence mask are used to indicate packet loss.
  • the method before step S710, before it is detected that the received multicast data packet is lost, the method further includes: step S701, sending a multicast join message to the gateway device, and the multicast join message is used for 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; Step S702, receive the multicast data packet of the multicast group requested to join sent by the gateway device.
  • the step of receiving the retransmission response message of the gateway device in S720 may specifically include:
  • the HTTP proxy of the text transmission protocol receives the unicast data packets based on the transmission control protocol TCP forwarded by the gateway device, and obtains the lost data packets carried in the TCP unicast data packets.
  • the retransmission response packet is a packet received through an RTP data channel between the set-top box device and the gateway device, and the retransmission response packet carries a retransmission packet identifier, which is used to identify the retransmission response message; in this embodiment, after step S720, the method may further include: step S730, acquiring the header information based on real-time transmission protocol RTP and the original packet sequence number of the lost data packet carried in the retransmission response message , and the payload of the lost data packet in the original RTP data packet; Step S731, parse the header information based on RTP, if the header information contains the retransmission packet identifier, then parse out the retransmitted packet from the payload in the original packet Lost data packets; Step S732, assemble the currently received lost data packets and the received non-lost data packets to obtain the assembled data packets, and decode the assembled data packets to play the decoded data.
  • step S730 acquiring the header information based
  • the set-top box device after detecting that there is packet loss, the set-top box device initiates a retransmission request to the home gateway, and receives the lost data message retransmitted by the gateway device and re-sends it to the set-top box. multicast packets.
  • the data retransmission method compared with sending a retransmission request to the multicast server after detecting packet loss, the load of the multicast server, the retransmission delay and the network congestion can be effectively reduced.
  • FIG. 10 shows a schematic flowchart of the data retransmission method of the present disclosure.
  • the data retransmission method may be applied to a multicast server. As shown in FIG. 10 , the data retransmission method may include the following steps S810 and S820.
  • step S810 a multicast join message sent by the designated gateway device is received, where the multicast join message is a multicast join message sent by the set-top box device to the gateway device, or a request based on the hypertext transfer protocol HTTP sent by the set-top box device The multicast join message obtained by converting the message;
  • the home gateway when the home gateway receives a multicast join message that the set-top box device requests to join the multicast group, it obtains the corresponding multicast group and message source port device information, and according to the multicast VLAN configured by the current gateway Add the corresponding multicast learning entry, and further forward the multicast join message to the corresponding bridging or routing service plane according to the networking of the home gateway and the deployment of the IPTV service plane, such as the bridging B plane (corresponding to the IPTV private network) or A plane for Internet routing (corresponding to OTT application scenarios).
  • the bridging B plane corresponding to the IPTV private network
  • a plane for Internet routing corresponding to OTT application scenarios
  • the source port may be determined according to a device identifier corresponding to a buffer area (Struct sk_buffer, skb) received by the kernel, such as an Ethernet port eth0 or a wireless LAN port wlan0.
  • a buffer area such as an Ethernet port eth0 or a wireless LAN port wlan0.
  • the multicast server After receiving the multicast join packet sent by the gateway device, the multicast server sends the downlink multicast data packet corresponding to the 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 is used to retransmit the data packets lost by the set-top box device to the set-top box device. Therefore, when a packet loss occurs on the set-top box device side, the gateway device retransmits the lost data packets to the set-top box device without receiving and processing a large number of data packets through the multicast server. This can effectively reduce the load of multicast servers, retransmission delay and network congestion.
  • step S910 the multicast data packet sent by the multicast server is received and saved.
  • step S920 a second retransmission request sent by the designated gateway device is received, and the second retransmission request is used to request the packet loss retransmission server to retransmit the data packets lost by the designated set-top box device, and the gateway device currently caches the data packets in the local cache.
  • the data packets lost by the set-top box device are not included in the broadcast data packets.
  • step S930 from the saved multicast data packets, find and send the lost data packets to the multicast server, and the lost data packets are forwarded to the set-top box device in the multicast server.
  • the multicast packet loss retransmission server when the multicast packet loss retransmission server receives the retransmission request from the gateway device to retransmit the lost data packet of the specified set-top box device, it sends the lost data packet to the multicast server.
  • the request is sent by the gateway device when the locally cached multicast data packets do not contain the data packets lost by the set-top box device. Compared with each time the set-top box device loses packets, the multicast packet loss retransmission server will receive and process it.
  • the retransmission request sent by the set-top box device reduces the network delay of the retransmission, and at the same time can reduce the load of the multicast server and the network congestion.
  • FIG. 12 is a schematic flowchart of implementing STB multicast data stream retransmission through a home gateway according to the present disclosure.
  • the method includes the following steps S1001-a to S1010.
  • step S1001-a the set-top box sends a multicast join message.
  • step S1001-b the home gateway forwards the corresponding multicast join message to the multicast server in a bridging manner or in a multicast routing proxy manner.
  • step 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.
  • step S1003 the multicast packet loss retransmission server synchronously saves the multicast data stream of the corresponding channel.
  • step S1004 the home gateway device receives the downlink multicast data stream, forwards it to the LAN-side set-top box, and caches it locally.
  • the set-top box in the embodiment of the present disclosure may use a wireless or wired access manner, and the data stream retransmission method may mainly be directed to the wireless access manner of the set-top box.
  • the home gateway device may perform local caching according to the zoned multicast group and the RTP destination port number.
  • step S1005 after receiving the multicast data stream, the set-top box device detects that there is packet loss, and initiates an RTCP request to the local home gateway to retransmit the lost data packet.
  • the set-top box device performs 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 stream, the The gateway initiates an RTCP request to retransmit the lost data packet, and its content contains the RTCP standard header and the privately defined extension field frame format content.
  • FEC forward error correction
  • step S1006 the home gateway device receives the RTCP packet retransmission request, and sends the lost multicast data packet found in the local cache to the set-top box device.
  • the home gateway device acquires the multicast group data packets cached at the local kernel layer 2 or layer 3, and if the acquisition is successful, it retransmits the corresponding lost group according to the private frame format of the retransmission response packet defined between it and the set-top box. broadcast data packets to the set-top box.
  • step S1007 if the local cache fails to find the packet loss sequence number, the home gateway device, as the local proxy of the multicast server, continues to request the multicast packet loss retransmission server to retransmit the lost packets.
  • step S1008 the multicast packet loss retransmission server receives the packet retransmission request, and retransmits the corresponding lost multicast data packet to the home gateway.
  • step S1009 after receiving the retransmission packet of the service response, the home gateway device decodes it and forwards it to the set-top box device again according to the private frame format of the response packet defined with the set-top box device.
  • step S1010 the set-top box device reassembles the complete retransmission packet according to the currently received retransmission packet and the normal packet that has been received before, decodes the output and then plays it on the TV.
  • the multicast data stream is cached locally on the home gateway, and when the set-top box device detects packet loss, it will first request the home gateway for RTCP retransmission, the retransmission delay is small, and the multicast server RTCP can be effectively reduced Retransmit packet load and reduce network retransmission delay.
  • FIG. 13 shows a schematic structural diagram of a data retransmission apparatus provided by the present disclosure.
  • the data retransmission apparatus can be applied to a home gateway device, and includes the following modules: a first retransmission request receiving module 1110, configured to receive a first retransmission request from a set-top box device, and the first retransmission request uses In order to request the home gateway to retransmit the lost data packets; the lost packet retransmission module 1120 is configured to search for the lost data packets from the data packets pre-cached by the home gateway, send a retransmission response message to the set-top box device, and retransmit the response The message carries the found lost packets.
  • a first retransmission request receiving module 1110 configured to receive a first retransmission request from a set-top box device, and the first retransmission request uses In order to request the home gateway to retransmit the lost data packets
  • the lost packet retransmission module 1120 is configured to search for
  • it can be a scheme that multicast data packets are processed in the chip of the CPU, and then the data packets can be buffered and forwarded at the second or third layer of the kernel.
  • the multicast data packets are not For processing in the CPU, the hard-accelerated forwarding scheme of the chip can be used directly, and the transmission efficiency is higher.
  • the apparatus for data retransmission in the home gateway device may further include: a service request forwarding module, configured to receive different service request packets from the set-top box device before receiving the first retransmission request from the set-top box device When different service request messages are sent to the corresponding multicast server; the message buffering and forwarding module is configured to cache the downlink data packets received from the corresponding multicast server locally in the home gateway in a predetermined manner and forwarding, wherein the predetermined mode corresponds to different service request messages and playback modes of the set-top box device.
  • a service request forwarding module configured to receive different service request packets from the set-top box device before receiving the first retransmission request from the set-top box device When different service request messages are sent to the corresponding multicast server
  • the message buffering and forwarding module is configured to cache the downlink data packets received from the corresponding multicast server locally in the home gateway in a predetermined manner and forwarding, wherein the predetermined mode corresponds to different service request messages and playback modes of the set
  • the service request forwarding module is specifically configured to, according to the received multicast join message of the set-top box device, convert the obtained corresponding multicast group information, The device information of the packet source port and the multicast VLAN information pre-configured on the home gateway are added as the corresponding multicast learning entries; according to the networking of the home gateway and the network protocol TV IPTV service plane deployment information, the multicast is added The message is forwarded to the corresponding multicast server bridging the service plane or the multicast server of the routing service plane; the message buffering and forwarding module is specifically configured to send the received downlink multicast data packets to the set-top box device; the downlink multicast data The packets are buffered in the preset buffer queue of the home gateway by means of cyclic coverage according to different multicast addresses and destination port numbers based on the real-time transmission protocol RTP.
  • the size of the cached storage space is the size of the storage space determined in advance according to the service requirements corresponding to the received multicast data packets. The rate and cache time are determined.
  • the service request message is a hypertext transfer protocol HTTP request message
  • the service request forwarding module is specifically configured to convert the received HTTP request message carrying the address information of the multicast program into a multicast join message; send the converted multicast join message to the multicast server of the routing service plane corresponding to the address information of the multicast program.
  • the apparatus for data retransmission in the home gateway device may further include: a pre-retransmission request sending module, configured to, after forwarding the multicast join message according to the multicast source port in the multicast join message, detect When the sequence numbers of the received downlink multicast data packets are discontinuous, send a pre-retransmission request to the designated packet loss retransmission server.
  • the pre-retransmission request is used to request the packet loss retransmission server.
  • the multicast data packets corresponding to the consecutive sequence numbers are retransmitted; the pre-retransmission data packet receiving module is configured to receive the multicast data packets corresponding to the discontinuous sequence numbers sent by the packet loss retransmission server.
  • the message buffering and forwarding module in the home gateway device is specifically configured to: receive from the multicast server of the corresponding routing service plane
  • the downlink multicast data packets are converted into TCP unicast data packets, and the TCP unicast data packets are sent to the set-top box device; from the downlink multicast data packets, the Ethernet transmission point-to-point protocol PPPoE header and IP header are removed to obtain the corresponding UDP multicast data stream, and store UDP multicast packets in local slices.
  • the message buffering and forwarding module in the home gateway device is specifically configured to: In the downlink media file data packet, the transport stream TS media file is obtained, and the TS media file is forwarded to the set-top box device by means of HTTP proxy; based on the multimedia data processing service MTS, the TS media file is locally sliced and stored.
  • the first retransmission request is an unacknowledged NACK feedback message based on the real-time transmission control protocol (RTCP) sent by the set-top box device, and the multicast data packets pre-buffered by the home gateway are based on different multicast groups, destination port numbers Multicast packets that are buffered with the original packet sequence number.
  • RTCP real-time transmission control protocol
  • the lost packet retransmission module 1120 in the home gateway device is specifically configured to: parse the RTCP-based NACK feedback message to obtain the multicast group information, destination port number, lost data packets carried in the NACK feedback message
  • the packet loss sequence mask is used to determine the packet loss of the set-top box device; according to the multicast group information, destination port number and the sequence number of the lost data packet carried in the NACK feedback message, the Look for lost packets in the multicast packets cached locally by the gateway device.
  • the retransmission response packet carries a retransmission packet identifier, and the retransmission packet identifier is used to identify the retransmission response packet;
  • the lost packet retransmission module 1120 in the home gateway device is specifically configured to The retransmission response message is generated by the data packet, and the retransmission response message carries the header information based on the real-time transmission protocol RTP, 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 RTP data retransmission channel between the home gateway and the set-top box device sends a retransmission response message to the set-top box device.
  • the lost packet retransmission module 1120 in the home gateway device 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, the lost packet retransmission module 1120 in the home gateway device, specifically It is also configured 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 the HTTP protocol proxy flow If the media is played, the lost packet retransmission module 1120 in the home gateway device is further configured to search for lost data packets from the TS media files pre-cached by the home gateway.
  • the data retransmission apparatus in the home gateway device may further include: a second retransmission request sending module, configured to send a message to the home gateway if it fails to search for the missing data packet from the multicast data packets pre-cached by the home gateway.
  • the designated packet loss retransmission server sends a second retransmission request, and the second retransmission request is used to request the packet loss retransmission server to retransmit the lost data packets;
  • the lost packet receiving module receives the lost packets sent by the packet loss retransmission server. data pack.
  • the home gateway when receiving a retransmission request directly initiated by the home gateway when the set-top box device loses packets, the home gateway searches for the set-top box device to request retransmission through the locally cached multicast stream in advance
  • the lost data includes, and the data packets found in the local cache are resent to the set-top box device, which effectively reduces the RTCP retransmission packet load of the multicast server and reduces the network retransmission delay.
  • FIG. 14 shows a schematic structural diagram of a data retransmission apparatus provided by the present disclosure.
  • the data retransmission apparatus can be applied to a set-top box device, and includes the following modules: a retransmission request sending module 1210, configured to detect that the received multicast data packet is lost, and send the first data to the designated gateway device.
  • a retransmission request is used to request the gateway device to retransmit the lost data packet;
  • the lost packet receiving module 1220 is configured to receive the retransmission response packet of the gateway device, and obtain the lost packet carried in the retransmission response packet
  • the lost data packets are those found in the local cache of the gateway device.
  • the first retransmission request is an unacknowledged NACK feedback message based on the real-time transmission control protocol RTCP
  • the retransmission request sending module 1210 is specifically configured to: detect that the received multicast data packet is lost, and the packet is lost.
  • the packet loss rate is within the predetermined packet loss rate range
  • the retransmission request sending module 1210 is specifically configured as follows when detecting that the received multicast data packet is lost: Perform FEC decoding according to the FEC code carried by the multicast data to recover the lost data packets; if the lost data packets fail to be recovered, it is determined that the received downlink multicast data packets are lost.
  • FEC forward error correction check
  • the data retransmission apparatus in the set-top box device may further include: a multicast join message sending module, configured to send a multicast join message to the gateway device before detecting that the received multicast data packet is lost.
  • 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;
  • the multicast packet receiving module is configured to receive the request to join sent by the gateway device. The multicast packets of the multicast group.
  • the lost packet receiving module 1220 in the set-top box device is used to receive the retransmission response of the gateway device.
  • the specific configuration is as follows: through the hypertext transfer protocol HTTP proxy, receiving the unicast data packet based on the transmission control protocol TCP forwarded by the gateway device, and obtaining the lost data packet carried in the TCP unicast data packet.
  • the set-top box adopts the multicast-to-unicast playback mode and the application scenario where the playback mode based on HTTP protocol proxy streaming media is adopted, it is possible to support the direct TCP single-streaming between the gateway and the set-top box. It does not require direct retransmission between the set-top box and the multicast server.
  • 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, and the retransmission packet identifier Used to identify retransmission response packets.
  • the data retransmission apparatus in the set-top box device may further include: a message information acquisition module, configured to acquire the real-time transmission protocol RTP-based header information carried in the retransmission response message, and the original data of the lost data packet.
  • the header information parsing module is configured to parse the RTP-based header information.
  • the retransmitted lost data packets are obtained by parsing the payload in After the data packet, to play the decoded data.
  • the set-top box device After the set-top box device detects that there is a packet loss, it initiates a retransmission request to the home gateway, and receives the lost data packet retransmitted by the gateway device and re-sends it to the set-top box, so as to obtain a complete package after assembly. multicast packets.
  • the data retransmission method compared with sending a retransmission request to the multicast server after detecting packet loss, the load of the multicast server, the retransmission delay and the network congestion can be effectively reduced.
  • FIG. 15 shows a schematic structural diagram of a data retransmission apparatus provided by the present disclosure.
  • the data retransmission apparatus can be applied to a multicast server, and includes the following modules.
  • the multicast join message receiving module 1310 is configured to receive a multicast join message sent by a specified gateway device, where the multicast join message is a multicast join message sent by the set-top box device to the gateway device, or based on the multicast join message sent by the set-top box device.
  • the multicast join message obtained by converting the request message of the hypertext transfer protocol HTTP.
  • the multicast data packet sending module 1320 is configured to send the multicast data packet of the multicast group requesting to join to the designated packet loss retransmission server and the 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 data packet lost by the set-top box device to the set-top box device.
  • the multicast server after receiving the multicast join message sent by the gateway device, the multicast server sends the downlink multicast data packet corresponding to the multicast group to the packet loss retransmission server and the gateway device, so as to The gateway device locally caches the downlink multicast data packet and is used 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, There is no need to receive and process a large number of data retransmission requests through the multicast server, thereby effectively reducing the multicast server load, retransmission delay and network congestion.
  • FIG. 16 shows a schematic structural diagram of a data retransmission apparatus provided by the present disclosure.
  • the data retransmission apparatus can be applied to a multicast retransmission server, and can include the following modules.
  • the multicast data packet receiving module 1410 is configured to receive and save the multicast data packet sent by the multicast server;
  • the second retransmission request receiving module 1420 is configured to receive a second retransmission request sent by the specified gateway device.
  • the second retransmission request is used to request the retransmission of the data packets lost by the specified set-top box device, and the gateway device currently caches the data packets locally.
  • the multicast data packets do not contain data packets lost by the set-top box device;
  • the lost packet sending module 1430 is configured to find and send the lost data packet from the saved multicast data packets to the gateway device, and the lost data packet is forwarded to the set-top box device in the gateway device.
  • the apparatus for data retransmission may further include: a pre-retransmission request receiving module, configured to receive a pre-retransmission request sent by the gateway device, where the pre-retransmission request is used to request the discontinuous sequence received by the gateway device
  • the pre-retransmission data receiving module is configured to send the found multicast data packets corresponding to the discontinuous sequence numbers from the saved multicast data packets to the gateway. equipment.
  • the server for packet loss retransmission when the server for packet loss retransmission receives the retransmission request from the gateway device to retransmit the lost data packet of the specified set-top box device, it sends the lost data packet to the multicast server.
  • the transmission request is sent by the gateway device when the locally cached multicast data packets do not contain the data packets lost by the set-top box device.
  • the packet loss retransmission server Compared with each time the set-top box device loses packets, the packet loss retransmission server will receive and process the set-top box.
  • the retransmission request sent by the device reduces the network delay of retransmission, and at the same time reduces the load of the multicast server and network congestion.
  • 17 is a structural diagram illustrating an exemplary hardware architecture of a computing device capable of implementing the data retransmission method and apparatus according to an embodiment of the present disclosure.
  • 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 through the bus 1510, and the input device 1501 and the output device 1506 are respectively connected to the bus 1510 through the input interface 1502 and the output interface 1505, and then to the computing device 1500. connections to other components.
  • 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 store the output information in the memory 1504, and then transmit 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 the user to use.
  • the computing device shown in FIG. 17 may be implemented as a gateway device, and the gateway device may include: a memory configured to store a program; a processor configured to execute the program stored in the memory to The data retransmission method described in the above embodiment is executed.
  • the computing device shown in FIG. 17 may be implemented as a set-top box device, and the set-top box device may include: a memory configured to store a program; a processor configured to execute the program stored in the memory to The data retransmission method described in the above embodiment is executed.
  • the computing device shown in FIG. 17 may be implemented as a multicast server, and the multicast server may include: a memory configured to store a program; a processor configured to execute the program stored in the memory , so as to execute the data retransmission method described in the above embodiments.
  • the computing device shown in FIG. 17 may be implemented as a multicast packet loss and retransmission server, and the multicast packet loss and retransmission server may include: a memory configured to store a program; a processor, configured by It is configured to run the program stored in the memory to execute the data retransmission method described in the above embodiments.
  • Embodiments of the present disclosure may be implemented by the execution of computer program instructions by a data processor of a mobile device, eg, 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 written in any combination of one or more programming languages or object code.
  • ISA instruction set architecture
  • the block diagrams of any logic flow in the figures of the present disclosure may represent program steps, or may represent interconnected logic circuits, modules, and functions, or may represent a combination of program steps and logic circuits, modules, and functions.
  • Computer programs can be stored on memory.
  • the memory may be of any type suitable for the local technical environment and may be implemented using any suitable data storage technology, such as but not limited to read only memory (ROM), random access memory (RAM), optical memory devices and systems (Digital Versatile Discs). DVD or CD disc) etc.
  • Computer-readable media may include non-transitory storage media.
  • the data processor may be of any type suitable for the local technical environment, such as, but not limited to, a general purpose computer, special purpose computer, microprocessor, digital signal processor (DSP), application specific integrated circuit (ASIC), programmable logic device (FGPA) and processors based on multi-core processor architectures.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FGPA programmable logic device

Abstract

A data retransmission method, a network device, and a computer readable storage medium. The method comprises: receiving a first retransmission request from a set top box device, the first retransmission request being used for requesting this home gateway to retransmit a lost data packet (S210); and searching for the lost data packet from data packets pre-cached in this home gateway, and sending a retransmission response message to the set top box device, the retransmission response message carrying the searched lost data packet (S220).

Description

数据重传方法、网络设备和计算机可读存储介质Data retransmission method, network device and computer-readable storage medium
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求2020年6月30提交给中国专利局的第202010614878.X号专利申请的优先权,其全部内容通过引用合并于此。This application claims priority to Patent Application No. 202010614878.X, filed with the China Patent Office on June 30, 2020, the entire contents of which are incorporated herein by reference.
技术领域technical field
本公开涉及但不限于通信技术领域。The present disclosure relates to, but is not limited to, the field of communication technology.
背景技术Background technique
视频图像通常采用点播和基于组播的方式进行视频流传输,组播数据流的传输一般采用用户数据包协议(User Datagram Protocol,UDP)的封包方式,但视频信号基于UDP协议的传输并不可靠,互联网网络质量差时,数据包的丢失导致视频数据不完整,从而造成视频丢包卡顿,无法还原视频信号的全部内容,尤其当在无线上网(Wireless Fidelity,WIFI)环境下传输组播高清视频业务时视频丢包卡顿会严重影响用户的视频播放体验。Video images are usually transmitted by on-demand and multicast-based video streams. The transmission of multicast data streams generally uses the User Datagram Protocol (UDP) packetization method, but the transmission of video signals based on the UDP protocol is not reliable. , When the quality of the Internet network is poor, the loss of data packets will cause the video data to be incomplete, resulting in video packet loss and stuck, unable to restore the full content of the video signal, especially when the multicast HD is transmitted in the wireless Internet (Wireless Fidelity, WIFI) environment. Video packet loss and freezing during video services will seriously affect the user's video playback experience.
发明内容SUMMARY OF THE INVENTION
本公开提供一种数据重传方法、网络设备和计算机可读存储介质。The present disclosure provides a data retransmission method, a network device, and a computer-readable storage medium.
第一方面,本公开提供一种数据重传方法,包括:接收来自机顶盒设备的第一重传请求,所述第一重传请求用于请求本家庭网关重传丢失的数据包;从本家庭网关预先缓存的数据包中查找所述丢失的数据包,向所述机顶盒设备发送重传响应报文,所述重传响应报文携带有查找到的所述丢失的数据包。In a first aspect, the present disclosure provides a data retransmission method, comprising: receiving a first retransmission request from a set-top box device, where the first retransmission request is used to request a home gateway to retransmit a lost data packet; The gateway searches for the lost data packet in the data packets pre-cached, and sends a retransmission response message to the set-top box device, where the retransmission response message carries the found lost data packet.
第二方面,本公开提供一种数据重传方法,包括:检测到接收的组播数据包发生包丢失时,向指定的网关设备发送第一重传请求,所述第一重传请求用于请求所述网关设备重传丢失的数据包;接收所述网关设备的重传响应报文,得到所述重传响应报文中携带的所述丢失 的数据包,其中,所述丢失的数据包是在所述网关设备本地缓存中查找到的数据包。In a second aspect, the present disclosure provides a data retransmission method, comprising: when packet loss of a received multicast data packet is detected, sending a first retransmission request to a designated gateway device, where the first retransmission request is used for Request the gateway device to retransmit the lost data packet; receive the retransmission response message from 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.
第三方面,本公开提供一种网络设备,包括:一个或多个处理器;存储器,其上存储有一个或多个程序,当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现本公开中的第一方面或第二方面的数据重传方法。In a third aspect, the present disclosure 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 the one or more processors, a The or multiple processors implement the data retransmission method of the first aspect or the second aspect of the present disclosure.
第四方面,本公开提供了一种计算机可读存储介质,存储介质存储有计算机程序,计算机程序被处理器执行时实现本公开中的任意一种数据重传方法。In a fourth aspect, the present disclosure provides a computer-readable storage medium, 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 present disclosure is implemented.
附图说明Description of drawings
图1示出传统机顶盒设备组播重传的流程示意图。FIG. 1 shows a schematic flowchart of a conventional set-top box device multicast retransmission.
图2示出本公开的数据重传方法的流程示意图。FIG. 2 shows a schematic flowchart of the data retransmission method of the present disclosure.
图3示出本公开的网关设备缓存组播流数据的流程示意图。FIG. 3 shows a schematic flowchart of the gateway device of the present disclosure caching multicast stream data.
图4示出本公开的组播转单播场景下进行数据重传的流程示意图。FIG. 4 shows a schematic flowchart of data retransmission in the multicast-to-unicast scenario of the present disclosure.
图5示出本公开的网关设备重传响应包帧格式的报文格式示意图。FIG. 5 shows a schematic diagram of the packet format of the frame format of the retransmission response packet of the gateway device of the present disclosure.
图6示出本公开的网关设备处理机顶盒发送的重传请求的流程示意图。FIG. 6 shows a schematic flowchart of a gateway device of the present disclosure processing a retransmission request sent by a set-top box.
图7示出本公开的数据重传方法的流程示意图。FIG. 7 shows a schematic flowchart of the data retransmission method of the present disclosure.
图8示出本公开的机顶盒反馈消息的通过包报文格式示意图。FIG. 8 shows a schematic diagram of a pass-through packet format of a set-top box feedback message of the present disclosure.
图9示出图8中机顶盒反馈消息的具体负载的报文格式示意图。FIG. 9 shows a schematic diagram of the message format of the specific payload of the set-top box feedback message in FIG. 8 .
图10示出本公开的数据重传方法的流程示意图。FIG. 10 shows a schematic flowchart of the data retransmission method of the present disclosure.
图11示出本公开的数据重传方法的流程示意图。FIG. 11 shows a schematic flowchart of the data retransmission method of the present disclosure.
图12是本公开的通过家庭网关实现机顶盒设备组播数据流重传的流程示意图。FIG. 12 is a schematic flowchart of the implementation of multicast data stream retransmission of a set-top box device through a home gateway according to the present disclosure.
图13示出本公开提供的数据重传装置的结构示意图。FIG. 13 shows a schematic structural diagram of a data retransmission apparatus provided by the present disclosure.
图14示出本公开提供的数据重传装置的结构示意图。FIG. 14 shows a schematic structural diagram of a data retransmission apparatus provided by the present disclosure.
图15示出本公开提供的数据重传装置的结构示意图。FIG. 15 shows a schematic structural diagram of a data retransmission apparatus provided by the present disclosure.
图16示出本公开提供的数据重传装置的结构示意图。FIG. 16 shows a schematic structural diagram of a data retransmission apparatus provided by the present disclosure.
图17是示出能够实现根据本公开的数据重传方法和装置的计算 设备的示例性硬件架构的结构图。17 is a block diagram illustrating an exemplary hardware architecture of a computing device capable of implementing the data retransmission method and apparatus according to the present disclosure.
具体实施方式detailed description
为使本公开的目的、技术方案和优点更加清楚明白,下文中将结合附图对本公开的实施方式进行详细说明。需要说明的是,在不冲突的情况下,本公开中的实施方式及实施方式中的特征可以相互任意组合。In order to make the objectives, technical solutions and advantages of the present disclosure clearer, the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments in the present disclosure and the features of the embodiments can be arbitrarily combined with each other unless there is conflict.
视频图像通常采用点播和基于组播的方式进行视频流传输,组播数据流的传输一般采用用户数据包协议(User Datagram Protocol,UDP)的封包方式,但视频信号基于UDP协议的传输并不可靠,互联网网络质量差时,数据包的丢失导致视频数据不完整,从而造成视频丢包卡顿,无法还原视频信号的全部内容,尤其当在无线上网(Wireless Fidelity,WIFI)环境下传输组播高清视频业务时视频丢包卡顿会严重影响用户的视频播放体验。Video images are usually transmitted by on-demand and multicast-based video streams. The transmission of multicast data streams generally uses the User Datagram Protocol (UDP) packetization method, but the transmission of video signals based on the UDP protocol is not reliable. , When the quality of the Internet network is poor, the loss of data packets will cause the video data to be incomplete, resulting in video packet loss and stuck, unable to restore the full content of the video signal, especially when the multicast HD is transmitted in the wireless Internet (Wireless Fidelity, WIFI) environment. Video packet loss and freezing during video services will seriously affect the user's video playback experience.
为解决视频在互联网中传输过程中出现的视频数据不完整的问题,通常在服务源端基于视频信号码流建立缓存区域,将视频信号码流缓存在缓存区域内,并对信号码流缺失的数据包重新向缓存区域请求重新发送。但针对视频服务器源端进行组播重传,会增加服务器和传输网络的负载,当有大量的机顶盒(Set-Top-Box,STB)终端设备并发请求重传时,极端情况下会造成网络拥塞,影响用户体验。In order to solve the problem of incomplete video data in the process of video transmission in the Internet, a cache area is usually established at the service source based on the video signal stream, and the video signal stream is cached in the cache area. The packet is re-requested to the cache area to be resent. However, multicast retransmission at the source end of the video server will increase the load on the server and the transmission network. When a large number of Set-Top-Box (STB) terminal devices request retransmission concurrently, network congestion will be caused in extreme cases. , which affects the user experience.
图1示出传统机顶盒设备组播重传方法的流程示意图。如图1所示,该组播重传方法可以包括如下步骤S101至S106。FIG. 1 shows a schematic flowchart of a traditional set-top box device multicast retransmission method. As shown in FIG. 1 , the multicast retransmission method may include the following steps S101 to S106.
在步骤S101,如图1中“组播加入”所示,机顶盒设备发送组播加入报文至组播服务器。In step S101, as shown in "multicast join" in FIG. 1, the set-top box device sends a multicast join message to the multicast server.
在该步骤中,家庭网关可以通过二层桥接方式透传组播加入报文,或作为三层组播路由代理转发相应的组播加入报文至组播服务器。In this step, the home gateway can transparently transmit the multicast join message through the Layer 2 bridging mode, or forward the corresponding multicast join message to the multicast server as a Layer 3 multicast routing agent.
在步骤S102,如图1中“发送组播码流”所示,组播服务器发送对应组播组的实时传输协议(Real Time Protocol,RTP)组播码流给机顶盒设备和组播丢包重传服务器。In step S102, as shown in "Send Multicast Stream" in Fig. 1, the multicast server sends the Real Time Transport Protocol (RTP) multicast stream corresponding to the multicast group to the set-top box device and multicast packet loss transfer server.
在步骤S103,如图1中“保存码流”所示,组播丢包重传服务器 对相应频道的组播数据流进行同步保存。In step S103, as shown in "Save stream" in Fig. 1, the multicast packet loss retransmission server synchronously saves the multicast data stream of the corresponding channel.
在步骤S104,如图1中“发现有丢包,请求重传”所示,机顶盒设备收到组播数据流,进行丢包检查,当发现收到的组播数据流有丢包时,则向组播丢包重传服务器请求重传丢失的数据包。In step S104, as shown in Figure 1 as "found packet loss, request retransmission", the set-top box device receives the multicast data stream and performs packet loss check. Request retransmission of lost packets from the multicast packet loss retransmission server.
在步骤S105,如图1中“重传丢失的包”所示,组播丢包重传服务器收到重传报文请求,重传对应丢失的组播数据包。In step S105, as shown in "Retransmit Lost Packet" in FIG. 1, the multicast packet loss retransmission server receives the packet retransmission request, and retransmits the corresponding lost multicast data packet.
在步骤S106,如图1中“组装完整,解码输出播放”所示,机顶盒可以根据当前接收的重传包和之前已收到的正常包重新组装完整,解码输出后给电视播放。In step S106, as shown in "completely assembled, decoded and outputted for playback" in Fig. 1, the set-top box can be completely reassembled according to the currently received retransmission packet and the previously received normal packet, and decoded and outputted to the TV for playback.
通过上述步骤S101-S106,在组播重传服务器端建立缓存区域,将从组播服务器接收到的视频信号码流缓存在缓存区域内,机顶盒设备可以对信号码流传输过程中的序列号缺失的数据包重新向组播重传服务器的缓存区域请求重新发送,以解决视频在互联网中传输过程中因为网络问题而导致视频数据不完整的问题。Through the above steps S101-S106, a buffer area is established on the multicast retransmission server side, and the video signal stream received from the multicast server is buffered in the buffer area. The data packets are retransmitted to the cache area of the multicast retransmission server, so as to solve the problem that the video data is incomplete due to network problems during the transmission of the video in the Internet.
在该组播重传方法中,当有大量的机顶盒终端设备并发请求重传时,针对视频服务器源端(例如组播重传服务器)发出的重传请求,会增加服务器和传输网络的负载,极端情况下会造成网络拥塞,影响用户体验。In this multicast retransmission method, when there are a large number of set-top box terminal devices concurrently requesting retransmission, the retransmission request issued by the source end of the video server (for example, the multicast retransmission server) will increase the load of the server and the transmission network. In extreme cases, it will cause network congestion and affect user experience.
本公开提供一种数据重传方法,可以在网关设备本地对组播数据流进行缓存,机顶盒设备优先向该网关设备请求重传,可有效减少组播服务器重传报文负载和降低网络重传时延。The present disclosure provides a data retransmission method, which can cache the multicast data stream locally in the gateway device, and the set-top box device preferentially requests retransmission from the gateway device, which can effectively reduce the load of retransmitted packets by the multicast server and reduce network retransmission. time delay.
图2示出本公开的数据重传方法的流程示意图。如图2所示,本公开中的数据重传方法可以应用于家庭网关,并可以包括以下步骤S210和S220。FIG. 2 shows a schematic flowchart of the data retransmission method of the present disclosure. As shown in FIG. 2 , the data retransmission method in the present disclosure may be applied to a home gateway, and may include the following steps S210 and S220.
在步骤S210,接收来自机顶盒设备的第一重传请求,第一重传请求用于请求本家庭网关重传丢失的数据包。In step S210, a first retransmission request from the set-top box device is received, and the first retransmission request is used to request the home gateway to retransmit the lost data packet.
在步骤S220,从本家庭网关预先缓存的数据包中查找丢失的数据包,向机顶盒设备发送重传响应报文,重传响应报文携带有查找到的丢失的数据包。In step S220, the lost data packet is searched from the data packets pre-cached by the home gateway, and a retransmission response message is sent to the set-top box device, and the retransmission response message carries the found lost data packet.
根据本公开的数据重传方法,网关设备本地对组播数据进行缓存, 机顶盒设备优先向网关设备请求重传丢失的数据包,可有效减少组播服务器重传报文的负载和降低网络重传时延。According to the data retransmission method of the present disclosure, the gateway device caches the multicast data locally, and the set-top box device preferentially requests the gateway device to retransmit lost data packets, which can effectively reduce the load of the multicast server retransmitted packets and reduce network retransmission. time delay.
在一个实施方式中,本家庭网关缓存中的数据包,根据组网方式和视频播放业务的不同,广域网(Wide Area Network,WAN)侧组播数据流,包括第一原始码流数据包和第二原始码流数据包,其中,第一原始码流数据包和第二原始码流数据包是携带有基于实时传输协议RTP头信息的组播数据包,且第一原始码流数据包来自通过路由方式接入的互联网电视(Over The Top,OTT),对家庭网关来说是通过Internet路由上网通道承载组播业务的组播业务平面,第二原始码流数据包来自通过桥接方式接入的网络协议电视(Internet Protocol TV,IPTV)专网组播业务平面。In one embodiment, the data packets in the cache of the home gateway, according to the different networking methods and video playback services, the wide area network (Wide Area Network, WAN) side multicast data stream, including the first original code stream data packet and the third Two original code stream data packets, wherein the first original code stream data packet and the second original code stream data packet are multicast data packets carrying real-time transmission protocol-based RTP header information, and the first original code stream data packet comes from The Internet TV (Over The Top, OTT) connected by routing is a multicast service plane that carries multicast services through the Internet routing channel for home gateways. Internet Protocol TV (Internet Protocol TV, IPTV) private network multicast service plane.
在本公开实施方式中,家庭网关将接收到的下行组播数据流转发至机顶盒设备时,同步将该组播学习到的组播数据流按照组播地址和目的端口号的方式进行本地缓存存储,具体实现时,网关本地根据业务需要预先配置下发了相应的组播虚拟局域网(Virtual Local Area Network,VLAN)至内核,网关在接收到STB上行加入报文时,根据接收到的上行加入报文和该组播VLAN配置添加组播学习条目,该添加组播学习条目包括组播VLAN、组播组、报文源端口等信息,后续收到下行组播流是根据组播组进行哈希Hash运算,并根据上行学习的组播条目信息转发至对应源端口,并同时记录该组播组对应UDP数据包头之后的RTP头部分信息,缓存的数据包可以有针对性地只对带RTP包头部的组播数据流进行缓存,同时支持多个不同组播组节目源缓存。In the embodiment of the present disclosure, when the home gateway forwards the received downlink multicast data stream to the set-top box device, the multicast data stream learned by multicast is synchronously cached locally according to the multicast address and destination port number. , in the specific implementation, the gateway locally pre-configures and delivers the corresponding multicast virtual local area network (Virtual Local Area Network, VLAN) to the kernel according to the needs of the business. When the gateway receives the STB uplink join message, it will This multicast learning entry includes multicast VLAN, multicast group, packet source port and other information. Subsequent received downlink multicast streams are hashed according to the multicast group. Hash operation, and forward to the corresponding source port according to the multicast entry information learned from the upstream, and record the RTP header part information after the UDP packet header corresponding to the multicast group at the same time. It can buffer the multicast data stream of the department, and supports the buffering of multiple different multicast groups at the same time.
在本公开实施方式中,网关设备可以是家庭网关设备,将光网络单元(Optical Network Unit,ONU)作为STB接入的家庭网关设备,在转发基本组播协议报文和数据报文的同时,具有小型内容分发网络(Content Distribution Network,CDN)的功能,由于家庭网关设备是机顶盒接入的最近一个网关设备,优先在家庭网关设备本地请求重传丢失的数据包,可以有效降低视频服务器的网络负载,降低网络拥塞,提升无线4K接入时视频传输质量等优点。In the embodiment of the present disclosure, the gateway device may be a home gateway device, and an optical network unit (Optical Network Unit, ONU) is used as a home gateway device accessed by an STB, and while forwarding basic multicast protocol packets and data packets, It has the function of a small content distribution network (CDN). Since the home gateway device is the latest gateway device connected to the set-top box, the home gateway device is given priority to request retransmission of lost data packets locally, which can effectively reduce the network of the video server. load, reduce network congestion, and improve video transmission quality during wireless 4K access.
在一个实施方式中,在步骤S210之前,该方法还包括:步骤S11,接收到来自机顶盒设备的不同业务请求报文时,将不同的业务请求报文发送至对应的组播服务器;步骤S12,在本家庭网关本地,对从对应的组播服务器接收的下行数据包,进行预定方式的缓存和转发,其中,预定方式与不同的业务请求报文和机顶盒设备的播放方式相对应。In one embodiment, before step S210, the method further includes: step S11, when receiving different service request messages from the set-top box device, sending different service request messages to the corresponding multicast server; step S12, Locally, the home gateway caches and forwards the downlink data packets received from the corresponding multicast server in a predetermined manner, wherein the predetermined manner corresponds to different service request messages and playback modes of the set-top box device.
图3示出本公开的网关设备缓存组播流数据的流程示意图。在图3中,机顶盒通过有线局域网(Local Area Network,LAN)口或无线WLAN口,桥接接入IPTV网络侧组播服务器的组播数据流,该组播流数据缓存的过程具体可以包括如下步骤S301至S304。FIG. 3 shows a schematic flowchart of the gateway device of the present disclosure caching multicast stream data. In Figure 3, the set-top box bridges the multicast data stream of the IPTV network-side multicast server through a wired local area network (Local Area Network, LAN) port or a wireless WLAN port, and the process of caching the multicast stream data may specifically include the following steps S301 to S304.
在步骤S301,机顶盒设备通过无线WLAN口发送上行组播协议加入报文。In step S301, the set-top box device sends an uplink multicast protocol join message through the wireless WLAN port.
在该步骤中,机顶盒设备可以通过有线LAN口或无线WLAN口,以桥接方式接入IPTV网络侧组播服务器。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.
在步骤S302,家庭网关设备根据上行组播协议加入报文学习加入的组播组和源端口,并转发至IPTV桥WAN连接网络侧组播服务器。In step S302, the home gateway device learns the added multicast group and source port according to the uplink multicast protocol join message, and forwards it to the IPTV bridge WAN to connect to the network side multicast server.
在该步骤中,家庭网关可以通过因特网组管理协议(The Internet Group Management Protocol,IGMP)组播侦听Snooping模块,侦听机顶盒设备的上行组播协议加入报文。In this step, the home gateway can listen to the Snooping module through the Internet Group Management Protocol (The Internet Group Management Protocol, IGMP) multicast, and listen to the uplink multicast protocol join message of the set-top box device.
在步骤S303,家庭网关设备接收WAN侧服务器发送的下行组播数据流,并区分组播组和RTP目的端口号进行本地组播数据流缓存。In step S303, the home gateway device receives the downlink multicast data stream sent by the WAN side server, and distinguishes the packet group and the RTP destination port number for local multicast data stream caching.
在该步骤中,当家庭网关丢包预检测子模块发现RTP包序号不连续时,可主动向服务器端请求预重传。In this step, when the packet loss pre-detection sub-module of the home gateway finds that the sequence numbers of the RTP packets are discontinuous, it can actively request the server for pre-retransmission.
在步骤S304,家庭网关设备将接收到的下行组播数据流转发至无线WLAN端口的机顶盒终端设备。In step S304, the home gateway device forwards the received downlink multicast data stream to the set-top box terminal device of the wireless WLAN port.
在该步骤中,家庭网关设备可以根据学习的上行规则将下行组播数据流转发至对应的LAN端口或无线WLAN端口,从而转发至机顶盒终端设备。In this step, the home gateway device may forward the downstream multicast data stream to the corresponding LAN port or wireless WLAN port according to the learned upstream rule, so as to forward it to the set-top box terminal device.
通过上述步骤S301-S304,家庭网关设备可以将接收到的机顶盒设备请求上行的组播加入报文转发组播服务器,并将接收到的下行对 应组播组的组播数据包发送至机顶盒设备,并可以同步将接收到的不同组播组的组播数据包缓存至本家庭网关中。Through the above steps S301-S304, the home gateway device can send the received multicast data packet of the downstream corresponding multicast group to the set-top box device, And it can synchronously cache the received multicast data packets of different multicast groups into the home gateway.
在该实施方式中,家庭网关收到下行组播数据流并转发给机顶盒设备后,可以区分组播组和目的端口号进行本地缓存,以用于后续根据接收到的机顶盒设备的重传请求,从本地缓存中查找并向机顶盒设备发送所丢失的数据包。In this embodiment, after receiving the downlink multicast data stream and forwarding it to the set-top box device, the home gateway can distinguish the packet group and the destination port number for local caching, so as to be used for subsequent retransmission requests according to the received set-top box device, Find and send the missing packet from the local cache to the set-top box device.
通过上述描述可知,若业务请求报文为组播加入报文,则上述步骤S11具体可以包括:步骤S11-01,根据接收到的机顶盒设备的组播加入报文,将获取的对应的组播组信息、报文源端口设备信息,以及预先在本家庭网关配置的组播VLAN信息,添加为相应的组播学习条目;步骤S11-02,根据本家庭网关的组网及网络协议电视IPTV业务平面部署信息,将组播加入报文转发至对应的桥接业务平面的组播服务器或路由业务平面的组播服务器。上述步骤S12具体可以包括:步骤S12-01,发送所接收的下行组播数据包至机顶盒设备;步骤S12-02,将下行组播数据包,按照不同的组播地址和基于实时传输协议RTP的目的端口号,通过循环覆盖的方式缓存至本家庭网关的预设缓存队列中。As can be seen from the above description, if the service request message is a multicast join message, the above step S11 may specifically include: step 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; step S11-02, according to the home gateway's networking and network protocol TV IPTV service Plane deployment information to forward the multicast join message to the corresponding multicast server of the bridging service plane or the multicast server of the routing service plane. The above-mentioned step S12 may specifically include: step S12-01, sending the received downlink multicast data packet to the set-top box device; step S12-02, sending the downlink multicast data packet according to different multicast addresses and based on real-time transmission protocol RTP. The destination port number is cached in the preset cache queue of the home gateway by means of cyclic coverage.
在一个实施方式中,若第一重传请求是机顶盒设备发送的基于实时传输控制协议(Real-time Transport Control Protocol,RTCP)的非确认NACK反馈消息,且本家庭网关预先缓存的数据包是按照不同的组播组、RTP目的端口号和原始包序号进行缓存的组播数据包。In one embodiment, if the first retransmission request is an unacknowledged 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 packets buffered by different multicast groups, RTP destination port numbers and original packet sequence numbers.
在该实施方式中,上述步骤S220中,从本家庭网关预先缓存的数据包中查找丢失的数据包的步骤,可以包括:步骤S221,解析基于RTCP的NACK反馈消息,得到NACK反馈消息中携带的组播组信息、目的端口号、所丢失数据包的序列号和丢包序列掩码,丢包序列掩码用于确定机顶盒设备出现包丢失;步骤S222,据NACK反馈消息中携带的组播组信息、目的端口号和所丢失数据包的序列号,从网关设备本地缓存的组播数据包中,查找丢失的数据包。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 include: step S221, parsing the RTCP-based NACK feedback message, and obtaining the NACK feedback message carried in the NACK feedback message. Multicast group information, destination port number, serial number of the lost data packet and packet loss sequence mask, the packet loss sequence mask is used to determine that the set-top box device has packet loss; step S222, according to the multicast group carried in the NACK feedback message information, destination port number, and sequence number of the lost packet, and find the lost packet from the multicast packets cached locally by the gateway device.
相应地,在该实施方式中,重传响应报文携带重传包标识,重传包标识用于标识重传响应报文;上述步骤S220中,向机顶盒设备发送 重传响应报文的步骤,可以包括步骤S223,根据查找到的丢失的数据包生成重传响应报文,重传响应报文携带基于RTP的头信息、丢失的数据包的原始包序号,以及丢失的数据包在原始RTP数据包中的有效载荷,有效载荷用于获取丢失的数据包的原始内容;步骤S224,通过本家庭网关与机顶盒设备的RTP数据重传通道,发送重传响应报文至机顶盒设备。Correspondingly, in this embodiment, the retransmission response packet carries the retransmission packet identifier, and the retransmission packet identifier is used to identify the retransmission response packet; in the above step S220, the step of sending the retransmission response packet to the set-top box device, Step S223 may be included, generating a retransmission response message according to the found lost data packet, the retransmission response message carrying the RTP-based header information, the original packet sequence number of the lost data packet, and the lost data packet in the original RTP data. The payload in the packet is used to obtain the original content of the lost data packet; in step S224, a 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.
在该实施方式中,重传报文采用RTCP消息发送,机顶盒设备一旦发现有丢包,将采用立即反馈主动上报,本家庭网关在收到机顶盒设备发送的基于RTCP的NACK重传请求报文,对接收的RTCP重传报文进行解析,获取对应的组播组、RTP端口号和丢包序号及丢包序列掩码信息,以利用解析得到的信息查询本地缓存中的组播数据包。In this embodiment, the retransmission message is sent by an RTCP message. Once the set-top box device finds that there is a packet loss, it will use immediate feedback to actively report it. When the home gateway receives the RTCP-based NACK retransmission request message sent by the set-top box device, Analyze the received RTCP retransmission message, obtain the corresponding multicast group, RTP port number, packet loss sequence number, and packet loss sequence mask information, and use the parsed information to query the multicast data packets in the local cache.
本公开实施方式中,网关设备的缓存大小为按照指定分辨率视频的视频速率进行固定时长的缓存,例如按照4K视频速率25~35Mbps进行2秒缓存所需要的缓存空间大小。在实际应用场景中,缓存大小具体可根据实际业务需求和家庭网关的存储配置能力进行适当扩展。In the embodiment of the present disclosure, the cache size of the gateway device is the size of the cache space required to perform caching for a fixed duration according to the video rate of the specified resolution video, for example, the size of the cache space required for 2-second caching according to the 4K video rate of 25-35 Mbps. In practical application scenarios, the cache size can be appropriately expanded according to actual business requirements and the storage configuration capability of the home gateway.
在本公开实施方式中,在步骤S11之后,所述方法还包括:步骤S13,检测到所接收的下行组播数据包的序列号不连续时,向指定的丢包重传服务器发送预重传请求,预重传请求用于请求丢包重传服务器,对接收到的不连续的序列号所对应的组播数据包进行重传;步骤S14,接收丢包重传服务器发送的不连续的序列号所对应的组播数据包。In the embodiment of the present disclosure, after step S11, the method further includes: step S13, when it is detected that the sequence numbers of the received downlink multicast data packets are discontinuous, sending a pre-retransmission to a designated packet loss retransmission server request, the pre-retransmission request is used to request the packet loss retransmission server to retransmit the multicast data packets corresponding to the received discontinuous sequence numbers; step S14, receive the discontinuous sequence sent by the packet loss retransmission server The multicast data packet corresponding to the number.
在该实施方式中,通过有线方式传输时,通常认为丢包率较小,因此,本公开可以提出一种针对网关和机顶盒设备在无线接入方式下的组播重传方法。当家庭网关丢包预检测子模块发现RTP包序号不连续时,可主动向服务器端请求预重传,提高数据重传效率。In this embodiment, it is generally considered that the packet loss rate is small when transmitting in a wired manner. Therefore, the present disclosure can propose a method for multicast retransmission in a wireless access manner for gateways and set-top box devices. When the packet loss pre-detection sub-module of the home gateway finds that the sequence numbers of the RTP packets are discontinuous, it can actively request pre-retransmission from the server to improve the efficiency of data retransmission.
在该实施方式中,家庭网关设备与机顶盒设备可以采用组播或单播的通讯方式,若机顶盒设备为纯单播的业务场景,则按照点播的方式发送,网关一般桥接透传或路由方式下做NAT转换,纯单播应用场景不在本公开的实施方式范围内。In this embodiment, the home gateway device and the set-top box device can use multicast or unicast communication mode. If the set-top box device is a pure unicast service scenario, it is sent in the way of on-demand, and the gateway generally bridges the transparent transmission or routing mode. For NAT translation, pure unicast application scenarios are not within the scope of the embodiments of the present disclosure.
图4示出本公开的组播转单播场景下进行数据重传的流程示意图。在图4中,机顶盒通过有线局域网(Local Area Network,LAN)口或 无线WLAN口,并通过路由设备接入OTT网络侧组播服务器的组播数据流。FIG. 4 shows a schematic flowchart of data retransmission in the multicast-to-unicast scenario of the present disclosure. In Figure 4, the set-top box accesses the multicast data stream of the OTT network side multicast server through a wired local area network (Local Area Network, LAN) port or a wireless WLAN port and through a routing device.
如图4所示,在一个实施方式中,该数据重传方法可以包括如下步骤S401至S406。As shown in FIG. 4, in one embodiment, the data retransmission method may include the following steps S401 to S406.
在步骤S401,机顶盒设备通过无线WLAN口发送携带有组播节目地址信息的HTTP(超文本传输协议,Hypertext Transfer Protocol)请求报文。In step S401, the set-top box device sends an HTTP (Hypertext Transfer Protocol, Hypertext Transfer Protocol) request message carrying the address information of the multicast program through the wireless WLAN port.
在该步骤中,示例性地给出HTTP请求报文的组播投屏命令参考例如:In this step, the multicast screen projection command reference of the HTTP request message is exemplarily given, for example:
http://192.168.1.1:9090/IGMP:224.1.1.2:2024http://192.168.1.1:9090/IGMP:224.1.1.2:2024
以及,http://192.168.1.1:9090/RTP:224.1.1.2:2024and, http://192.168.1.1:9090/RTP:224.1.1.2:2024
家庭网关可以实现组播转单播代理udpxy模块,可以从组播投屏命令参考提取出“IGMP:224.1.1.2:2024”以及“RTP:224.1.1.2:2024”,根据提取出的内容生成HTTP请求报文对应的基于组播协议的组播加入报文。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 HTTP according to the extracted content. The multicast join message based on the multicast protocol corresponding to the request message.
在步骤S402,家庭网关中用于实现组播转单播代理功能的udpxy模块,将上述HTTP请求报文翻译转换为组播加入报文发送至Internet路由WAN连接平面的OTT组播服务器。In step S402, the udpxy module in the home gateway for realizing the multicast-to-unicast proxy function translates the HTTP request message into a multicast join message and sends it to the OTT multicast server of the Internet routing WAN connection plane.
在该步骤中,家庭网关设备收到LAN侧或WLAN侧发送的组播加入报文时,也可以作为代理,通过IGMP组播代理Proxy模块转发该组播加入报文。In this step, when the home gateway device receives the multicast join message sent by 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 Proxy module.
在步骤S403,对于组播转单播播放方式,家庭网关收到WAN侧OTT组播数据流,剥除以太网传输点对点协议(Point-to-Point Protocol over Ethernet,PPPoE)的报头,得到对应UDP组播数据流。In step 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 flow.
在步骤S404,家庭网关对收到的UDP组播数据流进行本地切片存储。In step S404, the home gateway performs local slice storage on the received UDP multicast data stream.
在步骤S405,家庭网关将收到的WAN侧组播数据流转换为传输控制协议(Transmission Control Protocol,TCP)单播数据流。In step S405, the home gateway converts the received WAN side multicast data stream into a Transmission Control Protocol (Transmission Control Protocol, TCP) unicast data stream.
在步骤S406,家庭网关转发单播数据流至WLAN侧的机顶盒设备。In step S406, the home gateway forwards the unicast data stream to the set-top box device on the WLAN side.
在该步骤中,正常组播流不进行单播转换时,其转发流程是家庭网关根据上行学习的协议栈三层组播路由转发到对应的br0网桥设备端口(即源端口),并且,家庭网关将接收到的下行组播数据流转发到对应学习到的LAN侧机顶盒有线和无线接入桥端口(即目的端口)。In this step, when the normal multicast stream does not undergo unicast conversion, the forwarding process is that the home gateway forwards the protocol stack Layer 3 multicast route learned upstream to the corresponding br0 bridge device port (ie the source port), and, The home gateway forwards the received downlink multicast data stream to the corresponding learned wired and wireless access bridge ports (ie, destination ports) of the LAN-side set-top box.
在一个实施方式中,udpxy模块根据UDP目的端口号将组播数据流收包至udpxy进程,由udpxy用户态进程进行RTP组播流缓存,进一步将该组播数据流转换成TCP协议的单播流转发至LAN侧机顶盒。In one embodiment, the udpxy module receives packets of the multicast data stream to the udpxy process according to the UDP destination port number, and the udpxy user mode process performs RTP multicast stream caching, and further converts the multicast data stream into the unicast of the TCP protocol. The stream is forwarded to the LAN side set-top box.
通过上述步骤S401-S406,在组播转单播应用场景中,家庭网关将设备支持WAN广域网侧组播数据流转为LAN局域网侧TCP单播流,并可以包括组播转单播udpxy播放方式或通过HTTP代理HLS播放方式。家庭网关设备根据机顶盒TCP单播重传请求进行数据重发。Through the above steps S401-S406, in the multicast-to-unicast application scenario, the home gateway converts the device-supported multicast data stream on the WAN side to the TCP unicast stream on the LAN side, and may include multicast-to-unicast udpxy playback methods or HLS playback through HTTP proxy. The home gateway device performs data retransmission according to the set-top box TCP unicast retransmission request.
在本公开另一应用场景中,机顶盒设备可以采用基于HTTP协议的流媒体(HTTP Live Streaming,HLS)的播放方式,在该应用场景中,家庭网关可以将接收到的携带有组播节目地址信息的HTTP请求报文,转换为组播加入报文;并从所对应的路由业务平面的组播服务器接收到的下行媒体文件数据包中,获取传输流TS媒体文件,通过HTTP代理的方式转发TS媒体文件至机顶盒设备;基于多媒体数据处理服务MTS,对TS媒体文件在本地进行切片存储。In another application scenario of the present disclosure, the set-top box device can adopt the streaming media (HTTP Live Streaming, HLS) playback mode based on the HTTP protocol. In this application scenario, the home gateway can carry the received multicast program address information. The HTTP request message is converted into a multicast join message; and from the downstream media file data packet received by the multicast server of the corresponding routing service plane, the transport stream TS media file is obtained, and the TS is forwarded through HTTP proxy. The media files are sent to the set-top box device; based on the multimedia data processing service MTS, the TS media files are locally sliced and stored.
在基于HTTP协议的流媒体HLS播放方式的应用场景中,HLS是基于HTTP协议实现的实时流传输协议,传输内容可以包括两部分,一部分是描述文件,例如扩展M3U播放列表(Extended M3U Playlist,M3U8)描述文件,M3U表示音频文件的列表文件;另一部分是TS媒体文件,所以对于HLS方式,家庭网关本地缓存的可以是TS媒体文件,并通过MTS方式进行切片存储。In the application scenario of streaming media HLS playback based on HTTP protocol, HLS is a real-time streaming transmission protocol based on HTTP protocol. ) description file, M3U represents a list file of audio files; the other part is TS media files, so for HLS mode, the home gateway can cache TS media files locally, and store them in slices through MTS mode.
通过上述描述内容可知,在一个实施方式中,若业务请求报文为超文本传输协议HTTP请求报文,则上述步骤S11可以包括:步骤S11-11,将接收到的携带有组播节目地址信息的HTTP请求报文,转换为组播加入报文;步骤S11-12,将转换得到的组播加入报文,发送至组播节目地址信息所对应的路由业务平面的组播服务器。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 include: step S11-11, which carries the address information of the multicast program in the received message. The HTTP request message is converted into a multicast join message; step S11-12, the converted multicast join message is sent to the multicast server of the routing service plane corresponding to the multicast program address information.
当机顶盒设备采用组播转单播的播放方式,则上述步骤S12可以 包括:步骤S12-11,将从所对应的路由业务平面的组播服务器接收到的下行组播数据包,转换为TCP单播数据包,发送TCP单播数据包至机顶盒设备;步骤S12-12,从下行组播数据包中,去除以太网传输点对点协议PPPoE报头和互联网协议(Internet Protocol,IP)报头,得到对应UDP组播数据流,并将UDP的组播数据包进行本地切片存储。When the set-top box device adopts the multicast-to-unicast playback mode, the above step S12 may include: step S12-11, converting the downlink multicast data packet received from the multicast server of the corresponding routing service plane into a TCP unicast broadcast data packets, and send the TCP unicast data packets to the set-top box device; step S12-12, remove the Ethernet transmission point-to-point protocol PPPoE header and the Internet Protocol (Internet Protocol, IP) header from the downlink multicast data packets, and obtain the corresponding UDP group UDP multicast data streams are stored locally in slices.
若机顶盒设备采用基于HTTP协议代理流媒体的播放方式,则上述步骤S12可以包括:步骤S12-21,从所对应的路由业务平面的组播服务器接收到的下行媒体文件数据包中,获取传输流TS媒体文件,通过HTTP代理的方式转发TS媒体文件至机顶盒设备;步骤S12-22,基于多媒体数据处理服务MTS,对TS媒体文件在本地进行切片存储。If the set-top box device adopts the playback mode of proxy streaming media based on the HTTP protocol, the above step S12 may include: step S12-21, obtaining the transport stream from the downstream media file data packets received by the multicast server of the corresponding routing service plane The TS media file is forwarded to the set-top box device by means of HTTP proxy; step S12-22, based on the multimedia data processing service MTS, the TS media file is locally sliced and stored.
在上述实施方式中,对于组播转单播播放的应用场景,以及基于HTTP协议实现的HLS方式播放的应用场景,家庭网关和机顶盒设备之间通过TCP协议进行通讯,并可以实现基于TCP的单播重传。In the above-mentioned embodiments, for the application scenario of multicast-to-unicast playback, and the application scenario of HLS-based playback based on HTTP protocol, the home gateway and the set-top box device communicate through the TCP protocol, and the TCP-based unicast can be implemented. replay.
具体地,在组播转单播播放的应用场景中,机顶盒设备向网关设备发送的第一重传请求,可以是基于TCP协议的单播重传请求,本家庭网关预先缓存的数据包为本地切片存储的UDP数据包,在上述步骤S220中,从本家庭网关预先缓存的数据包中查找丢失的数据包的步骤,具体是指从UDP组播数据流中查找丢失的数据包,并通过TCP单播重传至机顶盒设备。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 may be a unicast retransmission request based on the TCP protocol, and the data packets pre-cached by the home gateway are local Slicing the stored UDP data packets, in the above step S220, the step of searching for the lost data packets from the data packets pre-buffered by the home gateway specifically refers to searching for the lost data packets from the UDP multicast data stream, and sending the data packets through the TCP Unicast retransmission to the set-top box device.
具体地,在基于HTTP协议实现的HLS方式播放的应用场景中,机顶盒设备向网关设备发送的第一重传请求,可以是基于TCP协议的单播重传请求,本家庭网关预先缓存的数据包为本地切片存储的TS媒体文件,在上述步骤S220中,从本家庭网关预先缓存的数据包中查找丢失的数据包的步骤,具体是指则从TS媒体文件中查找丢失的数据包,并通过TCP单播重传至机顶盒设备。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 may be a unicast retransmission request based on the TCP protocol, and the data packet pre-cached by the home gateway For the TS media file stored in the local slice, in the above-mentioned step S220, the step of searching for the lost data packet from the data packet pre-cached by the home gateway specifically refers to searching for the lost data packet from the TS media file, and by TCP unicast retransmission to the set-top box device.
图5示出本公开的网关设备重传响应包帧格式的报文格式示意图。通过图5可知,家庭网关和机顶盒设备之间的重传响应报文的报文格式,可以采用定义私有报文扩展方式,在重传响应报文中携带RTP的头信息、丢失的数据包的原始包序号以及丢失的数据包在原始RTP数据包中的有效载荷。具体实现中,响应报文中包含的多播端口 (Multicast Port)为组播RTP流的目的端口号减1(RTP端口号和RTCP的端口号一般为一对)。FIG. 5 shows a schematic diagram of the packet format of the frame format of the retransmission response packet of the gateway device of the present disclosure. As can be seen from Figure 5, the message format of the retransmission response message between the home gateway and the set-top box device can be extended by defining a private message, and the retransmission response message carries the RTP header information and the missing data packet The original packet sequence number and the payload of the lost packet in the original RTP packet. In the specific implementation, the multicast port (Multicast Port) 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).
在一个实施方式中,若从本家庭网关预先缓存的组播数据包中查找丢失的数据包失败,所述方法还包括:步骤S230,向指定的丢包重传服务器发送第二重传请求,第二重传请求用于请求丢包重传服务器重传丢失的数据包;步骤S231,接收丢包重传服务器发送的丢失的数据包。In one embodiment, if the search for the lost data packet from the multicast data packets pre-cached by the home gateway fails, the method further includes: step S230, sending a second retransmission request to a designated packet loss retransmission server, The second retransmission request is used to request the packet loss retransmission server to retransmit the lost data packet; step S231, receive the lost packet sent by the packet loss retransmission server.
在该实施方式中,如果本家庭网关的本地缓存没有查找到机顶盒设备请求重传的丢失的数据包,则本家庭网关作为代理向上层组播重传服务器继续进行请求重传,以达到WIFI接入下,流畅播放4K视频的目的,同时可以减轻视频服务器的负载。In this embodiment, if the local cache of the home gateway does not find the lost data packet that the set-top box device requests for retransmission, the home gateway acts as a proxy to continue to request retransmission to the upper-layer multicast retransmission server, so as to achieve WIFI connection Enter the purpose of playing 4K video smoothly, and at the same time can reduce the load of the video server.
图6示出本公开的网关设备处理机顶盒发送的重传请求的流程示意图。如图6所示,网关设备处理机顶盒发送的重传请求可以包括如下步骤S601至S605。FIG. 6 shows a schematic flowchart of a gateway device of the present disclosure processing a retransmission request sent by a set-top box. As shown in FIG. 6 , the gateway device processing the retransmission request sent by the set-top box may include the following steps S601 to S605.
在步骤S601,网关设备接收到机顶盒设备发送的RTCP重传请求报文。In step S601, the gateway device receives the RTCP retransmission request message sent by the set-top box device.
在步骤S602,网关设备对接收的RTCP重传进行解析,获取对应的组播组、RTP端口号和丢包序号及丢包序列掩码信息。In step S602, the gateway device parses the received RTCP retransmission, and obtains the corresponding multicast group, RTP port number, packet loss sequence number, and packet loss sequence mask information.
在该步骤中,包序列号(Packet ID,PID),作为丢包序号可以用于指示当前丢失的包起始序号;后继丢失分组的位掩码(Bitmask of Lost Packets,BLP),BLT可以为16位(bits);BLP允许在PID指示的RTP分组之后,立即报告后续16个RTP分组中的任何一个的丢失。即根据当前丢失的包起始序号及BLP计算出后续的重传丢包序号,机顶盒一次重传请求,家庭网关可以响应多个数据包。In this step, the packet sequence number (Packet ID, PID), as the packet loss sequence number, can be used to indicate the start sequence number of the currently lost packet; the bitmask of the subsequent lost packets (Bitmask of Lost Packets, BLP), BLT can be 16 bits (bits); BLP allows the loss of any of the following 16 RTP packets to be reported immediately after the RTP packet indicated by the PID. That is, according to the starting sequence number of the currently lost packet and the BLP, the subsequent packet loss sequence number for retransmission is calculated, and the set-top box requests a retransmission, and the home gateway can respond to multiple data packets.
在步骤S603,网关设备获取本地内核二层或三层缓存的组播RTP原始码流数据包。In step S603, the gateway device obtains the multicast RTP original code stream data packets buffered at the local kernel layer 2 or layer 3.
在步骤S604,网关设备本地缓存查找丢包序号失败,则作为代理再向组播丢包重传服务器请求重传丢失的包。In step S604, if the local cache of the gateway device fails to find the sequence number of the lost packet, it acts as a proxy to request retransmission of the lost packet from the multicast packet loss retransmission server.
在步骤S605,网关设备重新按照和机顶盒设备通信的帧格式进行RTP封包并响应给STB客户端。In step S605, the gateway device performs RTP packets again according to the frame format communicated with the set-top box device and responds to the STB client.
通过上述在步骤S601-S605,通过家庭网关实现组播RTP数据流重传控制的方法,通过该方法可以有效减少组播服务器负载、重传时延和网络拥塞情况。Through the above-mentioned method for implementing multicast RTP data stream retransmission control through the home gateway in steps S601-S605, the multicast server load, retransmission delay and network congestion can be effectively reduced by this method.
根据本公开的数据重传方法,家庭网关在接收到机顶盒设备出现丢包时直接向本家庭网关发起的重传请求时,通过预先在本地缓存的组播码流查找机顶盒设备请求重传的丢失的数据包括,并将本地缓存中查找到的数据报文重新发送给机顶盒设备,有效减少组播服务器RTCP重传报文负载和降低网络重传时延。According to the data retransmission method of the present disclosure, when receiving a retransmission request directly initiated by the set-top box device to the home gateway when packet loss occurs, the home gateway searches for the loss of retransmission requested by the set-top box device through the locally cached multicast stream in advance The data includes and resends the data packets found in the local cache to the set-top box device, effectively reducing the RTCP retransmission packet load of the multicast server and reducing the network retransmission delay.
图7示出本公开的数据重传方法的流程示意图。该数据重传方法可以应用于机顶盒设备,如图7所示,该方法可以包括如下步骤S710和S720。FIG. 7 shows a schematic flowchart of the data retransmission method of the present disclosure. The data retransmission method can be applied to a set-top box device. As shown in FIG. 7 , the method can include the following steps S710 and S720.
在步骤S710,检测到接收的组播数据包发生包丢失时,向指定的网关设备发送第一重传请求,第一重传请求用于请求网关设备重传丢失的数据包。In step S710, when it is detected that the received multicast data packet is lost, a first retransmission request is sent to the designated gateway device, and the first retransmission request is used to request the gateway device to retransmit the lost data packet.
在步骤S720,接收网关设备的重传响应报文,得到重传响应报文中携带的丢失的数据包,其中,丢失的数据包是在该网关设备本地缓存中查找到的数据包。In step S720, the retransmission response message of the gateway device is received, and the lost data packet carried in the retransmission response message is obtained, wherein the lost data packet is the data packet found in the local cache of the gateway device.
在该实施方式中,机顶盒设备检测到所接收的下行组播数据包发生包丢失时,直接向网关设备发送重传请求,从而得到网关设备在本地缓存中查找到的丢失的数据包。In this embodiment, when the set-top box device detects that the received downlink multicast data packet is lost, it directly sends a retransmission request to the gateway device, thereby obtaining the lost data packet found in the local cache by the gateway device.
在一个实施方式中,第一重传请求是基于实时传输控制协议RTCP的非确认NACK反馈消息,在该实施方式中,步骤S710具体可以包括:检测到接收的组播数据包发生包丢失,且丢包率在预定丢包率区间范围内时,向指定的网关设备发送基于RTCP的NACK反馈消息,其中,NACK反馈消息中携带指定的组播组、目的端口号和所丢失数据包的序列号。In one embodiment, the first retransmission request is an unacknowledged NACK feedback message based on the real-time transmission control protocol RTCP. In this embodiment, step S710 may specifically include: detecting that the received multicast data packet is lost, and When the packet loss rate is within the predetermined packet loss rate range, send an RTCP-based NACK feedback message to the specified gateway device, where the NACK feedback message carries the specified multicast group, destination port number and the sequence number of the lost data packet .
在该实施方式中,如果机顶盒设备STB组播通道数据经丢包重传模块检测到丢包,且丢包率在预定丢包率区间范围内时,向家庭网关发送RTCP的NACK重传请求报文;家庭网关收到NACK重传请求报文后,通过数据重传通道例如RTP通道回复重传数据包。In this embodiment, if the STB multicast channel data of the set-top box device detects packet loss through the packet loss retransmission module, and the packet loss rate is within the predetermined packet loss rate range, it sends an RTCP NACK retransmission request message to the home gateway. message; after receiving the NACK retransmission request message, the home gateway replies to the retransmitted data packet through a data retransmission channel such as an RTP channel.
在该实施方式中,网关和STB之间重传数据包的传输通信方式,如通过指定IP和私有端口号UDP无连接方式进行通信。In this implementation manner, the transmission communication mode for retransmitting data packets between the gateway and the STB, such as communication by specifying IP and private port number UDP connectionless mode.
家庭网关和STB之间的通信可采用UDP采用无连接方式进行通信时,作为一个示例,例如固定IP为192.168.1.1和某个指定私有端口,一般机顶盒在IGMP Proxy路由代理方式对应的OTT接入场景下采用如此方案,此时机顶盒获取的是网关分配的小网地址(即小网段地址,例如192.168.1.x);The communication between the home gateway and the STB can use UDP to communicate in a connectionless mode. As an example, for example, the fixed IP is 192.168.1.1 and a specified private port. Generally, the set-top box accesses the OTT corresponding to the IGMP Proxy routing proxy mode. In this scenario, the set-top box obtains the small network address (ie the small network segment address, such as 192.168.1.x) assigned by the gateway;
作为另一示例,对于机顶盒和桥接方式接入IPTV服务器场景,机顶盒可以采用两个虚拟MAC,其中一个虚拟媒体接入控制(Media Access Control,MAC)地址和网关采用上述UDP方式通信,另一个虚拟MAC地址获取的是IPTV专网业务平面的大网地址(即大网段地址)。As another example, for a scenario where a set-top box is connected to an IPTV server in a bridging manner, the set-top box may use two virtual MACs, one of which is a virtual Media Access Control (MAC) address and the gateway to communicate in the above-mentioned UDP manner, and the other virtual MAC address. The MAC address obtained is the large network address (that is, the large network segment address) of the IPTV private network service plane.
下面通过图8和图9描述机顶盒设备发送反馈消息的报文格式示意图。图8示出本公开实施方式的机顶盒反馈消息的通过包报文格式示意图;图9示出图8中机顶盒反馈消息的具体负载的报文格式示意图。The following describes a schematic diagram of the message format of the feedback message sent by the set-top box device by using FIG. 8 and FIG. 9 . FIG. 8 shows a schematic diagram of a packet format of a set-top box feedback message according to an embodiment of the present disclosure; FIG. 9 shows a schematic diagram of a packet format of a specific payload of the set-top box feedback message in FIG. 8 .
在图8中,机顶盒设备的重传请求报文采用RTCP消息发送,机顶盒设备一旦发现有丢包,可以立即通过重传请求报文反馈给网关设备。在重传请求报文的RTCP报头中,FMT和PT可以用于决定报文的类型,反馈控制信息(Feedback control Information,FCI)则是该类型报文的具体负载。作为示例,如图8所示,当FMT=1并且PT=205时,代表此报文是个NACK报文。In FIG. 8 , the retransmission request message of the set-top box device is sent by using an RTCP message. Once the set-top box device finds that there is packet loss, it can immediately feed back the retransmission request message to the gateway device. In the RTCP header of the retransmission request message, FMT and PT can be used to determine the type of the message, and the feedback control information (Feedback control Information, FCI) is the specific payload of this type of message. As an example, as shown in FIG. 8 , when FMT=1 and PT=205, it means that the packet is a NACK packet.
在图9中,FCI指示的NACK报文中,包括:包序列号(Packet ID,PID),用于标示丢失的包的序号;丢包序列掩码,(Bitmask Of Following Lost Packets,BLP),是从PID开始的16个包的掩码,BLP为1,标识机顶盒设备发生包丢失,BLP为0表示机顶盒设备未上报丢包。In Figure 9, the NACK message indicated by the FCI includes: the packet sequence number (Packet ID, PID), which is used to indicate the sequence number of the lost packet; the packet loss sequence mask, (Bitmask Of Following Lost Packets, BLP), It is a mask of 16 packets starting from the PID. The BLP is 1, which indicates that the set-top box device has lost packets. The BLP is 0, which means that the set-top box device has not reported packet loss.
在该实施方式中,机顶盒设备发现丢包时,通过上述图8和图9示出的机顶盒设备发送反馈消息的报文格式,向网关设备发送重传请求,并在该重传请求中携带丢失的包的序列号和丢包序列掩码。In this embodiment, when the set-top box device finds packet loss, it sends a retransmission request to the gateway device through the packet format of the feedback message sent by the set-top box device shown in Figures 8 and 9, and the retransmission request carries the lost packet. The sequence number of the packet and the packet loss sequence mask.
在一个实施方式中,在步骤S710之前,检测到接收的组播数据包发生包丢失之前,所述方法还包括:步骤S701,向网关设备发送组播加入报文,组播加入报文用于请求加入组播组,且组播加入报文中携带组播源端口设备信息和请求加入的组播组信息;步骤S702,接收网关设备发送的请求加入的组播组的组播数据包。In one embodiment, before step S710, before it is detected that the received multicast data packet is lost, the method further includes: step S701, sending a multicast join message to the gateway device, and the multicast join message is used for 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; Step S702, receive the multicast data packet of the multicast group requested to join sent by the gateway device.
在一个实施方式中,若机顶盒设备采用组播转单播udpxy的播放方式或者基于HTTP协议代理流媒体的播放方式,S720中接收网关设备的重传响应报文的步骤,具体可以包括:通过超文本传输协议HTTP代理,接收网关设备转发的基于传输控制协议TCP的单播数据包,得到TCP单播数据包中携带的丢失的数据包。In one embodiment, if the set-top box device adopts the playback mode of multicast-to-unicast udpxy or the playback mode of proxy streaming media based on the HTTP protocol, the step of receiving the retransmission response message of the gateway device in S720 may specifically include: The HTTP proxy of the text transmission protocol receives the unicast data packets based on the transmission control protocol TCP forwarded by the gateway device, and obtains the lost data packets carried in the TCP unicast data packets.
在该实施方式中,在机顶盒采用组播转单播的播放方式的应用场景中,家庭网关可以通过udpxy模块将下行组播数据流转换为TCP单播数据流,并将转换后的TCP单播数据流发送至机顶盒设备,用于实现网关和机顶盒之间直接进行TCP单播重传;在机顶盒设备采用基于HTTP协议代理流媒体的播放方式的应用场景中,通过HTTP代理的方式转发TS媒体文件至机顶盒设备,这两种场景下,都可以支持在网关和机顶盒之间直接进行TCP单播重传,而不需要机顶盒和组播服务器之间进行直接重传。In this embodiment, in the application scenario where the set-top box adopts the multicast-to-unicast playback mode, the home gateway can convert the downlink multicast data stream into a TCP unicast data stream through the udpxy module, and convert the converted TCP unicast data stream into a TCP unicast data stream. The data stream is sent to the set-top box device to implement TCP unicast retransmission directly between the gateway and the set-top box; in the application scenario where the set-top box device adopts the HTTP protocol proxy-based streaming media playback mode, the TS media file is forwarded by HTTP proxy. To the set-top box device, in both scenarios, TCP unicast retransmission can be supported directly between the gateway and the set-top box, without the need for direct retransmission between the set-top box and the multicast server.
在一个实施方式中,重传响应报文是通过机顶盒设备与网关设备之间的RTP数据通道接收的报文,且重传响应报文携带重传包标识,重传包标识用于标识重传响应报文;在该实施方式中,在步骤S720之后,该方法还可以包括:步骤S730,获取重传响应报文中携带的基于实时传输协议RTP的头信息、丢失的数据包的原始包序号,以及丢失的数据包在原始RTP数据包中的有效载荷;步骤S731,解析基于RTP的头信息,若头信息中包含重传包标识,则从原始包中的有效载荷中解析得到重传的丢失的数据包;步骤S732,组装当前接收的丢失的数据包和已收到的未丢失的数据包,得到组装后的数据包,解码组装后的数据包,以对解码得到的数据进行播放。In one embodiment, the retransmission response packet is a packet received through an RTP data channel between the set-top box device and the gateway device, and the retransmission response packet carries a retransmission packet identifier, which is used to identify the retransmission response message; in this embodiment, after step S720, the method may further include: step S730, acquiring the header information based on real-time transmission protocol RTP and the original packet sequence number of the lost data packet carried in the retransmission response message , and the payload of the lost data packet in the original RTP data packet; Step S731, parse the header information based on RTP, if the header information contains the retransmission packet identifier, then parse out the retransmitted packet from the payload in the original packet Lost data packets; Step S732, assemble the currently received lost data packets and the received non-lost data packets to obtain the assembled data packets, and decode the assembled data packets to play the decoded data.
根据本公开实施方式的数据重传方法,机顶盒设备检测到有丢包后,向家庭网关发起重传请求,并接收网关设备重传的该丢失的数据 报文重新发送给机顶盒,得到组装后完整的组播数据包。在该数据重传方法中,相比检测到有丢包后向组播服务器发送重传请求,能够有效减少组播服务器负载、重传时延和网络拥塞情况。According to the data retransmission method of the embodiment of the present disclosure, after detecting that there is packet loss, the set-top box device initiates a retransmission request to the home gateway, and receives the lost data message retransmitted by the gateway device and re-sends it to the set-top box. multicast packets. In the data retransmission method, compared with sending a retransmission request to the multicast server after detecting packet loss, the load of the multicast server, the retransmission delay and the network congestion can be effectively reduced.
图10示出本公开的数据重传方法的流程示意图。该数据重传方法可以应用于组播服务器,如图10所示,该数据重传方法可以包括如下步骤S810和S820。FIG. 10 shows a schematic flowchart of the data retransmission method of the present disclosure. The data retransmission method may be applied to a multicast server. As shown in FIG. 10 , the data retransmission method may include the following steps S810 and S820.
在步骤S810,接收指定的网关设备发送的组播加入报文,组播加入报文是机顶盒设备发送至网关设备的组播加入报文,或根据机顶盒设备发送的基于超文本传输协议HTTP的请求报文进行转换得到的组播加入报文;In step S810, a multicast join message sent by the designated gateway device is received, where the multicast join message is a multicast join message sent by the set-top box device to the gateway device, or a request based on the hypertext transfer protocol HTTP sent by the set-top box device The multicast join message obtained by converting the message;
在步骤S820,发送请求加入的组播组的组播数据包至指定的丢包重传服务器和网关设备,其中,所发送的组播数据包在网关设备被本地缓存,且所发送的组播数据包在网关设备中被用于向机顶盒设备重传机顶盒设备丢失的数据。In step S820, the multicast data packet of the multicast group requested to join is sent to the designated packet loss retransmission server and the gateway device, wherein the sent multicast data packet is locally cached in the gateway device, and the sent multicast The data packets are used in the gateway device to retransmit data lost by the set top box device to the set top box device.
在该数据重传方法中,家庭网关接收到机顶盒设备请求加入组播组的组播加入报文时,获取对应的组播组、报文源端口设备信息,并根据当前网关配置的组播VLAN添加相应的组播学习条目,进一步根据家庭网关的组网及IPTV业务平面部署情况,将组播加入报文转发至对应的桥接或路由业务平面,如桥接B平面(对应于IPTV专网)或Internet路由上网的A平面(对应于OTT应用场景)。作为示例,源端口可以是根据内核收包的缓冲区域(Struct sk_buffer,skb)对应设备标识符确定的,如以太网端口eth0或无线局域网端口wlan0。In the data retransmission method, when the home gateway receives a multicast join message that the set-top box device requests to join the multicast group, it obtains the corresponding multicast group and message source port device information, and according to the multicast VLAN configured by the current gateway Add the corresponding multicast learning entry, and further forward the multicast join message to the corresponding bridging or routing service plane according to the networking of the home gateway and the deployment of the IPTV service plane, such as the bridging B plane (corresponding to the IPTV private network) or A plane for Internet routing (corresponding to OTT application scenarios). As an example, the source port may be determined according to a device identifier corresponding to a buffer area (Struct sk_buffer, skb) received by the kernel, such as an Ethernet port eth0 or a wireless LAN port wlan0.
组播服务器在接收到网关设备发送的组播加入报文后,发送对应组播组的下行组播数据包至丢包重传服务器和网关设备,以使网关设备本地缓存该下行组播数据包,并用于向机顶盒设备重传机顶盒设备丢失的数据包,因此,在机顶盒设备侧发生丢包时,由网关设备向机顶盒设备重传丢失的数据包,而无需通过该组播服务器接收并处理大量的数据重传请求,从而有效减少组播服务器负载、重传时延和网络拥塞情况。After receiving the multicast join packet sent by the gateway device, the multicast server sends the downlink multicast data packet corresponding to the 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 is used to retransmit the data packets lost by the set-top box device to the set-top box device. Therefore, when a packet loss occurs on the set-top box device side, the gateway device retransmits the lost data packets to the set-top box device without receiving and processing a large number of data packets through the multicast server. This can effectively reduce the load of multicast servers, retransmission delay and network congestion.
需要明确的是,本公开并不局限于上文实施方式中所描述并在图 中示出的特定配置和处理。为了描述的方便和简洁,这里省略了对已知方法的详细描述,并且上述描述的系统、模块和单元的具体工作过程,可以参考前述方法实施方式中的对应过程,在此不再赘述。It is to be understood that the present disclosure 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, the detailed description of the known method is omitted here, and the specific working process of the system, module and unit described above can refer to the corresponding process in the foregoing method implementation, which will not be repeated here.
图11示出本公开的数据重传方法的流程示意图。该数据重传方法可以应用于组播重传服务器,如图11所示,该数据重传方法可以包括如下步骤S910至S930。FIG. 11 shows a schematic flowchart of the data retransmission method of the present disclosure. The data retransmission method may be applied to a multicast retransmission server. As shown in FIG. 11 , the data retransmission method may include the following steps S910 to S930.
在步骤S910,接收并保存组播服务器发送的组播数据包。In step S910, the multicast data packet sent by the multicast server is received and saved.
在步骤S920,接收指定的网关设备发送的第二重传请求,第二重传请求用于请求丢包重传服务器重传指定的机顶盒设备丢失的数据包,且网关设备当前在本地缓存的组播数据包中未包含机顶盒设备丢失的数据包。In step S920, a second retransmission request sent by the designated gateway device is received, and the second retransmission request is used to request the packet loss retransmission server to retransmit the data packets lost by the designated set-top box device, and the gateway device currently caches the data packets in the local cache. The data packets lost by the set-top box device are not included in the broadcast data packets.
在步骤S930,从保存的组播数据包中,查找并发送丢失的数据包至组播服务器,丢失的数据包在组播服务器中被转发至机顶盒设备。In step S930, from the saved multicast data packets, find and send the lost data packets to the multicast server, and the lost data packets are forwarded to the set-top box device in the multicast server.
在该数据重传方法中,组播丢包重传服务器接收到网关设备请求重传指定的机顶盒设备丢失的数据包的重传请求时,将丢失的数据包至组播服务器,由于该重传请求是网关设备当前在本地缓存的组播数据包中未包含机顶盒设备丢失的数据包的情况下发出的,相比每次机顶盒设备丢包时,组播丢包重传服务器都会接收到并处理机顶盒设备发送的重传请求,减少了重传的网络时延,同时可以减少组播服务器负载和网络拥塞。In the data retransmission method, when the multicast packet loss retransmission server receives the retransmission request from the gateway device to retransmit the lost data packet of the specified set-top box device, it sends the lost data packet to the multicast server. The request is sent by the gateway device when the locally cached multicast data packets do not contain the data packets lost by the set-top box device. Compared with each time the set-top box device loses packets, the multicast packet loss retransmission server will receive and process it. The retransmission request sent by the set-top box device reduces the network delay of the retransmission, and at the same time can reduce the load of the multicast server and the network congestion.
需要明确的是,本公开并不局限于上文实施方式中所描述并在图中示出的特定配置和处理。为了描述的方便和简洁,这里省略了对已知方法的详细描述,并且上述描述的系统、模块和单元的具体工作过程,可以参考前述方法实施方式中的对应过程,在此不再赘述。It is to be understood that the present disclosure 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, the detailed description of the known method is omitted here, and the specific working process of the system, module and unit described above can refer to the corresponding process in the foregoing method implementation, which will not be repeated here.
图12是本公开的通过家庭网关实现STB组播数据流重传的流程示意图。在该实施方式中,该方法包括如下步骤S1001-a至S1010。FIG. 12 is a schematic flowchart of implementing STB multicast data stream retransmission through a home gateway according to the present disclosure. In this embodiment, the method includes the following steps S1001-a to S1010.
在步骤S1001-a,机顶盒发送组播加入报文。In step S1001-a, the set-top box sends a multicast join message.
在步骤S1001-b,家庭网关通过桥接方式透传或作为组播路由代理方式转发相应的组播加入报文至组播服务器。In step S1001-b, the home gateway forwards the corresponding multicast join message to the multicast server in a bridging manner or in a multicast routing proxy manner.
在步骤S1002,组播服务器发送对应组播组的RTP数据流给家庭 网关和组播丢包重传服务器。In step 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.
在步骤S1003,组播丢包重传服务器对相应频道的组播数据流进行同步保存。In step S1003, the multicast packet loss retransmission server synchronously saves the multicast data stream of the corresponding channel.
在步骤S1004,家庭网关设备收到下行组播数据流,转发给LAN侧机顶盒并进行本地缓存。In step S1004, the home gateway device receives the downlink multicast data stream, forwards it to the LAN-side set-top box, and caches it locally.
在该步骤中,本公开实施方式中的机顶盒可以使用无线或有线接入方式,该数据流重传方法主要可以针对机顶盒的无线接入方式。In this step, the set-top box in the embodiment of the present disclosure may use a wireless or wired access manner, and the data stream retransmission method may mainly be directed to the wireless access manner of the set-top box.
在该步骤中,家庭网关设备可按区分组播组和RTP目的端口号进行本地缓存。In this step, the home gateway device may perform local caching according to the zoned multicast group and the RTP destination port number.
在步骤S1005,机顶盒设备收到组播数据流后,检测到有丢包,向本地家庭网关发起RTCP请求重传丢失的数据包。In step S1005, after receiving the multicast data stream, the set-top box device detects that there is packet loss, and initiates an RTCP request to the local home gateway to retransmit the lost data packet.
在该步骤中,机顶盒设备进行RTP丢包检查,如果是组播带FEC(前向纠错)功能,则先进行FEC恢复,当FEC不能恢复确认为码流有丢包时,则向本地家庭网关发起RTCP请求重传丢失的数据包,其内容带有RTCP标准头和私有定义的扩展字段帧格式内容。In this step, the set-top box device performs 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 stream, the The gateway initiates an RTCP request to retransmit the lost data packet, and its content contains the RTCP standard header and the privately defined extension field frame format content.
在步骤S1006,家庭网关设备收到RTCP重传报文请求,将本地缓存中查找到的该丢失的组播数据包发送给机顶盒设备。In step S1006, the home gateway device receives the RTCP packet retransmission request, and sends the lost multicast data packet found in the local cache to the set-top box device.
在该步骤中,家庭网关设备获取本地内核二层或三层缓存的组播组数据包,如果获取成功,则按照和机顶盒之间定义的重传响应包私有帧格式,重传对应丢失的组播数据包给机顶盒。In this step, the home gateway device acquires the multicast group data packets cached at the local kernel layer 2 or layer 3, and if the acquisition is successful, it retransmits the corresponding lost group according to the private frame format of the retransmission response packet defined between it and the set-top box. broadcast data packets to the set-top box.
在步骤S1007,如果本地缓存查找丢包序号失败,则家庭网关设备作为组播服务器本地代理继续向组播丢包重传服务器请求重传丢失的包。In step S1007, if the local cache fails to find the packet loss sequence number, the home gateway device, as the local proxy of the multicast server, continues to request the multicast packet loss retransmission server to retransmit the lost packets.
在步骤S1008,组播丢包重传服务器收到重传报文请求,重传对应丢失的组播数据包给家庭网关。In step S1008, the multicast packet loss retransmission server receives the packet retransmission request, and retransmits the corresponding lost multicast data packet to the home gateway.
在步骤S1009,家庭网关设备收到服务响应的重传包解码后重新按照和机顶盒设备定义的响应包私有帧格式转发给机顶盒设备。In step S1009, after receiving the retransmission packet of the service response, the home gateway device decodes it and forwards it to the set-top box device again according to the private frame format of the response packet defined with the set-top box device.
在步骤S1010,机顶盒设备根据当前接收的重传包和之前已收到的正常包重新组装完整,解码输出后给电视播放。In step S1010, the set-top box device reassembles the complete retransmission packet according to the currently received retransmission packet and the normal packet that has been received before, decodes the output and then plays it on the TV.
通过上述步骤S1001-S1010,在家庭网关本地对组播数据流进行 缓存,机顶盒设备检测到丢包时,优先向家庭网关请求RTCP重传,重传时延小,并可有效减少组播服务器RTCP重传报文负载和降低网络重传时延。Through the above steps S1001-S1010, the multicast data stream is cached locally on the home gateway, and when the set-top box device detects packet loss, it will first request the home gateway for RTCP retransmission, the retransmission delay is small, and the multicast server RTCP can be effectively reduced Retransmit packet load and reduce network retransmission delay.
下面结合附图,详细介绍根据本公开的数据重传装置。图13示出本公开提供的数据重传装置的结构示意图。如图13所示,数据重传装置可以应用于家庭网关设备,并包括如下模块:第一重传请求接收模块1110,配置为接收来自机顶盒设备的第一重传请求,第一重传请求用于请求本家庭网关重传丢失的数据包;丢失包重传模块1120,配置为从本家庭网关预先缓存的数据包中查找丢失的数据包,向机顶盒设备发送重传响应报文,重传响应报文携带有查找到的丢失的数据包。The data retransmission apparatus according to the present disclosure will be described in detail below with reference to the accompanying drawings. FIG. 13 shows a schematic structural diagram of a data retransmission apparatus provided by the present disclosure. As shown in FIG. 13 , the data retransmission apparatus can be applied to a home gateway device, and includes the following modules: a first retransmission request receiving module 1110, configured to receive a first retransmission request from a set-top box device, and the first retransmission request uses In order to request the home gateway to retransmit the lost data packets; the lost packet retransmission module 1120 is configured to search for the lost data packets from the data packets pre-cached by the home gateway, send a retransmission response message to the set-top box device, and retransmit the response The message carries the found lost packets.
在本公开的具体实施方案中,可以是采用组播数据包在CPU的芯片中进行处理的方案,后续可以在内核二层或三层进行数据包缓存和转发,对于部分芯片组播数据包不在CPU中进行处理,而是可以直接走芯片的硬加速转发方案,传输效率更高。In the specific embodiment of the present disclosure, it can be a scheme that multicast data packets are processed in the chip of the CPU, and then the data packets can be buffered and forwarded at the second or third layer of the kernel. For some chips, the multicast data packets are not For processing in the CPU, the hard-accelerated forwarding scheme of the chip can be used directly, and the transmission efficiency is higher.
在一个实施方式中,家庭网关设备中的数据重传装置还可以包括:业务请求转发模块,配置为在接收来自机顶盒设备的第一重传请求之前,接收到来自机顶盒设备的不同业务请求报文时,将不同的业务请求报文发送至对应的组播服务器;报文缓存与转发模块,配置为在本家庭网关本地,对从对应的组播服务器接收的下行数据包,进行预定方式的缓存和转发,其中,预定方式与不同的业务请求报文和机顶盒设备的播放方式相对应。In one embodiment, the apparatus for data retransmission in the home gateway device may further include: a service request forwarding module, configured to receive different service request packets from the set-top box device before receiving the first retransmission request from the set-top box device When different service request messages are sent to the corresponding multicast server; the message buffering and forwarding module is configured to cache the downlink data packets received from the corresponding multicast server locally in the home gateway in a predetermined manner and forwarding, wherein the predetermined mode corresponds to different service request messages and playback modes of the set-top box device.
在一个实施方式中,若业务请求报文为组播加入报文,则业务请求转发模块,具体配置为根据接收到的机顶盒设备的组播加入报文,将获取的对应的组播组信息、报文源端口设备信息,以及预先在本家庭网关配置的组播VLAN信息,添加为相应的组播学习条目;根据本家庭网关的组网及网络协议电视IPTV业务平面部署信息,将组播加入报文转发至对应的桥接业务平面的组播服务器或路由业务平面的组播服务器;报文缓存与转发模块,具体配置为发送所接收的下行组播数据包至机顶盒设备;将下行组播数据包,按照不同的组播地址和基于实时传输协议RTP的目的端口号,通过循环覆盖的方式缓存至本家 庭网关的预设缓存队列中。In one embodiment, if the service request message is a multicast join message, the service request forwarding module is specifically configured to, according to the received multicast join message of the set-top box device, convert the obtained corresponding multicast group information, The device information of the packet source port and the multicast VLAN information pre-configured on the home gateway are added as the corresponding multicast learning entries; according to the networking of the home gateway and the network protocol TV IPTV service plane deployment information, the multicast is added The message is forwarded to the corresponding multicast server bridging the service plane or the multicast server of the routing service plane; the message buffering and forwarding module is specifically configured to send the received downlink multicast data packets to the set-top box device; the downlink multicast data The packets are buffered in the preset buffer queue of the home gateway by means of cyclic coverage according to different multicast addresses and destination port numbers based on the real-time transmission protocol RTP.
在一个实施方式中,缓存的存储空间大小,是预先根据所接收组播数据包对应的业务需求确定的存储空间大小,业务需求由所传输的组播数据包中的视频数据的分辨率、传输速率和缓存时间确定。In one embodiment, the size of the cached storage space is the size of the storage space determined in advance according to the service requirements corresponding to the received multicast data packets. The rate and cache time are determined.
在一个实施方式中,业务请求报文为超文本传输协议HTTP请求报文,则业务请求转发模块具体配置为将接收到的携带有组播节目地址信息的HTTP请求报文,转换为组播加入报文;将转换得到的组播加入报文,发送至组播节目地址信息所对应的路由业务平面的组播服务器。In one embodiment, the service request message is a hypertext transfer protocol HTTP request message, and the service request forwarding module is specifically configured to convert the received HTTP request message carrying the address information of the multicast program into a multicast join message; send the converted multicast join message to the multicast server of the routing service plane corresponding to the address information of the multicast program.
在一个实施方式中,家庭网关设备中的数据重传装置还可以包括:预重传请求发送模块,配置为在根据组播加入报文中的组播源端口转发组播加入报文之后,检测到所接收的下行组播数据包的序列号不连续时,向指定的丢包重传服务器端发送预重传请求,预重传请求用于请求丢包重传服务器端,对接收到的不连续的序列号所对应的组播数据包进行重传;预重传数据包接收模块,配置为接收丢包重传服务器发送的不连续的序列号所对应的组播数据包。In one embodiment, the apparatus for data retransmission in the home gateway device may further include: a pre-retransmission request sending module, configured to, after forwarding the multicast join message according to the multicast source port in the multicast join message, detect When the sequence numbers of the received downlink multicast data packets are discontinuous, send a pre-retransmission request to the designated packet loss retransmission server. The pre-retransmission request is used to request the packet loss retransmission server. The multicast data packets corresponding to the consecutive sequence numbers are retransmitted; the pre-retransmission data packet receiving module is configured to receive the multicast data packets corresponding to the discontinuous sequence numbers sent by the packet loss retransmission server.
在一个实施方式中,若机顶盒设备采用组播转单播udpxy的播放方式,则家庭网关设备中的报文缓存与转发模块具体配置为:将从所对应的路由业务平面的组播服务器接收到的下行组播数据包,转换为TCP单播数据包,发送TCP单播数据包至机顶盒设备;从下行组播数据包中,去除以太网传输点对点协议PPPoE报头和IP报头,得到对应UDP组播数据流,并将UDP的组播数据包进行本地切片存储。In one embodiment, if the set-top box device adopts the playback mode of multicast-to-unicast udpxy, the message buffering and forwarding module in the home gateway device is specifically configured to: receive from the multicast server of the corresponding routing service plane The downlink multicast data packets are converted into TCP unicast data packets, and the TCP unicast data packets are sent to the set-top box device; from the downlink multicast data packets, the Ethernet transmission point-to-point protocol PPPoE header and IP header are removed to obtain the corresponding UDP multicast data stream, and store UDP multicast packets in local slices.
在一个实施方式中,若机顶盒设备采用基于HTTP协议代理流媒体的播放方式,则家庭网关设备中的报文缓存与转发模块具体配置为:从所对应的路由业务平面的组播服务器接收到的下行媒体文件数据包中,获取传输流TS媒体文件,通过HTTP代理的方式转发TS媒体文件至机顶盒设备;基于多媒体数据处理服务MTS,对TS媒体文件在本地进行切片存储。In one embodiment, if the set-top box device adopts the playback mode of proxy streaming media based on the HTTP protocol, the message buffering and forwarding module in the home gateway device is specifically configured to: In the downlink media file data packet, the transport stream TS media file is obtained, and the TS media file is forwarded to the set-top box device by means of HTTP proxy; based on the multimedia data processing service MTS, the TS media file is locally sliced and stored.
在一个实施方式中,第一重传请求是机顶盒设备发送的基于实时传输控制协议RTCP的非确认NACK反馈消息,本家庭网关预先缓存 的组播数据包是按照不同的组播组、目的端口号和原始包序号进行缓存的组播数据包。In one embodiment, the first retransmission request is an unacknowledged NACK feedback message based on the real-time transmission control protocol (RTCP) sent by the set-top box device, and the multicast data packets pre-buffered by the home gateway are based on different multicast groups, destination port numbers Multicast packets that are buffered with the original packet sequence number.
在该实施方式中,家庭网关设备中的丢失包重传模块1120,具体配置为:解析基于RTCP的NACK反馈消息,得到NACK反馈消息中携带的组播组信息、目的端口号、所丢失数据包的序列号和丢包序列掩码,丢包序列掩码用于确定机顶盒设备出现包丢失;根据NACK反馈消息中携带的组播组信息、目的端口号和所丢失数据包的序列号,从本网关设备本地缓存的组播数据包中,查找丢失的数据包。In this embodiment, the lost packet retransmission module 1120 in the home gateway device is specifically configured to: parse the RTCP-based NACK feedback message to obtain the multicast group information, destination port number, lost data packets carried in the NACK feedback message The packet loss sequence mask is used to determine the packet loss of the set-top box device; according to the multicast group information, destination port number and the sequence number of the lost data packet carried in the NACK feedback message, the Look for lost packets in the multicast packets cached locally by the gateway device.
在一个实施方式中,重传响应报文携带重传包标识,重传包标识用于标识重传响应报文;家庭网关设备中的丢失包重传模块1120,具体配置为根据查找到的丢失的数据包生成重传响应报文,重传响应报文携带基于实时传输协议RTP的头信息、丢失的数据包的原始包序号,以及丢失的数据包在原始RTP数据包中的有效载荷;通过本家庭网关与机顶盒设备的RTP数据重传通道,发送重传响应报文至机顶盒设备。In one embodiment, the retransmission response packet carries a retransmission packet identifier, and the retransmission packet identifier is used to identify the retransmission response packet; the lost packet retransmission module 1120 in the home gateway device is specifically configured to The retransmission response message is generated by the data packet, and the retransmission response message carries the header information based on the real-time transmission protocol RTP, 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 RTP data retransmission channel between the home gateway and the set-top box device sends a retransmission response message to the set-top box device.
在一个实施方式中,若第一重传请求是基于TCP协议的单播重传请求,且机顶盒设备采用组播转单播的播放方式,则家庭网关设备中的丢失包重传模块1120,具体还配置为从本家庭网关预先缓存的UDP组播数据包中查找丢失的数据包;以及,若第一重传请求是基于TCP协议的单播重传请求,且机顶盒设备采用采用HTTP协议代理流媒体的播放方式,则家庭网关设备中的丢失包重传模块1120具体还配置为:从本家庭网关预先缓存的TS媒体文件中查找丢失的数据包。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 mode, the lost packet retransmission module 1120 in the home gateway device, specifically It is also configured 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 the HTTP protocol proxy flow If the media is played, the lost packet retransmission module 1120 in the home gateway device is further configured to search for lost data packets from the TS media files pre-cached by the home gateway.
在一个实施方式中,家庭网关设备中的数据重传装置还可以包括:第二重传请求发送模块,配置为若从本家庭网关预先缓存的组播数据包中查找丢失的数据包失败,向指定的丢包重传服务器发送第二重传请求,第二重传请求用于请求丢包重传服务器重传丢失的数据包;丢失数据包接收模块,接收丢包重传服务器发送的丢失的数据包。In one embodiment, the data retransmission apparatus in the home gateway device may further include: a second retransmission request sending module, configured to send a message to the home gateway if it fails to search for the missing data packet from the multicast data packets pre-cached by the home gateway. The designated packet loss retransmission server sends a second retransmission request, and the second retransmission request is used to request the packet loss retransmission server to retransmit the lost data packets; the lost packet receiving module receives the lost packets sent by the packet loss retransmission server. data pack.
根据本公开实施方式的数据重传装置,家庭网关在接收到机顶盒设备出现丢包时直接向本家庭网关发起的重传请求时,通过预先在本地缓存的组播码流查找机顶盒设备请求重传的丢失的数据包括,并将本地缓存中查找到的数据报文重新发送给机顶盒设备,有效减少组播 服务器RTCP重传报文负载和降低网络重传时延。According to the data retransmission apparatus of the embodiment of the present disclosure, when receiving a retransmission request directly initiated by the home gateway when the set-top box device loses packets, the home gateway searches for the set-top box device to request retransmission through the locally cached multicast stream in advance The lost data includes, and the data packets found in the local cache are resent to the set-top box device, which effectively reduces the RTCP retransmission packet load of the multicast server and reduces the network retransmission delay.
下面结合附图,详细介绍根据本公开实施方式的数据重传装置。图14示出本公开提供的数据重传装置的结构示意图。如图14所示,该数据重传装置可以应用于机顶盒设备,包括如下模块:重传请求发送模块1210,配置为检测到接收的组播数据包发生包丢失时,向指定的网关设备发送第一重传请求,第一重传请求用于请求网关设备重传丢失的数据包;丢失包接收模块1220,配置为接收网关设备的重传响应报文,得到重传响应报文中携带的丢失的数据包,其中,丢失的数据包是在网关设备本地缓存中查找到的数据包。The data retransmission apparatus according to the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. FIG. 14 shows a schematic structural diagram of a data retransmission apparatus provided by the present disclosure. As shown in FIG. 14 , the data retransmission apparatus can be applied to a set-top box device, and includes the following modules: a retransmission request sending module 1210, configured to detect that the received multicast data packet is lost, and send the first data to the designated gateway device. A retransmission request, the first retransmission request is used to request the gateway device to retransmit the lost data packet; the lost packet receiving module 1220 is configured to receive the retransmission response packet of the gateway device, and obtain the lost packet carried in the retransmission response packet The lost data packets are those found in the local cache of the gateway device.
在一个实施方式中,第一重传请求是基于实时传输控制协议RTCP的非确认NACK反馈消息,重传请求发送模块1210具体配置为:检测到接收的组播数据包发生包丢失,且丢包率在预定丢包率区间范围内时,向指定的网关设备发送基于RTCP的NACK反馈消息,其中,NACK反馈消息中携带指定的组播组、目的端口号和所丢失数据包的序列号。In one embodiment, the first retransmission request is an unacknowledged NACK feedback message based on the real-time transmission control protocol RTCP, and the retransmission request sending module 1210 is specifically configured to: detect that the received multicast data packet is lost, and the packet is lost. When the packet loss rate is within the predetermined packet loss rate range, send an RTCP-based NACK feedback message to the specified gateway device, where the NACK feedback message carries the specified multicast group, destination port number and the sequence number of the lost data packet.
在一个实施方式中,若机顶盒设备接收的组播数据包携带前向纠错校验FEC编码,则重传请求发送模块1210在检测到接收的组播数据包发生包丢失时,具体配置为:根据组播数据携带的FEC编码进行FEC解码,以对丢失的数据包进行恢复;若对丢失的数据包恢复失败,确定所接收的下行组播数据包发生包丢失。In one embodiment, if the multicast data packet received by the set-top box device carries the forward error correction check (FEC) code, the retransmission request sending module 1210 is specifically configured as follows when detecting that the received multicast data packet is lost: Perform FEC decoding according to the FEC code carried by the multicast data to recover the lost data packets; if the lost data packets fail to be recovered, it is determined that the received downlink multicast data packets are lost.
在一个实施方式中,机顶盒设备中的数据重传装置还可以包括:组播加入报文发送模块,配置为在检测到接收的组播数据包发生包丢失之前,向网关设备发送组播加入报文,组播加入报文用于请求加入组播组,且组播加入报文携带组播源端口和请求加入的组播组;组播数据包接收模块,配置为接收网关设备发送的请求加入的组播组的组播数据包。In one embodiment, the data retransmission apparatus in the set-top box device may further include: a multicast join message sending module, configured to send a multicast join message to the gateway device before detecting that the received multicast data packet is lost. 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; the multicast packet receiving module is configured to receive the request to join sent by the gateway device. The multicast packets of the multicast group.
在一个实施方式中,若机顶盒设备采用组播转单播udpxy的播放方式或者基于HTTP协议代理流媒体的播放方式,则机顶盒设备中的丢失包接收模块1220在用于接收网关设备的重传响应报文时,具体配置为:通过超文本传输协议HTTP代理,接收网关设备转发的基于传 输控制协议TCP的单播数据包,得到TCP单播数据包中携带的丢失的数据包。In one embodiment, if the set-top box device adopts the playback mode of multicast-to-unicast udpxy or the playback mode of proxy streaming media based on the HTTP protocol, the lost packet receiving module 1220 in the set-top box device is used to receive the retransmission response of the gateway device. When sending a message, the specific configuration is as follows: through the hypertext transfer protocol HTTP proxy, receiving the unicast data packet based on the transmission control protocol TCP forwarded by the gateway device, and obtaining the lost data packet carried in the TCP unicast data packet.
在该实施方式中,在机顶盒采用组播转单播的播放方式的应用场景中和采用基于HTTP协议代理流媒体的播放方式的应用场景中,均可以支持在网关和机顶盒之间直接进行TCP单播重传,而不需要机顶盒和组播服务器之间进行直接重传。In this embodiment, in the application scenario where the set-top box adopts the multicast-to-unicast playback mode and the application scenario where the playback mode based on HTTP protocol proxy streaming media is adopted, it is possible to support the direct TCP single-streaming between the gateway and the set-top box. It does not require direct retransmission between the set-top box and the multicast server.
在一个实施方式中,机顶盒设备接收到的重传响应报文是通过机顶盒设备与网关设备之间的RTP数据通道接收的报文,且重传响应报文携带重传包标识,重传包标识用于标识重传响应报文。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, and the retransmission packet identifier Used to identify retransmission response packets.
在该实施方式中,机顶盒设备中的数据重传装置还可以包括:报文信息获取模块,配置为获取重传响应报文中携带的基于实时传输协议RTP的头信息、丢失的数据包的原始包序号,以及丢失的数据包在原始RTP数据包中的有效载荷;头信息解析模块,配置为解析基于RTP的头信息,若解析基于RTP的头信息中包含重传包标识,则从原始包中的有效载荷中解析得到重传的丢失的数据包;数据包组装模块,配置为组装当前接收的丢失的数据包和已收到的未丢失的数据包,得到组装后的数据包,解码组装后的数据包,以对解码得到的数据进行播放。In this embodiment, the data retransmission apparatus in the set-top box device may further include: a message information acquisition module, configured to acquire the real-time transmission protocol RTP-based header information carried in the retransmission response message, and the original data of the lost data packet. The packet sequence number, and the payload of the lost data packet in the original RTP packet; the header information parsing module is configured to parse the RTP-based header information. The retransmitted lost data packets are obtained by parsing the payload in After the data packet, to play the decoded data.
根据本公开实施方式的数据重传装置,机顶盒设备检测到有丢包后,向家庭网关发起重传请求,并接收网关设备重传的该丢失的数据报文重新发送给机顶盒,得到组装后完整的组播数据包。在该数据重传方法中,相比检测到有丢包后向组播服务器发送重传请求,能够有效减少组播服务器负载、重传时延和网络拥塞情况。According to the data retransmission apparatus according to the embodiment of the present disclosure, after the set-top box device detects that there is a packet loss, it initiates a retransmission request to the home gateway, and receives the lost data packet retransmitted by the gateway device and re-sends it to the set-top box, so as to obtain a complete package after assembly. multicast packets. In the data retransmission method, compared with sending a retransmission request to the multicast server after detecting packet loss, the load of the multicast server, the retransmission delay and the network congestion can be effectively reduced.
下面结合附图,详细介绍根据本公开实施方式的数据重传装置。图15示出本公开提供的数据重传装置的结构示意图。如图15所示,数据重传装置可以应用于组播服务器,并包括如下模块。The data retransmission apparatus according to the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. FIG. 15 shows a schematic structural diagram of a data retransmission apparatus provided by the present disclosure. As shown in FIG. 15 , the data retransmission apparatus can be applied to a multicast server, and includes the following modules.
组播加入报文接收模块1310,配置为接收指定的网关设备发送的组播加入报文,组播加入报文是机顶盒设备发送至网关设备的组播加入报文,或根据机顶盒设备发送的基于超文本传输协议HTTP的请求报文进行转换得到的组播加入报文。The multicast join message receiving module 1310 is configured to receive a multicast join message sent by a specified gateway device, where the multicast join message is a multicast join message sent by the set-top box device to the gateway device, or based on the multicast join message sent by the set-top box device. The multicast join message obtained by converting the request message of the hypertext transfer protocol HTTP.
组播数据包发送模块1320,配置为发送请求加入的组播组的组播数据包至指定的丢包重传服务器和网关设备,其中,所发送的组播数据包在网关设备被本地缓存,且所发送的组播数据包在网关设备中被用于向机顶盒设备重传机顶盒设备丢失的数据包。The multicast data packet sending module 1320 is configured to send the multicast data packet of the multicast group requesting to join to the designated packet loss retransmission server and the 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 data packet lost by the set-top box device to the set-top box device.
根据本公开实施方式的数据重传装置,组播服务器在接收到网关设备发送的组播加入报文后,发送对应组播组的下行组播数据包至丢包重传服务器和网关设备,以使网关设备本地缓存该下行组播数据包,并用于向机顶盒设备重传机顶盒设备丢失的数据包,因此,在机顶盒设备侧发生丢包时,由网关设备向机顶盒设备重传丢失的数据包,而无需通过该组播服务器接收并处理大量的数据重传请求,从而有效减少组播服务器负载、重传时延和网络拥塞情况。According to the data retransmission device of the embodiment of the present disclosure, after receiving the multicast join message sent by the gateway device, the multicast server sends the downlink multicast data packet corresponding to the multicast group to the packet loss retransmission server and the gateway device, so as to The gateway device locally caches the downlink multicast data packet and is used 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, There is no need to receive and process a large number of data retransmission requests through the multicast server, thereby effectively reducing the multicast server load, retransmission delay and network congestion.
下面结合附图,详细介绍根据本公开实施方式的数据重传装置。图16示出本公开提供的数据重传装置的结构示意图。如图16所示,数据重传装置可以应用于组播重传服务器,并可以包括如下模块。The data retransmission apparatus according to the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. FIG. 16 shows a schematic structural diagram of a data retransmission apparatus provided by the present disclosure. As shown in FIG. 16 , the data retransmission apparatus can be applied to a multicast retransmission server, and can include the following modules.
组播数据包接收模块1410,配置为接收并保存组播服务器发送的组播数据包;The multicast data packet receiving module 1410 is configured to receive and save the multicast data packet sent by the multicast server;
第二重传请求接收模块1420,配置为接收指定的网关设备发送的第二重传请求,第二重传请求用于请求重传指定的机顶盒设备丢失的数据包,且网关设备当前在本地缓存的组播数据包中未包含机顶盒设备丢失的数据包;The second retransmission request receiving module 1420 is configured to receive a second retransmission request sent by the specified gateway device. The second retransmission request is used to request the retransmission of the data packets lost by the specified set-top box device, and the gateway device currently caches the data packets locally. The multicast data packets do not contain data packets lost by the set-top box device;
丢失包发送模块1430,配置为从保存的组播数据包中,查找并发送丢失的数据包至网关设备,丢失的数据包在网关设备中被转发至机顶盒设备。The lost packet sending module 1430 is configured to find and send the lost data packet from the saved multicast data packets to the gateway device, and the lost data packet is forwarded to the set-top box device in the gateway device.
在一个实施方式中,数据重传装置还可以包括:预重传请求接收模块,配置为接收网关设备发送的预重传请求,预重传请求用于请求对网关设备接收到的不连续的序列号所对应的组播数据包进行重传;预重传数据接收模块,配置为从保存的组播数据包中,将查找到的不连续的序列号所对应的组播数据包,发送至网关设备。In one embodiment, the apparatus for data retransmission may further include: a pre-retransmission request receiving module, configured to receive a pre-retransmission request sent by the gateway device, where the pre-retransmission request is used to request the discontinuous sequence received by the gateway device The pre-retransmission data receiving module is configured to send the found multicast data packets corresponding to the discontinuous sequence numbers from the saved multicast data packets to the gateway. equipment.
根据本公开实施方式的数据重传装置,丢包重传服务器接收到网关设备请求重传指定的机顶盒设备丢失的数据包的重传请求时,将丢 失的数据包至组播服务器,由于该重传请求是网关设备当前在本地缓存的组播数据包中未包含机顶盒设备丢失的数据包的情况下发出的,相比每次机顶盒设备丢包时,丢包重传服务器都会接收到并处理机顶盒设备发送的重传请求,减少了重传的网络时延,同时可以减少组播服务器负载和网络拥塞。According to the data retransmission apparatus according to the embodiment of the present disclosure, when the server for packet loss retransmission receives the retransmission request from the gateway device to retransmit the lost data packet of the specified set-top box device, it sends the lost data packet to the multicast server. The transmission request is sent by the gateway device when the locally cached multicast data packets do not contain the data packets lost by the set-top box device. Compared with each time the set-top box device loses packets, the packet loss retransmission server will receive and process the set-top box. The retransmission request sent by the device reduces the network delay of retransmission, and at the same time reduces the load of the multicast server and network congestion.
需要明确的是,本公开并不局限于上文实施方式中所描述并在图中示出的特定配置和处理。为了描述的方便和简洁,这里省略了对已知方法的详细描述,并且上述描述的系统、模块和单元的具体工作过程,可以参考前述方法实施方式中的对应过程,在此不再赘述。It is to be understood that the present disclosure 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, the detailed description of the known method is omitted here, and the specific working process of the system, module and unit described above can refer to the corresponding process in the foregoing method implementation, which will not be repeated here.
图17是示出能够实现根据本公开实施方式的数据重传方法和装置的计算设备的示例性硬件架构的结构图。17 is a structural diagram illustrating an exemplary hardware architecture of a computing device capable of implementing the data retransmission method and apparatus according to an embodiment of the present disclosure.
如图17所示,计算设备1500包括输入设备1501、输入接口1502、中央处理器1503、存储器1504、输出接口1505、以及输出设备1506。其中,输入接口1502、中央处理器1503、存储器1504、以及输出接口1505通过总线1510相互连接,输入设备1501和输出设备1506分别通过输入接口1502和输出接口1505与总线1510连接,进而与计算设备1500的其他组件连接。As shown in FIG. 17 , 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 through the bus 1510, and the input device 1501 and the output device 1506 are respectively connected to the bus 1510 through the input interface 1502 and the output interface 1505, and then to the computing device 1500. connections to other components.
具体地,输入设备1501接收来自外部的输入信息,并通过输入接口1502将输入信息传送到中央处理器1503;中央处理器1503基于存储器1504中存储的计算机可执行指令对输入信息进行处理以生成输出信息,将输出信息临时或者永久地存储在存储器1504中,然后通过输出接口1505将输出信息传送到输出设备1506;输出设备1506将输出信息输出到计算设备1500的外部供用户使用。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 store the output information in the memory 1504, and then transmit 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 the user to use.
在一个实施方式中,图17所示的计算设备可以被实现为一种网关设备,该网关设备可以包括:存储器,被配置为存储程序;处理器,被配置为运行存储器中存储的程序,以执行上述实施方式描述的数据重传方法。In one embodiment, the computing device shown in FIG. 17 may be implemented as a gateway device, and the gateway device may include: a memory configured to store a program; a processor configured to execute the program stored in the memory to The data retransmission method described in the above embodiment is executed.
在一个实施方式中,图17所示的计算设备可以被实现为一种机顶盒设备,该机顶盒设备可以包括:存储器,被配置为存储程序;处理器,被配置为运行存储器中存储的程序,以执行上述实施方式描述 的数据重传方法。In one embodiment, the computing device shown in FIG. 17 may be implemented as a set-top box device, and the set-top box device may include: a memory configured to store a program; a processor configured to execute the program stored in the memory to The data retransmission method described in the above embodiment is executed.
在一个实施方式中,图17所示的计算设备可以被实现为一种组播服务器,该组播服务器可以包括:存储器,被配置为存储程序;处理器,被配置为运行存储器中存储的程序,以执行上述实施方式描述的数据重传方法。In one embodiment, the computing device shown in FIG. 17 may be implemented as a multicast server, and the multicast server may include: a memory configured to store a program; a processor configured to execute the program stored in the memory , so as to execute the data retransmission method described in the above embodiments.
在一个实施方式中,图17所示的计算设备可以被实现为一种组播丢包重传服务器,该组播丢包重传服务器可以包括:存储器,被配置为存储程序;处理器,被配置为运行存储器中存储的程序,以执行上述实施方式描述的数据重传方法。In one embodiment, the computing device shown in FIG. 17 may be implemented as a multicast packet loss and retransmission server, and the multicast packet loss and retransmission server may include: a memory configured to store a program; a processor, configured by It is configured to run the program stored in the memory to execute the data retransmission method described in the above embodiments.
以上所述,仅为本公开的示例性实施方式而已,并非用于限定本公开的保护范围。一般来说,本公开的多种实施方式可以在硬件或专用电路、软件、逻辑或其任何组合中实现。例如,一些方面可以被实现在硬件中,而其它方面可以被实现在可以被控制器、微处理器或其它计算装置执行的固件或软件中,尽管本公开不限于此。The above descriptions are merely exemplary embodiments of the present disclosure, and are not intended to limit the protection scope of the present disclosure. In general, various embodiments of the present disclosure may be implemented in hardware or special purpose circuits, software, logic, or any combination thereof. For example, some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor or other computing device, although the present disclosure is not limited thereto.
本公开的实施方式可以通过移动装置的数据处理器执行计算机程序指令来实现,例如在处理器实体中,或者通过硬件,或者通过软件和硬件的组合。计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码。Embodiments of the present disclosure may be implemented by the execution of computer program instructions by a data processor of a mobile device, eg, 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 written in any combination of one or more programming languages or object code.
本公开附图中的任何逻辑流程的框图可以表示程序步骤,或者可以表示相互连接的逻辑电路、模块和功能,或者可以表示程序步骤与逻辑电路、模块和功能的组合。计算机程序可以存储在存储器上。存储器可以具有任何适合于本地技术环境的类型并且可以使用任何适合的数据存储技术实现,例如但不限于只读存储器(ROM)、随机访问存储器(RAM)、光存储器装置和系统(数码多功能光碟DVD或CD光盘)等。计算机可读介质可以包括非瞬时性存储介质。数据处理器可以是任何适合于本地技术环境的类型,例如但不限于通用计算机、专用计算机、微处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、可编程逻辑器件(FGPA)以及基于多核处理器架构的处理器。The block diagrams of any logic flow in the figures of the present disclosure may represent program steps, or may represent interconnected logic circuits, modules, and functions, or may represent a combination of program steps and logic circuits, modules, and functions. Computer programs can be stored on memory. The memory may be of any type suitable for the local technical environment and may be implemented using any suitable data storage technology, such as but not limited to read only memory (ROM), random access memory (RAM), optical memory devices and systems (Digital Versatile Discs). DVD or CD disc) etc. Computer-readable media may include non-transitory storage media. The data processor may be of any type suitable for the local technical environment, such as, but not limited to, a general purpose computer, special purpose computer, microprocessor, digital signal processor (DSP), application specific integrated circuit (ASIC), programmable logic device (FGPA) and processors based on multi-core processor architectures.
通过示范性和非限制性的示例,上文已提供了对本公开的示范实施方式的详细描述。但结合附图和权利要求来考虑,对以上实施方式的多种修改和调整对本领域技术人员来说是显而易见的,但不偏离本公开的范围。因此,本公开的恰当范围将根据权利要求确定。The foregoing has provided the detailed description of exemplary embodiments of the present disclosure, by way of illustrative and non-limiting example. 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, without departing from the scope of the present disclosure. Accordingly, the proper scope of the present disclosure will be determined with reference to the claims.

Claims (18)

  1. 一种数据重传方法,包括:A data retransmission method, comprising:
    接收来自机顶盒设备的第一重传请求,所述第一重传请求用于请求本家庭网关重传丢失的数据包;receiving a first retransmission request from the set-top box device, where the first retransmission request is used to request the home gateway to retransmit the lost data packet;
    从本家庭网关预先缓存的数据包中查找所述丢失的数据包,向所述机顶盒设备发送重传响应报文,所述重传响应报文携带有查找到的所述丢失的数据包。The lost data packet is searched from the data packets pre-cached by the home gateway, and a retransmission response message is sent to the set-top box device, and the retransmission response message carries the found lost data packet.
  2. 根据权利要求1所述的方法,其中,在所述接收来自机顶盒设备的第一重传请求之前,所述方法还包括:The method of claim 1, wherein, before the receiving the first retransmission request from the set-top box device, the method further comprises:
    接收到来自机顶盒设备的不同业务请求报文时,将所述不同的业务请求报文发送至对应的组播服务器;When receiving different service request messages from the set-top box device, send the different service request messages to the corresponding multicast server;
    在本家庭网关本地,对从所述对应的组播服务器接收的下行数据包,进行预定方式的缓存和转发,其中,所述预定方式与所述不同的业务请求报文和所述机顶盒设备的播放方式相对应。In the local home gateway, the downlink data packets received from the corresponding multicast server are cached and forwarded in a predetermined manner, wherein the predetermined manner is different from the different service request packets and the set-top box equipment. corresponding to the playback method.
  3. 根据权利要求2所述的方法,其中,若所述业务请求报文为组播加入报文,则所述接收到来自机顶盒设备的不同业务请求报文时,将所述不同的业务请求报文发送至对应的组播服务器,包括:The method according to claim 2, wherein, if the service request message is a multicast join message, when the different service request message from the set-top box device is received, the different service request message Send to the corresponding multicast server, including:
    根据接收到的机顶盒设备的组播加入报文,将获取的对应的组播组信息、报文源端口设备信息,以及预先在本家庭网关配置的组播虚拟局域网(VLAN)信息,添加为相应的组播学习条目;According to the received multicast join message of the set-top box device, the corresponding acquired multicast group information, message source port device information, and multicast virtual local area network (VLAN) information pre-configured on the home gateway are added as corresponding multicast learning entry;
    根据本家庭网关的组网及网络协议电视(IPTV)业务平面部署信息,将所述组播加入报文转发至对应的桥接业务平面的组播服务器或路由业务平面的组播服务器;According to the networking of the home gateway and the network protocol television (IPTV) service plane deployment information, the multicast join message is forwarded to the corresponding bridging service plane multicast server or routing service plane multicast server;
    所述在本家庭网关本地,对从所述对应的组播服务器接收的下行数据包,进行预定方式的缓存和转发,包括:The local home gateway caches and forwards the downlink data packets received from the corresponding multicast server in a predetermined manner, including:
    发送所接收的下行组播数据包至所述机顶盒设备;sending the received downlink multicast data packet to the set-top box device;
    将所述下行组播数据包,按照不同的组播地址和基于实时传输协 议(RTP)的目的端口号,通过循环覆盖的方式缓存至本家庭网关的预设缓存队列中。The downlink multicast data packets are buffered in the preset buffer queue of the home gateway by means of cyclic coverage according to different multicast addresses and destination port numbers based on Real Time Transport Protocol (RTP).
  4. 根据权利要求2所述的方法,其中,若所述业务请求报文为超文本传输协议(HTTP)请求报文,则所述接收到来自机顶盒设备的不同业务请求报文时,将所述不同的业务请求报文发送至对应的组播服务器,包括:The method according to claim 2, wherein, if the service request message is a hypertext transfer protocol (HTTP) request message, when different service request messages from a set-top box device are received, the different service request messages are The service request message sent to the corresponding multicast server, including:
    将接收到的携带有组播节目地址信息的HTTP请求报文,转换为组播加入报文;Convert the received HTTP request message carrying the address information of the multicast program 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.
  5. 根据权利要求4所述的方法,其中,若所述机顶盒设备采用组播转单播的播放方式,则所述在本家庭网关本地,对从所述对应的组播服务器接收的下行数据包,进行预定方式的缓存和转发,包括:The method according to claim 4, wherein, if the set-top box device adopts a multicast-to-unicast playback mode, the local home gateway, for the downlink data packets received from the corresponding multicast server, Cache and forward in predetermined ways, including:
    将从所对应的路由业务平面的组播服务器接收到的下行组播数据包,转换为传输控制协议(TCP)单播数据包,发送所述TCP单播数据包至所述机顶盒设备;Convert the downlink multicast packet received from the multicast server of the corresponding routing service plane into a Transmission Control Protocol (TCP) unicast packet, and send the TCP unicast packet to the set-top box device;
    从所述下行组播数据包中,去除以太网传输点对点协议(PPPoE)报头和互联网协议(IP)报头,得到对应用户数据包协议(UDP)组播数据流,并将所述UDP的组播数据包进行本地切片存储。From the downlink multicast data packet, remove the Point-to-Point Protocol over Ethernet (PPPoE) header and the Internet Protocol (IP) header to obtain the corresponding User Datagram Protocol (UDP) multicast data stream, and transmit the UDP multicast data stream. Data packets are stored locally in slices.
  6. 根据权利要求4所述的方法,其中,若所述机顶盒设备采用基于超文本传输协议(HTTP)协议代理流媒体的播放方式,则所述在本家庭网关本地,对从所述对应的组播服务器接收的下行数据包,进行预定方式的缓存和转发,包括:The method according to claim 4, wherein, if the set-top box device adopts the playing mode of proxy streaming media based on the Hypertext Transfer Protocol (HTTP) protocol, the local home gateway, on the The downlink data packets received by the server are buffered and forwarded in a predetermined manner, including:
    从所对应的路由业务平面的组播服务器接收到的下行媒体文件数据包中,获取传输流(TS)媒体文件,通过HTTP代理的方式转发所述TS媒体文件至所述机顶盒设备;From the downstream media file data packet received by the multicast server of the corresponding routing service plane, obtain a transport stream (TS) media file, and forward the TS media file to the set-top box device by means of an HTTP proxy;
    基于多媒体数据处理服务(MTS),对所述TS媒体文件在本地 进行切片存储。Based on the Multimedia Data Processing Service (MTS), the TS media file is locally sliced and stored.
  7. 根据权利要求2-5中任一项所述的方法,其中,在将所述不同的业务请求报文发送至对应的组播服务器之后,所述方法还包括:The method according to any one of claims 2-5, wherein after sending the different service request packets to the corresponding multicast server, the method further comprises:
    检测到所接收的下行组播数据包的序列号不连续时,向指定的丢包重传服务器发送预重传请求,所述预重传请求用于请求所述丢包重传服务器,对接收到的不连续的序列号所对应的组播数据包进行重传;When it is detected that the sequence numbers of the received downlink multicast data packets are discontinuous, a pre-retransmission request is sent to the designated packet loss retransmission server, and the pre-retransmission request is used to request the packet loss retransmission server. The multicast data packets corresponding to the received discontinuous sequence numbers are retransmitted;
    接收所述丢包重传服务器发送的所述不连续的序列号所对应的组播数据包。Receive the multicast data packets corresponding to the discontinuous sequence numbers sent by the packet loss retransmission server.
  8. 根据权利要求1所述的方法,其中,若所述第一重传请求是所述机顶盒设备发送的基于实时传输控制协议(RTCP)的非确认(NACK)反馈消息;则所述从本家庭网关预先缓存的数据包中查找所述丢失的数据包,包括:The method according to claim 1, wherein, if the first retransmission request is a real-time transmission control protocol (RTCP)-based non-acknowledgement (NACK) feedback message sent by the set-top box device; Find the lost data packet in the pre-cached data packet, including:
    解析所述基于RTCP的NACK反馈消息,得到所述NACK反馈消息中携带的组播组信息、目的端口号、所丢失数据包的序列号和丢包序列掩码,所述丢包序列掩码用于确定所述机顶盒设备出现包丢失;Parse the RTCP-based NACK feedback message, and 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 uses for determining that the set-top box device has packet loss;
    根据所述NACK反馈消息中携带的组播组信息、目的端口号和所丢失数据包的序列号,从本网关设备本地缓存的组播数据包中,查找所述丢失的数据包。According to the multicast group information, the destination port number and the serial number of the lost data packet carried in the NACK feedback message, the lost data packet is searched from the multicast data packets cached locally by the gateway device.
  9. 根据权利要求8所述的方法,其中,所述重传响应报文携带重传包标识,所述重传包标识用于标识所述重传响应报文;所述向所述机顶盒设备发送重传响应报文,包括:The method according to claim 8, wherein the retransmission response packet carries a retransmission packet identifier, and the retransmission packet identifier is used to identify the retransmission response packet; the retransmission response packet is sent to the set-top box device. Send a response message, including:
    根据查找到的所述丢失的数据包生成重传响应报文,所述重传响应报文携带基于RTP的头信息、所述丢失的数据包的原始包序号,以及所述丢失的数据包在原始RTP数据包中的有效载荷,所述有效载荷用于获取所述丢失的数据包的原始内容;A retransmission response message is generated according to the found lost data packet, and the retransmission response message carries RTP-based header information, the original packet sequence number of the lost data packet, and the lost data packet in the The payload in the original RTP data packet, the payload is used to obtain the original content of the lost data packet;
    通过本家庭网关与机顶盒设备的RTP数据重传通道,发送所述重传响应报文至所述机顶盒设备。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.
  10. 根据权利要求1-5中任一项所述的方法,其中,The method according to any one of claims 1-5, wherein,
    若所述第一重传请求是基于TCP协议的单播重传请求,且所述机顶盒设备采用组播转单播的播放方式,则所述从本家庭网关预先缓存的数据包中查找所述丢失的数据包,包括:从本家庭网关预先缓存的UDP组播数据包中查找所述丢失的数据包;If the first retransmission request is a unicast retransmission request based on the TCP protocol, and the set-top box device adopts the multicast-to-unicast playback mode, the search for the Lost data packets, including: searching for the lost data packets from the UDP multicast data packets pre-cached by the home gateway;
    若所述第一重传请求是基于TCP协议的单播重传请求,且所述机顶盒设备采用HTTP协议代理流媒体的播放方式,则从本家庭网关预先缓存的数据包中查找所述丢失的数据包,包括:从本家庭网关预先缓存的TS媒体文件中查找所述丢失的数据包。If the first retransmission request is a unicast retransmission request based on the TCP protocol, and the set-top box device adopts the HTTP protocol proxy streaming media playback mode, search for the lost data packet from the data packets pre-cached by the home gateway. The data packets include: searching for the lost data packets from the TS media files pre-cached by the home gateway.
  11. 根据权利要求1-5中任一项所述的方法,其中,若从本家庭网关预先缓存的组播数据包中查找所述丢失的数据包失败,所述方法还包括:The method according to any one of claims 1-5, wherein, if the search for the lost data packet from the multicast data packets pre-cached by the home gateway fails, the method further comprises:
    向指定的丢包重传服务器发送第二重传请求,所述第二重传请求用于请求所述丢包重传服务器重传所述丢失的数据包;sending a second retransmission request to the designated packet loss retransmission server, where the second retransmission request is used to request the packet loss retransmission server to retransmit the lost data packet;
    接收所述丢包重传服务器发送的所述丢失的数据包。Receive the lost data packet sent by the lost packet retransmission server.
  12. 一种数据重传方法,包括:A data retransmission method, comprising:
    检测到接收的组播数据包发生包丢失时,向指定的网关设备发送第一重传请求,所述第一重传请求用于请求所述网关设备重传丢失的数据包;When detecting that the received multicast data packet is lost, send a first retransmission request to the designated gateway device, where the first retransmission request is used to request the gateway device to retransmit the lost data packet;
    接收所述网关设备的重传响应报文,得到所述重传响应报文中携带的所述丢失的数据包,其中,所述丢失的数据包是在所述网关设备本地缓存中查找到的数据包。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 found in the local cache of the gateway device data pack.
  13. 根据权利要求12所述的方法,其中,所述第一重传请求是基于实时传输控制协议(RTCP)的非确认(NACK)反馈消息,所述检测到接收的组播数据包发生包丢失时,向指定的网关设备发送第一重传请求,包括:The method of claim 12, wherein the first retransmission request is a real-time transmission control protocol (RTCP)-based non-acknowledgement (NACK) feedback message, and the detected packet loss occurs when the received multicast data packet is lost. , send the first retransmission request to the specified gateway device, including:
    检测到接收的组播数据包发生包丢失,且丢包率在预定丢包率区间范围内时,向指定的网关设备发送所述基于(RTCP)的NACK反馈消息,其中,所述NACK反馈消息中携带指定的组播组信息、目的端口号和所丢失数据包的序列号。When it is detected that the received multicast data packet is lost, and the packet loss rate is within the range of the predetermined packet loss rate, send the (RTCP)-based NACK feedback message to the designated gateway device, wherein the NACK feedback message It carries the specified multicast group information, destination port number and sequence number of lost data packets.
  14. 根据权利要求12或13所述的方法,其中,在所述检测到接收的组播数据包发生包丢失之前,所述方法还包括:The method according to claim 12 or 13, wherein, before the detected packet loss of the received multicast data packet, the method further comprises:
    向所述网关设备发送组播加入报文,所述组播加入报文用于请求加入组播组,且所述组播加入报文中携带组播源端口设备信息和请求加入的组播组信息;Send a multicast join message to the gateway device, where the multicast join message is used to request to join a multicast group, and the multicast join message carries the multicast source port device information and the multicast group requested to join information;
    接收所述网关设备发送的所述请求加入的组播组的组播数据包。Receive a multicast data packet of the multicast group that is requested to join and sent by the gateway device.
  15. 根据权利要求12所述的方法,其中,若本机顶盒设备采用组播转单播的播放方式或者基于HTTP协议代理流媒体的播放方式,则所述接收所述网关设备的重传响应报文,得到所述重传响应报文中携带的所述丢失的数据包,包括:The method according to claim 12, wherein, if the local set-top box device adopts a multicast-to-unicast playback mode or an HTTP protocol-based proxy streaming media playback mode, the receiving the retransmission response message of the gateway device, Obtaining the lost data packet carried in the retransmission response message, including:
    通过超文本传输协议HTTP代理,接收所述网关设备发送的TCP单播数据包,得到所述TCP单播数据包中携带的所述丢失的数据包。Receive the TCP unicast data packet sent by the gateway device through a hypertext transfer protocol HTTP proxy, and obtain the lost data packet carried in the TCP unicast data packet.
  16. 根据权利要求12或13所述的方法,其中,所述重传响应报文是通过本机顶盒设备与所述网关设备之间的RTP数据通道接收的报文,且所述重传响应报文携带重传包标识,所述重传包标识用于标识所述重传响应报文;所述接收所述网关设备的重传响应报文之后,所述方法还包括:The method according to claim 12 or 13, wherein the retransmission response message is a message received through an RTP data channel between the local set-top box device and the gateway device, and the retransmission response message carries a retransmission packet identifier, where the retransmission packet identifier is used to identify the retransmission response message; after receiving the retransmission response message from the gateway device, the method further includes:
    获取所述重传响应报文中携带的基于实时传输协议(RTP)的头信息、所述丢失的数据包的原始包序号,以及所述丢失的数据包在原始RTP数据包中的有效载荷;Obtain the real-time transport protocol (RTP)-based header information carried in the retransmission response message, the original packet sequence number of the lost data packet, and the payload of the lost data packet in the original RTP data packet;
    解析所述基于RTP的头信息,若所述头信息中包含所述重传包标识,则从所述原始包中的有效载荷中解析得到重传的所述丢失的数据包;Parsing the RTP-based header information, if the header information includes the retransmission packet identifier, parse the retransmitted lost data packet from the payload in the original packet;
    组装当前接收的所述丢失的数据包和已收到的未丢失的数据包,得到组装后的数据包,解码所述组装后的数据包,以对解码得到的数据进行播放。The currently received lost data packets and the received non-lost data packets are assembled to obtain the assembled data packets, and the assembled data packets are decoded to play the decoded data.
  17. 一种网络设备,包括:A network device comprising:
    一个或多个处理器;one or more processors;
    存储器,其上存储有一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现权利要求1-11、或权利要求12-16中任一项所述的数据重传方法。a memory having stored thereon one or more programs which, when executed by the one or more processors, cause the one or more processors to implement claims 1-11, or claims The data retransmission method described in any one of 12-16.
  18. 一种计算机可读存储介质,其中,所述存储介质存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-11、或权利要求12-16中任一项所述的数据重传方法。A computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, realizes the data reproduction according to any one of claims 1-11 or 12-16. pass method.
PCT/CN2021/103090 2020-06-30 2021-06-29 Data retransmission method, network device, and computer readable storage medium WO2022002043A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010614878.XA CN113872916A (en) 2020-06-30 2020-06-30 Data retransmission method, network device, and computer-readable storage medium
CN202010614878.X 2020-06-30

Publications (1)

Publication Number Publication Date
WO2022002043A1 true WO2022002043A1 (en) 2022-01-06

Family

ID=78981255

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/103090 WO2022002043A1 (en) 2020-06-30 2021-06-29 Data retransmission method, network device, and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN113872916A (en)
WO (1) WO2022002043A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114499777A (en) * 2022-04-15 2022-05-13 四川腾盾科技有限公司 Data transmission method for cluster unmanned system
CN115208864A (en) * 2022-08-12 2022-10-18 阿波罗智联(北京)科技有限公司 Data transmission method, device, equipment, vehicle and storage medium
CN115276914A (en) * 2022-06-21 2022-11-01 北京网聚云联科技有限公司 UDP transmission method, device and equipment based on multi-level cache retransmission mechanism
CN115314730A (en) * 2022-08-10 2022-11-08 中国电信股份有限公司 Video streaming transmission method and device applied to virtual reality VR scene
CN115633104A (en) * 2022-09-13 2023-01-20 江苏为是科技有限公司 Data sending method, data receiving method, device and data receiving and sending system
CN116033365A (en) * 2023-03-22 2023-04-28 新华三技术有限公司 Communication method, device, electronic equipment and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116455527A (en) * 2023-06-16 2023-07-18 深圳华锐分布式技术股份有限公司 Message retransmission method
CN116600010B (en) * 2023-07-17 2023-10-10 腾讯科技(深圳)有限公司 Data transmission method, device, equipment, storage medium and program product

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447565A (en) * 2010-10-11 2012-05-09 中国电信股份有限公司 Method and system for realizing multicast control in broadband access network
CN103458370A (en) * 2012-06-01 2013-12-18 华为技术有限公司 Transmission method, device and system for receiving mobile network multicast data
CN103873373A (en) * 2012-12-11 2014-06-18 杭州华三通信技术有限公司 Multicast data message forwarding method and equipment
US20150043414A1 (en) * 2013-08-08 2015-02-12 Samsung Electronics Co., Ltd. Communication method of access point (ap) and terminal to retransmit multicast packet based on feedback in network
CN106817629A (en) * 2016-12-20 2017-06-09 北京华为数字技术有限公司 A kind of medium information transmission method, apparatus and system
CN110300337A (en) * 2018-03-21 2019-10-01 华为技术有限公司 The method and apparatus of Wireless Fidelity link transmission message
CN110958068A (en) * 2018-09-27 2020-04-03 华为技术有限公司 Video transmission method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101827036B (en) * 2010-05-18 2014-12-17 中兴通讯股份有限公司 Method and device for realizing multicast service configuration of home gateway
CN101917670A (en) * 2010-05-20 2010-12-15 中兴通讯股份有限公司 Method and system for transmitting wireless multicast data
CN103179618B (en) * 2013-03-19 2015-09-23 福建三元达通讯股份有限公司 A kind of method based on improving the QoS of backhaul network in LTE Femto system
CN105812252B (en) * 2014-12-29 2019-03-15 中国电信股份有限公司 A kind of method of home gateway, system and terminal access multicast service

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447565A (en) * 2010-10-11 2012-05-09 中国电信股份有限公司 Method and system for realizing multicast control in broadband access network
CN103458370A (en) * 2012-06-01 2013-12-18 华为技术有限公司 Transmission method, device and system for receiving mobile network multicast data
CN103873373A (en) * 2012-12-11 2014-06-18 杭州华三通信技术有限公司 Multicast data message forwarding method and equipment
US20150043414A1 (en) * 2013-08-08 2015-02-12 Samsung Electronics Co., Ltd. Communication method of access point (ap) and terminal to retransmit multicast packet based on feedback in network
CN106817629A (en) * 2016-12-20 2017-06-09 北京华为数字技术有限公司 A kind of medium information transmission method, apparatus and system
CN110300337A (en) * 2018-03-21 2019-10-01 华为技术有限公司 The method and apparatus of Wireless Fidelity link transmission message
CN110958068A (en) * 2018-09-27 2020-04-03 华为技术有限公司 Video transmission method and device

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114499777A (en) * 2022-04-15 2022-05-13 四川腾盾科技有限公司 Data transmission method for cluster unmanned system
CN115276914A (en) * 2022-06-21 2022-11-01 北京网聚云联科技有限公司 UDP transmission method, device and equipment based on multi-level cache retransmission mechanism
CN115276914B (en) * 2022-06-21 2024-02-02 北京网聚云联科技有限公司 UDP transmission method, device and equipment based on multi-level cache retransmission mechanism
CN115314730A (en) * 2022-08-10 2022-11-08 中国电信股份有限公司 Video streaming transmission method and device applied to virtual reality VR scene
CN115208864A (en) * 2022-08-12 2022-10-18 阿波罗智联(北京)科技有限公司 Data transmission method, device, equipment, vehicle and storage medium
CN115208864B (en) * 2022-08-12 2024-02-06 阿波罗智联(北京)科技有限公司 Data transmission method, device, equipment, vehicle and storage medium
CN115633104A (en) * 2022-09-13 2023-01-20 江苏为是科技有限公司 Data sending method, data receiving method, device and data receiving and sending system
CN115633104B (en) * 2022-09-13 2024-02-13 江苏为是科技有限公司 Data transmission method, data receiving method, device and data receiving and transmitting system
CN116033365A (en) * 2023-03-22 2023-04-28 新华三技术有限公司 Communication method, device, electronic equipment and storage medium
CN116033365B (en) * 2023-03-22 2023-06-20 新华三技术有限公司 Communication method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113872916A (en) 2021-12-31

Similar Documents

Publication Publication Date Title
WO2022002043A1 (en) Data retransmission method, network device, and computer readable storage medium
US9083585B2 (en) Retransmission-based stream repair and stream join
US10034058B2 (en) Method and apparatus for distributing video
US8989185B2 (en) Method and apparatus for converting a multicast session to a unicast session
US10205971B2 (en) Media data live broadcast method, device, and system
EP2171600B1 (en) Assisted peer-to-peer media streaming
US8935736B2 (en) Channel switching method, channel switching device, and channel switching system
US20120140645A1 (en) Method and apparatus for distributing video
KR102506107B1 (en) Methods and systems for audio-visual live content delivery
US20130117460A1 (en) Data management methods for use in a network system and network systems using the same
US20200021867A1 (en) Broadcast signal transmitting and receiving method and device
WO2017185212A1 (en) Multicast delay diagnosis method and apparatus
Gatimu et al. Experimental study of QoE improvements towards adaptive HD video streaming using flexible dual TCP-UDP streaming protocol
CN111245592B (en) Signaling transmission method and device and computer readable storage medium
CN110086772B (en) Method and system for acquiring monitoring video
JP2006332935A (en) System and method for contents data transmission
Bradbury A scalable distribution system for broadcasting over IP networks
US11316776B2 (en) System and method for bypassing a content delivery network (CDN)
US20220263673A1 (en) Content distribution system, multicast unicast / multicast multicast converter, multicast unicast converter, content distribution method and content distribution program
WO2013086873A1 (en) Media playing method and device
CN115103202A (en) IP video live broadcast transmission method and system capable of resisting network degradation
CN111565096A (en) Data transmission method and device
Fracchia et al. P2ProxyLite: effective video streaming in wireless ad-hoc networks
WO2017063704A1 (en) Synchronization stream for switching to multicast delivery of streamed content

Legal Events

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

Ref document number: 21832470

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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

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

122 Ep: pct application non-entry in european phase

Ref document number: 21832470

Country of ref document: EP

Kind code of ref document: A1