Remote fault diagnosis method based on reverse intranet penetration technology

Based on the remote failure diagnosis method based on the reverse internal network penetration technology, the problem of existing technology relying on customer cooperation and low diagnostic efficiency has been solved, and technical personnel can perform real -time online diagnosis without on -site. , Reduced costs and improved user experience.

CN119341897APending Publication Date: 2025-01-21SHANDONG SENTER ELECTRONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310892187.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-20
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The existing remote fault diagnosis method of mobile terminals relies on customer cooperation, and the feedback accuracy is poor. Before obtaining the equipment, technicians can only analyze the equipment status through customer feedback information or log information. It has poor timeliness, low efficiency, and automatic diagnosis software to the scene. The environmental adaptability is low and can only provide reference data. The cost of returning to the factory and door-to-door is high, and the user experience is poor.

Method used

A remote fault diagnosis method based on reverse intranet penetration technology is used to achieve real-time online diagnosis through the connection of the main control device, controlled mobile terminal and server. The main control device runs a remote assistance tool developed based on the adb client command set. Through server forwarding, it can realize remote operations on the controlled mobile terminal, including fault diagnosis, device status viewing, application uninstallation and installation, firmware upgrade, log collection, etc.

Benefits of technology

The technical personnel can perform real -time online diagnosis without on -site, obtain equipment information, positioning equipment abnormalities and directly repair problems, improve diagnostic efficiency and accuracy, reduce costs, and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119341897A_ABST
    Figure CN119341897A_ABST
Patent Text Reader

Abstract

The invention discloses a remote fault diagnosis method based on a reverse intranet penetration technology, and belongs to the technical field of communication. According to the invention, the remote channel is established by using the reverse intranet penetration technology, and the adb service of the controlled mobile terminal is provided for the main control equipment, so that the main control equipment can debug the adb of the controlled mobile terminal. And real-time debugging, monitoring and diagnosis in equipment operation are realized in an approximate development environment. Technicians can remotely carry out real-time online diagnosis, equipment information acquisition, equipment abnormity positioning and even direct problem repairing without arriving at the site, and in cooperation with a remote assistance tool developed based on an adb client instruction set, positioning and troubleshooting are more efficient, and the threshold requirement for the technicians is lower. According to the invention, the defect of high dependence on customer cooperation in the prior art is overcome, debugging and problem positioning diagnosis in a user on-site environment are realized, problems are fully exposed, and the method is efficient, timely, accurate, low in cost, high in troubleshooting accuracy and good in user experience satisfaction degree.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of communication technology, and in particular to a remote fault diagnosis method based on reverse intranet penetration technology. Background Art

[0002] Traditional mobile terminal-assisted troubleshooting technology is still at the stage of manual telephone and video communication guidance, and fault location is based on experience. Customers assist in taking system logs and log analysis. Develop automatic diagnostic software and other means to allow customers to assist in operation. If the problem cannot be solved, customers will try to restore the factory, send the product back for repair, or arrange for technicians to come to the customer's home for troubleshooting.

[0003] Some remote diagnosis technologies have also emerged in the existing technology, but the existing remote diagnosis technologies still require the terminal users to assist in a large amount of fault information entry operations and transmit them to the server. The main control device then obtains the information of the device under test from the server, makes a diagnosis based on the information obtained, and then sends it to the device under test through the server. This process is still equivalent to the scope of obtaining logs and analyzing logs to solve problems. It only uses remote technology to build a channel for information transmission, and does not achieve real-time remote online diagnosis.

[0004] Existing mobile terminals also have interface-level operation tests and interface-level operation assistance based on various remote technologies, but they can only reach the assisting operation level and cannot accurately locate faults.

[0005] The existing remote fault diagnosis method for mobile terminals has the following defects:

[0006] 1. Existing technologies are too dependent on customer cooperation, and the accuracy of problem feedback is poor. Before receiving the equipment, technicians can only analyze the equipment status through customer feedback or collected log information. This is time-sensitive, inefficient, easily misled by wrong information, and highly dependent on customer cooperation.

[0007] 2. The automatic diagnosis software has defects such as low adaptability to the on-site environment and can only provide some reference data for troubleshooting.

[0008] 3. Returning to the factory and visiting the site are costly, inefficient, and provide a poor user experience, and may sometimes have a destructive impact on user data.

[0009] 4. Remote assistance operation only stays at the interface operation level and can only solve the user's requests for help due to improper operation. Summary of the invention

[0010] The present invention provides a remote fault diagnosis method based on reverse intranet penetration technology. Technical personnel do not need to arrive at the site, but can perform real-time online diagnosis remotely. The method is efficient, timely, accurate, and low-cost, has high troubleshooting accuracy, and provides good user experience satisfaction.

[0011] The present invention provides the following technical solutions:

[0012] A remote fault diagnosis method based on reverse intranet penetration technology, comprising a main control device, a controlled mobile terminal and a server, wherein the main control device and the controlled mobile terminal are respectively connected to the server, and the method comprises:

[0013] S10: the main control device, with the authorization of the controlled mobile terminal, first registers the information of the controlled mobile terminal on the server and applies for a remote port;

[0014] S20: The controlled mobile terminal remotely applies to the server through its preset remote assistance program, obtains matching approval, and establishes a channel to achieve penetration of the intranet adb service created on the controlled mobile terminal to the external network;

