IPTV data transmission method, device and system

By binding virtual devices in the IPTV set-top box and using TCP wireless link to transmit code stream data, the packet loss problem during wireless playback is solved, stable video playback is achieved, and user experience is improved.

CN119729140AActive Publication Date: 2025-03-28SICHUAN TIANYI COMHEART TELECOM
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411643169.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-03-28
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

Packet loss is prone to occur when wireless continuous playback in IPTV set-top box, resulting in screen loss in video playback and affecting user experience.

Method used

Retrieve the protocol type of the currently transmitted data by responding to the video application's startup request. If it is a multicast protocol, the video application is bound to the prebuilt first virtual device and the first virtual device is bound to the multicast protocol. The code stream data sent by the gateway is received through the pre-built TCP wireless link, and the code stream data is sent and forwarded to the first virtual device to reduce packet loss.

Benefits of technology

It effectively reduces packet loss when the set-top box is continuously played wirelessly, avoids the problem of screen loss during video playback, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119729140A_ABST
    Figure CN119729140A_ABST
Patent Text Reader

Abstract

The invention discloses an IPTV data transmission method, device and system, and the method comprises the steps: obtaining a protocol type of current transmission data in response to a video application program starting request; if the protocol type is a multicast protocol, binding the video application program with a first virtual device pre-built in the set top box, and binding the first virtual device with the multicast protocol; receiving first code stream data sent by the gateway through a pre-constructed TCP wireless link, sending the first code stream data to a first virtual device, and sending the first code stream data to a video application through the first virtual device; and receiving second code stream data sent by the video application program, sending a second code stream to the first virtual device, sending the second code stream data to the TCP wireless link through the first virtual device, and sending the second code stream data to the gateway through the TCP wireless link, thereby solving the technical problem that packet loss is easy to occur in wireless continuous playing of the set top box.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of IPTV technology, and in particular to an IPTV data transmission method, device and system. Background Art

[0002] IPTV set-top boxes generally use wired networks as transmission networks, but wired Ethernet ports are generally large, and the resulting devices are generally large. Currently, set-top boxes are developing towards miniaturization. Some set-top box devices have cancelled Ethernet ports and use WLAN ports as the network interface of set-top boxes. The advantage of wireless is that it is easy to install and does not require wiring. The advantages of miniaturization of IPTV are small size and simple installation. On the path from the optical modem (gateway) to the set-top box, wireless is prone to screen distortion when playing multicast videos, while the same wired rarely has screen distortion. Through packet capture analysis, packet loss is prone to occur during continuous wireless playback. Due to the characteristics of multicast playback, the client cannot repeatedly apply for packet loss messages after packet loss, so it is impossible to recover the lost packet data, resulting in screen distortion, which affects the user experience. Summary of the invention

[0003] The main purpose of the present application is to provide an IPTV data transmission method, device and system, aiming to solve the technical problem of packet loss that easily occurs during continuous wireless playback of a set-top box.

[0004] To achieve the above-mentioned purpose, the present application provides an IPTV data transmission method, device and system, which, in response to a video application startup request, obtains the protocol type of the current transmission data; if the protocol type is a multicast protocol, binds the video application to the first virtual device pre-built in the set-top box, and binds the first virtual device to the multicast protocol; receives the first code stream data sent by the gateway through the pre-built TCP wireless link, sends the first code stream data to the first virtual device, and sends the first code stream data to the video application through the first virtual device; receives the second code stream data sent by the video application, sends the second code stream to the first virtual device, sends the second code stream data to the TCP wireless link through the first virtual device, and sends the second code stream data to the gateway through the TCP wireless link.

[0005] Optionally, the IPTV data transmission method further includes: constructing the first virtual device; creating a first socket; creating a TCP connection for communicating with a server in the gateway based on the first socket; and associating the first virtual device and the first socket.

[0006] Optionally, the IPTV data transmission method further includes: acquiring the server address in the gateway through a DHCP service; and configuring the address of the first virtual device based on the server address.

[0007] Optionally, the IPTV data transmission method also includes: if the protocol type is a non-multicast protocol, receiving a third stream data sent by the gateway through a default wireless link; sending the third stream data to the video application; receiving a fourth stream data sent by the video application; and sending the fourth stream data to the gateway.

[0008] Optionally, the IPTV data transmission method also includes: creating an epoll instance based on the first virtual device; using the epoll instance to receive the first code stream data, and sending the first code stream data to the first virtual device; using the epoll instance to receive the second code stream data, and sending the second code stream data to the TCP wireless link.

