IPTV device remote security debugging method, system and IPTV device

By setting up multiple communication networks on IPTV devices, allowing them to connect to the server side, and using SSL objects to transmit debugging data, the problem that remote debugging terminals cannot establish connections with IPTV devices is solved, and secure and matching debugging communication is achieved, saving server port resources are saved.

CN119299750BActive Publication Date: 2025-04-15SICHUAN TIANYI COMHEART TELECOM
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411849551.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-04-15
Estimated Expiration
2044-12-16

AI Technical Summary

Technical Problem

When an IPTV device fails, the remote debugging terminal cannot establish a communication connection with it, resulting in the inability to control and debug. Due to the limited server port, there is a problem that the debugging terminal and the IPTV device cannot match.

Method used

By setting up multiple communication networks other than IPTV networks on the IPTV device, the IPTV device is allowed to determine the target network connected to the server from multiple communication networks and send identification information under the target network. The server side receives the target identification information sent by the debugging terminal, and calls the first SSL object corresponding to the target IPTV device from the preset list based on this information, and creates a second SSL object, and uses these two SSL objects to transmit debugging data.

Benefits of technology

It solves the problem that the remote debugging terminal cannot establish a communication connection with the IPTV device, realizes the correct matching between the debugging terminal and the IPTV device, and ensures the security of communication through the SSL protocol, saving server port resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299750B_ABST
    Figure CN119299750B_ABST
Patent Text Reader

Abstract

The present application discloses a remote secure debugging method, system and IPTV device for IPTV devices, and relates to the technical field of IPTV television network devices. The method comprises: receiving identification information sent by the IPTV device under the target network, the target network being a communication network connected to the server end determined by the IPTV device from multiple communication networks; receiving target identification information sent by the debugging terminal; in the case where it is determined according to the target identification information that there is a target IPTV device in the preset list, retrieving the first SSL object corresponding to the target IPTV device from the preset list; creating a second SSL object, and transmitting debugging data using the first SSL object and the second SSL object corresponding to the target IPTV device; the debugging data is used to control the debugging tool in the target IPTV device to debug the IPTV device. Thus, the problems of the remote debugging terminal being unable to establish a communication connection with the IPTV device, the matching and secure communication between the debugging terminal and the IPTV device, etc. can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of IPTV television network equipment, and in particular to a method and system for remote secure debugging of IPTV equipment and IPTV equipment. Background Art

[0002] As we all know, IPTV network is a private network, and different regions have their own IPTV network environment. Usually, after the set-top box is connected to the IPTV network through a wired method, it will obtain a private network address to realize functions such as network playback.

[0003] However, this private network address cannot be accessed through the Internet, so when the set-top box fails, the staff cannot access the set-top box through the Internet to control and debug it. Even if the set-top box can access the Internet through a wireless network card, the set-top box will only get a local area network address, and the remote debugging terminal cannot connect to this address to achieve the purpose of controlling and debugging the set-top box;

[0004] In addition, due to the limited number of server ports, when multiple set-top boxes fail, there will be a problem that the debugging terminal and the set-top boxes cannot match. Summary of the invention

[0005] The main purpose of this application is to provide a remote secure debugging method, system and IPTV device for IPTV equipment to solve the problems of the remote debugging terminal being unable to establish a communication connection with the IPTV equipment, the matching and secure communication of the debugging terminal and the IPTV equipment, etc.

[0006] To achieve the above object, the present application provides a remote secure debugging method for an IPTV device, which is applied to a server side, and the method comprises:

[0007] Receiving identification information sent by the IPTV device in a target network, where the target network is a communication network connected to the server end and determined by the IPTV device from a plurality of communication networks;

[0008] Receiving target identification information sent by the debugging terminal, wherein the target identification information is a unique identification of a target IPTV device, and the target IPTV device is a debugging object of the debugging terminal;

[0009] In the case where it is determined according to the target identification information that the target IPTV device exists in the preset list, retrieving the first SSL object corresponding to the target IPTV device from the preset list; the preset list includes identification information of multiple groups of IPTV devices and corresponding first SSL objects;

[0010] A second SSL object is created, and debugging data is transmitted using the first SSL object and the second SSL object corresponding to the target IPTV device; the debugging data is used to control a debugging tool in the target IPTV device to debug the IPTV device.

[0011] Optionally, the server side includes a preset port, and before receiving the target identification information sent by the debugging terminal, the method also includes: creating a first socket and configuring the first socket to listen to the preset port; configuring the context environment of the SSL protocol, and creating the first SSL object when receiving the first connection request sent by the IPTV device using the first socket; using the first SSL object to receive the identification information sent by the IPTV device, and associating the identification information with the first SSL object and storing it in the preset list.

[0012] Optionally, before receiving the target identification information sent by the debugging terminal, the method further includes: using the first socket to receive a second connection request sent by the debugging terminal, and establishing a communication connection with the debugging terminal.

[0013] Optionally, the identification information is the MAC address of the IPTV device, and the target identification information is the MAC address of the target IPTV device. The method further includes: determining whether there is a MAC address of an IPTV device that is the same as the MAC address of the target IPTV device in the preset list; if there is an IPTV device in the preset list that has a MAC address that is the same as the MAC address of the target IPTV device, determining that the target IPTV device exists in the preset list; if there is no IPTV device in the preset list that has a MAC address that is the same as the MAC address of the target IPTV device, disconnecting the communication connection with the debugging terminal.

[0014] Optionally, the debugging data includes first debugging data and second debugging data, and the transmitting of debugging data using the first SSL object and the second SSL object corresponding to the target IPTV device includes: reading the first debugging data from the first SSL object corresponding to the target IPTV device, and writing the first debugging data into the second SSL object; reading the second debugging data from the second SSL object, and writing the second debugging data into the first SSL object corresponding to the target IPTV device.