[0015] S30: The main control device runs a remote assistance tool developed based on an adb client instruction set, and implements remote operations including fault diagnosis on the controlled mobile terminal through forwarding by the server.

[0016] Further, the S10 includes:

[0017] S101: The controlled mobile terminal authorizes its remote assistance code to the master device, and the master device sends a port application message with the remote assistance code to the server, registers the information of the controlled mobile terminal with the server, and applies for a remote port;

[0018] S102: the server pre-allocates a plurality of remote ports, and places the allocated plurality of remote ports into a remote port pool;

[0019] S103: After receiving the port application message, the server takes out a remote port with the longest idle time from the remote port pool, binds the port number of the taken out remote port with the remote assistance code of the controlled mobile terminal, marks the bound remote port as allocated, and registers the remote assistance code of the controlled mobile terminal in the authorization registration table;

[0020] S104: The server replies an authorization result to the master device, where the authorization result includes the port number of the bound remote port, and the master device displays the port number of the bound remote port to the controlled mobile terminal;

[0021] S105: the controlled mobile terminal sends an http remote connection request message with a remote assistance code to the server. After receiving the http remote connection request message, the server searches the authorization registration table and replies to the controlled mobile terminal with the allocated remote parameters, wherein the remote parameters include the address remoteHost of the server, the main port MainPort of the server and the port number of the bound remote port;

[0022] S106: The controlled mobile terminal receives the remote parameters replied by the server and obtains permission to be controlled remotely.

[0023] Further, the S20 includes:

[0024] S201: the server monitors its main port MainPort in real time, waiting for the remote connection of the controlled mobile terminal;

[0025] S202: The controlled mobile terminal initiates a socket connection request to establish a Conn1 channel with the main port MainPort of the server through its remote assistance program;

[0026] The socket connection request carries remote configuration information, which includes the port number Pn of the bound remote port, the data type tcp to be forwarded in this connection, a token for verifying the identity of the client, the IP address of the internal service, and the port number of the internal service;

[0027] S203: The server registers the remote configuration information into an identifier mapping table, and starts to monitor the remote port bound to the controlled mobile terminal. At the same time, the server replies to the controlled mobile terminal with information that the Conn1 channel is successfully established and the remote port is successfully bound;

[0028] S204: After receiving the information from the server that the Conn1 channel is successfully established and the remote port is successfully bound, the controlled mobile terminal starts the local adbd service, sets the adb service port to 5556, changes the local remote state to channel ready, and sends an http remote invitation message to the server;

[0029] S205: After receiving the http remote invitation message from the controlled mobile terminal, the server updates the remote assistance state of the master device to the invitation remote state;

[0030] S206: The master control device starts the remote assistance tool and sends a connection request instruction to the remote port bound to the controlled mobile terminal. After the server monitors the connection request instruction of the bound remote port, it establishes a TCP socket long connection with the master control device and establishes a Conn2 channel;

[0031] S207: The server sets the remote port to an occupied state, updates the port status registration table, and notifies the main control device to update the interface display;

[0032] S208: The server establishes a communication channel between the controlled mobile terminal and the main control device according to the corresponding relationship in the identifier mapping table, and implements data forwarding between the Conn1 channel and the Conn2 channel.

[0033] Furthermore, the S20 further includes:

[0034] S209: the master control device sends a remote connection instruction to the server through the Conn2 channel, and the server forwards the remote connection instruction to the controlled mobile terminal through the Conn1 channel;

[0035] S210: After receiving the remote connection instruction forwarded by the server through the Conn1 channel, the controlled mobile terminal creates a local client locally, and establishes another TCP socket connection between the local client and adb service port 5556 to establish a Conn3 channel;

[0036] S211: After the controlled mobile terminal monitors that the Conn3 channel is successfully established, it changes the local remote state to remote, and sends a remote creation success message to the server;

[0037] S212: The Conn1 channel forwards the received related data traffic to the local adb service port through the local client through the Conn3 channel. The local adb service port forwards the adb service response data to the Conn1 channel through the local client through the Conn3 channel. The data is forwarded between the Conn1 channel and the Conn3 channel in the controlled mobile terminal, and then reaches the main control device through the forwarding of the Conn1 channel and the Conn2 channel, thereby realizing the exposure of the reverse intranet service to the external network and simulating the adb network debugging under the local network.

[0038] Furthermore, the method further comprises:

[0039] S40: When the remote operation is completed, the controlled mobile terminal triggers remote termination, ends the Conn1 channel and the Conn3 channel, closes the adbd service, changes the local remote progress to remote end, and sends a remote end message to the server;

[0040] After receiving the remote termination message, the server ends the Conn2 channel, updates the identifier mapping table and the port status registration table, changes the port status to idle, records the idle start time, and updates the remote assistance status of the master device to ended.

[0041] Furthermore, the method further comprises:

[0042] S11: After the Conn1 channel is successfully established, the controlled mobile terminal starts to monitor the status of the Conn1 channel and the connection status of the Conn3 channel. If the Conn3 channel is not successfully created within the first set time period after the Conn1 channel is successfully established, it is considered that the invitation has timed out, and the controlled mobile terminal automatically disconnects the Conn1 channel, executes the remote end process, and sends an invitation timeout message to the server, triggering the server to execute the remote resource recovery process;