[0009] Optionally, the IPTV data transmission method includes: receiving the second code stream data, and sending the second code stream data to the main bridge through the preset second virtual device; receiving the first code stream data from the main bridge, sending the second code stream data to the second virtual device, and sending the first code stream data to the set-top box through the second virtual device.

[0010] Optionally, before receiving the second code stream data, the IPTV data transmission method also includes: creating a second virtual device; binding the second virtual device to the main bridge of the gateway; generating a second socket in response to the connection of the set-top box; associating the second socket with the second virtual device; and establishing the TCP connection based on the second socket and the first socket.

[0011] In order to achieve the above-mentioned purpose, the present invention also provides an IPTV data transmission device, which is applied to a set-top box, comprising: an acquisition module, which is used to respond to a video application startup request and obtain the protocol type of the current transmission data; a binding module, which is used to bind the video application with the first virtual device pre-built in the set-top box if the protocol type is a multicast protocol, and bind the first virtual device with the multicast protocol; a first transmission module, which is used to receive the first code stream data sent by the gateway through the pre-built TCP wireless link, send the first code stream data to the first virtual device, and send the first code stream data to the video application through the first virtual device; a second transmission module, which is used to receive the second code stream data sent by the video application, send the second code stream to the first virtual device, send the second code stream data to the TCP wireless link through the first virtual device, and send the second code stream data to the gateway through the TCP wireless link.

[0012] In order to achieve the above-mentioned purpose, the present invention also provides an IPTV data transmission device, which is applied to a gateway, and includes: a third transmission module, which is used to receive the second code stream data and send the second code stream data to the main bridge through the preset second virtual device; a fourth transmission module, which is used to receive the first code stream data from the main bridge, send the second code stream data to the second virtual device, and send the first code stream data to the set-top box through the second virtual device.

[0013] Optionally, the IPTV data transmission device also includes: a first generation module, used to create a second virtual device and bind the second virtual device to the main bridge of the gateway; a second generation module, used to generate a second socket in response to the connection of the set-top box, and associate the second socket with the second virtual device; a connection establishment module, establishing the TCP connection based on the second socket and the first socket.

[0014] An IPTV data transmission method, device and system proposed in the embodiments of the present application obtain the protocol type of the current transmission data by responding to a video application startup request; if the protocol type is a multicast protocol, the video application is bound to a first virtual device pre-built in a set-top box, and the first virtual device is bound to the multicast protocol; a first code stream data sent by a gateway is received through a pre-built TCP wireless link, the first code stream data is sent to the first virtual device, and the first code stream data is sent to the video application through the first virtual device; second code stream data sent by the video application is received, the second code stream is sent to the first virtual device, and the second code stream data is sent to the TCP wireless link through the first virtual device, and the second code stream data is sent to the gateway through the TCP wireless link, thereby solving the technical problem of packet loss that is prone to occur during continuous wireless playback of the set-top box. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A flow chart of an IPTV data transmission method at a set-top box end provided in an embodiment of the present application;

[0016] Figure 2 A flow chart of the IPTV data transmission method at the gateway end provided in the embodiment of the present application;

[0017] Figure 3 A structural block diagram of an IPTV data transmission device at a set-top box end provided by an embodiment of the present invention;

[0018] Figure 4 A structural block diagram of an IPTV data transmission device at a gateway end provided by an embodiment of the present invention;

[0019] Figure 5 This is a structural block diagram of an IPTV data transmission system provided by an embodiment of the present invention.

[0020] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0021] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0022] In the related technology, the experimenters connected the same optical modem to the set-top box via wired and wireless respectively. The set-top box played the same multicast content. At this time, the wirelessly connected set-top box would have a distorted screen when playing the video, while the wired set-top box would not. The experimenters found through analysis that the cause of the distorted screen was a packet loss failure in the transmission data. The experimenters further analyzed and found that the transmission segment with the most serious packet loss was the segment from the optical modem to the set-top box. This is because the data is transmitted via multicast, and the multicast messages are UDP messages. After forwarding the multicast UDP messages, the optical modem cannot guarantee whether all of them are received on the set-top box side. Therefore, the wireless network is prone to individual message loss under certain fluctuations, resulting in a distorted screen when the video is played.

