An internet of things edge computing remote debugging method and system

By using secure authentication services and remote debugging methods with dynamic publishing modules, the problems of debugging difficulties and high maintenance costs of edge computing devices have been solved, enabling online diagnosis and functional expansion of edge devices and reducing operation and maintenance costs.

CN115604265BActive Publication Date: 2025-11-11FOUNDER INT(WUHAN)TECH DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211306943.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-20
Publication Date
2025-11-11
Estimated Expiration
2042-10-20

AI Technical Summary

Technical Problem

Edge computing devices are difficult to debug and maintain in the later stages of installation, and existing edge gateway products are difficult to debug flexibly.

Method used

It employs a security authentication service, a remote communication module, and a dynamic publishing module. Remote debugging is achieved through the MQTT communication protocol. The dynamic publishing module executes scripts or program packages according to the type of debugging task and reports the results to the cloud.

Benefits of technology

It enables online diagnostics and debugging of edge devices, reduces operation and maintenance costs, and supports functional expansion, thereby improving the flexibility and scalability of edge devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115604265B_ABST
    Figure CN115604265B_ABST
Patent Text Reader

Abstract

This invention provides a remote debugging method and framework for IoT edge computing. The method includes: after a security authentication service is initiated, the local authentication service reads the current device's unique code and built-in key file for encryption; remote identity authentication verifies the authentication; upon successful verification, the cloud service sends the key information required by the remote communication module; the remote communication module establishes MQTT communication with the cloud based on the key information and sends remote debugging tasks via downlink communication; the dynamically published module receives the remote debugging tasks and, depending on the specific debugging task program, executes either scripts or program packages; after execution, it collects the execution results and reports them to the cloud via uplink communication. This solution enables online debugging and diagnosis of edge devices, reducing the operation and maintenance costs of edge devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of IoT edge computing, and particularly relates to a remote debugging method and system for IoT edge computing. Background Technology

[0002] With the development of IoT technology and market demand in recent years, more and more devices are connecting to the cloud. The massive amounts of raw data generated by these diverse devices are pushed to centralized cloud platforms for storage, analysis, management, and decision-making. Due to the interactive nature of these devices, the analysis results generated from the reported data need to be transmitted back to the devices. This presents two significant problems: firstly, poor real-time performance, as transmitting data to the cloud computing center and then requesting processing results increases system latency; secondly, insufficient bandwidth, as transmitting large amounts of data to the cloud puts significant pressure on network bandwidth. Edge computing has emerged to address this, facilitating data processing and analysis at the internet edge, closer to the data source, leading to a large number of edge gateway products on the market. However, most of these products use fixed programs, making debugging difficult in practical applications, and increasing maintenance costs after installation. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide a remote debugging method and system for IoT edge computing, which solves the problems of difficult edge computing debugging and high maintenance costs.

[0004] In a first aspect of the present invention, a remote debugging method for IoT edge computing is provided, comprising:

[0005] After the security authentication service is started, the local authentication service reads the current device's unique code and the built-in key file for encryption, and the remote identity authentication performs authentication verification. After the verification is successful, the cloud service sends the key information required by the remote communication module.

[0006] The remote communication module establishes MQTT communication with the cloud based on key information and sends remote debugging tasks through downlink communication;

[0007] The dynamic publishing module receives remote debugging tasks and executes scripts or program packages depending on the type of debugging task. After execution, it collects the execution results and reports them to the cloud via uplink communication.

[0008] In a second aspect of the present invention, a system for remote debugging of IoT edge computing is provided, including a security authentication module, a remote communication module, and a dynamic publishing module. The security authentication module includes local authentication services and remote identity authentication. The remote communication module includes uplink communication and downlink communication. The dynamic publishing module includes a publishing debugging unit, a package execution engine, and a script execution engine.

[0009] Among them, after the security authentication service is started, the local authentication service reads the current device's unique code and the built-in key file for encryption processing, and the remote identity authentication performs identity authentication verification. After the verification is successful, the cloud service sends the key information required by the remote communication module.