[0015] In addition, to achieve the above-mentioned purpose, the present application also provides another remote secure debugging method for an IPTV device, which is applied to an IPTV device, wherein the IPTV device has multiple communication networks, and the method includes: traversing each of the communication networks and creating a second socket, and using the second socket to determine a target network connected to a server side from all the communication networks; in the target network environment, using the second socket to send identification information to the server side, and receiving debugging data sent by the server side; the debugging data is used to control the debugging tool in the IPTV device to debug the IPTV device.

[0016] Optionally, traversing each of the communication networks and creating a second socket, and using the second socket to determine a target network connected to the server side from all the communication networks, includes: selecting one communication network from all the communication networks to bind to a debugging application; creating a second socket, and using the second socket to send a first connection request to the server side in an environment of the communication network bound to the debugging application; receiving feedback information sent by the server side, wherein the feedback information is generated by the server side based on the first connection request; and when the feedback information is a connection failure, replacing the communication network bound to the debugging application, and using the second socket to resend the first connection request to the server side, until the feedback information received is a successful connection, and using the successfully connected communication network as the target network.

[0017] Optionally, after determining the target network connected to the server side, the method also includes: configuring a firewall to set access permissions for the debugging tool service port; creating a third socket, wherein the third socket is used for data interaction between the IPTV device and the debugging tool; in the target network environment, using the second socket to send identification information to the server side, and receiving debugging data sent by the server side, including: creating a third SSL object based on the second socket; using the third SSL object to send identification information to the server side, and receiving debugging data sent by the server side.

[0018] The present application also provides a remote secure debugging system for an IPTV device, comprising a server side, at least one IPTV device and at least one debugging terminal; the IPTV device is used to determine a target network connected to the server side from all communication networks, and send identification information to the server side under the target network; the debugging terminal is used to send target identification information to the server side, the target identification information is a unique identification of a target IPTV device, and the target IPTV device is a debugging object of the debugging terminal; the server side is used to receive the target identification information sent by the debugging terminal, and when it is determined that the target IPTV device exists in a preset list according to the target identification information, retrieve a first SSL object corresponding to the target IPTV device from the preset list, and create a second SSL object, and use the first SSL object and the second SSL object corresponding to the target IPTV device to transmit debugging data; wherein the preset list includes identification information of multiple groups of IPTV devices and corresponding first SSL objects; the debugging data is used to control the debugging tool in the target IPTV device to debug the IPTV device.

[0019] The present application also provides an IPTV device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the remote secure debugging method for the IPTV device as described above is implemented.

[0020] The remote secure debugging method for an IPTV device of the present application sets a plurality of communication networks other than an IPTV network on the IPTV device. When the IPTV device needs to be debugged, the IPTV device determines a target network connected to a server end from a plurality of communication networks and sends identification information under the target network. The server end receives the target identification information sent by the debugging terminal and, when it is determined according to the target identification information that a target IPTV device exists in a preset list, retrieves a first SSL object corresponding to the target IPTV device from the preset list. Furthermore, the server end creates a second SSL object and finally transmits debugging data using the first SSL object and the second SSL object corresponding to the target IPTV device. Thus, the problem that a remote modulation terminal cannot establish a communication connection with the IPTV device is solved. Furthermore, the debugging terminal can be correctly matched with the IPTV device through the identification information, and secure communication can be achieved by communicating using the SSL protocol. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is a scenario example of the remote security debugging method of IPTV equipment provided by this application;

[0022] Figure 2This is one of the flow charts of a method for remote secure debugging of an IPTV device according to an embodiment of the present application;

[0023] Figure 3 This is the second flowchart of the method for remote secure debugging of an IPTV device according to an embodiment of the present application;

[0024] Figure 4 This is one of the flow charts of a method for remote secure debugging of an IPTV device according to another embodiment of the present application;

[0025] Figure 5 This is a second flowchart of a method for remote secure debugging of an IPTV device according to another embodiment of the present application;

[0026] Figure 6 It is a schematic diagram of a remote security debugging system for an IPTV device according to an embodiment of the present application;

[0027] Figure 7 An example of a physical structure diagram of an IPTV device is shown;

[0028] In the figure: 600, IPTV device remote security debugging system; 610, server side; 620, IPTV device; 630, debugging terminal; 710, processor; 720, communication interface; 730, memory; 740, communication bus.

[0029] 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

[0030] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0031] IPTV (Interactive Personal Television or Interactive Protocol Television) is a technology that uses broadband networks, combined with the Internet, multimedia, communications and other technologies, to provide home users with various interactive services including digital television. Users can receive and enjoy IPTV services through computers, network set-top boxes, ordinary TVs or mobile devices (such as smartphones and tablets). It can be seen that the network usually used by set-top boxes (i.e. IPTV devices) is the IPTV network; however, the IPTV network is a private network, and different provinces and cities have their own IPTV network environments.

[0032] In Android device debugging related technologies, the ADB (Android Debug Bridge) tool is usually used for device debugging. The ADB tool is a general command line tool used to communicate with Android devices. The ADB tool provides a variety of functions, including installing and debugging applications, and transferring files between devices and computers. The ADB tool is widely used in the development, testing, and debugging of Android applications.

[0033] When using the ADB tool to debug IPTV devices, the following problems may occur:

[0034] 1. During the development, testing and use of IPTV equipment, the IPTV equipment and the debugging terminal may be in different locations. In this case, the debugging terminal is required to remotely debug the IPTV equipment. However, the IPTV network is a separate network and is not connected to the Internet. Therefore, after the IPTV equipment is connected to the IPTV network, the remote staff cannot access the IPTV equipment through the ADB tool in the debugging terminal, which makes it impossible to debug the IPTV equipment.