[0023] Based on the above reasons, the present invention proposes an IPTV data transmission method, which aims to solve the problem of screen distortion when the video is played wirelessly. Figure 1 , Figure 1 The flowchart of the IPTV data transmission method provided in the embodiment of the present application, which method can be executed by the set-top box 100, may include:

[0024] S10, in response to a start request of a video application, obtaining a protocol type of currently transmitted data;

[0025] Specifically, after the video application starts playing, the set-top box 100 analyzes the sending address and transmission protocol of the current transmission data, wherein the current transmission data may be video data sent from the video application to the Internet, or may be video data sent from the Internet to the video application.

[0026] It should be noted that the application in the present application may also be other application besides video. The data transmitted by the set-top box 100 and the gateway 200 may also be non-video data. For these non-video data, the settings are made with reference to the video data, which will not be described one by one here.

[0027] S20, if the protocol type is a multicast protocol, binding the video application to a first virtual device pre-built in the set-top box 100, and binding the first virtual device to the multicast protocol;

[0028] Specifically, after receiving the transmission data, the set-top box 100 parses the transmission data to obtain the video transmission protocol used by the transmission data. The video transmission protocol can be a multicast video transmission protocol or a non-multicast video transmission protocol. The multicast video transmission protocol generally uses UDP message transmission. In addition, the multicast video transmission protocol also includes VideoStream, RSVP, real-time transport protocol multicast, etc., while the non-multicast video transmission protocol is generally HTTP protocol. In addition, the non-multicast video transmission protocol also includes HLS, NDI, etc. In this embodiment, if the transmission data obtained by the set-top box 100 is a multicast video transmission protocol, then in the virtual environment created by the first virtual device, a virtual network interface card (NIC) is created or selected as the network card of the first virtual device to bind to the multicast video transmission protocol.

[0029] Specifically, set-top box 100 can use preset socket programming to join the network interface of the first virtual device to specific multicast group.After the first virtual device is bound with the multicast video transmission protocol and is set up, the video application program begins to monitor the multicast address and port of appointment, so as to receive the data that are sent to this multicast group.

[0030] The first virtual device may be a tap device, which is a virtual network interface mainly used to transfer data between user space and kernel space. The tap device is usually used for network virtualization in Linux systems and can simulate the functions of physical network devices.

[0031] Exemplarily, if the data transmission address is udp: / / 239.1.1.1:8023, the set-top box 100 can bind the video playback application to the pre-built first virtual device (eg, tap0) and add the first virtual device to the multicast network so that the first virtual device can receive the multicast data.

[0032] S30, receiving the first code stream data sent by the gateway 200 through the pre-constructed TCP wireless link, sending the first code stream data to the first virtual device, and sending the first code stream data to the video application through the first virtual device;

[0033] Exemplarily, the first code stream data sent by the gateway 200 is sent to the set-top box 100 via a TCP wireless link. After receiving the first code stream data, the set-top box 100 sends the first code stream data to the first virtual device, and then sends the first code stream data to the video application through the first virtual device. The set-top box 100 sends the first code stream data to the video application in the order of tap0<- / dev / tap0<-TCP, where / dev / tap0 represents a virtual network interface, tap0 represents a first virtual device, and TCP represents a TCP socket. After the gateway 200 sends the first code stream data to the TCP socket in the set-top box 100 via the TCP wireless link, it sends the first code stream data to the first virtual device through the virtual network interface bound to the TCP socket, and finally sends the first code stream data to the video application.

[0034] It should be noted that the priority of the TCP wireless link is lower than the priority of the default wireless link. The TCP wireless link is enabled only when the multicast video transmission protocol is used to transmit video data.

[0035] S40, receiving the second code stream data sent by the video application, sending the second code stream to the first virtual device, and sending the second code stream data to the TCP wireless link through the first virtual device, and sending the second code stream data to the gateway 200 through the TCP wireless link.

[0036] Exemplarily, after receiving the second bitstream data, the video application sends the second bitstream data to the gateway 200. It should be noted that the path through which the second bitstream data is sent is opposite to the path through which the first bitstream data is sent. Specifically, the video application first sends the second bitstream data to the first virtual device, and then sends the second bitstream data to the TCP wireless link in the path sequence of tap0-> / dev / tap0->TCP, and then sends the second bitstream data to the gateway 200 through the TCP wireless link.