[0010] The remote communication module establishes MQTT communication with the cloud based on key information and sends remote debugging tasks through downlink communication;

[0011] After receiving a remote debugging task, the dynamic publishing module distributes the task according to the different debugging task programs. The script execution engine executes the script, and the program package execution engine executes the program package. After the execution is completed, the execution results are collected and reported to the cloud through uplink communication.

[0012] In a third aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor executes the computer program to implement the steps of the method as described in the first aspect of the present invention.

[0013] In a fourth aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method provided in the first aspect of the present invention.

[0014] In this embodiment of the invention, based on security authentication services and remote communication, a remote debugging task is received. Depending on the different debugging task programs, script execution or program package execution is performed respectively. After execution is completed, the execution results are reported to the cloud, thereby enabling online diagnosis and debugging of edge devices, reducing the operation and maintenance costs of edge devices, and facilitating functional expansion. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a flowchart illustrating a remote debugging method for IoT edge computing according to an embodiment of the present invention.

[0017] Figure 2 A schematic diagram illustrating the principle of edge device service extension according to an embodiment of the present invention;

[0018] Figure 3 This is a schematic diagram of the structure of a system for remote debugging of IoT edge computing according to an embodiment of the present invention;

[0019] Figure 4 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present invention. Detailed Implementation

[0020] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0021] It should be understood that the terms "comprising" and other similar expressions in the specification, claims, and accompanying drawings of this invention are intended to cover a non-exclusive inclusion, such as a process, method, system, or apparatus that includes a series of steps or units and is not limited to the listed steps or units. Furthermore, "first" and "second" are used to distinguish different objects and are not intended to describe a specific order.

[0022] Please see Figure 1 The present invention provides a flowchart illustrating a remote debugging method for IoT edge computing, comprising:

[0023] S101. After the security authentication service is started, the local authentication service reads the current device's unique code and the built-in key file for encryption, and the remote identity authentication performs authentication verification. After the verification is successful, the cloud service sends the key information required by the remote communication module.

[0024] The security authentication service is used to provide authentication services for IoT edge computing devices. Identity authentication is required before data transmission with the cloud, and remote communication can only be established after successful authentication.

[0025] The local authentication service reads the edge computing device's unique code and built-in key, dynamically encrypts and generates authentication information. Upon receiving the authentication information, the remote authentication service decrypts and verifies it. After successful device identity verification, the cloud service issues a communication key for secure remote communication between the edge computing device and the cloud.

[0026] S102. The remote communication module establishes MQTT communication with the cloud based on key information and sends remote debugging tasks through downlink communication.

[0027] MQTT (Message Queuing Telemetry Transport) communication is a publish / subscribe messaging protocol designed for remote devices with low hardware performance or poor network conditions. It is lightweight, simple, and easy to develop. Using the MQTT protocol can provide reliable network services for IoT devices in low-bandwidth and unstable network environments. Two topics, uplink communication and downlink communication, are defined at the core of the remote communication module.

[0028] The remote debugging task is in JSON structured format, and the task types are divided into dynamic program deployment tasks and extended business tasks.

[0029] S103 The remote debugging task received by the dynamic publishing module is executed as either a script or a program package, depending on the different debugging task programs. After execution, the execution results are collected and reported to the cloud via uplink communication.

[0030] Remote debugging tasks sent from the cloud can be divided into two types: scripts and program packages. These two types of debugging tasks can be executed by different engines. After execution, the execution results are collected and uploaded to the cloud via uplink communication in the remote communication module.

[0031] Specifically, the package execution engine downloads the program based on the package download address in the debugging task content, and executes the exec program (finding the executable file) through system commands; the script execution engine directly executes the JavaScript script content, which can be parsed by Node.js.