[0035] 2. Even if the IPTV device is connected to the Internet, because the IPTV device is under the router, due to the security policy of the router, the external network is usually blocked from directly accessing the internal device. The router has an isolation effect on remote access, so the local communication program of the IPTV device cannot connect to the specific device through the ADB tool.

[0036] 3. Due to the limited ports on the server side, when different debugging terminals are needed to debug different IPTV devices, there will be a matching connection problem between multiple IPTV devices and multiple debugging terminals.

[0037] 4. Since the ADB service of IPTV equipment involves the process of opening the ADB service port during use, the security scanning tool can scan the open port, and the open ADB service port generally allows other devices to connect directly, so there are certain security risks.

[0038] To this end, the embodiments of the present application provide a remote secure debugging method, system and IPTV device for an IPTV device to solve the problem that the IPTV device and the debugging terminal cannot communicate and connect due to network inconsistency and router isolation, and achieve matching connection and data interaction between the IPTV device and the debugging terminal by using only one port on the server side, solve the problem of limited server ports, and improve the security of communication.

[0039] For ease of understanding, this specification provides a scenario example of a method for remote secure debugging of an IPTV device. The scenario example is applied in the following example: Figure 1 In the application environment shown, the scenario includes an IPTV device, a server, a debugging terminal, a first router, and a second router. The IPTV device is connected to an IPTV network, the first router is connected to the IPTV device for communication, the second router is connected to the debugging terminal for communication, and the first router and the second router are connected to the server for communication, respectively. In addition, the IPTV device and the debugging terminal are in a remote state.

[0040] In this scenario example, the IPTV device may be a set-top box, and the IPTV device uses an IPTV network to implement main applications such as network playback. The debugging terminal may refer to a debugging terminal used by a staff member, i.e., a debugging client, and the debugging terminal may include (but is not limited to): mobile terminals such as mobile phones, laptops, PADs (tablet computers), and fixed terminals such as desktop computers, etc. The debugging terminal is not specifically limited here.

[0041] For IPTV devices, you can add wireless networks, wired networks, and any other communication networks that can connect to the Internet, such as wireless networks, wired networks, etc., to IPTV devices by installing USB network cards, wired connections, wireless connections, etc. These communication networks can be used to connect to the Internet to assist in debugging communications, and the debugging process will not affect the main applications of the IPTV device (such as live TV, on-demand content, interactive functions, etc.), because the main applications are still run through the IPTV network.

[0042] In this scenario, the server side refers to the middleware or server used to manage and forward debugging commands. It serves as a bridge between the debugging terminal (debugging client) and the IPTV device (debugged end) and is responsible for receiving, managing and forwarding debugging commands. For IPTV devices, the server side belongs to the external network server. If the IPTV device wants to establish a communication connection with the server side, it usually needs to be achieved through the Internet.

[0043] When it is necessary to remotely debug an IPTV device, first, the IPTV device establishes a communication connection with the server through other communication networks other than the IPTV network. After the IPTV device establishes a communication connection with the server, the debugging terminal establishes a communication connection with the server. Furthermore, the IPTV device sends identification information to the server under the target network, and the server stores the identification information. The debugging terminal then sends target identification information to the server, and the target identification information can represent the target IPTV device that the debugging terminal needs to debug; the server queries the target IPTV device through the target identification information and the identification information of each stored IPTV device, and the server then establishes a communication connection between the target IPTV device and the debugging terminal.

[0044] Furthermore, the debugging terminal sends debugging data (i.e., debugging commands) to the server through the ADB tool, and the server then forwards the debugging data to the target IPTV device, which also has the ADB tool installed. After the target IPTV device receives the debugging data, it sends the debugging data to the ADB service, so that the ADB service debugs the target IPTV device according to the debugging data.

[0045] In addition, in this scenario, the IPTV device, server, and debugging terminal all use the TLS (Transport Layer Security) protocol for communication. The use of the TLS protocol can provide strong security for network communications, which can not only protect the privacy and integrity of data, but also ensure the authenticity of the identities of both parties in the communication.

[0046] Thus, a communication connection is established between the IPTV device and the server side through other communication networks, thereby solving the problem that the IPTV device and the debugging terminal cannot communicate due to network inconsistency and router isolation; by adopting the TLS protocol, the security of both parties in communication is guaranteed, and only one server-side port is needed to achieve the purpose of debugging multiple IPTV devices simultaneously by multiple debugging terminals.

[0047] Referring to the scenario example of the IPTV device remote security debugging method in the aforementioned embodiment, the IPTV device remote security debugging method in the embodiment of the present application is described in detail below.

[0048] Figure 2 This is one of the flowcharts of the remote security debugging method of an IPTV device according to an embodiment of the present application. The remote security debugging method of an IPTV device can be applied to the server side in the above embodiment. Figure 2 As shown, the IPTV device remote security debugging method may include the following steps:

[0049] Step 210: receiving identification information sent by the IPTV device in the target network, where the target network is a communication network connected to the server end determined by the IPTV device from among multiple communication networks.

[0050] Step 220: Receive the target identification information sent by the debugging terminal. The target identification information is the unique identification of the target IPTV device. The target IPTV device is the debugging object of the debugging terminal.

[0051] Step 230: When it is determined that the target IPTV device exists in the preset list according to the target identification information, retrieve the first SSL object corresponding to the target IPTV device from the preset list; the preset list includes identification information of multiple groups of IPTV devices and corresponding first SSL objects.

[0052] Step 240: Create a second SSL object, and use the first SSL object and the second SSL object corresponding to the target IPTV device to transmit debugging data; the debugging data is used to control the debugging tool in the target IPTV device to debug the IPTV device.