[0037] It should be noted that after using the TCP wireless link to transmit the first code stream data and the second code stream data, the problem of data loss between the gateway 200 and the set-top box 100 device is solved, but the video playback may be delayed and stuck. In order to solve the above problem, the player can increase the cache space to appropriately delay the start time, thereby reducing the stuck phenomenon caused by video playback.

[0038] The first bitstream data and the second bitstream data are data transmitted by the set-top box 100 and the gateway 200 using the TCP wireless link, and are mainly video bitstream data transmitted under the multicast protocol. The video bitstream data can be, for example, live broadcasts of sports events, live broadcasts of grand conferences, etc.

[0039] In an embodiment of the present application, before step S10, the IPTV data transmission method may include the following implementation process:

[0040] S51, constructing the first virtual device;

[0041] Specifically, in Linux system, you can use ip tuntap command to pre-create a TAP type virtual network device. The command used to create a TAP type virtual network device is ip tuntap add dev tap0mode tap. It should be noted that the TAP virtual network device is a virtual network interface that simulates the behavior of real network hardware, allowing the operating system and application programs to handle it like a physical network device.

[0042] S52, creating a first socket;

[0043] Exemplarily, the Linux system can create a socket according to socket programming, and the socket is a TCP socket specifically used to receive TCP code stream data.

[0044] S53, creating a TCP connection for communicating with the server in the gateway 200 based on the first socket;

[0045] Exemplarily, the Linux system may use the connect function to establish a TCP connection with the gateway 200 .

[0046] S54: Associating the first virtual device with the first socket.

[0047] Exemplarily, when associating the first virtual device with the first socket, the Linux system needs to interact the data sending and receiving operations of the socket with the file descriptor of the first virtual device. The interaction process can be implemented in a variety of ways. Exemplarily, the Linux system can use I / O multiplexing technologies such as select, poll or epoll to implement the above association process.

[0048] In an embodiment of the present invention, after step S54, the IPTV data transmission method may further include the following implementation process:

[0049] S55, obtaining the server address in the gateway 200 through the DHCP service;

[0050] S56. Configure the address of the first virtual device based on the server address.

[0051] Specifically, after detecting the creation of the first virtual device, the set-top box 100 will start a DHCP service request. The set-top box 100 can obtain the IP address of the gateway 200 based on the DHCP service request and configure the IP address of the first virtual device according to the IP address of the gateway 200.

[0052] For example, in Linux, the dhclient command can be used to request the DHCP service to allocate an IP address. After executing the above command, dhclient will communicate with the DHCP server and obtain network configuration information such as an IP address, subnet mask, and default gateway 200 of the gateway server, and parse the network configuration information to find the IP address of the server. Based on the IP address of the server, the IP address of the first virtual device can be configured. After configuring the IP address, the system needs to ensure that the first virtual device is in an activated state.

[0053] In an embodiment of the present invention, after step S10, the IPTV data transmission method may further include the following implementation process:

[0054] S61, if the protocol type is a non-multicast protocol, receiving the third code stream data sent by the gateway 200 through a default wireless link;

[0055] S62, sending the third code stream data to the video application;

[0056] S63, receiving fourth stream data sent by the video application;

[0057] S64: Send the fourth code stream data to the gateway 200.

[0058] It should be noted that the priority of the default wireless link is higher than the priority of the TCP wireless link. Under the non-multicast video transmission protocol, the video application uses the default wireless link to transmit the third stream data. It is worth noting that the first virtual device does not need to be established during the transmission of the third stream data and the fourth stream data, and only needs to be transmitted according to the ordinary wireless data transmission link.

[0059] The third bit stream data and the fourth bit stream data are both video service data sent by the Internet to the video application, and the video service data is mainly transmitted in the form of bit streams. The third bit stream data and the fourth bit stream data are not transmitted through a TCP wireless link, but through a default wireless link. The gateway 200 and the set-top box 100 do not need to establish a virtual device or create a TCP wireless link when transmitting the third bit stream data and the fourth bit stream data.

[0060] In an embodiment of the present invention, after step S56, the IPTV data transmission method may further specifically include the following implementation process:

[0061] S57, creating an epoll instance based on the first virtual device;

[0062] S58, using the epoll instance to receive the first code stream data, and sending the first code stream data to the first virtual device;

[0063] S59: Receive the second code stream data using the epoll instance, and send the second code stream data to the TCP wireless link.