[0032] The dynamic publishing module adopts a Flow process design, globally defines the core index.js, and defines at least 5 core methods: startup node, task loading node, output node, end node, and execution sub-flow Flow.

[0033] The startup node is used to inject the received tasks into each node. The task loading node is used to execute the task program. If the task contains other defined flow designs, it enters the execution sub-flow. The execution sub-flow is designed in the same way as the global method and is nested. When the task is completed, the result is output through the output node, and the resources are recycled and logged through the end node.

[0034] In one embodiment, S103 further includes:

[0035] After receiving an extended business task, the extended business module determines whether new components need to be added. If it determines that a component is missing, it dynamically installs the required component.

[0036] The protocol data required to execute extended business tasks is collected and the execution results are reported to the cloud through extended debugging.

[0037] For example, such as Figure 2 As shown, this section explains how to extend a new computing engine under dynamic deployment in Node.js. The core foundation for extending a new computing engine is... Figure 1 This embodiment of the remote debugging method for edge computing provides a standard interface, which can be implemented using the HTTP protocol or a dynamic library, to provide extensibility for the original computing engine. The design process is as follows: The original computing engine S1 drives the computing method to execute computing logic S2, which can call the standard interface N100 in the extended computing engine N1 of this invention, and then executes the edge computing debugging method N101. The core of this debugging method is a dynamic publishing module and an extended business module. After the debugging method performs the calculation, it outputs the result and returns it to the computing logic S2 through the standard interface N100. After processing and merging the original computing information, S3 outputs the final result.

[0038] The components required for the business in the extended business module are managed by NPM (Node Package Manager), and the extended business definition exposes the corresponding component protocol parameter standard JSON using an interface mode.

[0039] In the extended debugging design, for the corresponding component's built-in empty content, a comparison object (such as a diff object) is defined. The object identifies the changes that occur due to deployment, dynamically replacing the task execution content, and outputting the execution result after execution is completed.

[0040] It should be noted that the remote debugging method in this embodiment uses Node.js as the underlying computing framework and may include a security authentication service, a remote communication module, a dynamic publishing module, and an extended business module.

[0041] In this embodiment, Node.js is used as the underlying engine, enabling dynamic deployment and timely response to real-time emergencies. It can also serve as an online diagnostic tool, capable of analyzing and diagnosing edge devices. The remote debugging function can be expanded to include new computing engines, enhancing the scalability and flexibility of existing edge computing capabilities. It provides technical support for upgrading IoT gateways to edge computing smart gateways and enables remote operation and maintenance debugging, saving on maintenance costs.

[0042] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0043] Figure 3This is a schematic diagram of a system for remote debugging of IoT edge computing provided in an embodiment of the present invention. The system includes a security authentication module 310, a remote communication module 320, and a dynamic publishing module 330. The security authentication module 310 includes local authentication services and remote identity authentication. The remote communication module 320 includes uplink communication and downlink communication. The dynamic publishing module 330 includes a publishing debugging unit, a program package execution engine, and a script execution engine.

[0044] Among them, after the security authentication service is started, the local authentication service reads the current device's unique code and the built-in key file for encryption processing, and the remote identity authentication performs identity authentication verification. After the verification is successful, the cloud service sends the key information required by the remote communication module.

[0045] The remote communication module 320 establishes MQTT communication with the cloud based on key information and sends remote debugging tasks through downlink communication;

[0046] The remote debugging task is in JSON structured format, and the task types are divided into dynamic program deployment tasks and extended business tasks.

[0047] After receiving the remote debugging task, the dynamic publishing module 330 distributes the task according to the different debugging task programs. The script execution engine executes the script, and the program package execution engine executes the program package. After the execution is completed, the execution results are collected and reported to the cloud through uplink communication.

[0048] Specifically, the package execution engine downloads the program according to the package download address in the debugging task content, and executes the exec program through system commands;

[0049] The script execution engine directly executes the JavaScript script content.

