Method and system for realizing remote debugging
By setting up a short-range wireless communication module on the mobile communication terminal, short-range wireless communication with sensor devices is realized, and logs are obtained and transmitted in real time, which solves the problems of cumbersome debugging process, high learning cost and poor real-time performance of sensor devices, and improves the real-time and efficiency of debugging.
Patent Information
- Application Number
- CN202411974740.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, the debugging process of sensor equipment is cumbersome, the learning cost is high, and the real-time performance is poor, making it difficult to quickly locate and solve problems when problems arise.
By setting up short-range wireless communication modules, such as NFC, Bluetooth or WiFi, short-range wireless communication with sensor devices can be realized, remote connection information is obtained, and logs are transmitted to the remote debugging server in real time through the network for debugging.
It simplifies the debugging process, reduces operational complexity and learning costs, improves the real-time and efficiency of debugging, and can quickly locate and solve problems when they arise.
Smart Images

Figure CN119815318A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of equipment debugging, and in particular to a method and system for realizing remote debugging. Background Art
[0002] For sensor devices deployed in production environments, such as embedded low-power sensor devices, when a device fails and needs to be debugged and the device log is obtained for problem troubleshooting and location, currently on-site staff mainly use serial ports to access the device, read the device log through the serial port, and then transmit it to remote technicians for data analysis to determine the problem. Figure 1 FIG. 1 shows a flow chart of the existing debugging method. Figure 1 As shown, the existing debugging methods have the following problems:
[0003] 1. Complicated operation and heavy workload: To debug a device and obtain device logs, you need to disassemble the device, remove the casing, plug in cables, configure the serial port, start debugging, and send the logs to remote technicians. The steps required are too complicated and require repeated communication and collaboration. If there are a large number of devices that need to be debugged, the workload will increase exponentially.
[0004] 2. High learning cost: Serial port access requires users to learn some serial port communication related knowledge and disassemble the device. For some non-professional users, there is a high learning cost;
[0005] 3. Poor real-time performance: Problems with some devices occur probabilistically, and their occurrence is closely related to the current environment of the device, and is fleeting. By the time the mentioned operation steps are completed and the log file is sent to the remote technician, the environment at that time has passed. It may be difficult to reproduce the problem if debugging is performed again. Summary of the invention
[0006] In view of the above problems in the prior art, an embodiment of the present invention provides a method and system for implementing remote debugging.
[0007] In order to achieve the above object, on the one hand, a method for implementing remote debugging is provided, which is used to remotely debug a sensor device deployed in a production environment, wherein the sensor device has a short-range wireless communication function, and the method comprises:
[0008] After the first mobile communication terminal starts the remote debugging mode, it approaches the sensor device so that the first mobile communication terminal can perform short-range wireless communication with the sensor device through the short-range wireless communication module provided thereon;
[0009] The first mobile communication terminal obtains remote connection information of the sensor device from the sensor device through short-range wireless communication, and sends the remote connection information of the sensor device to a second mobile communication terminal arranged at the remote debugging side;
[0010] When the remote debugging server located on the remote debugging side uses the remote connection information to enter the remote debugging of the sensor, the first mobile communication terminal transmits the log read from the sensor device through short-range wireless communication to the remote debugging server in real time through the network, so that the remote debugging server can debug the sensor device according to the log.
[0011] Preferably, in the method described, the short-range wireless communication is: NFC communication; Bluetooth communication; or WiFi communication.
[0012] Preferably, in the method described above, a program module for implementing a remote debugging mode is pre-set on the first mobile communication terminal.
[0013] Preferably, in the method, the first mobile communication terminal communicates with the remote debugging server through WebSocket and / or HTTP protocol in the remote debugging mode.
[0014] On the other hand, a system for implementing remote debugging is provided, which is used for remote debugging of a sensor device in a production environment, wherein the sensor device has an NFC short-range wireless communication function, and the system includes:
[0015] A first mobile communication terminal, comprising: a processor and a memory; the memory stores a computer program, the computer program is used to be executed by the processor to implement short-range wireless communication and a remote debugging mode, in which the first mobile communication terminal can communicate with a remote server on a remote debugging side through a network; after starting the remote debugging mode, the first communication terminal approaches the sensor device so that the first mobile communication terminal can perform short-range wireless communication with the sensor device through a short-range wireless communication module provided thereon, obtain remote connection information of the sensor device from the sensor device through short-range wireless communication, send the remote connection information of the sensor device to a second mobile communication terminal provided on the remote debugging side, and read the log of the sensor device from the sensor device through short-range wireless communication and transmit it to the remote server during real-time debugging;
[0016] The remote server is used to use the remote connection information to enter remote debugging of the sensor, and during remote debugging, connect to the first mobile communication terminal through a network, receive the log of the sensor device transmitted by the first mobile communication terminal, and debug the sensor device according to the log.
[0017] Preferably, in the system, the short-range wireless communication is: NFC communication; Bluetooth communication; or WiFi communication.
[0018] Preferably, in the system, the first mobile communication terminal communicates with the remote debugging server through WebSocket and / or HTTP protocol in the remote debugging mode.
[0019] The above technical solution has the following technical effects:
[0020] The technical solution of the embodiment of the present invention realizes direct real-time data transmission between the remote service end and the on-site device end by introducing short-range communication such as NFC near-field communication and WebSocket, without using serial communication through connecting cables; it has the following advantages:
[0021] Simple operation: Users only need to take out a smart device that supports selected short-range communication functions such as NFC communication function, turn on the debugging mode, and approach the debugging device. Without additional steps and cables, they can start remote debugging of the device.
[0022] Friendly interaction: Users do not need to learn additional communication knowledge, and can easily get started after operating the corresponding device once;
[0023] Low cost: First, the corresponding short-distance communication modules such as NFC are low in cost and power consumption, which is particularly suitable for IoT sensors covering a large number of non-intelligent objects. It can ensure the integrity of the shell and improve the protection level without paying extra labor costs and time costs to repeatedly disassemble and assemble the equipment;
[0024] High real-time performance: Problems can be debugged and located remotely in real time, so that problems can be discovered, located, and solved at the first possible moment, thus improving the efficiency of problem solving. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a schematic diagram of the operation flow of the remote debugging method of the prior art;
[0026] Figure 2 A flowchart of a method for implementing remote debugging according to an embodiment of the present invention;
[0027] Figure 3 This is an architecture diagram of a system for implementing remote debugging according to an embodiment of the present invention;
[0028] Figure 4 A schematic diagram of the operation flow of remote debugging using the remote debugging system according to an embodiment of the present invention;
[0029] Figure 5 The present invention is a flowchart of an operation of performing offline debugging using the remote debugging system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] To further illustrate the various embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, a person of ordinary skill in the art should be able to understand other possible implementations and advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0031] The present invention will now be further described with reference to the accompanying drawings and specific implementation methods.
[0032] Embodiment 1:
[0033] Figure 2 The flowchart of the method for implementing remote debugging in one embodiment of the present invention is shown in FIG. The method for implementing remote debugging in this embodiment is used to remotely debug a sensor device deployed in a production environment, and the sensor device has an NFC communication function. The sensor device targeted by the present invention is generally an embedded low-power sensor device, which needs to be connected to the network through a gateway or a third-party device. Figure 1 The method for implementing remote debugging in this embodiment includes:
[0034] After the first mobile communication terminal starts the remote debugging mode, it approaches the sensor device so that the first mobile communication terminal can perform corresponding short-distance wireless communication with the sensor device through the short-distance wireless communication module provided thereon; preferably, the above-mentioned short-distance wireless communication is: NFC communication, Bluetooth communication or WiFi communication; in a specific implementation, a program module for implementing the remote debugging mode is pre-set on the first mobile communication terminal; in an implementation, the program module is implemented as a remote debugging software, i.e., an APP; in a specific implementation, the first mobile communication terminal is a mobile phone;
[0035] The first mobile communication terminal obtains remote connection information of the sensor device from the sensor device through short-range wireless communication, and sends the remote connection information of the sensor device to a second mobile communication terminal arranged at the remote debugging side; in a specific implementation, the second mobile communication terminal is a mobile phone; in a specific implementation, after the technical service personnel at the remote debugging side obtains the remote connection information through the second mobile communication terminal, they input the information into the remote debugging background and can communicate with the remote first mobile communication terminal;
[0036] When the first mobile communication terminal uses the remote connection information to enter the remote debugging of the sensor at the remote debugging server located at the remote debugging side, the log read from the sensor device through short-range wireless communication is transmitted to the remote debugging server in real time through the network, so that the remote debugging server can debug the sensor device according to the log. In a specific implementation, the first mobile communication terminal communicates with the remote debugging server through a network transmission protocol such as WebSocket and / or HTTP in the remote debugging mode. In a specific implementation, in the remote debugging mode, the remote communication between the first mobile communication terminal and the remote debugging server is implemented through a browser and / or a preset APP for implementing remote debugging.
[0037] The embodiment of the present invention introduces short-range wireless communication such as NFC near-field communication, Bluetooth communication or WiFi communication, and WebSocket network transmission protocol, so that on-site staff only need to use a device with a selected short-range wireless communication function such as NFC, such as a mobile phone, and turn on the remote debugging mode, so that the staff can communicate with the device through the selected short-range wireless communication method such as NFC to obtain the log and other information required for debugging, and then transmit the log and other information required for debugging to the remote debugging server in real time through the network through the client of the mobile phone, such as the remote debugging software client; thereby achieving the purpose of real-time remote debugging of the on-site embedded low-power sensor equipment.
[0038] Embodiment 2:
[0039] The present invention also provides a system for implementing remote debugging, which is used for remote debugging of sensor equipment in a production environment, wherein the sensor equipment has a short-range wireless communication function such as NFC communication function, Bluetooth communication function or WiFi communication function. Figure 3 FIG. 1 is an architecture diagram of a system for implementing remote debugging according to an embodiment of the present invention. In this embodiment, the short-range communication used is NFC communication. Figure 3 , the system comprises:
[0040] The first mobile communication terminal is a user end located at the sensor site, comprising: a processor and a memory; the memory stores a computer program, the computer program is used to be executed by the processor to realize NFC communication and remote debugging mode, in which the first mobile communication terminal can communicate with the remote service end at the remote debugging side through the network; after starting the remote debugging mode, the first communication terminal approaches the sensor device so that the first mobile communication terminal can perform NFC communication with the sensor device through the NFC communication module arranged thereon, obtain remote connection information of the sensor device from the sensor device through NFC communication, send the remote connection information of the sensor device to the second mobile communication terminal arranged at the remote debugging side, and read the log of the sensor device from the sensor device through NFC communication and transmit it to the remote service end during real-time debugging; in a specific implementation, a program module for realizing the remote debugging mode is pre-set on the first mobile communication terminal; in an implementation, the program module is implemented as remote debugging software, i.e., APP;
[0041] The remote server is used to use the remote connection information to enter the remote debugging of the sensor, and is connected to the first mobile communication terminal through the network during the remote debugging, receives the log of the sensor device transmitted by the first mobile communication terminal, and debugs the sensor device according to the log.
[0042] In a specific implementation, the first mobile communication terminal communicates with the remote debugging server through the WebSocket and / or HTTP protocol in the remote debugging mode.
[0043] Figure 4 FIG. 1 is a schematic diagram of the operation flow of remote debugging using a remote debugging system according to an embodiment of the present invention. Figure 4 When performing remote debugging using the remote debugging system of the embodiment of the present invention:
[0044] 1) The operation steps for the user at the on-site device end include:
[0045] 1. Turn on remote debugging mode;
[0046] 2. NFC is close to the device;
[0047] 3. Inform the remote personnel of the remote debugging ID, password and other remote connection information;
[0048] 4. Start real-time debugging communication;
[0049] 2) The operation steps of the remote technician include:
[0050] 1. Open the remote debugging background;
[0051] 2. Enter the debugging ID and password;
[0052] 3. Start obtaining logs and debug and locate problems in real time.
[0053] contrast Figure 4 and Figure 1 It can be seen that the remote debugging method of the embodiment of the present invention realizes direct real-time data transmission between the remote service end and the on-site device end by introducing communication transmission methods such as NFC near-field communication and WebSocket, without using serial port communication. It has the advantages of simple operation, friendly interaction, low cost and high real-time performance.
[0054] Figure 5 This is a schematic diagram of the operation flow of using the remote debugging system of an embodiment of the present invention to perform offline debugging. When it is inconvenient to use the network for real-time remote debugging at the production site, the device log can also be exported through NFC and then transmitted to the remote technician for viewing. Figure 5 The operation steps of using the remote debugging system of the embodiment of the present invention to perform offline debugging include:
[0055] 1. Open the export log function;
[0056] 2. NFC is close to the device;
[0057] 3. Export log files;
[0058] 4. Send log files to remote technicians. Although the present invention is specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes can be made to the present invention in form and detail without departing from the spirit and scope of the present invention as defined in the appended claims, and all are within the scope of protection of the present invention.
Claims
1. A method for implementing remote debugging, for remote debugging of a sensor device deployed in a production environment, characterized in that: The sensor device has a short-range wireless communication function, and the method includes: After the first mobile communication terminal starts the remote debugging mode, it approaches the sensor device so that the first mobile communication terminal can perform short-range wireless communication with the sensor device through the short-range wireless communication module provided thereon; The first mobile communication terminal obtains remote connection information of the sensor device from the sensor device through short-range wireless communication, and sends the remote connection information of the sensor device to a second mobile communication terminal arranged at the remote debugging side; When the remote debugging server located on the remote debugging side uses the remote connection information to enter the remote debugging of the sensor, the first mobile communication terminal transmits the log read from the sensor device through short-range wireless communication to the remote debugging server in real time through the network, so that the remote debugging server can debug the sensor device according to the log.
2. The method according to claim 1, characterized in that: The short-range wireless communication is: NFC communication; Bluetooth communication; or, WiFi communication.
3. The method according to claim 1, characterized in that: A program module for implementing a remote debugging mode is pre-set on the first mobile communication terminal.
4. The method according to claim 1, characterized in that In the remote debugging mode, the first mobile communication terminal communicates with the remote debugging server via WebSocket and / or HTTP protocol.
5. A system for implementing remote debugging, used for remote debugging of sensor devices in a production environment, characterized in that: The sensor device has a short-range wireless communication function, and the system includes: A first mobile communication terminal, comprising: a processor and a memory; the memory stores a computer program, the computer program is used to be executed by the processor to implement short-range wireless communication and a remote debugging mode, in which the first mobile communication terminal can communicate with a remote server on a remote debugging side through a network; after starting the remote debugging mode, the first communication terminal approaches the sensor device so that the first mobile communication terminal can perform short-range wireless communication with the sensor device through a short-range wireless communication module provided thereon, obtain remote connection information of the sensor device from the sensor device through short-range wireless communication, send the remote connection information of the sensor device to a second mobile communication terminal provided on the remote debugging side, and read the log of the sensor device from the sensor device through short-range wireless communication and transmit it to the remote server during real-time debugging; The remote server is used to use the remote connection information to enter remote debugging of the sensor, and during remote debugging, connect to the first mobile communication terminal through a network, receive the log of the sensor device transmitted by the first mobile communication terminal, and debug the sensor device according to the log.
6. The system according to claim 5, characterized in that The short-range wireless communication is: NFC communication; Bluetooth communication; or, WiFi communication.
7. The system according to claim 5, characterized in that In the remote debugging mode, the first mobile communication terminal communicates with the remote debugging server via WebSocket and / or HTTP protocol.