[0053] First, it should be noted that the identification information described in the embodiment of the present application may be any information that can characterize the identity of the IPTV device, and specifically may be the MAC address of the IPTV device. In addition, the communication network described in the embodiment of the present application refers to any network that can be connected to the Internet except the IPTV network, such as a wireless network, a wired network, etc.; the debugging tool described in the embodiment may be an ADB tool.

[0054] In this embodiment, various communication networks can be added to the IPTV device by wireless, wired, USB network card, etc.; the added communication network is used to connect to the Internet, and the IPTV network is used for running the main application.

[0055] In step 210, when multiple IPTV devices need to be remotely debugged, each IPTV device can first find a target network that can establish a communication connection with the server, and after each IPTV device establishes a communication connection with the server, it sends identification information to the server based on the corresponding target network. After receiving the identification information sent by the IPTV device, the server can associate the identification information of the IPTV device with the corresponding first SSL object created and store it in a preset list, and the first SSL object is used for the IPTV device to perform data interaction with the server.

[0056] Furthermore, when the server receives the target identification information sent by the debugging terminal, that is, the identification information of the target IPTV device that the debugging terminal needs to debug, the server can search for the identification information and the first SSL object that are identical to the target identification information in the preset list. If the identification information identical to the target identification information does not exist in the preset list, it indicates that the target IPTV device that the debugging terminal needs to debug has not established a communication connection with the server, and at this time, the connection between the server and the debugging terminal can be disconnected first.

[0057] If there is identification information identical to the target identification information in the preset list, it indicates that the target IPTV device that the debugging terminal needs to debug has established a communication connection with the server; the server can retrieve the first SSL object corresponding to the target IPTV device from the preset list and create a second SSL object, which is used for data exchange between the server and the debugging terminal. In this way, the server can forward the debugging data through the first SSL object and the second SSL object, and realize the matching and communication connection between the debugging terminal and the IPTV device.

[0058] Figure 3 This is the second flowchart of the remote security debugging method of an IPTV device according to an embodiment of the present application.

[0059] like Figure 3 As shown, in some implementations, the server side includes a preset port. Before receiving the target identification information sent by the debugging terminal, the IPTV device remote security debugging method may further include the following steps:

[0060] Step 310: Create a first socket, and configure the first socket to listen to the preset port.

[0061] Step 320: Configure the context environment of the SSL protocol, and create a first SSL object when a first connection request sent by the IPTV device is received by using the first socket.

[0062] Step 330: Utilize the first SSL object to receive identification information sent by the IPTV device, and associate the identification information with the first SSL object and store them in a preset list.

[0063] It should be noted that the preset port can be any port on the server side, and is not specifically limited here. It is worth mentioning that, usually during the debugging process, two server-side ports need to be used, one to connect the IPTV device and the other to connect the debugging terminal, which results in too many server-side ports being occupied; however, after optimization in the embodiment of the present application, the server side only needs to use one port to achieve the purpose of debugging multiple IPTV devices.

[0064] In this embodiment, the server side can first create a first socket, which can be recorded as socketS1; the first socket can be configured to listen to a preset port, and the first socket can be set to a non-blocking mode. The server side can monitor in real time through the first socket whether the preset interface receives a connection request sent by the IPTV device or the debugging terminal.

[0065] Furthermore, after configuring the first socket, you can configure the context of the SSL (Secure Sockets Layer) protocol on the server side. For example, import the private key and SSL certificate on the server side. The private key and SSL certificate work together in the SSL / TLS protocol to perform data encryption, identity authentication, and data integrity protection, thereby ensuring the security and confidentiality of data transmission, ensuring the authenticity of both communicating parties, preventing identity impersonation, and ensuring that data is not tampered with during transmission.

[0066] After the server configures the context environment of the SSL protocol, the first socket monitors the preset interface and waits for the IPTV device to request a connection. Specifically, when the server receives the first connection request sent by the IPTV device on the first socket, it creates a fourth socket, which can be recorded as socketS4. Furthermore, the server can create a first SSL object based on the fourth socket, that is, complete SSL_accept on the first SSL object; the server can receive data sent by the IPTV device through the first SSL object. It should be noted here that the first connection request can be an SSL / TLS protocol connection request.

[0067] After the server creates the first SSL object corresponding to the IPTV device, it waits to receive data sent by the IPTV device through the first SSL object. After the server receives the identification information sent by the IPTV device through the first SSL object, the identification information of the IPTV device can be associated with the first SSL object and stored in a preset list, so as to subsequently query the required first SSL object corresponding to the IPTV device from the preset list. It should be noted that the identification information of the IPTV device can be a MAC address.

[0068] As an example, when the server receives "adbserver:00:11:22:33:44:55" sent by the IPTV device through the first SSL object, 00:11:22:33:44:55 is the MAC address of the IPTV device. The MAC address can be associated with the first SSL object and saved in a list memstore in the server memory.

[0069] Therefore, as long as the preset interface of the server receives the first connection request sent by a certain IPTV device, the server creates a corresponding first SSL object to interact with it, receives the identification information sent by the IPTV device, and associates the identification information with the corresponding first SSL object for storage. The IPTV devices that can be queried in the preset list are all devices that have established a communication connection with the server.

[0070] In some implementations, before receiving the target identification information sent by the debugging terminal, the IPTV device remote secure debugging method further includes: using the first socket to receive a second connection request sent by the debugging terminal, and establishing a communication connection with the debugging terminal.

[0071] In this embodiment, after the server side and the IPTV device complete the communication connection process, the debugging terminal can then establish a communication connection with the server side. Because the debugging terminal can directly establish a communication connection with the server side through the Internet, the connection process between the debugging terminal and the server side is relatively simple. Therefore, the server side can first connect to the IPTV device and then connect to the debugging terminal.