[0050] Preferably, the dynamic publishing module 330 adopts a Flow process design, globally defines the core index.js, and defines at least 5 core methods: startup node, task loading node, output node, end node, and execution sub-process Flow.

[0051] The startup node is used to inject the received tasks into each node. The task loading node is used to execute the task program. If the task contains other defined flow designs, it enters the execution sub-flow. The execution sub-flow is designed in the same way as the global method and is nested. When the task is completed, the result is output through the output node, and the resources are recycled and logged through the end node.

[0052] In one embodiment, the system for remote debugging of IoT edge computing further includes an extended business module 340, which includes a dynamic component security unit, a protocol parsing and execution unit, and an extended debugging unit.

[0053] After receiving the extended service task, the extended service module determines whether new components need to be added. If it determines that components are missing, it installs the required components based on the dynamic component security unit.

[0054] The protocol parsing and execution unit is used to execute the protocol data required for extended business tasks, and the extended debugging unit collects the execution results and reports them to the cloud.

[0055] Preferably, the components required for the business in the extended business module 340 are managed by NPM, and the extended business definition exposes the corresponding component protocol parameter standard JSON using the interface mode;

[0056] In the extended debugging design, for the corresponding component's built-in empty content, a comparison object is defined. The object identifies the changes that occur due to deployment, dynamically replacing the task execution content. After execution, the execution result is output.

[0057] This architecture employs Node.js as its underlying computing framework engine, enabling dynamic deployment and timely response to unforeseen circumstances. Simultaneously, it serves as an online diagnostic tool, capable of analyzing and diagnosing edge devices and facilitating the expansion with new computing engines, thereby enhancing the scalability and flexibility of edge devices.

[0058] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and architecture described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0059] Figure 4 This is a schematic diagram of an electronic device according to an embodiment of the present invention. The electronic device is used for remote debugging of IoT edge computing. Figure 4 As shown, the electronic device 4 in this embodiment includes a memory 410, a processor 420, and a system bus 430. The memory 410 includes an executable program 4101 stored thereon. As those skilled in the art will understand, Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0060] The following is combined with Figure 4 A detailed introduction to each component of the electronic device:

[0061] The memory 410 can be used to store software programs and modules. The processor 420 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 410. The memory 410 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device (such as cached data), etc. In addition, the memory 410 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0062] The memory 410 contains an executable program 4101 with a network request method. This executable program 4101 can be divided into one or more modules / units, which are stored in the memory 410 and executed by the processor 420 to enable remote debugging of edge devices, etc. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, describing the execution process of the computer program 4101 in the electronic device 4. For example, the computer program 4101 can be divided into functional modules such as a security authentication module, a remote communication module, a dynamic publishing module, and an extended service module.

[0063] The processor 420 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 410, and by calling data stored in the memory 410, it performs various functions and processes data, thereby monitoring the overall status of the electronic device. Optionally, the processor 420 may include one or more processing units; preferably, the processor 420 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, application programs, etc., and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 420.

[0064] The system bus 430 is used to connect various functional components inside the computer, transmitting data, address, and control information. Its type can be, for example, a PCI bus, an ISA bus, or a CAN bus. Instructions from the processor 420 are transmitted to the memory 410 via the bus, and the memory 410 sends data back to the processor 420. The system bus 430 is responsible for data and instruction exchange between the processor 420 and the memory 410. Of course, the system bus 430 can also connect to other devices, such as network interfaces and display devices.

[0065] In this embodiment of the invention, the executable program executed by the processing 420 of the electronic device includes:

[0066] After the security authentication service is started, the local authentication service reads the current device's unique code and the built-in key file for encryption, and the remote identity authentication performs authentication verification. After the verification is successful, the cloud service sends the key information required by the remote communication module.

[0067] The remote communication module establishes MQTT communication with the cloud based on key information and sends remote debugging tasks through downlink communication;

[0068] The dynamic publishing module receives remote debugging tasks and executes scripts or program packages depending on the type of debugging task. After execution, it collects the execution results and reports them to the cloud via uplink communication.