[0043] S12: After the remote creation is successful, the controlled mobile terminal continuously monitors the status of the Conn1 channel and the Conn3 channel. If it is monitored that the status of the Conn1 channel or the Conn3 channel becomes non-ESTABLISHED, the connection is considered abnormal, and the controlled mobile terminal executes the remote end process and sends a connection disconnection message to the server, triggering the server to execute the remote resource recovery process.

[0044] Furthermore, the method further comprises:

[0045] S21: When the identifier mapping of the server is inserted, the server monitors the remote port. If no master device is connected to the monitored remote port within a second set time period, and no invitation timeout message is received from the controlled mobile terminal, it is considered that the network on the controlled mobile terminal side is abnormal, and the server triggers a remote resource recovery process;

[0046] S22: When the master device is successfully connected to the Conn2 channel of the server, the server updates the corresponding sub-item in the identifier mapping table to remote, and registers the information of the master device;

[0047] If the server monitors that the master device is disconnected from the Conn2 channel of the server due to network reasons, the server updates the identifier mapping table to the initial registration state, re-initiates the remote port monitoring process, and waits for the master device to initiate a new round of remote connection instructions again;

[0048] S23: After the remote creation is successful, if the remote process is interrupted due to network reasons between the controlled mobile terminal and the server, the controlled mobile terminal and the server update their respective local status displays according to the monitored connection status, and recycle and release their respective local resources. The server waits for the controlled mobile terminal to initiate a remote connection again.

[0049] Furthermore, the communication between the main control device and the server is encrypted.

[0050] Furthermore, the remote operation includes remote command issuance, device status viewing, application uninstallation and installation, firmware upgrade, log collection, remote assistance, real-time debugging, remote desktop control and fault diagnosis.

[0051] The present invention has the following beneficial effects:

[0052] The present invention realizes the use of reverse intranet penetration technology to build a remote channel under the condition of obtaining the authorization of the controlled mobile terminal user, and provides the adb service of the controlled mobile terminal to the main control device, thereby realizing the adb debugging of the controlled mobile terminal by the main control device. It realizes real-time debugging, monitoring and diagnosis of equipment in operation in a complete customer environment and a development environment. The user does not need to do much cooperation, and only needs to actively trigger the authorization request for remote assistance after the controlled mobile terminal is connected to the network.

[0053] Based on the remote diagnosis and troubleshooting of the method of the present invention, technicians can perform real-time online diagnosis remotely without arriving at the site, obtain equipment information, locate equipment anomalies, and even directly fix problems. They can also perform some operation assistance, training, and other work. With the remote assistance tool developed based on the adb client instruction set, positioning and troubleshooting are more efficient and require lower thresholds for technicians. The present invention changes the defect of the prior art that is highly dependent on customer cooperation, and realizes debugging and problem location diagnosis in the user's on-site environment. The on-site debugging mode allows problems to be fully exposed, which is efficient, timely, accurate, and low-cost, with high troubleshooting accuracy and good user experience satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 A schematic diagram of a remote assistance system applied by the present invention;

[0055] Figure 2 It is a flow chart of the remote fault diagnosis method based on reverse intranet penetration technology of the present invention;

[0056] Figure 3 It is a schematic diagram of the remote authorization process;

[0057] Figure 4 Schematic diagram of the remote channel binding process;

[0058] Figure 5 Schematic diagram of the process of achieving remote reverse penetration of the intranet. DETAILED DESCRIPTION

[0059] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0060] The present invention provides a remote fault diagnosis method based on reverse intranet penetration technology, which is used in a remote assistance system. The remote assistance system includes a main control device 1, a controlled mobile terminal 2 and a server 3. The main control device 1 and the controlled mobile terminal 2 are respectively connected to the server 3. Figure 1 As shown. The master control device 1 can be a master control PC or other devices, and the server 3 has a remote proxy server and a port management system. This embodiment does not limit the specific type of the controlled mobile terminal 2, for example, it can be a mobile phone, a handheld PAD product, and other different types of terminal devices. In this embodiment, the network connection method between the controlled mobile terminal 2 and the server 3, and between the master control device 1 and the server 3 is not limited, for example, it can be WLan, wired Ethernet, mobile data connection, etc.

[0061] Based on the above remote assistance system, the remote fault diagnosis method based on reverse intranet penetration technology of the present invention is as follows: Figure 2 As shown, including:

[0062] S10: With the authorization of the controlled mobile terminal 2, the main control device 1 first registers the information of the controlled mobile terminal 2 on the remote proxy server of the service end 3 and applies for a remote port.

[0063] S20: The controlled mobile terminal 2 uses its preset remote assistance program. The user triggers the remote assistance program of the controlled mobile terminal, remotely applies to the server 3, obtains matching approval, and establishes a channel to achieve penetration of the intranet adb (Android Debug Bridge) service created on the controlled mobile terminal 2 to the external network.

[0064] In the present invention, the adb service is started on the controlled mobile terminal 2 as an intranet service, waiting to be remotely controlled. The remote proxy server on the server 3 runs on the public network as a penetration server, acting as a bridge between the intranet service and the public network users. After the controlled mobile terminal 2 establishes a connection mapping channel with the remote proxy server of the server 3, the main control device 1 realizes remote assistance and troubleshooting by accessing the port mapped by the controlled mobile terminal 2 on the remote proxy server.