[0072] Specifically, the server side monitors the preset interface in real time through the first socket whether there is a second connection request sent by the debugging terminal. If the preset interface receives the second connection request sent by the debugging terminal, it can first create a fifth socket, which can be recorded as socketS5, and receive the target identification information sent by the debugging terminal on the fifth socket to realize the communication connection between the server side and the debugging terminal.

[0073] In some embodiments, the identification information is the MAC address of the IPTV device, and the target identification information is the MAC address of the target IPTV device; step 230 determines whether the target IPTV device exists in the preset list according to the target identification information, which may include: if the MAC address of the IPTV device in the preset list is the same as the MAC address of the target IPTV device, then determining that the target IPTV device exists in the preset list; if the MAC address of the IPTV device in the preset list is not the same as the MAC address of the target IPTV device, then disconnecting the communication connection with the debugging terminal.

[0074] Specifically, after receiving the target identification information sent by the debugging terminal through the fifth socket, the server can query whether the target identification information exists in the preset list to determine whether the target IPTV device that the debugging terminal needs to debug has established a connection with the server.

[0075] If the target identification information exists in the preset list, the debugging terminal successfully matches the IPTV device and retrieves the first SSL object corresponding to the IPTV device from the preset list; further, the server creates a second SSL object based on the fifth socket to use the second SSL object to interact with the debugging terminal. If the target identification information does not exist in the preset list, it indicates that the target IPTV device has not established a communication connection with the server, and the communication connection with the debugging terminal can be closed at this time.

[0076] In some embodiments, the debugging data includes first debugging data and second debugging data. Step 240 transmits the debugging data using the first SSL object and the second SSL object corresponding to the target IPTV device, which may include: reading the first debugging data from the first SSL object corresponding to the target IPTV device and writing the first debugging data into the second SSL object; reading the second debugging data from the second SSL object and writing the second debugging data into the first SSL object corresponding to the target IPTV device.

[0077] It should be noted that the first debugging data may be debugging results fed back by the IPTV device, current status data of the IPTV device, etc.; the second debugging data may be debugging commands generated by the debugging terminal, etc.

[0078] In this embodiment, when the server establishes connections with both the target IPTV device and the debugging terminal, and the target IPTV device successfully matches the debugging terminal, the server receives the first debugging data sent by the target IPTV device through the first SSL object, and receives the second debugging data sent by the debugging terminal through the second SSL object.

[0079] Furthermore, the server reads the first debugging data on the first SSL object through SSL_read, and then writes the first debugging data into the second SSL object through SSL_write; in addition, the server reads the second debugging data on the second SSL object through SSL_read, and then writes the second debugging data into the first SSL object through SSL_write. In this way, data forwarding and exchange on the server side can be realized, so that data interaction can be achieved between the target IPTV device and the debugging terminal.

[0080] The above is an introduction to the remote security debugging method of the IPTV device in the embodiment of the present application from the server side. The following is an introduction to the remote security debugging method of the IPTV device from the IPTV device side.

[0081] Figure 4 This is one of the flowcharts of the remote security debugging method of IPTV device in another embodiment of the present application. The remote security debugging method of IPTV device can be applied to IPTV devices, such as Figure 4As shown, the IPTV device remote security debugging method may include the following steps:

[0082] Step 410: traverse each communication network and create a second socket, and use the second socket to determine the target network connected to the server from all communication networks.

[0083] Step 420: In the target network environment, use the second socket to send identification information to the server side, and receive debugging data sent by the server side; the debugging data is used to control the debugging tool in the IPTV device to debug the IPTV device.

[0084] It should be noted that the communication network described in this embodiment refers to any network that can be connected to the Internet except the IPTV network, such as a wireless network, a wired network, etc.; the debugging tool described in this embodiment may be an ADB tool.

[0085] In this embodiment, the IPTV device can first connect to any communication network, start the ADB service of the IPTV device, and import the SSL certificate and private key required for secure connection on the IPTV device. After the IPTV device completes the above-mentioned preparations before connection, it can start traversing various communication networks to find the target network and communicate with the server.

[0086] Specifically, the IPTV device traverses various communication networks to find a communication network that can be connected to the server side, and interacts with the server side under the communication network to solve the problem that the IPTV device cannot communicate with the server side when the IPTV network is used as the default network. Specifically, the IPTV device can create a socket, which is the second socket, and the second socket can be recorded as socketS2. In the current communication network environment, the second socket can be used to try to connect to the server side. If the connection is successful, the current communication network can be used as the target network; if the connection is not successful, the communication network is changed, and the second socket is used again to try to connect to the server side until a communication network that can be connected to the server side is found. If there is still no communication network that can successfully connect to the server side after the traversal, the IPTV device can be put into a waiting state first.

[0087] In some implementations, a network change broadcast can be registered on the IPTV device to monitor whether the IPTV device network has changed. If the IPTV device network has changed, the network change broadcast will send out a network change broadcast so that the user can be informed of the change in the IPTV device network. In addition, when the IPTV device network is detected to have changed, the IPTV device can also control the debugging program to make corresponding changes to promote the process of connecting to the server side and make the next attempt to connect to the server side.

[0088] In step 420, after the target network is determined, the IPTV device can communicate with the server through the second socket in the target network environment. At this time, the second socket can be used to send its identification information to the server, or the second socket can be used to receive debugging data sent by the server.

[0089] Specifically, the IPTV device first sends identification information to the server to register on the server, indicating that the IPTV device has been online. Furthermore, after the debugging terminal successfully matches the IPTV device, the debugging terminal generates second debugging data (such as debugging commands) and sends it to the server; the server sends the debugging data to the IPTV device under the target network environment; when the IPTV device receives the second debugging data, the IPTV device sends the second debugging data to the ADB service. If the IPTV device needs to send the first debugging data (such as debugging results) to the debugging terminal, the IPTV device also sends the first debugging data to the server, and the server forwards it to the debugging terminal.