[0069] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0070] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0071] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A remote debugging method for IoT edge computing, characterized in that, include: After the security authentication service is started, the local authentication service reads the current device's unique code and the built-in key file for encryption, and the remote identity authentication performs authentication verification. After the verification is successful, the cloud service sends the key information required by the remote communication module. The remote communication module establishes MQTT communication with the cloud based on key information and sends remote debugging tasks through downlink communication; The dynamic publishing module receives remote debugging tasks and executes scripts or program packages depending on the type of debugging task. After execution, it collects the execution results and reports them to the cloud via uplink communication. The step of executing scripts and packages according to different debugging task programs includes: The package execution engine downloads the program based on the package download address in the debugging task content and executes the exec program via system commands. The script execution engine directly executes the JavaScript script content; Among them, after receiving the extended business task, the extended business module determines whether new components need to be added. If it is determined that a component is missing, the required component is dynamically installed. The protocol data required to execute extended business tasks is collected and the execution results are reported to the cloud through extended debugging.

2. The method according to claim 1, characterized in that, The remote debugging task is in JSON structured format, and the task types are divided into dynamic program deployment tasks and extended business tasks.

3. The method according to claim 1, characterized in that, The dynamic publishing module adopts a Flow process design, with a globally defined core index.js, and at least five core methods defined: startup node, task loading node, output node, end node, and execution sub-flow Flow. The startup node is used to inject the received tasks into each node. The task loading node is used to execute the task program. If the task contains other defined flow designs, it enters the execution sub-flow. The execution sub-flow is designed in the same way as the global method and is nested. When the task is completed, the result is output through the output node, and the resources are recycled and logged through the end node.

4. The method according to claim 1, characterized in that, The components required for the business in the extended business module are managed by NPM, and the extended business definition exposes the corresponding component protocol parameters in standard JSON using an interface pattern. In the extended debugging design, for the corresponding component's built-in empty content, a comparison object is defined. The object identifies the changes that occur due to deployment, dynamically replacing the task execution content. After execution, the execution result is output.

5. A system for remote debugging of IoT edge computing, comprising at least a security authentication module, a remote communication module, and a dynamic publishing module, characterized in that, The security authentication module includes local authentication service and remote identity authentication; the remote communication module includes uplink communication and downlink communication; and the dynamic publishing module includes a publishing debugging unit, a package execution engine, and a script execution engine. Among them, after the security authentication service is started, the local authentication service reads the current device's unique code and the built-in key file for encryption processing, and the remote identity authentication performs identity authentication verification. After the verification is successful, the cloud service sends the key information required by the remote communication module. The remote communication module establishes MQTT communication with the cloud based on key information and sends remote debugging tasks through downlink communication; After receiving a remote debugging task, the dynamic publishing module distributes the task according to the different debugging task programs. The script execution engine executes the script, and the program package execution engine executes the program package. After the execution is completed, the execution results are collected and reported to the cloud through uplink communication. The package execution engine downloads the program based on the package download address in the debugging task content and executes the exec program through system commands. The script execution engine directly executes the JavaScript script content; The system for remote debugging of IoT edge computing also includes an extended business module, which includes a dynamic component security unit, a protocol parsing and execution unit, and an extended debugging unit. After receiving the extended service task, the extended service module determines whether new components need to be added. If it determines that components are missing, it installs the required components based on the dynamic component security unit. The protocol parsing and execution unit is used to execute the protocol data required for extended business tasks, and the extended debugging unit collects the execution results and reports them to the cloud.

6. An electronic 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, it implements the steps of the IoT edge computing remote debugging method as described in any one of claims 1 to 4.

7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed, it implements the steps of the remote debugging method for IoT edge computing as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Algorithm task processing method and device for industrial edge gateway and storage medium

    CN111443935A

  • Electric power data acquisition system based on edge internet-of-things proxy equipment

    CN114205375A