[0065] S30: the main control device 1 runs a remote assistance tool developed based on the adb client instruction set, and implements remote operations including fault diagnosis on the controlled mobile terminal 2 through forwarding by the server 3.

[0066] In the present invention, the remote assistance tool is run on the main control device 1, which provides two modes of operation: command line interface and graphical user interface. The visual technician can choose according to his personal preference, and the graphical user interface provides a series of tools to simplify the remote operation process. The remote operation includes but is not limited to the following operations: remote command issuance, device status viewing, application uninstallation and installation, firmware upgrade, log collection, remote assistance, real-time debugging, remote desktop control and fault diagnosis, etc.

[0067] The present invention realizes that, when the user authorization of the controlled mobile terminal 2 is obtained, a remote channel is built using the reverse intranet penetration technology, and the adb service of the controlled mobile terminal 2 is provided to the main control device 1, thereby realizing adb debugging of the controlled mobile terminal 2 by the main control device 1. Real-time debugging, monitoring and diagnosis of equipment in operation are realized in a complete customer environment, similar to a development environment. The user does not need to do much cooperation, and only needs to actively trigger the authorization request for remote assistance after the controlled mobile terminal 2 is connected to the network.

[0068] Based on the remote diagnosis and troubleshooting of the method of the present invention, technicians can perform real-time online diagnosis remotely without arriving at the site, obtain equipment information, locate equipment anomalies, and even directly fix problems. They can also perform some operation assistance, training, and other work. With the remote assistance tool developed based on the adb client instruction set, positioning and troubleshooting are more efficient and require lower thresholds for technicians. The present invention changes the defect of the prior art that is highly dependent on customer cooperation, and realizes debugging and problem location diagnosis in the user's on-site environment. The on-site debugging mode allows problems to be fully exposed, which is efficient, timely, accurate, and low-cost, with high troubleshooting accuracy and good user experience satisfaction.

[0069] The remote fault diagnosis based on the reverse intranet penetration technology of the present invention has the advantages of specialization, timeliness, precision, and low cost, all of which can bring higher efficiency and better user experience. At the same time, the remote diagnosis and troubleshooting of the present invention is also easier to operate, because remote technicians do not need to operate on-site, and can operate through technical means such as remote connection and remote control, which can save time and labor costs and is more convenient and flexible. In addition, remote diagnosis and troubleshooting can also avoid problems such as human misoperation and misjudgment in traditional troubleshooting methods, improve the accuracy and reliability of troubleshooting results, and bring better services and experience to enterprises and users.

[0070] The aforementioned S10 is used for remote authorization. As an improvement of the embodiment of the present invention, the aforementioned S10 is as follows: Figure 3 As shown, including:

[0071] S101: The controlled mobile terminal 2 authorizes its remote assistance code to the main control device 1 (for example, authorization can be performed by remote application over the phone). The main control device 1 sends a port application message with the remote assistance code to the server 3, registers the information of the controlled mobile terminal 2 with the server 3, and applies for a remote port.

[0072] S102: The server 3 pre-allocates a plurality of remote ports (eg, N), and places the allocated plurality of remote ports into a remote port pool.

[0073] S103: After receiving the port application message, the server 3 takes out a remote port with the longest idle time from the remote port pool, binds the port number Pn of the taken out remote port to the remote assistance code of the controlled mobile terminal 2, and marks the bound remote port as allocated, and at the same time registers the remote assistance code of the controlled mobile terminal 2 in the authorization registration table.

[0074] S104: The server 3 replies to the master device 1 with the authorization result, i.e., replies to the master device 1 that the remote request interface has been opened. The authorization result includes the port number Pn of the bound remote port, and the master device 1 displays the status change to the controlled mobile terminal 2, displays the port number Pn of the bound remote port, and displays the waiting remote invitation status.

[0075] S105: The controlled mobile terminal 2 sends an http remote connection request message with a remote assistance code to the server 3. After receiving the http remote connection request message, the server 3 searches the authorization registration table and replies with the allocated remote parameters (i.e., authorization resource information) to the controlled mobile terminal 2. The remote parameters include the remote server address remoteHost of the server 1, the main port MainPort of the server 1, and the port number Pn of the bound remote port.

[0076] If the remote assistance code registered by the controlled mobile terminal 2 is not found after searching the authorization registration table, an unauthorized message is replied to the controlled mobile terminal 2, and an authorization application is made to the main control device 1 remotely by telephone.

[0077] S106: The controlled mobile terminal 2 receives the remote parameters replied by the server 1 and obtains the permission to be controlled remotely.

[0078] The aforementioned S20 is used to perform remote channel binding and reverse penetration of the intranet to achieve remote. In an example, the remote channel binding in the S20 is as follows: Figure 4 As shown, including:

[0079] S201: The server 3 monitors the main port MainPort of its remote proxy server in real time, waiting for the remote connection of the controlled mobile terminal 2.

[0080] S202: The controlled mobile terminal 2 initiates a socket connection request to the main port MainPort of the remote proxy server of the server 3 through its remote assistance program, which is called the Conn1 channel.