[0090] Figure 5 This is the second flowchart of the remote security debugging method of an IPTV device according to another embodiment of the present application.

[0091] like Figure 5 As shown, in some implementations, step 410 traverses each communication network and creates a second socket, and uses the second socket to determine the target network connected to the server from all communication networks, which may include the following steps:

[0092] Step 510: Select one communication network from all communication networks and bind it to the debugging application.

[0093] Step 520: Create a second socket, and use the second socket to send a first connection request to the server in a communication network environment bound to the debugging application.

[0094] Step 530: receiving feedback information sent by the server, where the feedback information is generated by the server according to the first connection request.

[0095] Step 540: When the feedback information is that the connection failed, replace the communication network bound to the debugging application, and use the second socket to resend the first connection request to the server, until the feedback information received is that the connection is successful, and use the successfully connected communication network as the target network.

[0096] Specifically, all communication networks available to the IPTV device can be obtained first, and then a communication network can be randomly selected from all communication networks as the current communication network of the IPTV device; further, the communication network can be bound to the debugging application in the IPTV device so that the debugging application can run under the communication network. It should be noted here that after the debugging application is bound to the communication network, the sockets created by the IPTV device and related to the debugging application all use the communication network for communication.

[0097] After binding the debugging application to the communication network, the IPTV device can create a second socket socketS2, and use the second socket to send a first connection request to the server side in the communication network environment bound to the debugging application. If the server side can receive the first connection request, it means that it can communicate with the server side through the communication network. At this time, the server side will send feedback information to the IPTV device. The feedback information can be any form of information that can represent a successful connection; it can also be information that is automatically returned after the IPTV device detects that the first connection request is successfully sent. If the server side cannot receive the first connection request or receives an error, it means that it cannot connect to the server side through the current communication network. When the server side does not detect the first connection request after a preset time, it can send feedback information to the IPTV device. The feedback information can be any form of information that can represent a connection failure; it can also be: when the IPTV device detects that the first connection request fails to be sent or no information is returned after a preset time, it automatically determines that the current communication network cannot connect to the server side.

[0098] In this embodiment, if the current communication network connection fails, the next communication network is replaced; after the communication network is replaced, the above-mentioned network change broadcast will broadcast the IPTV device network change, and the IPTV device will bind the new communication network to the debugging application in the IPTV device. Further, after binding, the IPTV device uses the second socket to resend the first connection request to the server side, and the second socket monitors in real time whether the corresponding feedback information is received. According to the above steps, all communication networks of the IPTV device are traversed until a communication network that can be successfully connected to the server side is found (that is, the corresponding feedback information is a successful connection), and the communication network is used as the target network.

[0099] Therefore, in the subsequent debugging process, the IPTV device can exchange data with the server side in the target network environment, solving the problem that the IPTV device cannot connect to the server side due to network inconsistency.

[0100] In some embodiments, after determining the target network connected to the server, the IPTV device remote secure debugging method further includes: configuring a firewall, setting access rights to the debugging tool service port; creating a third socket, the third socket being used for data interaction between the IPTV device and the debugging tool. Step 420, in the target network environment, using the second socket to send identification information to the server, and receiving debugging data sent by the server, may include: creating a third SSL object based on the second socket; using the third SSL object to send identification information to the server, and receiving debugging data sent by the server.

[0101] It is understandable that when the ADB service of the IPTV device is started, the ADB service port will be opened, and the ADB service port generally allows other devices to connect directly, so there is a security risk. Based on this, in the embodiment of the present application, after starting the ADB service of the IPTV device, the firewall is configured so that the ADB service port is only allowed to be accessed by the local loopback address, and other addresses are not allowed to access the ADB service port. In addition, the IPTV device can also create a third socket, which can be recorded as socketS3, and the third socket can be used for the IPTV device to communicate with the ADB service port locally.

[0102] In this embodiment, after the IPTV device is successfully connected to the server, a third SSL object can be created based on the second socket, and the IPTV device can receive data sent by the first SSL object on the server through the third SSL object, thereby achieving secure data interaction.

[0103] Specifically, the IPTV device can first send its identification information to the server through the third SSL object, and the first SSL object on the server receives the identification information. Secondly, when the server writes the second debugging data on the second SSL object into the first SSL object and outputs it to the IPTV device, the third SSL object of the IPTV device can receive the second debugging data sent by the first SSL object. Furthermore, the IPTV device can read the second debugging data from the third SSL object through SSL_read, write the second debugging data into the third socket through SSL_wrtie, send the second debugging data to the ADB service port in the IPTV device through the third socket, and the ADB service debugs the IPTV device based on the second debugging data.

[0104] Therefore, by prohibiting other devices from accessing the ADB service port and using the SSL / TLS protocol during data interaction, the security of data during data interaction is guaranteed.

[0105] Next, we will introduce the remote security debugging method of IPTV equipment from the debugging terminal side.

[0106] In the embodiment of the present application, the debugging terminal can first import the protocol certificate and private key file required by the SSL / TLS protocol to prepare for the subsequent connection to the server. Further, the debugging terminal sends a second connection request to the server through the TLS protocol. After the server is connected to the debugging terminal, the debugging terminal can create a sixth socket and create a fourth SSL object based on the sixth socket.

[0107] The debugging terminal sends the target identification information to the server through the fourth SSL object, that is, the debugging terminal needs to connect and exchange data with the target IPTV device corresponding to the target identification information. The second SSL object on the server receives the target identification information. If the server finds the target identification information from the preset list, the debugging terminal is matched with the target IPTV device, and the server returns the matching success information to the debugging terminal. After the fourth SSL object of the debugging terminal receives the returned matching success information, the debugging terminal can further create a seventh socket, which can be recorded as socketS7, and configure the seventh socket to bind the port P1 of the debugging terminal. It should be noted that port P1 is a port connected to the ADB client.