[0064] Exemplarily, using epoll for efficient I / O multiplexing is a method for handling a large number of concurrent network connections. The set-top box 100 can establish an epoll instance on a first virtual device, add the virtual device to the epoll monitoring, and add the TCP socket to the epoll monitoring. The set-top box 100 can use epoll_wait to wait for data. When the first code stream data and the second code stream data arrive, the set-top box 100 can use epoll_wait to loop and process the first code stream data and the second code stream data received and sent by the TCP socket.

[0065] Based on the above embodiment, the present invention further provides an IPTV data transmission method, which is applied to a gateway 200. Figure 2 The flowchart of the IPTV data transmission method at the gateway end provided in the embodiment of the present application is shown in FIG. Figure 2 The method may be performed by the gateway 200, and the IPTV data transmission method may include:

[0066] S70, receiving the second code stream data, and sending the second code stream data to the main bridge through the preset second virtual device;

[0067] S80, receiving the first code stream data from the main network bridge, sending the second code stream data to the second virtual device, and sending the first code stream data to the set-top box 100 through the second virtual device.

[0068] The second virtual device may also be a tap device.

[0069] Exemplarily, the gateway end may pre-create a TAP device tap1, i.e., a second virtual device, which may receive the second code stream data through a TCP wireless link. After receiving the second code stream data, the second virtual device sends the second code stream data to the main bridge, which then sends the second code stream data to the Internet. Exemplarily, the process sequence of the gateway 200 processing the second code stream data may be TCP-> / dev / tap1->tap1->br0, where TCP represents a TCP socket, / dev / tap1 represents a network port of the second virtual device, tap1 represents the second virtual device, and br0 represents the main bridge device.

[0070] It should be noted that the process of the gateway 200 device sending the second code stream data to the set-top box 100 is opposite to the process of the gateway 200 receiving the first code stream data sent by the set-top box 100, which will not be described in detail here.

[0071] In an embodiment of the present invention, before step S70, the IPTV data transmission method further includes the following implementation steps:

[0072] S91, creating a second virtual device;

[0073] S92, binding the second virtual device to the main bridge of the gateway 200;

[0074] S93, generating a second socket in response to the connection of the set-top box 100;

[0075] S94, associating the second socket with the second virtual device;

[0076] S95. Establish the TCP connection based on the second socket and the first socket.

[0077] Specifically, the method for creating the second virtual device and the second socket on the gateway side can be completely the same as the method for creating the first socket and the first virtual device on the set-top box 100 side, but after creating the second virtual device on the gateway 200, it is also necessary to bind the second virtual device to the main bridge. The gateway 200 can establish a TCP connection matching the set-top box 100 by executing steps S91-S95.

[0078] Exemplarily, after the second virtual device is created, the gateway 200 can add the second virtual device to the main bridge br0 of the gateway 200. Specifically, a socket S1 needs to be created on the gateway 200 first, and then the gateway 200 can associate the socket S1 with / dev / tap0, and then use epoll or other methods to write the second stream data received from the socket S1 to / dev / tap0, or write the first stream data received from / dev / tap0 to the socket S1.

[0079] In summary, an IPTV data transmission method proposed in an embodiment of the present application obtains the protocol type of the current transmission data by responding to a video application startup request; if the protocol type is a multicast protocol, the video application is bound to a first virtual device pre-built in the set-top box 100, and the first virtual device is bound to the multicast protocol; the first code stream data sent by the gateway 200 is received through a pre-built TCP wireless link, the first code stream data is sent to the first virtual device, and the first code stream data is sent to the video application through the first virtual device; the second code stream data sent by the video application is received, the second code stream is sent to the first virtual device, and the second code stream data is sent to the TCP wireless link through the first virtual device, and the second code stream data is sent to the gateway 200 through the TCP wireless link, which solves the technical problem that packet loss is prone to occur during wireless continuous playback of the set-top box 100.

[0080] Based on the above embodiment, the present invention further provides an IPTV data transmission device. Figure 3 The structure diagram of the IPTV data transmission device at the set-top box 100 provided in the embodiment of the present invention is shown in FIG. Figure 3The IPTV data transmission device is applied to a set-top box 100. The IPTV data transmission device 100 may include an acquisition module 101, a binding module 102, a first transmission module 103, and a second transmission module 104, wherein the acquisition module 101 may be used to respond to a video application startup request to obtain a protocol type of current transmission data; the binding module 102 may be used to bind the video application to the first virtual device pre-built in the set-top box 100 if the protocol type is a multicast protocol, and bind the first virtual device to the multicast protocol; the first transmission module 103 may be used to receive the first code stream data sent by the gateway 200 through the pre-built TCP wireless link, send the first code stream data to the first virtual device, and send the first code stream data to the video application through the first virtual device; the second transmission module 104 may be used to receive the second code stream data sent by the video application, send the second code stream to the first virtual device, send the second code stream data to the TCP wireless link through the first virtual device, and send the second code stream data to the gateway 200 through the TCP wireless link.