[0081] The socket connection request carries remote configuration information and is sent to the remote proxy service of the server 3. The remote configuration information includes the port number Pn of the bound remote port, the data type TCP (Transmission Control Protocol) to be forwarded in this connection, the token used to verify the identity of the client, the IP address of the internal service, and the port number of the internal service.

[0082] S203: The server 3 registers the remote configuration information into the identifier mapping table, and notifies its remote proxy service to start listening to the remote port bound to the controlled mobile terminal 2 (i.e., the port with port number Pn). At the same time, the server 3 replies to the controlled mobile terminal 2 with information that the Conn1 channel is successfully established and the remote port is successfully bound.

[0083] S204: After receiving the information from the server 3 that the Conn1 channel is successfully established and the remote port is successfully bound, the controlled mobile terminal 2 starts the local network adbd (adb daemon) service, sets the adb network service port number to 5556, changes the local remote state to channel ready, and sends an http remote invitation message to the server 3.

[0084] S205: After receiving the http remote invitation message from the controlled mobile terminal 2, the server 3 updates the remote assistance state of the main control device 1 to the invitation remote state.

[0085] S206: The main control device 1 starts the remote assistance tool and sends a connection request instruction (i.e., adb connect MainPort:Pn instruction) to the remote port bound to the controlled mobile terminal 2. After the server 3 monitors the connection request instruction of the bound remote port, it establishes a TCP socket long connection with the main control device 1, i.e., establishes the Conn2 channel.

[0086] S207: The remote proxy service of the server 3 reports to the port management system that the remote port is in an occupied state. The port management system updates the port status registration table and notifies the main control device 1 to update the interface display.

[0087] S208: The server 3 establishes a communication channel between the controlled mobile terminal 2 and the main control device 1 according to the corresponding relationship in the identifier mapping table, and realizes data forwarding between the Conn1 channel and the Conn2 channel.

[0088] Furthermore, the intranet reverse penetration in S20 realizes remote Figure 5 As shown, including:

[0089] S209: the master device 1 sends a remote connection instruction (adb connectserverIP:Pn) to the server 3 through the Conn2 channel, and the server 3 forwards the remote connection instruction to the controlled mobile terminal 2 through the Conn1 channel.

[0090] S210: After receiving the remote connection instruction forwarded by the server 3 through the Conn1 channel, the controlled mobile terminal 2 creates a local client locally and establishes another TCP socket connection between the local client and the adb service port 5556, that is, establishes the Conn3 channel.

[0091] S211: After the controlled mobile terminal 2 monitors that the Conn3 channel is successfully established, it changes the local remote state to remote, and sends a remote creation success message to the server 3.

[0092] S212: Conn1 channel forwards the received relevant data traffic to the local adb service port of the controlled mobile terminal 2 through the local client through the Conn3 channel. The local adb service port forwards the adb service response data to the Conn1 channel through the local client through the Conn3 channel. The data is forwarded between the Conn1 channel and the Conn3 channel in the controlled mobile terminal 2, and then reaches the main control device 1 through the forwarding of the Conn1 channel and the Conn2 channel, thereby realizing the exposure of the reverse intranet service to the external network and simulating the adb network debugging under the local network.

[0093] In order to ensure security, the aforementioned various communications between the main control device 1 and the server 3 are encrypted to protect the security of the data transmission process. This embodiment does not limit the specific encryption method, for example, TLS / SSL encryption technology can be used for encryption.

[0094] After the above remote establishment is completed, in S30, the main control device 1 can remotely assist the controlled mobile terminal 2. The present invention implements a set of remote assistance tools based on the adb command set to assist technical support personnel in remotely issuing commands, checking device status, uninstalling and installing applications, upgrading firmware, collecting logs, and diagnosing abnormalities on the controlled mobile terminal 2, and provides a graphical interface or command line mode on the main control device 1 side.

[0095] Among them, in the command line mode, the main control device 1 can directly input the control command in the "command prompt" to remotely control the controlled mobile terminal 2. The graphical interface triggers the script file associated with the button by loading resources or selecting conditions and clicking the function button, sends the adb command to the controlled mobile terminal 2, and parses the remote return into a readable execution result or diagnostic conclusion for display.

[0096] The following are specific implementations of several functions of the graphical interface. The following are only examples, but are not limited to the following examples.

[0097] For example, the device status check function. Device status check is a powerful tool for diagnosing user feedback issues. By querying the current operating status of the device, a large amount of information can be obtained to assist in solving user feedback issues. Specifically:

[0098] In the graphical interface, click the "View running applications" button. This button is associated with the adb shell pmlist packages-e command. Click it to execute the script file. The tool interface displays the application package name currently running on the device and supports the search function. Click the "View device network node status" button to view the device network node status information and determine the current network status. Click the "View device battery status" button to execute battery-related scripts to obtain relevant information such as battery health, current temperature, current, voltage, etc. Click the "View device memory and CPU status" button to execute the memory and CPU real-time status query script to obtain the current device memory status and CPU occupancy status.

[0099] For example, the application installation function. When installing a specified application for a device, you can upload the application to the specified location of the remote assistance tool, click to install the application, and the remote assistance tool will parse the application package name and update the package name parameter in the script, and execute adbintall <package>The script instruction completes the installation of the application and returns the result to the remote assistance tool result display interface.