[0108] In this embodiment, when the seventh socket monitors that port P1 receives the second debugging data sent by the ADB client, the debugging terminal will create an eighth socket, which can be recorded as socketS8, and the eighth socket receives the second debugging data sent by the ADB client. Further, the debugging terminal writes the second debugging data to the fourth SSL object through SSL_wirte, and the fourth SSL object sends the second debugging data to the server.

[0109] Similarly, when the fourth SSL object receives the first debugging data sent by the server through the second SSL object, the debugging terminal reads the first debugging data from the fourth SSL object, writes the first debugging data into the eighth socket, and the eighth socket sends the first debugging data to the ADB client. Thus, the connection and data interaction between the ADB client and the debugging terminal are realized.

[0110] The remote secure debugging method for IPTV devices in the embodiment of the present application realizes multiple networks by connecting wireless networks, wired networks, USB network cards, etc. on the IPTV devices. The wireless networks, wired networks or USB network cards realize connection to the Internet to assist in debugging communications; the IPTV network is used for the operation of IPTV applications, ensuring the normal use of the main application of the IPTV device, and realizing the finding of a communication network that can connect to the server side in the presence of multiple networks, and realizing communication connection with the server side through the communication network. Secondly, the server side can realize the function of information forwarding between multiple IPTV devices and multiple debugging terminals through one port, solves the problem of connection matching between multiple devices and multiple control terminals, and saves the number of ports. Finally, by prohibiting other devices or addresses from connecting to the ADB service port, and by adopting the SSL / TLS protocol to realize communication, the security of data interaction is effectively improved.

[0111] Based on the above embodiments, the present invention also provides a remote security debugging system for IPTV equipment. Figure 6 Schematic diagram of the IPTV device remote security debugging system of the present application embodiment. Figure 6 As shown, the IPTV device remote security debugging system 600 includes a server 610 , at least one IPTV device 620 , and at least one debugging terminal 630 .

[0112] The IPTV device 620 is used to determine the target network connected to the server side 610 from all communication networks, and send identification information to the server side 610 under the target network; the debugging terminal 630 is used to send target identification information to the server side 610, the target identification information is the unique identification of the target IPTV device 620, and the target IPTV device 620 is the debugging object of the debugging terminal 630; the server side 610 is used to receive the target identification information sent by the debugging terminal 630, and when it is determined that the target IPTV device 620 exists in the preset list according to the target identification information, the first SSL object corresponding to the target IPTV device 620 is retrieved from the preset list, and a second SSL object is created, and debugging data is transmitted using the first SSL object and the second SSL object corresponding to the target IPTV device 620; wherein the preset list includes identification information of multiple groups of IPTV devices 620 and corresponding first SSL objects; the debugging data is used to control the debugging tool in the target IPTV device 620 to debug the IPTV device 620.

[0113] Therefore, by setting up multiple communication networks other than the IPTV network on the IPTV device 620, when the IPTV device 620 needs to be debugged, the IPTV device 620 determines the target network connected to the server side 610 from the multiple communication networks, and sends identification information under the target network; the server side 610 receives the target identification information sent by the debugging terminal 630, and when it is determined that the target IPTV device 620 exists in the preset list according to the target identification information, the server side 610 retrieves the first SSL object corresponding to the target IPTV device 620 from the preset list; further, the server side 610 creates a second SSL object, and finally uses the first SSL object and the second SSL object corresponding to the target IPTV device 620 to transmit debugging data; thereby, the problem that the remote modulation terminal cannot establish a communication connection with the IPTV device 620 is solved, and the debugging terminal 630 can be correctly matched with the IPTV device 620 through the identification information, and secure communication can be achieved by communicating using the SSL protocol.

[0114] It should be noted that for details not disclosed in the IPTV device remote security debugging system of this embodiment, please refer to the details disclosed in the embodiment of the IPTV device remote security debugging method in the embodiment of this specification, and no further details will be given here.

[0115] Figure 7 An example of a physical structure diagram of an IPTV device is shown below. Figure 7 As shown, the IPTV device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 complete mutual communication through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the second IPTV device remote security debugging method, which includes: traversing each communication network and creating a second socket, using the second socket to determine the target network connected to the server end from all communication networks; in the target network environment, using the second socket to send identification information to the server end, and receiving debugging data sent by the server end; the debugging data is used to control the debugging tool in the IPTV device to debug the IPTV device.

[0116] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. 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, etc. Various media that can store program codes.

[0117] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the above-mentioned second method for remote secure debugging of an IPTV device, which includes: traversing each communication network and creating a second socket, and using the second socket to determine a target network connected to a server from all communication networks; in the target network environment, using the second socket to send identification information to the server, and receiving debugging data sent by the server; the debugging data is used to control the debugging tool in the IPTV device to debug the IPTV device.

[0118] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned second method for remote secure debugging of an IPTV device, the method comprising: traversing each communication network and creating a second socket, and using the second socket to determine a target network connected to a server side from all communication networks; in the target network environment, using the second socket to send identification information to the server side, and receiving debugging data sent by the server side; the debugging data is used to control the debugging tool in the IPTV device to debug the IPTV device.