[0081] In an embodiment of the present invention, the IPTV data transmission device 100 may further include a creation module 105, which may be used to construct the first virtual device; create a first socket; create a TCP connection for communicating with the server in the gateway 200 based on the first socket; and associate the first virtual device and the first socket.

[0082] In an embodiment of the present invention, the IPTV data transmission apparatus 100 may further include an address configuration module 106. The address configuration module 106 may obtain the server address in the gateway 200 through a DHCP service; and configure the address of the first virtual device based on the server address.

[0083] In an embodiment of the present invention, the IPTV data transmission device 100 may further include a non-multicast code stream transmission module 107. The non-multicast code stream transmission module 107 may be used to receive the third code stream data sent by the gateway 200 through a default wireless link if the protocol type is a non-multicast protocol; send the third code stream data to the video application; receive the fourth code stream data sent by the video application; and send the fourth code stream data to the gateway 200.

[0084] In an embodiment of the present invention, the IPTV data transmission device 100 may further include a data forwarding module 108, which may be used to create an epoll instance based on the first virtual device; receive the first code stream data using the epoll instance, and send the first code stream data to the first virtual device; receive the second code stream data using the epoll instance, and send the second code stream data to the TCP wireless link.

[0085] Based on the above embodiment, the present invention further provides an IPTV data transmission device. Figure 4 The IPTV data transmission device structure block diagram of the gateway provided by the embodiment of the present invention is shown in FIG. Figure 4 The IPTV data transmission device is applied to the gateway 200, and the IPTV data transmission device 200 may include a third transmission module 201 and a fourth transmission module 202, wherein the third transmission module 201 can be used to receive the second code stream data and send the second code stream data to the main bridge through the preset second virtual device; the fourth transmission module 202 can be used to receive the first code stream data from the main bridge, send the second code stream data to the second virtual device, and send the first code stream data to the set-top box 100 through the second virtual device.

[0086] In an embodiment of the present invention, the IPTV data transmission device 200 may also include a first generation module 203, a second generation module 204 and a connection establishment module 205, wherein the first generation module 203 can be used to create a second virtual device and bind the second virtual device to the main bridge of the gateway 200; the second generation module 204 can be used to generate a second socket in response to the connection of the set-top box 100, and associate the second socket with the second virtual device; the connection establishment module 205 can establish the TCP connection based on the second socket and the first socket.

[0087] Based on the above embodiments, Figure 5 The structure diagram of the IPTV data transmission system provided by the embodiment of the present invention is shown in FIG. Figure 5The IPTV data transmission system 1000 includes a set-top box 100 and a gateway 200; wherein the set-top box 100 is used to apply the IPTV data transmission method in the above embodiment to receive the first code stream data sent by the gateway 200, and send the first code stream data to the video application, and is used to receive the second code stream data sent by the video application, and send the second code stream data to the gateway 200 through a TCP wireless link; the gateway 200 is used for the IPTV data transmission method in the above embodiment, receives the second code stream data sent by the set-top box 100, sends the second code stream data to the main bridge, and is used to receive the first code stream data sent by the main bridge, and sends the first code stream data to the set-top box 100 through a TCP wireless link.

[0088] It should be noted that the gateway 200 and the set-top box 100 in the IPTV data transmission system 1000 of this embodiment respectively have all the technical features of the gateway 200 and the set-top box 100 in the above-mentioned embodiments, and also have all the technical effects of the gateway 200 and the set-top box 100, which will not be repeated here.

[0089] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. An IPTV data transmission method, characterized in that: Applied to a set-top box, the IPTV data transmission method includes: In response to a start request of a video application, obtaining a protocol type of currently transmitted data; If the protocol type is a multicast protocol, binding the video application to a first virtual device pre-built in the set-top box, and binding the first virtual device to the multicast protocol; receiving first code stream data sent by a gateway through a pre-built TCP wireless link, sending the first code stream data to the first virtual device, and sending the first code stream data to the video application through the first virtual device; Receive the second code stream data sent by the video application, send the second code stream data to the first virtual device, send the second code stream data to the TCP wireless link through the first virtual device, and send the second code stream data to the gateway through the TCP wireless link.