[0100] For example, perform firmware upgrades or external hardware device fault diagnosis. The controlled mobile terminal 2 (such as a handheld network installation and maintenance device, etc.) is equipped with some peripheral hardware, such as an optical power meter, OTDR, vDsl, Onu module, etc. If the version information is checked through the status, or the hardware module firmware version is confirmed to have a problem through a remote diagnostic command, the firmware upgrade can be implemented through the firmware upgrade interface pre-opened by each module through instructions. The upgrade mode varies depending on the module. The module's own upgrade logic can be triggered by sending an upgrade trigger instruction; the firmware upgrade package can be pushed to the local specified path of the controlled mobile terminal 2 through instructions, and then the module can be triggered to power on, and the module upgrade mode can be turned on to implement the firmware upgrade; the module can be powered on only through instructions, and the module can be logged in through the telnet instruction to view parameters, set, diagnose problems, and upgrade firmware, etc.

[0101] For example, log collection. There are two modes for log collection. One is tracking log collection. The remote assistance tool sends tracking log collection instructions. The parameters include the type of log to be collected (main, kernel, modem, radio, etc.) and the collection time. The controlled mobile terminal 2 starts collecting system logs as required, and closes and uploads to the server 3 after the time is up, waiting for the technician to download and analyze. The other is the on-site debugging mode. The remote assistance tool sends the adb logcat instruction set to display the real-time system log on the remote console. Then the remote personnel operate the device, monitor the log output in real time, track and diagnose the problem points in real time, make remote real-time diagnosis a reality, and quickly locate the problems of the application or system in the on-site environment. It provides a fast, simple and time-effective method for problem diagnosis in situations where the problem can only be triggered in the on-site environment, the user cannot accurately describe the cause of the problem, and the problem triggering time point is not accurately located.

[0102] In addition, the remote assistance tool also supports network data packet capture in various demand scenarios, obtaining network packets and pulling them locally for further analysis.

[0103] At the same time, it can also cooperate with qtScrcpy and other software to realize remote desktop control, making remote assistance more intuitive and efficient, reducing the learning cost of technicians and improving the usability of the software. The graphical interactive interface can also support more functions and scalability, provide more user feedback and prompts, and help technicians locate and solve problems faster.

[0104] When the user wants to close the remote control, the user of the controlled mobile terminal 2 can terminate the remote control at any time. The remote control can also be terminated after the remote operation is completed. The specific operations include:

[0105] S40: When the remote operation is completed, the controlled mobile terminal 2 triggers remote termination, ends the Conn1 channel and the Conn3 channel, closes the adbd service, changes the local remote progress to remote end, and sends a remote end message to the server 3.

[0106] After receiving the remote termination message, the server 3 ends the Conn2 channel, updates the identifier mapping table and the port status registration table, changes the port status to idle, records the idle start time, and updates the remote assistance status of the master device 1 to end.

[0107] During the remote process, the remote status can also be monitored. The remote status is divided into four states: remote application approval, remote channel binding, remote in progress, and remote end. The remote application approval status is controlled by the server 3. The server 3 checks whether there are idle ports in the remote port pool based on the local resource usage to decide whether to open the remote interface. There are two situations: approved and not approved. The remote channel binding state is the state in which the controlled mobile terminal 2 registers the connection with the remote proxy service of the server 3 and receives the channel binding reply from the remote proxy service. Remote in progress is the remote state after the Conn1 channel, Conn2 channel, and Conn3 channel are established.

[0108] The monitoring of the remote connection status is completed by both the controlled mobile terminal 2 and the server 3. The controlled mobile terminal 2 monitors the Conn1 channel connection with the server 3 and the Conn3 channel connection with the local service to realize the monitoring of the remote assistance channel status; the server 3 monitors the identifier mapping table maintained locally and the Conn2 channel connection with the main control device 1 to realize the monitoring of the remote channel status. According to the above monitoring results, the remote channel status is updated in real time to realize the release and allocation of remote resources.

[0109] The monitoring process of the controlled mobile terminal 2 includes:

[0110] S11: After the Conn1 channel is successfully established, the controlled mobile terminal 2 starts to monitor the status of the Conn1 channel and the connection status of the Conn3 channel, and the successful establishment of the Conn3 channel is used as a sign of determining remote success.

[0111] If the Conn3 channel is not successfully created within the first set time period (for example, 20 minutes) after the Conn1 channel is successfully established, the invitation is considered to have timed out, and the controlled mobile terminal 2 automatically disconnects the Conn1 channel, executes the remote termination process, and sends an invitation timeout message to the server 1, triggering the server 1 to execute the remote resource recovery process.

[0112] S12: After the remote creation is successful, the controlled mobile terminal 2 continues to monitor the status of the Conn1 channel and the Conn3 channel. If the status of the Conn1 channel or the Conn3 channel is monitored to be non-ESTABLISHED (TCP connection successful), the connection is considered abnormal, and the controlled mobile terminal 2 executes the remote end process and sends a connection disconnection message to the server 3, triggering the server 3 to execute the remote resource recovery process.

[0113] The server 3 remote control system maintains the identifier mapping table in real time and monitors the Conn2 channel connection with the main control device 1. Specifically, it includes:

