Method and system for remotely debugging IPTV equipment in different networks and IPTV equipment
By traversing multiple communication networks and the server connections on the IPTV device, receiving and forwarding debugging data, the communication connection problem of remote debugging of IPTV devices is solved, and the remote debugging of IPTV devices is realized, and the obstacles of network inconsistency and router isolation are overcome.
Patent Information
- Application Number
- CN202411845597.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-01-14
AI Technical Summary
Because the IPTV device is on a private network, the remote debugging terminal cannot establish a communication connection with it and cannot perform remote debugging.
By traversing multiple communication networks on IPTV devices, creating sockets to the server connection, receiving debugging data and forwarding to debugging tools, remote debugging of IPTV devices is realized.
It solves the problem that IPTV devices cannot communicate and connect with remote debugging terminals, and realizes remote debugging of IPTV devices, avoiding obstacles caused by network inconsistency and router isolation.
Smart Images

Figure CN119316658A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of IPTV television network equipment, and in particular to a remote debugging method and system for IPTV equipment on a different network, and an 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. Summary of the invention
[0004] The main purpose of the present application is to provide a remote debugging method, system and IPTV device for a different network IPTV device, so as to solve the problem that a remote debugging terminal cannot establish a communication connection with the IPTV device.
[0005] To achieve the above object, the present application provides a remote debugging method for an IPTV device in a different network, which is applied to an IPTV device having multiple communication networks. The method comprises: Traversing each of the communication networks and creating a first socket, and using the first socket to determine a target network connected to the server from all of the communication networks; In the target network environment, the debugging data sent by the server is received by the first socket, and the debugging data is sent to the debugging tool of the IPTV device; the debugging data is generated by the terminal device and forwarded by the server, and is used to control the debugging tool to debug the IPTV device.
[0006] Optionally, traversing each of the communication networks and creating a first socket, and using the first socket to determine a target network connected to the server from all the communication networks, includes: selecting any one of the communication networks from all the communication networks to bind to a debugging application; creating a first socket, and using the first socket to send a first connection request to the server in an environment of the communication network bound to the debugging application; receiving feedback information sent by the server, wherein the feedback information is generated by the server 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 first socket to resend the first connection request to the server, until the feedback information received is a successful connection, and using the successfully connected communication network as the target network.
[0007] Optionally, in the target network environment, after using the first socket to receive the debugging data sent by the server, the method also includes: opening the service port of the debugging tool in the IPTV device; creating a second socket, the second socket being used for the IPTV device to communicate with the debugging tool.
[0008] Optionally, using the first socket to receive the debugging data sent by the server and sending the debugging data to the debugging tool of the IPTV device includes: using the first socket to receive the debugging data sent by the server; using the second socket to send the debugging data to the debugging tool of the IPTV device.
[0009] Optionally, before using the first socket to receive the debugging data sent by the server, the method further includes: using the first socket to send identification data to the server; the identification data is a unique identification of the IPTV device.
[0010] In addition, to achieve the above-mentioned purpose, the present application also provides another remote debugging method for an IPTV device in a different network, which is applied to a server, and the method includes: creating a third socket and a fourth socket; wherein the third socket is used to communicate with the first socket of the IPTV device, and the fourth socket is used to communicate with the terminal device; using the fourth socket to receive debugging data sent by the terminal device; in a target network environment, using the third socket to send the debugging data to the first socket of the IPTV device; the debugging data is used to control the debugging tool in the IPTV device to debug the IPTV device; the target network is a communication network in the IPTV device that can establish a communication connection with the server.
[0011] Optionally, the server includes a preset port, and before creating the third socket and the fourth socket, the method also includes: creating a fifth socket and configuring the fifth socket to listen to the preset port; the creation of the third socket and the fourth socket includes: if the preset port receives a first connection request sent by the first socket of the IPTV device, then creating the third socket; if the preset port receives a second connection request sent by the terminal device, then creating the fourth socket.
[0012] Optionally, before using the fourth socket to receive the debugging data sent by the terminal device, the method also includes: using the third socket to receive identification data sent by the first socket of the IPTV device; when it is determined that the identification data is a preset identification, controlling the third socket to monitor and receive data sent by the first socket of the IPTV device; when it is determined that the identification data is not the preset identification, disconnecting the communication connection with the IPTV device.
[0013] The present application also provides a remote debugging system for an IPTV device in a different network, comprising an IPTV device, a server and a terminal device; the IPTV device is used to traverse various communication networks and create a first socket, and use the first socket to determine a target network connected to the server from all the communication networks; under the target network environment, the IPTV device establishes a communication connection with the server; the terminal device is used to send debugging data to the server; the server is used to create a third socket and a fourth socket, and use the fourth socket to receive the debugging data sent by the terminal device, and use the third socket to send the debugging data to the first socket of the IPTV device; the debugging data is used to control the debugging tool in the IPTV device to debug the IPTV device.
[0014] The present application also provides an IPTV device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the remote debugging method for the IPTV device on a different network as described above is implemented.
[0015] The remote debugging method for a different network IPTV device of the present application sets a plurality of communication networks other than the IPTV network on the IPTV device. When the IPTV device needs to be debugged, the IPTV device first traverses each communication network and uses a first socket to try to connect to a server under different communication networks to determine a target network. Furthermore, under the target network environment, the IPTV device uses the first socket to receive debugging data sent by the server, and sends the debugging data to a debugging tool in the IPTV device, so that the debugging tool debugs the IPTV device according to the debugging data. Thus, the problem that a remote modulation terminal cannot establish a communication connection with the IPTV device is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a scenario example of the remote debugging method of IPTV equipment on a different network provided by this application; Figure 2 This is one of the flow charts of a remote debugging method for a different network IPTV device according to an embodiment of the present application; Figure 3 This is the second flowchart of the remote debugging method of the IPTV device in a different network according to an embodiment of the present application; Figure 4 This is the third flowchart of the remote debugging method of the IPTV device on a different network according to an embodiment of the present application; Figure 5 is a flowchart of a remote debugging method for an IPTV device on a different network according to another embodiment of the present application; Figure 6 This is a flowchart of a remote debugging method for an IPTV device on a different network according to a specific embodiment of the present application; Figure 7 It is a schematic diagram of a remote debugging system for IPTV devices on a different network according to an embodiment of the present application; Figure 8 An example of a physical structure diagram of an IPTV device is shown; In the figure: 700, remote debugging system for IPTV devices in different networks; 710, IPTV device; 720, server; 730, terminal device; 810, processor; 820, communication interface; 830, memory; 840, communication bus.
[0017] 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
[0018] 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.
[0019] IPTV (Interactive Personal Television or Interactive Protocol Television) is a technology that uses broadband networks, combined with 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 an IPTV network; however, IPTV networks are private networks, and different provinces and cities have their own IPTV network environments.
[0020] 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.
[0021] During the development, testing, and use of IPTV devices, the IPTV device and the debugging terminal may be in different locations. In this case, the debugging terminal is required to remotely debug the IPTV device. However, the IPTV network is a separate network and is not connected to the Internet. Therefore, after the IPTV device is connected to the IPTV network, the remote staff cannot access the IPTV device through the ADB tool in the debugging terminal, which makes it impossible to debug the IPTV device.
[0022] In addition, even if the IPTV device is connected to the Internet, because the IPTV device is under a router, due to the security policy of the router, direct access to internal devices from external networks is usually blocked, and 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.
[0023] To this end, the embodiments of the present application provide a remote debugging method, system and IPTV device for an IPTV device in a different network to solve the problem that the IPTV device and the debugging terminal cannot communicate due to network inconsistency and router isolation, and only use one port on the server side to implement the data interaction process between the IPTV device and the debugging terminal, thereby solving the problem of limited server ports.
[0024] For ease of understanding, this specification provides a scenario example of a remote debugging method for a different network 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 terminal device, 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 terminal device 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 terminal device are in a remote state.
[0025] In this scenario example, the IPTV device can be specifically a set-top box, and the IPTV device uses the IPTV network to implement the main application such as running network playback. The terminal device can refer to the debugging device used by the staff, that is, the debugging client, and the terminal device can include (but is not limited to): mobile terminals such as mobile phones, laptops, PADs (tablet computers), etc., and fixed terminals such as desktop computers, etc., and the terminal device is not specifically limited here.
[0026] 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.
[0027] In this scenario, the server refers to the middleware or server used to manage and forward debugging commands. It serves as a bridge between the terminal device (debugging client) and the IPTV device (debugging end) and is responsible for receiving, managing and forwarding debugging commands. For IPTV devices, the server is an external network server. If IPTV devices want to establish a communication connection with the server, it usually needs to be achieved through the Internet.
[0028] When the IPTV device needs to be debugged remotely, the IPTV device first establishes a communication connection with the server through a communication network other than the IPTV network. After the IPTV device establishes a communication connection with the server, the terminal device then establishes a communication connection with the server. Furthermore, the terminal device sends debugging data (i.e., debugging commands) to the server through the ADB tool, and the server then forwards the debugging data to the IPTV device, which also has the ADB tool installed. After the IPTV device receives the debugging data, it uses the second socket it creates to send the debugging data to the ADB tool, so that the ADB tool debugs the IPTV device according to the debugging data.
[0029] Thus, a communication connection between the IPTV device and the server is established through other communication networks, thereby solving the problem that the IPTV device and the debugging terminal cannot communicate and connect due to network inconsistency and router isolation.
[0030] Referring to the scenario example of the remote debugging method for IPTV devices in different networks in the above-mentioned embodiment, the remote debugging method for IPTV devices in different networks in the embodiment of the present application is described in detail below.
[0031] Figure 2 This is one of the flow charts of a remote debugging method for a different network IPTV device according to an embodiment of the present application. The remote debugging method for a different network IPTV device can be applied to the IPTV device in the above embodiment, and can be specifically applied to a set-top box device. Figure 2 As shown, the remote debugging method for the IPTV device in the different network may include the following steps: Step 210: traverse each communication network and create a first socket, and use the first socket to determine a target network connected to the server from all communication networks.
[0032] Step 220: In the target network environment, the debugging data sent by the server is received by using the first socket, and the debugging data is sent to the debugging tool of the IPTV device.
[0033] It should be noted that the debugging data is generated by the terminal device and forwarded by the server, and is used to control the debugging tool to debug the IPTV device. In addition, 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 can be an ADB tool.
[0034] 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.
[0035] In step 210, the IPTV device traverses various communication networks to find a communication network that can be connected to the server, and interacts with the server under the communication network to solve the problem that the IPTV device cannot communicate with the server when the IPTV network is used as the default network. Specifically, the IPTV device can create a socket, which is the first socket, and the first socket can be recorded as socketS1. In the current communication network environment, the first socket can be used to try to connect to the server. 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 first socket is used again to try to connect to the server until a communication network that can be connected to the server is found. If there is still no communication network that can be successfully connected to the server after the traversal, the IPTV device can be put into a waiting state first.
[0036] 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 changes 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 and make the next attempt to connect to the server.
[0037] In step 220, after the target network is determined, the IPTV device can communicate with the server through the first socket in the target network environment. At this time, the first socket socketS1 can be used to receive the debugging data sent by the server.
[0038] Specifically, the terminal device generates 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 first socket of the IPTV device receives the debugging data, the IPTV device sends the debugging data to the debugging tool. If the IPTV device needs to send data (such as debugging results) to the terminal device, the IPTV device also sends the data to the server through the first socket, and the server forwards it to the terminal device.
[0039] Figure 3 This is the second flowchart of the remote debugging method of a different network IPTV device according to an embodiment of the present application.
[0040] like Figure 3 As shown, in some implementations, step 210 traverses each communication network and creates a first socket, and uses the first socket to determine a target network connected to the server from all communication networks, which may include the following steps: Step 310: Select one communication network from all communication networks and bind it to the debugging application.
[0041] Step 320: Create a first socket, and use the first socket to send a first connection request to the server in a communication network environment bound to the debugging application.
[0042] Step 330: receiving feedback information sent by the server, where the feedback information is generated by the server according to the first connection request.
[0043] Step 340: When the feedback information is that the connection failed, replace the communication network bound to the debugging application, and use the first 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.
[0044] 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.
[0045] After binding the debugging application to the communication network, the IPTV device can create a first socket socketS1, and use the first socket to send a first connection request to the server under the communication network environment bound to the debugging application. If the server can receive the first connection request, it means that it can communicate with the server through the communication network. At this time, the server 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 cannot receive the first connection request or receives an error, it means that it cannot connect to the server through the current communication network. When the server 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.
[0046] 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 first socket to resend the first connection request to the server, and the first 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 is found (that is, the corresponding feedback information is a successful connection), and the communication network is used as the target network.
[0047] Therefore, in the subsequent debugging process, the IPTV device can exchange data with the server in the target network environment, solving the problem that the IPTV device cannot connect to the server due to network inconsistency.
[0048] In some implementations, before using the first socket to receive debugging data sent by the server, the remote debugging method for IPTV devices on a different network may further include: using the first socket to send identification data to the server; the identification data is a unique identification of the IPTV device.
[0049] When the IPTV device and the server have established a communication connection, the IPTV device can send identification data to the server on the first socket that has been connected, and the server can identify whether the device connected to it is the target device through the identification data. Specifically, the server and the IPTV device can pre-agree on a preset identifier, and the server can cache the preset identifier. For example, it can be agreed that the IPTV device's code is used as the preset identifier or the first string sent when the IPTV device is connected.
[0050] Furthermore, after receiving the identification data sent by the IPTV device, the server can compare the identification data with the stored preset identification; if the two are consistent, the server accesses the IPTV device; if the two are inconsistent, the server closes the connection and waits for a new IPTV device to access.
[0051] In some implementations, in the target network environment, after using the first socket to receive the debugging data sent by the server, the remote debugging method for the IPTV device in the different network may also include: opening the service port of the debugging tool in the IPTV device; creating a second socket, and the second socket is used for the IPTV device to communicate with the debugging tool.
[0052] In this embodiment, the IPTV device may include a debugging tool (ADB tool). After the IPTV device establishes a communication connection with the server, the IPTV device can control the debugging tool set thereon to start. Specifically, the ADB service port on the IPTV device can be started. When the ADB service port is started, the IPTV device can send debugging data to the ADB server through the service port.
[0053] Furthermore, the IPTV device may create a second socket, which may be recorded as socketS2, and data may be exchanged between the first socket and the second socket.
[0054] Figure 4 This is the third flowchart of the remote debugging method of a different network IPTV device according to an embodiment of the present application.
[0055] like Figure 4 As shown, in some implementations, step 220 uses the first socket to receive the debugging data sent by the server, and sends the debugging data to the debugging tool of the IPTV device, which may include the following steps: Step 410: Receive debugging data sent by the server using the first socket.
[0056] Step 420: Send the debugging data to the debugging tool of the IPTV device by using the second socket.
[0057] Specifically, after the server forwards the debugging data sent by the terminal device on the third socket, the IPTV device first receives the debugging data through the first socket, and then sends the debugging data to the ADB server using the second socket and the ADB service port.
[0058] It is understandable that for IPTV devices, the ADB server is in the intranet, and the aforementioned server is in the extranet. At this time, the IPTV device is equivalent to a debugging bridge, which connects the ADB server with the aforementioned server to realize data interaction between the server and the ADB server. It should be noted here that the ADB server usually refers to the ADB daemon running on the IPTV device, rather than the ADBServer running on the debugging host. The ADB daemon is responsible for receiving requests from terminal devices (such as ADB commands on the debugging computer) on the IPTV device and executing corresponding commands.
[0059] The above is an introduction to the remote debugging method of the IPTV device on a different network in the embodiment of the present application from the IPTV device side. The following is an introduction to the remote debugging method of the IPTV device on a different network from the server side.
[0060] Figure 51 is a flow chart of a remote debugging method for an IPTV device on a different network according to another embodiment of the present invention. The remote debugging method for an IPTV device on a different network can be applied to a server, which includes a preset port, such as Figure 5 As shown, the remote debugging method for the IPTV device in the different network may include the following steps: Step 510: Create a third socket and a fourth socket; wherein the third socket is used to communicate with the first socket of the IPTV device, and the fourth socket is used to communicate with the terminal device.
[0061] Step 520 uses the fourth socket to receive the debugging data sent by the terminal device.
[0062] Step 530: In the target network environment, the debugging data is sent to the first socket of the IPTV device using the third socket; the debugging data is used to control the debugging tool in the IPTV device to debug the IPTV device; the target network is a communication network in the IPTV device that can establish a communication connection with the server.
[0063] It should be noted that the preset port can be any port of the server, and is not specifically limited here. It is worth mentioning that, usually during the debugging process, two server ports are generally required, one connected to the IPTV device and the other connected to the terminal device, which results in too many server ports being occupied; however, after optimization in the embodiment of the present application, the server only needs to use one port to achieve the purpose of forwarding debugging information.
[0064] In some embodiments, before creating the third socket and the fourth socket, the method may further include: creating a fifth socket and configuring the fifth socket to listen to the preset port. Step 510 may include: if the preset port receives a first connection request sent by the first socket of the IPTV device, then creating a third socket; if the preset port receives a second connection request sent by the terminal device, then creating a fourth socket.
[0065] Specifically, a fifth socket can be created on the server side first, and the fifth socket can be recorded as socketS5. The fifth socket can be configured to listen to the preset port. The server side monitors the preset interface in real time through the fifth socket. When the preset interface receives the first connection request sent by the IPTV device through the first socket, the server side accept returns a socket, that is, creates a third socket, and the third socket can be recorded as socketS3. The third socket can interact with the first socket, and the server side can receive the data sent by the IPTV device through the first socket through the third socket. It should be noted here that the first connection request is usually a TCP (Transfer Control Protocol) protocol connection request.
[0066] After the server and the IPTV device complete the communication connection process, the terminal device can establish a communication connection with the server again, because the terminal device can directly establish a communication connection with the server through the Internet, and the connection process between the terminal device and the server is relatively simple. Therefore, the server can first connect to the IPTV device and then connect to the terminal device. Specifically, the server continues to listen on the fifth socket. When the terminal device sends a second connection request to the server through the ADB tool, the server accept returns a socket, that is, creates a fourth socket. The fourth socket can be recorded as socketS4. The fourth socket can interact with the terminal device. The server can receive data sent by the terminal device through the fourth socket.
[0067] In this embodiment, after the server has established communication connections with the IPTV device and the terminal device, the server continues to monitor the third socket and the fourth socket. When the server receives the debugging data sent by the terminal device through the fourth socket, the server uses the third socket to send the debugging data to the first socket of the IPTV device. When the server receives the data (such as debugging results and other data) sent by the first socket of the IPTV device through the third socket, the server uses the fourth socket to send the data to the terminal device.
[0068] In some embodiments, before using the fourth socket to receive debugging data sent by the terminal device, the method may also include: using the third socket to receive identification data sent by the first socket of the IPTV device; when it is determined that the identification data is a preset identification, controlling the third socket to monitor and receive data sent by the first socket of the IPTV device; when it is determined that the identification data is not a preset identification, disconnecting the communication connection with the IPTV device.
[0069] Specifically, after the server creates the third socket, the server receives the identification data sent by the IPTV device from the third socket. After receiving the identification data sent by the IPTV device, the server can compare the identification data with the stored preset identification to identify whether the device connected to it is the target device. It should be noted that the process of the server identifying the identification data can refer to the process described in the above embodiment, which will not be repeated here.
[0070] For ease of understanding, the remote debugging method for an IPTV device on a different network of the present application is further introduced below through a specific embodiment.
[0071] Figure 6 This is a flowchart of a remote debugging method for a different network IPTV device according to a specific embodiment of the present application. Figure 6 As shown, the remote debugging method for the IPTV device in the different network may include the following steps: Step 601: The IPTV device traverses various communication networks, creates a first socket, and uses the first socket to send a first connection request to a server.
[0072] Step 602: The server receives the first connection request and creates a third socket.
[0073] Step 603: The IPTV device sends identification data to the server using the first socket.
[0074] Step 604: the server compares the identification data with a preset identification, and when determining that the identification data is the preset identification, controls the third socket to monitor and receive data sent by the first socket of the IPTV device.
[0075] Step 605: The terminal device sends a second connection request to the server, and the server establishes a communication connection with the terminal device.
[0076] Step 606: The terminal device sends debugging data to the server.
[0077] Step 607: The server receives the debugging data through the fourth socket, and then forwards the debugging data to the IPTV device through the third socket.
[0078] Step 608: The IPTV device receives the debugging data through the first socket, and sends the debugging data to the ADB server in the IPTV device through the second socket, and the ADB tool debugs the IPTV device according to the debugging data.
[0079] Therefore, the remote debugging method of the IPTV device in the embodiment of the present application realizes multiple networks by connecting the wireless network, wired network, USB network card, etc. on the IPTV device. The wireless network, wired network or USB network card realizes the connection to the Internet to assist in debugging communication; the IPTV network is used for the operation of the IPTV application, ensuring the normal use of the main application of the IPTV device. Secondly, it is realized that in the case of multiple networks, the communication network that can connect to the server is found, and the communication connection with the server is realized through the communication network. Finally, the server can realize the function of information forwarding through one port, saving the number of ports.
[0080] Based on the above embodiments, the present invention also provides a remote debugging system for IPTV devices in a different network. Figure 7 Schematic diagram of the remote debugging system of IPTV equipment in different networks according to the embodiment of the present application. Figure 7 As shown, the remote debugging system 700 for IPTV devices in different networks includes an IPTV device 710 , a server 720 and a terminal device 730 .
[0081] Among them, the IPTV device 710 is used to traverse various communication networks and create a first socket, and use the first socket to determine the target network connected to the server 720 from all communication networks; in the target network environment, the IPTV device 710 establishes a communication connection with the server 720; the terminal device 730 is used to send debugging data to the server 720; the server 720 is used to create a third socket and a fourth socket, and use the fourth socket to receive the debugging data sent by the terminal device 730, and use the third socket to send the debugging data to the first socket of the IPTV device 710; the debugging data is used to control the debugging tool in the IPTV device 710 to debug the IPTV device 710.
[0082] Therefore, by setting up multiple communication networks other than the IPTV network on the IPTV device 710, when the IPTV device 710 needs to be debugged, the IPTV device 710 first traverses each communication network, and uses the first socket to try to connect to the server 720 under different communication networks to determine the target network; further, in the target network environment, the IPTV device 710 uses the first socket to receive the debugging data sent by the server 720, and sends the debugging data to the debugging tool in the IPTV device 710, so that the debugging tool debugs the IPTV device 710 according to the debugging data, thereby solving the problem that the remote modulation terminal cannot establish a communication connection with the IPTV device.
[0083] It should be noted that for details not disclosed in the remote debugging system for IPTV devices on different networks of this embodiment, please refer to the details disclosed in the embodiment of the remote debugging method for IPTV devices on different networks of this specification, which will not be repeated here.
[0084] Figure 8 An example of a physical structure diagram of an IPTV device is shown below. Figure 8 As shown, the IPTV device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the first remote debugging method of the IPTV device in a different network, the method comprising: traversing each communication network and creating a first socket, using the first socket to determine the target network connected to the server from all communication networks; in the target network environment, using the first socket to receive the debugging data sent by the server, and sending the debugging data to the debugging tool of the IPTV device; the debugging data is generated by the terminal device and forwarded by the server, and is used to control the debugging tool to debug the IPTV device.
[0085] In addition, the logic instructions in the above-mentioned memory 830 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 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, and the computer software product is stored in a storage medium, including a number of 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 and other media that can store program codes.
[0086] 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 first remote debugging method for a different network IPTV device, which method includes: traversing each communication network and creating a first socket, and using the first socket to determine a target network connected to a server from all communication networks; in the target network environment, using the first socket to receive debugging data sent by the server, and sending the debugging data to a debugging tool for the IPTV device; the debugging data is generated by the terminal device and forwarded by the server, and is used to control the debugging tool to debug the IPTV device.
[0087] 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 first remote debugging method for an IPTV device in a different network, the method comprising: traversing each communication network and creating a first socket, and using the first socket to determine a target network connected to a server from all communication networks; in the target network environment, using the first socket to receive debugging data sent by the server, and sending the debugging data to a debugging tool for the IPTV device; the debugging data is generated by a terminal device and forwarded by the server, and is used to control the debugging tool to debug the IPTV device.
[0088] 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.
[0089] 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.
[0090] 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 debugging method for IPTV equipment in a different network, applied to IPTV equipment, characterized in that: The IPTV device has multiple communication networks, and the method includes: Traversing each of the communication networks and creating a first socket, and using the first socket to determine a target network connected to the server from all of the communication networks; In the target network environment, the debugging data sent by the server is received by the first socket, and the debugging data is sent to the debugging tool of the IPTV device; the debugging data is generated by the terminal device and forwarded by the server, and is used to control the debugging tool to debug the IPTV device.
2. The remote debugging method of IPTV equipment in different network according to claim 1, characterized in that: The traversing of the communication networks, creating a first socket, and using the first 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 first socket, and sending a first connection request to a server using the first 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 first socket until the feedback information received indicates that the connection is successful, and the successfully connected communication network is used as the target network.
3. The remote debugging method of IPTV equipment in different network according to claim 1, characterized in that: In the target network environment, after receiving the debugging data sent by the server by using the first socket, the method further includes: Opening the service port of the debugging tool in the IPTV device; A second socket is created, where the second socket is used for the IPTV device to communicate with the debugging tool.
4. The remote debugging method of IPTV equipment in a different network according to claim 3, characterized in that: The step of using the first socket to receive the debugging data sent by the server and sending the debugging data to the debugging tool of the IPTV device includes: Using the first socket to receive debugging data sent by the server; The debugging data is sent to a debugging tool of the IPTV device using the second socket.
5. The remote debugging method for IPTV equipment in a different network according to any one of claims 1 to 4, characterized in that: Before using the first socket to receive the debugging data sent by the server, the method further includes: The first socket is used to send identification data to the server; the identification data is a unique identification of the IPTV device.
6. A remote debugging method for IPTV equipment in a different network, applied to a server, characterized in that: The method comprises: Creating a third socket and a fourth socket; wherein the third socket is used to communicate with the first socket of the IPTV device, and the fourth socket is used to communicate with the terminal device; Receiving debugging data sent by the terminal device using the fourth socket; In the target network environment, the debugging data is sent to the first socket of the IPTV device using the third socket; the debugging data is used to control the debugging tool in the IPTV device to debug the IPTV device; the target network is a communication network in the IPTV device that can establish a communication connection with the server.
7. A remote debugging method for IPTV equipment in a different network according to claim 6, characterized in that: The server includes a preset port. Before creating the third socket and the fourth socket, the method further includes: Creating a fifth socket, and configuring the fifth socket to listen to the preset port; The creating of the third socket and the fourth socket comprises: If the preset port receives the first connection request sent by the first socket of the IPTV device, then creating the third socket; If the preset port receives the second connection request sent by the terminal device, the fourth socket is created.
8. A remote debugging method for IPTV equipment in a different network according to claim 6, characterized in that: Before using the fourth socket to receive the debugging data sent by the terminal device, the method further includes: Receiving identification data sent by the first socket of the IPTV device using the third socket; When it is determined that the identification data is a preset identification, controlling the third socket to monitor and receive data sent by the first socket of the IPTV device; If it is determined that the identification data is not the preset identification, the communication connection with the IPTV device is disconnected.
9. A remote debugging system for IPTV equipment in a different network, characterized in that: Including IPTV equipment, server and terminal equipment; The IPTV device is used to traverse each communication network and create a first socket, and use the first socket to determine a target network connected to the server from all the communication networks; In the target network environment, the IPTV device establishes a communication connection with the server; The terminal device is used to send debugging data to the server; The server is used to create a third socket and a fourth socket, and use the fourth socket to receive the debugging data sent by the terminal device, and use the third socket to send the debugging data to the first socket of the IPTV device; The debugging data is used to control the debugging tool in the IPTV device to debug the IPTV device.
10. 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 computer program, the remote debugging method for an IPTV device on a different network as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Method for realizing remote debugging of IPTV set top box
CN103916663A
Remote debugging method and system for application programs and terminal
CN106201745A
Remote debugging method and system for embedded device
CN109246120A
Mixed-mode mobile application debugging method and system
CN113626330A