2. The IPTV data transmission method according to claim 1, characterized in that: Before obtaining the protocol type of the current transmission data, the IPTV data transmission method further includes: Constructing the first virtual device; Create the first socket; Associating the first virtual device with the first socket; A TCP connection is created based on the first socket for communicating with the server in the gateway.

3. The IPTV data transmission method according to claim 2, characterized in that: After the TCP connection for communicating with the server in the gateway is created based on the first socket, the IPTV data transmission method further includes: Obtaining the server address in the gateway through the DHCP service; The address of the first virtual device is configured based on the server address.

4. The IPTV data transmission method according to claim 1, characterized in that: The IPTV data transmission method also includes: If the protocol type is a non-multicast protocol, receiving the third code stream data sent by the gateway through a default wireless link; Sending the third code stream data to the video application; Receiving fourth stream data sent by the video application; The fourth code stream data is sent to the gateway through a default wireless link.

5. The IPTV data transmission method according to claim 1, characterized in that: The IPTV data transmission method also includes: Create an epoll instance based on the first virtual device; Receive the first code stream data using the epoll instance, and send the first code stream data to the first virtual device; The second code stream data is received by using the epoll instance, and the second code stream data is sent to the TCP wireless link.

6. An IPTV data transmission method, characterized in that: Applied to a gateway, the IPTV data transmission method includes: receiving second code stream data, and sending the second code stream data to the main bridge through a preset second virtual device; The first code stream data is received from the main network bridge, the first code stream data is sent to the second virtual device, and the first code stream data is sent to the set-top box through the second virtual device.

7. The IPTV data transmission method according to claim 6, characterized in that: Before receiving the second code stream data, the IPTV data transmission method further includes: Creating a second virtual device; Binding the second virtual device to the primary bridge of the gateway; In response to the connection of the set-top box, generating a second socket; Associating the second socket with the second virtual device; A TCP connection is established based on the second socket and the first socket of the set-top box.

8. An IPTV data transmission device, characterized in that: Applied to set-top boxes, including: An acquisition module, used for acquiring a protocol type of currently transmitted data in response to a video application startup request; a binding module, configured to bind the video application to a first virtual device pre-built in the set-top box and bind the first virtual device to the multicast protocol if the protocol type is a multicast protocol; A first transmission module, configured to receive first code stream data sent by a gateway through a pre-built TCP wireless link, send the first code stream data to the first virtual device, and send the first code stream data to the video application through the first virtual device; The second transmission module is used to receive the second code stream data sent by the video application, send the second code stream data to the first virtual device, send the second code stream data to the TCP wireless link through the first virtual device, and send the second code stream data to the gateway through the TCP wireless link.

9. An IPTV data transmission device, characterized in that: Applied to gateways, including: A third transmission module, used for receiving the second code stream data, and sending the second code stream data to the main bridge through a preset second virtual device; The fourth transmission module is used to receive the first code stream data from the main bridge, send the first code stream data to the second virtual device, and send the first code stream data to the set-top box through the second virtual device.

10. An IPTV data transmission system, characterized in that: Including set-top boxes and gateways; The set-top box is used to apply the IPTV data transmission method according to any one of claims 1 to 5 to receive the first bitstream data sent by the gateway, and send the first bitstream data to the video application, and receive the second bitstream data sent by the video application, and send the second bitstream data to the gateway through the TCP wireless link; The gateway is used to apply the IPTV data transmission method as described in claim 6 or 7, receive the second code stream data sent by the set-top box, send the second code stream data to the main bridge, and receive the first code stream data sent by the main bridge, and send the first code stream data to the set-top box via a TCP wireless link.

Citation Information

Patent Citations

  • Method and apparatus for forwarding data of virtual switching device, and computer device

    CN109379269A

  • TCP (Transmission Control Protocol) error code retransmission control method under video wireless multicast by dynamically controllable double flows

    CN110753271A

  • IPTV multimedia playing method, IPTV multimedia playing device and storage medium

    CN113840168A

  • Layered transmission method for satellite video by using UDP and TCP

    CN116582166A

  • Socket communication implementation method and device for virtual routing architecture

    CN118282934A