[0114] S21: When the identifier mapping of the server 3 is inserted, it indicates that a new remote registration has been entered. The server 3 starts listening to the new remote port. If the monitored remote port is not connected to the master device 1 within the second set time period, and the invitation timeout message from the controlled mobile terminal 2 is not received, it is considered that the network on the controlled mobile terminal 2 side is abnormal, and the server 1 triggers the remote resource recovery process.

[0115] The monitoring time for the remote port timeout failure of the server 2 is twice that of the controlled mobile terminal 2, that is, the second set time period is twice the first set time period, for example, 40 minutes. Under normal circumstances, if the controlled mobile terminal 2 does not receive a remote connection for 20 minutes, an invitation timeout event should be detected. If the server 3 has not received an invitation timeout message within 40 minutes, the server believes that the network on the controlled mobile terminal 2 side should be abnormal and failed to deliver the abnormality, so it actively triggers the remote resource recovery process.

[0116] The remote resource recovery process includes: deleting the identifier mapping table sub-item, modifying the port registry, and releasing the port. Correspondingly, the server 3 will synchronize the status to the controlled mobile terminal 2 and the main control device 1. If the controlled mobile terminal 2 can receive the message, it will determine the local status. If it has been processed, it will no longer care about it. If it has not been processed, it will go back to the process. If the controlled mobile terminal 2 does not receive the message, it will be automatically recovered through the invitation timeout process.

[0117] S22: When the master device 1 is successfully connected to the Conn2 channel of the server 3, the server 3 updates the corresponding sub-item in the identifier mapping table to remote, and registers the relevant information of the master device.

[0118] If the master device 1 is disconnected from the Conn2 channel of the server 3 due to network reasons, the server 3 will update the identifier mapping table to the initial registration state after monitoring the time, re-initiate the remote port monitoring process, and wait for the master device 1 to initiate a new round of remote connection instructions again.

[0119] At the same time, the corresponding status of the server 3 will be synchronized with the main control device 1, indicating that you should re-initiate the remote connection. When the main control device 1 re-initiates the connection, the server 3 will re-trigger the query mapping table to implement the forwarding binding process. The controlled mobile terminal 2 has no perception of the whole process. Of course, if the synchronization information cannot reach the main control device 1 due to network reasons, and the main control device 1 fails to issue a new remote connection in time, the server 3 will use the timeout process to finally recycle resources.

[0120] S23: After the remote creation is successful, if the remote interruption is caused by the network reasons between the controlled mobile terminal 2 and the server 3 during the remote process, the controlled mobile terminal 2 may no longer be able to return the remote disconnection message. At this time, the controlled mobile terminal 2 and the server 3 update their respective local status displays according to the monitored connection status, and recycle and release their respective local resources. For abnormal disconnection status, the server 3 can quickly activate the interface, reallocate the interface to the remote, and wait for the controlled mobile terminal 2 to initiate the remote connection again.

[0121] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.< / package>

Claims

1. A remote fault diagnosis method based on reverse intranet penetration technology, characterized in that: The method comprises a main control device, a controlled mobile terminal and a server, wherein the main control device and the controlled mobile terminal are respectively connected to the server, and the method comprises: S10: the main control device, with the authorization of the controlled mobile terminal, first registers the information of the controlled mobile terminal on the server and applies for a remote port; S20: The controlled mobile terminal remotely applies to the server through its preset remote assistance program, obtains matching approval, and establishes a channel to achieve penetration of the intranet adb service created on the controlled mobile terminal to the external network; S30: The main control device runs a remote assistance tool developed based on an adb client instruction set, and implements remote operations including fault diagnosis on the controlled mobile terminal through forwarding by the server.

2. The remote fault diagnosis method based on reverse intranet penetration technology according to claim 1 is characterized in that: The S10 includes: S101: The controlled mobile terminal authorizes its remote assistance code to the master device, and the master device sends a port application message with the remote assistance code to the server, registers the information of the controlled mobile terminal with the server, and applies for a remote port; S102: the server pre-allocates a plurality of remote ports, and places the allocated plurality of remote ports into a remote port pool; S103: After receiving the port application message, the server takes out a remote port with the longest idle time from the remote port pool, binds the port number of the taken out remote port with the remote assistance code of the controlled mobile terminal, marks the bound remote port as allocated, and registers the remote assistance code of the controlled mobile terminal in the authorization registration table; S104: The server replies an authorization result to the master device, where the authorization result includes the port number of the bound remote port, and the master device displays the port number of the bound remote port to the controlled mobile terminal; S105: the controlled mobile terminal sends an http remote connection request message with a remote assistance code to the server. After receiving the http remote connection request message, the server searches the authorization registration table and replies to the controlled mobile terminal with the allocated remote parameters, wherein the remote parameters include the address remoteHost of the server, the main port MainPort of the server and the port number of the bound remote port; S106: The controlled mobile terminal receives the remote parameters replied by the server and obtains permission to be controlled remotely.