[0119] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A remote secure debugging method for an IPTV device, applied to a server, characterized in that: The method comprises: Receiving identification information sent by the IPTV device under a target network, wherein the target network is determined by the IPTV device from all the communication networks by traversing each communication network and creating a second socket, and using the second socket; the IPTV device selects one communication network from all the communication networks to bind with a debugging application when traversing each communication network, and uses the second socket to send a first connection request to a server; the first connection request is used to request a connection to the server, so that the server sends feedback information to the IPTV device, and the target network is the communication network bound to the debugging application when the feedback information is a successful connection; Receiving target identification information sent by the debugging terminal, wherein the target identification information is a unique identification of a target IPTV device, and the target IPTV device is a debugging object of the debugging terminal; In the case where it is determined according to the target identification information that the target IPTV device exists in the preset list, retrieving the first SSL object corresponding to the target IPTV device from the preset list; the preset list includes identification information of multiple groups of IPTV devices and corresponding first SSL objects; A second SSL object is created, and debugging data is transmitted using the first SSL object and the second SSL object corresponding to the target IPTV device; the debugging data is used to control a debugging tool in the target IPTV device to debug the IPTV device.

2. The IPTV device remote security debugging method according to claim 1, characterized in that: The server side includes a preset port. Before receiving the target identification information sent by the debugging terminal, the method further includes: Creating a first socket, and configuring the first socket to listen to the preset port; configuring a context environment of the SSL protocol, and creating the first SSL object when a first connection request sent by the IPTV device is received by using the first socket; The identification information sent by the IPTV device is received by using the first SSL object, and the identification information is associated with the first SSL object and stored in the preset list.

3. The IPTV device remote security debugging method according to claim 2, characterized in that: Before receiving the target identification information sent by the debugging terminal, the method further includes: The second connection request sent by the debugging terminal is received by using the first socket, and a communication connection is established with the debugging terminal.

4. The IPTV device remote security debugging method according to claim 3, characterized in that: The identification information is the MAC address of the IPTV device, the target identification information is the MAC address of the target IPTV device, and the method further includes: Determine whether there is a MAC address of an IPTV device that is the same as the MAC address of the target IPTV device in the preset list; If the MAC address of the IPTV device in the preset list is the same as the MAC address of the target IPTV device, determining that the target IPTV device exists in the preset list; If there is no IPTV device in the preset list whose MAC address is the same as the MAC address of the target IPTV device, the communication connection with the debugging terminal is disconnected.

5. The IPTV device remote security debugging method according to claim 1, characterized in that: The debugging data includes first debugging data and second debugging data, and the transmitting the debugging data by using the first SSL object and the second SSL object corresponding to the target IPTV device includes: Reading first debugging data from a first SSL object corresponding to the target IPTV device, and writing the first debugging data into the second SSL object; The second debugging data is read from the second SSL object, and the second debugging data is written into the first SSL object corresponding to the target IPTV device.

6. A remote secure debugging method for an IPTV device, applied to an IPTV device, characterized in that: The IPTV device has multiple communication networks, and the method includes: Traversing each of the communication networks and creating a second socket, and using the second socket to determine a target network connected to the server from all of the communication networks; In the target network environment, using the second socket to send identification information to the server, and receiving debugging data sent by the server; the debugging data is used to control the debugging tool in the IPTV device to debug the IPTV device; The traversing of the communication networks, creating a second socket, and using the second socket to determine a target network connected to the server from all the communication networks includes: Selecting one communication network from all the communication networks to bind to the debugging application; Creating a second socket, and sending a first connection request to a server using the second socket in a communication network environment bound to the debugging application; receiving feedback information sent by the server, where the feedback information is generated by the server according to the first connection request; When the feedback information indicates that the connection failed, the communication network bound to the debugging application is replaced, and the first connection request is resent to the server using the second socket until the feedback information received indicates that the connection is successful, and the successfully connected communication network is used as the target network.

7. The method for remote secure debugging of an IPTV device according to claim 6, characterized in that: After determining the target network connected to the server, the method further includes: Configure the firewall and set the access rights of the debugging tool service port; Creating a third socket, wherein the third socket is used for data exchange between the IPTV device and the debugging tool; The step of sending identification information to the server side by using the second socket under the target network environment and receiving debugging data sent by the server side includes: Creating a third SSL object based on the second socket; The third SSL object is used to send identification information to the server, and debugging data sent by the server is received.

8. A remote security debugging system for IPTV equipment, characterized in that: It includes a server, at least one IPTV device and at least one debugging terminal; The IPTV device is used to traverse each communication network and create a second socket, use the second socket to determine a target network connected to the server from all the communication networks, and send identification information to the server under the target network; The debugging terminal is used to send target identification information to the server, wherein the target identification information is a unique identification of a target IPTV device, and the target IPTV device is a debugging object of the debugging terminal; The server is used to receive the target identification information sent by the debugging terminal, and when it is determined according to the target identification information that the target IPTV device exists in the preset list, retrieve the first SSL object corresponding to the target IPTV device from the preset list, and create a second SSL object, and transmit debugging data using the first SSL object and the second SSL object corresponding to the target IPTV device; The preset list includes identification information of multiple groups of IPTV devices and corresponding first SSL objects; the debugging data is used to control the debugging tool in the target IPTV device to debug the IPTV device; The IPTV device is specifically used to select one communication network from all the communication networks and bind it to the debugging application; create a second socket, and use the second socket to send a first connection request to the server side in the communication network environment bound to the debugging application; receive feedback information sent by the server side, and the feedback information is generated by the server side according to the first connection request; when the feedback information is a connection failure, replace the communication network bound to the debugging application, and use the second socket to resend the first connection request to the server side until the received feedback information is a successful connection, and use the successfully connected communication network as the target network.

9. An IPTV device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the remote security debugging method for IPTV equipment as claimed in claim 6 or 7 is implemented.

Citation Information

Patent Citations

  • Remote debugging method, server side and set top box

    CN107528892A

  • Device remote debugging method and system based on secure communication mode

    CN108259430A

  • Communication mode determination method and device

    CN116545840A

  • Virtual debugging communication method and device, equipment and storage medium

    CN118740899A