IPTV converged gateway communication method and device, set-top box and storage medium
By creating and binding an internal communication virtual network in the IPTV converged gateway, the problem of poor communication reliability between set-top box and optical cat is solved, and internal communication independent of the business network status is realized, which improves communication reliability and simplifies development difficulty. .
Patent Information
- Application Number
- CN202411443209.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-10-16
AI Technical Summary
The communication reliability between the set-top box and the optical cat in the IPTV converged gateway is poor, resulting in the wrong judgment of the network status of the service application and unreliable service operation.
Create an internal communication virtual network and bind it to the internal communication application to avoid the set-top box operating system connection service monitoring the virtual network, so that the internal communication virtual network is transparent to business applications and independent of changes in the state of the business network.
It improves the communication reliability between the set-top box and the optical cat in the IPTV converged gateway, simplifies the difficulty of developing internal communication applications, and avoids the unreliable operation of services caused by changes in network status.
Smart Images

Figure CN118972200B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network communication technology, and in particular to an IPTV converged gateway communication method and device, a set-top box, and a storage medium. Background Art
[0002] An IPTV converged gateway is a device that integrates an optical modem and a set-top box in the same housing, and can simultaneously realize the functions of fiber-optic Internet access (such as OTT services, Over-The-Top, which refers to the transmission of video, audio and other media content through the Internet without the transmission pipeline of traditional TV service providers) and watching TV (such as IPTV services, Internet Protocol Television, which uses the Internet protocol to transmit TV programs and video content. Unlike traditional cable or satellite TV, IPTV uses the Internet as a transmission medium, allowing users to watch TV content through a network connection). Usually, an IPTV converged gateway contains two systems, one is the set-top box system, and the other is the gateway (optical modem) system. The set-top box system and the gateway system are connected through an internal network cable, logically forming a situation where the built-in set-top box of the converged gateway is connected to the built-in LAN port of the gateway (optical modem). In this way, the set-top box can access the external network through the gateway (optical modem) (such as requesting OTT services or IPTV services), and internal communication between the set-top box and the gateway can be realized, such as the set-top box performing network configuration on the gateway. However, the inventors have found through research that in the prior art, there is a problem of poor communication reliability between the set-top box and the optical modem in the IPTV converged gateway. Summary of the invention
[0003] In view of this, the purpose of the present application is to provide an IPTV converged gateway communication method and device, a set-top box and a storage medium to improve the problem of poor communication reliability between the set-top box and the optical modem in the IPTV converged gateway in the prior art.
[0004] To achieve the above objectives, this application adopts the following technical solutions:
[0005] An IPTV converged gateway communication method is applied to a set-top box in an IPTV converged gateway, wherein the IPTV converged gateway further comprises an optical modem in communication connection with the set-top box, and the IPTV converged gateway communication method comprises:
[0006] Creating an internal communication application, wherein the internal communication application does not belong to a service application, the service application belongs to an external communication application, and the external communication application at least includes an IPTV service application for implementing an IPTV service and an OTT service application for implementing an OTT service;
[0007] Creating an internal communication virtual network, and binding the internal communication virtual network to the internal communication application, and determining that a connection service in the operating system of the set-top box does not perform network monitoring processing on the internal communication virtual network, wherein the internal communication virtual network does not belong to a business network, the business network belongs to an external communication network, and the business network at least includes an IPTV network for implementing an IPTV service and an Internet network for implementing an OTT service, and the connection service is used to perform network monitoring processing on the IPTV network and the Internet network, and the network monitoring processing at least includes network selection and monitoring of network status;
[0008] Target internal communication data is generated through the internal communication application, and the target internal communication data is sent to the optical modem through the internal communication virtual network to realize internal communication between the set-top box in the IPTV converged gateway and the optical modem, wherein the request data for requesting IPTV services and OTT services is transmitted to external devices through the optical modem to realize external communication of the set-top box.
[0009] In a preferred embodiment of the present application, in the above-mentioned IPTV converged gateway communication method, the steps of creating an internal communication virtual network, binding the internal communication virtual network to the internal communication application, and determining that the connection service in the operating system of the set-top box does not perform network monitoring processing on the internal communication virtual network include:
[0010] After the operating system of the set-top box is started, a corresponding internal communication virtual network is formed by creating a virtual network card, and a network name of the internal communication virtual network is obtained;
[0011] Performing network configuration operations on the internal communication virtual network;
[0012] After the network configuration operation is completed, the internal communication virtual network is bound to the internal communication application based on the network name of the internal communication virtual network, and it is determined that the connection service in the operating system of the set-top box does not perform network monitoring processing on the internal communication virtual network.
[0013] In a preferred embodiment of the present application, in the above-mentioned IPTV converged gateway communication method, the step of performing network configuration operation on the internal communication virtual network includes:
[0014] Acquire the network address information allocated for the internal communication virtual network, and perform address conflict detection on the network address information to determine whether it is repeated with other network address information, wherein the network address information includes IP address information;
[0015] When the obtained address conflict detection result reflects that the network address information is not repeated with the other network address information, using the network address information as the actual network address information of the internal communication virtual network;
[0016] When the obtained address conflict detection result reflects that the network address information is repeated with the other network address information, requesting to reallocate new network address information to the internal communication virtual network, and performing address conflict detection on the new network address information to determine whether the new network address information is repeated with other network address information;
[0017] When the new network address information does not overlap with other network address information, the new network address information is used as the actual network address information of the internal communication virtual network. When internal communication is performed between the set-top box and the optical modem, the target internal communication data is transmitted based on the actual network address information of the internal communication virtual network.
[0018] In a preferred selection of the present application, in the above-mentioned IPTV converged gateway communication method, after the network configuration operation is completed, based on the network name of the internal communication virtual network, the internal communication virtual network is bound to the internal communication application, and the step of determining that the connection service in the operating system of the set-top box does not perform network monitoring processing on the internal communication virtual network includes:
[0019] After the network configuration operation is completed, binding the internal communication virtual network to the internal communication application based on the network name of the internal communication virtual network;
[0020] Determine not to send the network name of the internal communication virtual network and the configuration information formed by the network configuration operation to the ConnectivityService as a connection service in the operating system of the set-top box, so that the connection service cannot perform network monitoring processing on the internal communication virtual network, wherein the operating system belongs to the Android system.
[0021] In a preferred embodiment of the present application, in the above-mentioned IPTV converged gateway communication method, the step of generating target internal communication data through the internal communication application, and sending the target internal communication data to the optical modem through the internal communication virtual network to realize the internal communication between the set-top box and the optical modem in the IPTV converged gateway includes:
[0022] After the internal communication application is started, determining whether the internal communication application is bound to the internal communication virtual network, and obtaining a corresponding binding determination result;
[0023] When the binding judgment result reflects that the internal communication application is not bound to the internal communication virtual network, re-judging whether the internal communication application is bound to the internal communication virtual network to obtain a corresponding new binding judgment result;
[0024] When the binding judgment result or the new binding judgment result reflects that the internal communication application is bound to the internal communication virtual network, target internal communication data is generated through the internal communication application, and the target internal communication data is sent to the optical modem through the internal communication virtual network to realize internal communication between the set-top box in the IPTV fusion gateway and the optical modem.
[0025] In a preferred embodiment of the present application, in the above-mentioned IPTV converged gateway communication method, when the binding judgment result or the new binding judgment result reflects that the internal communication application is bound to the internal communication virtual network, the target internal communication data is generated by the internal communication application, and the target internal communication data is sent to the optical modem through the internal communication virtual network to realize the internal communication between the set-top box and the optical modem in the IPTV converged gateway, including:
[0026] When the binding judgment result or the new binding judgment result reflects that the internal communication application is bound to the internal communication virtual network, registering a target listening event, wherein the target listening event is used to listen to a broadcast reflecting the network status of the internal communication virtual network;
[0027] Determining whether the internal communication virtual network can be used for internal communication based on the network status of the internal communication virtual network monitored by the target monitoring event;
[0028] When the internal communication virtual network can be used for internal communication, target internal communication data is generated through the internal communication application, and the target internal communication data is sent to the optical modem through the internal communication virtual network to achieve internal communication between the set-top box in the IPTV fusion gateway and the optical modem.
[0029] In a preferred embodiment of the present application, in the above-mentioned IPTV converged gateway communication method, when the internal communication virtual network can be used for internal communication, the target internal communication data is generated by the internal communication application, and the target internal communication data is sent to the optical modem through the internal communication virtual network to realize the internal communication between the set-top box and the optical modem in the IPTV converged gateway, including:
[0030] When the internal communication virtual network can be used for internal communication, generating target internal communication data through the internal communication application, wherein the target internal communication data is used to instruct to perform parameter configuration operation on the optical modem;
[0031] In the TCP / IP protocol stack of the operating system of the set-top box, encapsulating the target internal communication data into a TCP segment, and, based on the IP address information of the set-top box and the IP address information of the optical modem, encapsulating the TCP segment into a first IP data packet;
[0032] The first IP data packet is sent to the optical modem through the internal communication virtual network, so that the optical modem performs corresponding parameter configuration operations based on the target internal communication data in the first IP data packet, and encapsulates configuration operation status information formed by the parameter configuration operation into a second IP data packet based on the IP address information of the set-top box and the IP address information of the optical modem, and sends the second IP data packet to the set-top box;
[0033] After obtaining the second IP data packet based on the internal communication virtual network, the second IP data packet is parsed and processed to obtain corresponding configuration operation status information, so that the internal communication application can determine the status of the optical modem based on the configuration operation status information to achieve internal communication between the set-top box and the optical modem in the IPTV fusion gateway.
[0034] The present application also provides an IPTV converged gateway communication device, which is applied to a set-top box in an IPTV converged gateway, wherein the IPTV converged gateway further includes an optical modem in communication connection with the set-top box, and the IPTV converged gateway communication device includes:
[0035] A communication application creation module, used to create an internal communication application, wherein the internal communication application does not belong to a business application, and the business application belongs to an external communication application, and the external communication application at least includes an IPTV business application for implementing an IPTV service and an OTT business application for implementing an OTT service;
[0036] a virtual network creation module, used for creating an internal communication virtual network, binding the internal communication virtual network to the internal communication application, and determining that a connection service in the operating system of the set-top box does not perform network monitoring processing on the internal communication virtual network, wherein the internal communication virtual network does not belong to a business network, the business network belongs to an external communication network, and the business network at least includes an IPTV network for implementing an IPTV service and an Internet network for implementing an OTT service, and the connection service is used for performing network monitoring processing on the IPTV network and the Internet network, and the network monitoring processing at least includes network selection and network status monitoring;
[0037] The gateway internal communication module is used to generate target internal communication data through the internal communication application, and send the target internal communication data to the optical modem through the internal communication virtual network to realize internal communication between the set-top box and the optical modem in the IPTV converged gateway, wherein the request data for requesting IPTV services and OTT services is transmitted to external devices through the optical modem to realize external communication of the set-top box.
[0038] On the basis of the above, the present application also provides a set-top box, including:
[0039] Memory for storing computer programs;
[0040] The processor connected to the memory is used to execute the computer program stored in the memory to implement the above-mentioned IPTV converged gateway communication method.
[0041] On the basis of the above, the present application also provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is run, each step of the above-mentioned IPTV converged gateway communication method is executed.
[0042] The IPTV converged gateway communication method and device, set-top box and storage medium provided by the present application first create an internal communication application; secondly, create an internal communication virtual network, and bind the internal communication virtual network to the internal communication application, and determine that the connection service in the operating system of the set-top box does not perform network monitoring processing on the internal communication virtual network; then, generate target internal communication data through the internal communication application, and send the target internal communication data to the optical modem through the internal communication virtual network, so as to realize internal communication between the set-top box and the optical modem in the IPTV converged gateway. Based on the above content, since the internal communication virtual network used to realize the internal communication between the set-top box and the optical modem in the IPTV fusion gateway is not monitored by the connection service in the operating system of the set-top box, and the connection service needs to perform network monitoring and processing on the IPTV network and the Internet network, for IPTV business applications and OTT business applications, the status of the internal communication virtual network cannot be obtained through the connection service, so that the internal communication virtual network is actually transparent (imperceptible) to IPTV business applications and OTT business applications. Therefore, the status of the internal communication virtual network has actually no effect on the operation of the internal communication virtual network. Therefore, it can avoid to a certain extent the problem that the IPTV business application and the OTT business application make an incorrect judgment on the network status due to the change of the status of the internal communication virtual network, resulting in the corresponding business cannot be carried out reliably, thereby improving the problem of poor communication reliability between the set-top box and the optical modem in the IPTV fusion gateway in the prior art. In addition, due to the dedicated internal communication virtual network configured for the internal communication application, the development difficulty of the internal communication application can be simplified compared to the conventional solution that does not have a dedicated internal communication virtual network and can only use the Layer 2 Ethernet communication between the set-top box and the optical modem (for example, due to the security restrictions of the Android system, the communication application cannot create and use the Layer 2 communication method, where the Layer 2 communication requires the use of the original socket, and the creation and use of the socket requires root permission, which the communication application cannot obtain. Therefore, the communication application cannot communicate directly with the optical modem and must use a proxy solution, such as starting a program with root permission to send Layer 2 messages in the init process, and then the communication application interacts with the program to achieve data forwarding). BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings.
[0044] Figure 1 This is a structural block diagram of a set-top box provided in an embodiment of the present application.
[0045] Figure 2A flow chart of an IPTV converged gateway communication method provided in an embodiment of the present application.
[0046] Figure 3 A block diagram of an IPTV converged gateway communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.
[0048] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0049] like Figure 1 As shown, an embodiment of the present application provides a set-top box, wherein the set-top box may include a memory, a processor, and an IPTV converged gateway communication device.
[0050] In detail, the memory and the processor are electrically connected directly or indirectly to achieve data transmission or interaction. For example, the memory and the processor can be electrically connected through one or more communication buses or signal lines. The IPTV converged gateway communication device includes at least one software function module stored in the memory in the form of software or firmware. The processor is used to execute an executable computer program stored in the memory, for example, the software function module and computer program included in the IPTV converged gateway communication device, so as to implement the IPTV converged gateway communication method provided in the embodiment of the present application.
[0051] Optionally, the memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc.
[0052] Furthermore, the processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a system on chip (SoC), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0053] Understandably, Figure 1 The structure shown is for illustration only, and the set-top box may also include Figure 1 More or fewer components as shown, or with Figure 1 The different configurations shown, for example, may also include a communication unit for exchanging information with other devices (such as an optical modem, etc.).
[0054] It can be understood that the set-top box can be applied to the IPTV convergence gateway, and the IPTV convergence gateway can also include an optical modem that is communicatively connected to the set-top box. In other words, the set-top box and the optical modem can be integrated into one housing to form the IPTV convergence gateway.
[0055] Combination Figure 2 The present application also provides an IPTV converged gateway communication method applicable to the above-mentioned set-top box. The method steps defined in the process related to the IPTV converged gateway communication method can be implemented by the set-top box. Figure 2 The process shown is described in detail.
[0056] Step S110: creating an internal communication application.
[0057] In an embodiment of the present application, the set-top box can create an internal communication application. The internal communication application does not belong to a business application, and the business application belongs to an external communication application, and the external communication application at least includes an IPTV business application for implementing an IPTV service and an OTT business application for implementing an OTT service. In other words, the internal communication application refers to other applications other than the IPTV business application and the OTT. In addition, both the internal communication application and the business application refer to the corresponding application layer sequence, i.e., App (Application).
[0058] Step S120, creating an internal communication virtual network, binding the internal communication virtual network to the internal communication application, and determining that the connection service in the operating system of the set-top box does not perform network monitoring processing on the internal communication virtual network.
[0059] In an embodiment of the present application, the set-top box can also create an internal communication virtual network, and then the internal communication virtual network can be bound to the internal communication application, and it is determined that the connection service in the operating system of the set-top box does not perform network monitoring processing on the internal communication virtual network, that is, the internal communication application can directly use the internal communication virtual network without going through the connection service to use the internal communication virtual network. Wherein, the internal communication virtual network does not belong to the business network, the business network belongs to the external communication network, and the business network at least includes an IPTV network for implementing IPTV services and an Internet network for implementing OTT services, and the connection service is used to perform network monitoring processing on the IPTV network and the Internet network, and the network monitoring processing at least includes network selection and network status monitoring. In this way, the purpose of IPTV business applications and OTT business applications being unable to query the internal communication virtual network through the connection service can be achieved, and the network isolation of IPTV business applications and OTT business applications from the internal communication application is achieved, which avoids possible interference to IPTV business applications and OTT business applications, and realizes the dedicated network of the internal communication virtual network.
[0060] Step S130, generating target internal communication data through the internal communication application, and sending the target internal communication data to the optical modem through the internal communication virtual network, so as to realize internal communication between the set-top box in the IPTV converged gateway and the optical modem.
[0061] In the embodiment of the present application, after the internal communication virtual network is bound to the internal communication application, the set-top box can generate target internal communication data through the internal communication application, and send the target internal communication data to the optical modem through the internal communication virtual network to realize the internal communication between the set-top box and the optical modem in the IPTV converged gateway. The request data for requesting IPTV services and OTT services is transmitted to an external device (such as requesting to obtain video content) through the optical modem to realize the external communication of the set-top box.
[0062] Based on the above content, since the internal communication virtual network used to realize the internal communication between the set-top box and the optical modem in the IPTV fusion gateway is not monitored by the connection service in the operating system of the set-top box, and the connection service needs to perform network monitoring and processing on the IPTV network and the Internet network, for IPTV business applications and OTT business applications, the status of the internal communication virtual network cannot be obtained through the connection service, so that the internal communication virtual network is actually transparent (imperceptible) to IPTV business applications and OTT business applications. Therefore, the status of the internal communication virtual network has actually no effect on the operation of the internal communication virtual network. Therefore, it can avoid to a certain extent the problem that the IPTV business application and the OTT business application make an incorrect judgment on the network status due to the change of the status of the internal communication virtual network, resulting in the corresponding business cannot be carried out reliably, thereby improving the problem of poor communication reliability between the set-top box and the optical modem in the IPTV fusion gateway in the prior art. In addition, due to the dedicated internal communication virtual network configured for the internal communication application, the development difficulty of the internal communication application can be simplified compared to the conventional solution that does not have a dedicated internal communication virtual network and can only use the Layer 2 Ethernet communication between the set-top box and the optical modem (for example, due to the security restrictions of the Android system, the communication application cannot create and use the Layer 2 communication method, where the Layer 2 communication requires the use of the original socket, and the creation and use of the socket requires root permission, which the communication application cannot obtain. Therefore, the communication application cannot communicate directly with the optical modem and must use a proxy solution, such as starting a program with root permission to send Layer 2 messages in the init process, and then the communication application interacts with the program to achieve data forwarding).
[0063] First, it should be noted that for step S110, the specific method of creating the internal communication application is not limited and can be selected according to actual needs.
[0064] For example, in an alternative implementation, the internal communication application may be created using a standard Android application development method. Exemplarily, the following contents may be included:
[0065] Create a new project: Use Android Studio (Android development IDE) to create a new project by following these steps: Open Android Studio and select "Create New Project"; fill in the basic information such as the name of the application, package name, and project storage location in the wizard; select the target Android device and the minimum supported Android version; select a basic template for the application, such as Empty Activity, Basic Activity, etc.;
[0066] Design the user interface (UI): In Android Studio, you can design the user interface of the application through XML files or visual interface editors, which includes layout files, control placement and style definitions. Android provides a variety of layout types (such as linear layout, relative layout, frame layout, etc.) and a rich control library;
[0067] Writing the logic and functionality of the application: In Java or Kotlin programming languages, writing the logic and functional code of the application mainly includes the following aspects: Activity: The logic behind each screen or user interface is the responsibility of an activity class; Service: Long-term operations or services running in the background; Broadcast Receiver: Responding to system-level broadcast events; Content Provider: Data sharing and access; Permission management: Ensure that the application can access sensitive data or perform certain operations only with user permission.
[0068] Secondly, it should be noted that for step S120, the specific method of creating an internal communication virtual network and performing application binding is not limited and can be selected according to actual needs.
[0069] For example, in an alternative implementation, the above step S120 may further include step S121, step S122 and step S123, and the specific content of each step is described as follows.
[0070] Step S121, after the operating system of the set-top box is started, a corresponding internal communication virtual network is formed by creating a virtual network card, and a network name of the internal communication virtual network is obtained.
[0071] In an embodiment of the present application, after the operating system of the set-top box is started, a corresponding internal communication virtual network is formed by creating a virtual network card, and the network name of the internal communication virtual network is obtained. Exemplarily, the operating system of the set-top box can be an Android system on a Linux system kernel, based on which, a virtual network card can be created using the following command, where eth0:1 is named as an example: sudo ip link add eth0:1 typedummy. Wherein, eth0:1 is the name of the virtual network card, and dummy indicates that the type of the virtual network card is a virtual dummy interface.
[0072] Step S122, performing network configuration operations on the internal communication virtual network.
[0073] In the embodiment of the present application, after the internal communication virtual network is created, a network configuration operation may be performed on the internal communication virtual network, that is, corresponding network parameters may be configured.
[0074] Step S123, after the network configuration operation is completed, based on the network name of the internal communication virtual network, the internal communication virtual network is bound to the internal communication application, and it is determined that the connection service in the operating system of the set-top box does not perform network monitoring processing on the internal communication virtual network.
[0075] In an embodiment of the present application, after the network configuration operation is completed, the internal communication virtual network can be bound to the internal communication application based on the network name of the internal communication virtual network (for example, the network name of the internal communication virtual network can be sent to the internal communication application, so that the internal communication application can determine the internal communication virtual network based on the network name), and it is determined that the connection service in the operating system of the set-top box does not perform network monitoring processing on the internal communication virtual network, that is, the network name of the internal communication virtual network and other identifying information can not be sent to the connection service, so that the connection service is unaware of the internal communication virtual network. In this way, the business applications that rely on the connection service for network queries are also unaware of the internal communication virtual network.
[0076] It is understandable that, in the above step S122, the specific manner of performing the network configuration operation on the internal communication virtual network is not limited and can be selected according to actual needs. For example, in an alternative implementation, the above step S122 may include the following:
[0077] First, the network address information allocated for the internal communication virtual network can be obtained, and the network address information is subjected to address conflict detection to determine whether it is repeated with other network address information, wherein the network address information includes IP address information;
[0078] Secondly, when the obtained address conflict detection result reflects that the network address information is not repeated with the other network address information, the network address information can be used as the actual network address information of the internal communication virtual network;
[0079] Then, when the obtained address conflict detection result reflects that the network address information is repeated with the other network address information, a request may be made to reallocate new network address information to the internal communication virtual network, and an address conflict detection may be performed on the new network address information to determine whether the new network address information is repeated with the other network address information;
[0080] Finally, when the new network address information does not overlap with other network address information, the new network address information can be used as the actual network address information of the internal communication virtual network, wherein when internal communication is performed between the set-top box and the optical modem, the target internal communication data is transmitted based on the actual network address information of the internal communication virtual network.
[0081] It should be noted that, in the process of performing network configuration operations on the internal communication virtual network, in addition to performing the configuration operations of the network address information as described above, other operations can also be performed, such as obtaining the default configuration information of the network, configuring the netid (network identifier) and routing information, and after the configuration is completed, a broadcast that the network is connected can be sent so that data communication can be performed based on the network. Accordingly, after monitoring that the internal communication virtual network is offline (down), the network address information, the netid and the routing information can be released, and a broadcast that the network is disconnected can be sent to avoid invalid network requests, etc.
[0082] It is understandable that, in the above step S123, the specific method of binding the internal communication virtual network is not limited and can be selected according to actual needs. For example, in an alternative implementation, the above step S123 may include the following contents:
[0083] First, after the network configuration operation is completed, the internal communication virtual network can be bound to the internal communication application based on the network name of the internal communication virtual network. For example, the network name of the internal communication virtual network can be sent to the internal communication application, and the internal communication virtual network can be informed to belong to the network that can be used by the internal communication application;
[0084] Secondly, it can be determined that the network name of the internal communication virtual network and the configuration information (such as netid, etc.) formed by the network configuration operation will not be sent to the ConnectivityService in the operating system of the set-top box as a connection service, so that the connection service cannot perform network monitoring processing on the internal communication virtual network, wherein the operating system belongs to the Android system.
[0085] In the third aspect, it should be noted that the specific method of internal communication between the set-top box and the optical modem in the IPTV converged gateway is not limited and can be selected according to actual needs. For example, in an alternative implementation, the above step S130 can further include step S131, step S132 and step S133, and the specific content of each step is as follows.
[0086] Step S131, after the internal communication application is started, it is determined whether the internal communication application is bound to the internal communication virtual network to obtain a corresponding binding determination result.
[0087] In an embodiment of the present application, after the internal communication application is started, it can be determined whether the internal communication application is bound to the internal communication virtual network to obtain a corresponding binding determination result, that is, to determine whether the internal communication application is bound to the internal communication virtual network.
[0088] Step S132, when the binding judgment result reflects that the internal communication application is not bound to the internal communication virtual network, re-judgment is made as to whether the internal communication application is bound to the internal communication virtual network to obtain a corresponding new binding judgment result.
[0089] In an embodiment of the present application, when the binding judgment result reflects that the internal communication application is not bound to the internal communication virtual network, it is possible to re-judge whether the internal communication application is bound to the internal communication virtual network to obtain a corresponding new binding judgment result. Exemplarily, after startup, since the configuration or acquisition of some parameters may not be so timely, it may appear that the internal communication virtual network is not yet bound. At this time, you can wait (the specific waiting time can be configured according to demand), and then, after waiting for a certain period of time, you can re-judge whether the internal communication application is bound to the internal communication virtual network, so that a new binding judgment result can be obtained.
[0090] Step S133, when the binding judgment result or the new binding judgment result reflects that the internal communication application is bound to the internal communication virtual network, target internal communication data is generated through the internal communication application, and the target internal communication data is sent to the optical modem through the internal communication virtual network to realize internal communication between the set-top box in the IPTV fusion gateway and the optical modem.
[0091] In an embodiment of the present application, when the binding judgment result or the new binding judgment result reflects that the internal communication application is bound to the internal communication virtual network, target internal communication data can be generated by the internal communication application, and the target internal communication data can be sent to the optical modem through the internal communication virtual network to achieve internal communication between the set-top box in the IPTV converged gateway and the optical modem. Exemplarily, the internal communication application can generate the target internal communication data in response to the optical modem configuration operation performed by the corresponding user.
[0092] It is understandable that, in the above step S133, the specific communication method after the internal communication application is bound to the internal communication virtual network is not limited and can be selected according to actual needs. For example, in an alternative implementation, the above step S133 can further include step S133a, step S133b and step S133c, the specific contents of which are as follows.
[0093] Step S133a: when the binding determination result or the new binding determination result reflects that the internal communication application is bound to the internal communication virtual network, register a target listening event.
[0094] In an embodiment of the present application, when the binding judgment result or the new binding judgment result reflects that the internal communication application is bound to the internal communication virtual network, a target listening event can be registered. The target listening event is used to listen to the broadcast reflecting the network status of the internal communication virtual network, so that the network status can be obtained in time.
[0095] Step S133b: Determine whether the internal communication virtual network can be used for internal communication based on the network status of the internal communication virtual network monitored by the target monitoring event.
[0096] In an embodiment of the present application, after the network status of the internal communication virtual network is monitored based on the target monitoring event, it can be determined based on the network status whether the internal communication virtual network can be used for internal communication (such as it cannot be used for communication if the network is disconnected).
[0097] Step S133c, when the internal communication virtual network can be used for internal communication, target internal communication data is generated through the internal communication application, and the target internal communication data is sent to the optical modem through the internal communication virtual network to realize internal communication between the set-top box in the IPTV fusion gateway and the optical modem.
[0098] In an embodiment of the present application, when the internal communication virtual network can be used for internal communication, target internal communication data can be generated through the internal communication application, and the target internal communication data can be sent to the optical modem through the internal communication virtual network to achieve internal communication between the set-top box and the optical modem in the IPTV converged gateway. In other words, the target internal communication data can be generated first, and then, when it is determined that the internal communication virtual network can be used for internal communication, the target internal communication data can be sent to the optical modem through the internal communication virtual network to configure the optical modem accordingly based on the target internal communication data.
[0099] It is understandable that in the above step S133c, the specific method of internal communication between the set-top box and the optical modem is not limited and can be selected according to actual needs. For example, in an alternative implementation, the following contents may be included:
[0100] First, when the internal communication virtual network can be used for internal communication, target internal communication data can be generated by the internal communication application, wherein the target internal communication data is used to instruct parameter configuration operations on the optical modem, such as setting a protocol type for network connection, etc.;
[0101] Secondly, the target internal communication data can be encapsulated into a TCP segment in the TCP / IP protocol stack of the operating system of the set-top box, and the TCP segment can be encapsulated into a first IP data packet based on the IP address information of the set-top box and the IP address information of the optical modem;
[0102] Then, the first IP data packet can be sent to the optical modem through the internal communication virtual network, so that the optical modem performs corresponding parameter configuration operations based on the target internal communication data in the first IP data packet, and encapsulates configuration operation status information (such as whether the configuration is successful, etc.) formed by the parameter configuration operation based on the IP address information of the set-top box and the IP address information of the optical modem into a second IP data packet, and sends the second IP data packet to the set-top box;
[0103] Finally, after obtaining the second IP data packet based on the internal communication virtual network, the second IP data packet can be parsed and processed to obtain corresponding configuration operation status information, so that the internal communication application can determine the status of the optical modem based on the configuration operation status information (such as whether the parameter configuration is successful, so that the set-top box can take corresponding measures based on the status of the optical modem. Based on this, this solution and the conventional solution that uses Layer 2 Ethernet communication can also reliably determine the status of the optical modem, thereby promptly handling configuration failures) to achieve internal communication between the set-top box and the optical modem in the IPTV fusion gateway.
[0104] Combination Figure 3 The embodiment of the present application also provides an IPTV converged gateway communication device applicable to the above set-top box. The IPTV converged gateway communication device may include a communication application creation module, a virtual network creation module and a gateway internal communication module.
[0105] The communication application creation module can be used to create an internal communication application, wherein the internal communication application does not belong to a business application, and the business application belongs to an external communication application, and the external communication application at least includes an IPTV business application for implementing an IPTV service and an OTT business application for implementing an OTT service. In an embodiment of the present application, the communication application creation module can be used to execute Figure 2 As shown in step S110, the relevant contents of the communication application creation module can refer to the above description of step S110.
[0106] The virtual network creation module can be used to create an internal communication virtual network, bind the internal communication virtual network to the internal communication application, and determine that the connection service in the operating system of the set-top box does not perform network monitoring processing on the internal communication virtual network, wherein the internal communication virtual network does not belong to the business network, the business network belongs to the external communication network, and the business network at least includes an IPTV network for implementing IPTV services and an Internet network for implementing OTT services, and the connection service is used to perform network monitoring processing on the IPTV network and the Internet network, and the network monitoring processing at least includes network selection and network status monitoring. In an embodiment of the present application, the virtual network creation module can be used to perform Figure 2 As shown in step S120, the relevant contents of the virtual network creation module can refer to the above description of step S120.
[0107] The gateway internal communication module can be used to generate target internal communication data through the internal communication application, and send the target internal communication data to the optical modem through the internal communication virtual network to realize the internal communication between the set-top box in the IPTV converged gateway and the optical modem, wherein the request data for requesting IPTV services and OTT services is transmitted to the external device through the optical modem to realize the external communication of the set-top box. In the embodiment of the present application, the gateway internal communication module can be used to perform Figure 2 As shown in step S130, the relevant contents about the internal communication module of the gateway can refer to the description of step S130 in the previous text.
[0108] In an embodiment of the present application, corresponding to the above-mentioned IPTV converged gateway communication method applied to the set-top box, a computer-readable storage medium is also provided, in which a computer program is stored, and when the computer program is run, each step of the IPTV converged gateway communication method is executed. Among them, each step executed when the aforementioned computer program is run will not be repeated here one by one, and reference can be made to the above explanation of the IPTV converged gateway communication method.
[0109] To summarize, the IPTV converged gateway communication method and device, set-top box and storage medium provided by the present application first create an internal communication application; secondly, create an internal communication virtual network, and bind the internal communication virtual network to the internal communication application, and determine that the connection service in the operating system of the set-top box does not perform network monitoring processing on the internal communication virtual network; then, generate target internal communication data through the internal communication application, and send the target internal communication data to the optical modem through the internal communication virtual network to realize internal communication between the set-top box and the optical modem in the IPTV converged gateway. Based on the above content, since the internal communication virtual network used to realize the internal communication between the set-top box and the optical modem in the IPTV fusion gateway is not monitored by the connection service in the operating system of the set-top box, and the connection service needs to perform network monitoring and processing on the IPTV network and the Internet network, for IPTV business applications and OTT business applications, the status of the internal communication virtual network cannot be obtained through the connection service, so that the internal communication virtual network is actually transparent (imperceptible) to IPTV business applications and OTT business applications. Therefore, the status of the internal communication virtual network has actually no effect on the operation of the internal communication virtual network. Therefore, it can avoid to a certain extent the problem that the IPTV business application and the OTT business application make an incorrect judgment on the network status due to the change of the status of the internal communication virtual network, resulting in the corresponding business cannot be carried out reliably, thereby improving the problem of poor communication reliability between the set-top box and the optical modem in the IPTV fusion gateway in the prior art. In addition, due to the dedicated internal communication virtual network configured for the internal communication application, the development difficulty of the internal communication application can be simplified compared to the conventional solution that does not have a dedicated internal communication virtual network and can only use the Layer 2 Ethernet communication between the set-top box and the optical modem (for example, due to the security restrictions of the Android system, the communication application cannot create and use the Layer 2 communication method, where the Layer 2 communication requires the use of the original socket, and the creation and use of the socket requires root permission, which the communication application cannot obtain. Therefore, the communication application cannot communicate directly with the optical modem and must use a proxy solution, such as starting a program with root permission to send Layer 2 messages in the init process, and then the communication application interacts with the program to achieve data forwarding).
[0110] In several embodiments provided in the embodiments of the present application, it should be understood that the disclosed device and method can also be implemented in other ways. The device and method embodiments described above are merely schematic, for example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the device, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0111] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0112] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, electronic device, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code. It should be noted that in this article, the term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.
[0113] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An IPTV fusion gateway communication method, characterized in that: A set-top box applied to an IPTV converged gateway, wherein the IPTV converged gateway further comprises an optical modem communicatively connected to the set-top box, and the IPTV converged gateway communication method comprises: Creating an internal communication application, wherein the internal communication application does not belong to a service application, the service application belongs to an external communication application, and the external communication application at least includes an IPTV service application for implementing an IPTV service and an OTT service application for implementing an OTT service; Creating an internal communication virtual network, and binding the internal communication virtual network to the internal communication application, and determining that a connection service in the operating system of the set-top box does not perform network monitoring processing on the internal communication virtual network, wherein the internal communication virtual network does not belong to a business network, the business network belongs to an external communication network, and the business network at least includes an IPTV network for implementing an IPTV service and an Internet network for implementing an OTT service, and the connection service is used to perform network monitoring processing on the IPTV network and the Internet network, and the network monitoring processing at least includes network selection and monitoring of network status; Target internal communication data is generated through the internal communication application, and the target internal communication data is sent to the optical modem through the internal communication virtual network to realize internal communication between the set-top box in the IPTV converged gateway and the optical modem, wherein the request data for requesting IPTV services and OTT services is transmitted to external devices through the optical modem to realize external communication of the set-top box.
2. The IPTV converged gateway communication method according to claim 1, characterized in that: The steps of creating an internal communication virtual network, binding the internal communication virtual network to the internal communication application, and determining that the connection service in the operating system of the set-top box does not perform network monitoring processing on the internal communication virtual network include: After the operating system of the set-top box is started, a corresponding internal communication virtual network is formed by creating a virtual network card, and a network name of the internal communication virtual network is obtained; Performing network configuration operations on the internal communication virtual network; After the network configuration operation is completed, the internal communication virtual network is bound to the internal communication application based on the network name of the internal communication virtual network, and it is determined that the connection service in the operating system of the set-top box does not perform network monitoring processing on the internal communication virtual network.
3. The IPTV converged gateway communication method according to claim 2, characterized in that: The step of performing network configuration operation on the internal communication virtual network includes: Acquire the network address information allocated for the internal communication virtual network, and perform address conflict detection on the network address information to determine whether it is repeated with other network address information, wherein the network address information includes IP address information; When the obtained address conflict detection result reflects that the network address information is not repeated with the other network address information, using the network address information as the actual network address information of the internal communication virtual network; When the obtained address conflict detection result reflects that the network address information is repeated with the other network address information, requesting to reallocate new network address information to the internal communication virtual network, and performing address conflict detection on the new network address information to determine whether the new network address information is repeated with other network address information; When the new network address information does not overlap with other network address information, the new network address information is used as the actual network address information of the internal communication virtual network. When internal communication is performed between the set-top box and the optical modem, the target internal communication data is transmitted based on the actual network address information of the internal communication virtual network.
4. The IPTV converged gateway communication method according to claim 2, characterized in that: The steps of binding the internal communication virtual network to the internal communication application based on the network name of the internal communication virtual network after the network configuration operation is completed, and determining that the connection service in the operating system of the set-top box does not perform network monitoring processing on the internal communication virtual network, include: After the network configuration operation is completed, binding the internal communication virtual network to the internal communication application based on the network name of the internal communication virtual network; Determine not to send the network name of the internal communication virtual network and the configuration information formed by the network configuration operation to the ConnectivityService as a connection service in the operating system of the set-top box, so that the connection service cannot perform network monitoring processing on the internal communication virtual network, wherein the operating system belongs to the Android system.
5. The IPTV converged gateway communication method according to any one of claims 1 to 4, characterized in that: The step of generating target internal communication data through the internal communication application, and sending the target internal communication data to the optical modem through the internal communication virtual network to realize the internal communication between the set-top box in the IPTV fusion gateway and the optical modem includes: After the internal communication application is started, determining whether the internal communication application is bound to the internal communication virtual network, and obtaining a corresponding binding determination result; When the binding judgment result reflects that the internal communication application is not bound to the internal communication virtual network, re-judging whether the internal communication application is bound to the internal communication virtual network to obtain a corresponding new binding judgment result; When the binding judgment result or the new binding judgment result reflects that the internal communication application is bound to the internal communication virtual network, target internal communication data is generated through the internal communication application, and the target internal communication data is sent to the optical modem through the internal communication virtual network to realize internal communication between the set-top box in the IPTV fusion gateway and the optical modem.
6. The IPTV converged gateway communication method according to claim 5, characterized in that: When the binding judgment result or the new binding judgment result reflects that the internal communication application is bound to the internal communication virtual network, the step of generating target internal communication data through the internal communication application, and sending the target internal communication data to the optical modem through the internal communication virtual network to realize the internal communication between the set-top box in the IPTV converged gateway and the optical modem includes: When the binding judgment result or the new binding judgment result reflects that the internal communication application is bound to the internal communication virtual network, registering a target listening event, wherein the target listening event is used to listen to a broadcast reflecting the network status of the internal communication virtual network; Determining whether the internal communication virtual network can be used for internal communication based on the network status of the internal communication virtual network monitored by the target monitoring event; When the internal communication virtual network can be used for internal communication, target internal communication data is generated through the internal communication application, and the target internal communication data is sent to the optical modem through the internal communication virtual network to achieve internal communication between the set-top box in the IPTV fusion gateway and the optical modem.
7. The IPTV converged gateway communication method according to claim 6, characterized in that: When the internal communication virtual network can be used for internal communication, the target internal communication data is generated by the internal communication application, and the target internal communication data is sent to the optical modem through the internal communication virtual network to realize the internal communication between the set-top box and the optical modem in the IPTV converged gateway, including: When the internal communication virtual network can be used for internal communication, generating target internal communication data through the internal communication application, wherein the target internal communication data is used to instruct to perform parameter configuration operation on the optical modem; In the TCP / IP protocol stack of the operating system of the set-top box, encapsulating the target internal communication data into a TCP segment, and, based on the IP address information of the set-top box and the IP address information of the optical modem, encapsulating the TCP segment into a first IP data packet; The first IP data packet is sent to the optical modem through the internal communication virtual network, so that the optical modem performs corresponding parameter configuration operations based on the target internal communication data in the first IP data packet, and encapsulates configuration operation status information formed by the parameter configuration operation into a second IP data packet based on the IP address information of the set-top box and the IP address information of the optical modem, and sends the second IP data packet to the set-top box; After obtaining the second IP data packet based on the internal communication virtual network, the second IP data packet is parsed and processed to obtain corresponding configuration operation status information, so that the internal communication application can determine the status of the optical modem based on the configuration operation status information to achieve internal communication between the set-top box and the optical modem in the IPTV fusion gateway.
8. An IPTV fusion gateway communication device, characterized in that: A set-top box applied to an IPTV converged gateway, wherein the IPTV converged gateway further comprises an optical modem connected to the set-top box for communication, and the IPTV converged gateway communication device comprises: A communication application creation module, used to create an internal communication application, wherein the internal communication application does not belong to a business application, and the business application belongs to an external communication application, and the external communication application at least includes an IPTV business application for implementing an IPTV service and an OTT business application for implementing an OTT service; a virtual network creation module, used for creating an internal communication virtual network, binding the internal communication virtual network to the internal communication application, and determining that a connection service in the operating system of the set-top box does not perform network monitoring processing on the internal communication virtual network, wherein the internal communication virtual network does not belong to a business network, the business network belongs to an external communication network, and the business network at least includes an IPTV network for implementing an IPTV service and an Internet network for implementing an OTT service, and the connection service is used for performing network monitoring processing on the IPTV network and the Internet network, and the network monitoring processing at least includes network selection and network status monitoring; The gateway internal communication module is used to generate target internal communication data through the internal communication application, and send the target internal communication data to the optical modem through the internal communication virtual network to realize internal communication between the set-top box and the optical modem in the IPTV converged gateway, wherein the request data for requesting IPTV services and OTT services is transmitted to external devices through the optical modem to realize external communication of the set-top box.
9. A set-top box, characterized in that: include: Memory for storing computer programs; A processor connected to the memory is used to execute the computer program stored in the memory to implement the IPTV converged gateway communication method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is run, the IPTV converged gateway communication method according to any one of claims 1 to 7 is executed.