3. The remote fault diagnosis method based on reverse intranet penetration technology according to claim 2 is characterized in that: The S20 includes: S201: the server monitors its main port MainPort in real time, waiting for the remote connection of the controlled mobile terminal; S202: The controlled mobile terminal initiates a socket connection request to establish a Conn1 channel with the main port MainPort of the server through its remote assistance program; The socket connection request carries remote configuration information, which includes the port number Pn of the bound remote port, the data type tcp to be forwarded in this connection, a token for verifying the identity of the client, the IP address of the internal service, and the port number of the internal service; S203: The server registers the remote configuration information into an identifier mapping table, and starts to monitor the remote port bound to the controlled mobile terminal. At the same time, the server replies to the controlled mobile terminal with information that the Conn1 channel is successfully established and the remote port is successfully bound; S204: After receiving the information from the server that the Conn1 channel is successfully established and the remote port is successfully bound, the controlled mobile terminal starts the local adbd service, sets the adb service port to 5556, changes the local remote state to channel ready, and sends an http remote invitation message to the server; S205: After receiving the http remote invitation message from the controlled mobile terminal, the server updates the remote assistance state of the master device to the invitation remote state; S206: The master control device starts the remote assistance tool and sends a connection request instruction to the remote port bound to the controlled mobile terminal. After the server monitors the connection request instruction of the bound remote port, it establishes a TCP socket long connection with the master control device and establishes a Conn2 channel; S207: The server sets the remote port to an occupied state, updates the port status registration table, and notifies the main control device to update the interface display; S208: The server establishes a communication channel between the controlled mobile terminal and the main control device according to the corresponding relationship in the identifier mapping table, and implements data forwarding between the Conn1 channel and the Conn2 channel.

4. The remote fault diagnosis method based on reverse intranet penetration technology according to claim 3 is characterized in that: The S20 further includes: S209: the master control device sends a remote connection instruction to the server through the Conn2 channel, and the server forwards the remote connection instruction to the controlled mobile terminal through the Conn1 channel; S210: After receiving the remote connection instruction forwarded by the server through the Conn1 channel, the controlled mobile terminal creates a local client locally, and establishes another TCP socket connection between the local client and adb service port 5556 to establish a Conn3 channel; S211: After the controlled mobile terminal monitors that the Conn3 channel is successfully established, it changes the local remote state to remote, and sends a remote creation success message to the server; S212: The Conn1 channel forwards the received related data traffic to the local adb service port through the local client through the Conn3 channel. The local adb service port forwards the adb service response data to the Conn1 channel through the local client through the Conn3 channel. The data is forwarded between the Conn1 channel and the Conn3 channel in the controlled mobile terminal, and then reaches the main control device through the forwarding of the Conn1 channel and the Conn2 channel, thereby realizing the exposure of the reverse intranet service to the external network and simulating the adb network debugging under the local network.

5. The remote fault diagnosis method based on reverse intranet penetration technology according to claim 4 is characterized in that: The method further comprises: S40: When the remote operation is completed, the controlled mobile terminal triggers remote termination, ends the Conn1 channel and the Conn3 channel, closes the adbd service, changes the local remote progress to remote end, and sends a remote end message to the server; After receiving the remote termination message, the server ends the Conn2 channel, updates the identifier mapping table and the port status registration table, changes the port status to idle, records the idle start time, and updates the remote assistance status of the master device to ended.

6. The remote fault diagnosis method based on reverse intranet penetration technology according to claim 5 is characterized in that: The method further comprises: S11: After the Conn1 channel is successfully established, the controlled mobile terminal starts to monitor the status of the Conn1 channel and the connection status of the Conn3 channel. If the Conn3 channel is not successfully created within the first set time period after the Conn1 channel is successfully established, it is considered that the invitation has timed out, and the controlled mobile terminal automatically disconnects the Conn1 channel, executes the remote end process, and sends an invitation timeout message to the server, triggering the server to execute the remote resource recovery process; S12: After the remote creation is successful, the controlled mobile terminal continuously monitors the status of the Conn1 channel and the Conn3 channel. If it is monitored that the status of the Conn1 channel or the Conn3 channel becomes non-ESTABLISHED, the connection is considered abnormal, and the controlled mobile terminal executes the remote end process and sends a connection disconnection message to the server, triggering the server to execute the remote resource recovery process.

7. The remote fault diagnosis method based on reverse intranet penetration technology according to claim 6 is characterized in that: The method further comprises: S21: When the identifier mapping of the server is inserted, the server monitors the remote port. If no master device is connected to the monitored remote port within a second set time period, and no invitation timeout message is received from the controlled mobile terminal, it is considered that the network on the controlled mobile terminal side is abnormal, and the server triggers a remote resource recovery process; S22: When the master device is successfully connected to the Conn2 channel of the server, the server updates the corresponding sub-item in the identifier mapping table to remote, and registers the information of the master device; If the server monitors that the master device is disconnected from the Conn2 channel of the server due to network reasons, the server updates the identifier mapping table to the initial registration state, re-initiates the remote port monitoring process, and waits for the master device to initiate a new round of remote connection instructions again; S23: After the remote creation is successful, if the remote process is interrupted due to network reasons between the controlled mobile terminal and the server, the controlled mobile terminal and the server update their respective local status displays according to the monitored connection status, and recycle and release their respective local resources. The server waits for the controlled mobile terminal to initiate a remote connection again.

8. The remote fault diagnosis method based on reverse intranet penetration technology according to claim 4 is characterized in that: The communication between the main control device and the server is encrypted.

9. The remote fault diagnosis method based on reverse intranet penetration technology according to any one of claims 1 to 8, characterized in that: The remote operations include remote command issuance, device status viewing, application uninstallation and installation, firmware upgrades, log collection, remote assistance, real-time debugging, remote desktop control and fault diagnosis.