Method and system for supporting online debugging of multi-protocol Internet of Things equipment
By establishing a data interaction link between IoT devices, servers and front-end, and performing protocol conversion on IoT servers, the problem of online debugging of IoT devices is solved, and visual debugging of multi-protocol devices is realized. Reduces debugging difficulty.
Patent Information
- Application Number
- CN202411405868.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Faced with a large number of IoT devices with different scenarios and protocol standards, online debugging of devices has become complicated and it is difficult to achieve visual operations.
By establishing a data interaction link between the front-end, the Internet of Things server and the Internet of Things device, providing a visual interface to select the device to be debugged, and performing protocol conversion on the Internet of Things server, it supports online debugging of multi-protocol devices.
Visual online debugging of multi-protocol IoT devices is realized, reducing the difficulty of debugging, and there is no need to have an in-depth understanding of IoT protocols, and supports device access and debugging of multiple IoT protocols.
Smart Images

Figure CN119449840A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things, and in particular to a method and system for supporting online debugging of multi-protocol Internet of Things devices. Background Art
[0002] With the explosive technological iteration and development of the Internet of Things (IOT) in recent years, the scenarios for implementation have become increasingly rich and complex. According to Gartner data, by 2020, there will be as many as 20 billion connected devices generating billions of bytes of data for each user. These devices are not only smartphones or laptops, but also network-connected cars, vending machines, intelligent wearable devices, surgical medical robots, and so on.
[0003] Faced with a large number of devices in a large number of different scenarios and with different protocol standards, the equipment installers, operators, and R&D personnel face arduous challenges, especially IoT equipment R&D and operation personnel. They not only need to be familiar with various IoT equipment protocols and understand the communication mechanisms of IoT equipment, but also need to verify the correctness and feasibility of equipment operation, quickly identify equipment failure points, and resolve them.
[0004] How to visually operate and debug online equipment is a technical problem that needs to be solved. Summary of the invention
[0005] The technical task of the present invention is to address the above shortcomings and provide a method and system for supporting online debugging of multi-protocol Internet of Things devices to solve the technical problem of how to visually operate and debug online devices.
[0006] In a first aspect, the present invention provides a method for supporting online debugging of a multi-protocol IoT device, which is applied between a front end, an IoT server and an IoT device, and comprises the following steps:
[0007] The IoT device is connected to the IoT server and exchanges data with the front end through the IoT server;
[0008] Select the IoT device to be debugged through the visual interface provided by the front end, and manage the communication method between the IoT device and the IoT server;
[0009] The IoT server performs protocol conversion on the data transmitted between the IoT device and the front end.
[0010] Preferably, the communication mode between the IoT device and the IoT server includes two-way communication and one-way communication, the two-way communication mode includes data interaction based on the MQTT protocol and the WebSocket protocol, and the one-way communication mode includes data interaction based on the HTTP protocol and the TCP protocol;
[0011] The communication method between the front end and the IoT server is two-way communication, which is based on the MQTT protocol and the WebSocket protocol for data interaction.
[0012] As a preferred embodiment, when data communication is performed between the IoT device and the IoT server based on the MQTT protocol, after the IoT device and the IoT server establish a connection through the MQTT protocol, the validity of the connection is maintained through a heartbeat method, and the IoT device actively reports its collected data and device status to the IoT server, and the IoT server sends instructions to the IoT device;
[0013] When the IoT device and the IoT server exchange data based on the HTTP protocol, the following steps are included:
[0014] After the IoT device is started, it sends registration information to the IoT server based on HTTP network request to register the device and report the device status and data;
[0015] After receiving the HTTP network request from the IoT device, the IoT server registers the registration information of the IoT device and saves the device status and data reported by the IoT device;
[0016] If the IoT server sends instructions or data to the IoT device, the IoT device will send the instructions or data as a request response to the IoT device through the current HTTP network request of the IoT device.
[0017] After the IoT device receives the request response, if the response to this request contains instructions or data sent by the server, the IoT device will process the instructions and data sent after completing the business processing of this HTTP network request, and report the processed results to the IoT server through a new round of HTTP requests.
[0018] As a preferred embodiment, the IoT server divides the business interaction into multiple topics according to various IoT protocols for business interaction between IoT service front ends. The IoT server implements data conversion between IoT devices and front ends based on topics, including the following operations:
[0019] For the data uploaded by the IoT device, the IoT server converts the data into a format supported by the front-end, divides the converted data into the topic TOPIC_REPORT, and sends the topic TOPIC_REPORT to the front-end. After receiving the data, the front-end returns TOPIC_REPLY to the IoT server as a response. If the front-end cannot effectively process the data after receiving it, it returns TOPIC_ERROR to the IoT server as a response. If the IoT server does not receive a response from the front-end within the specified time, it is considered that the front-end has not received the data, and the IoT server resends the data to the front-end;
[0020] For the instructions sent by the front end, the IoT server converts the instructions into a format supported by the IoT device, divides the converted instructions into the topic TOPIC_REPLY, and sends the topic TOPIC_REPLY to the IoT device. If the IoT device cannot effectively process the data after receiving the response, it returns TOPIC_ERROR to the IoT server as a response.
[0021] In a second aspect, the present invention provides a system for supporting online debugging of multi-protocol IoT devices, including a front end, an IoT server, and an IoT device, for implementing online debugging of IoT devices through a method for supporting online debugging of multi-protocol IoT devices as described in any one of the first aspects;
[0022] The IoT device is connected to the IoT server and exchanges data with the front end through the IoT server;
[0023] The front end is used to provide a visual interface, which supports users to select IoT devices to be debugged and manage the communication method between IoT devices and IoT servers;
[0024] The IoT server is used to perform protocol conversion on data transmitted between IoT devices and the front end.
[0025] Preferably, the communication mode between the IoT device and the IoT server includes two-way communication and one-way communication, the two-way communication mode includes data interaction based on the MQTT protocol and the WebSocket protocol, and the one-way communication mode includes data interaction based on the HTTP protocol and the TCP protocol;
[0026] The communication method between the front end and the IoT server is two-way communication, which is based on the MQTT protocol and the WebSocket protocol for data interaction.
[0027] As a preferred embodiment, when data communication is performed between the IoT device and the IoT server based on the MQTT protocol, after the IoT device and the IoT server establish a connection through the MQTT protocol, the validity of the connection is maintained through a heartbeat method, and the IoT device actively reports its collected data and device status to the IoT server, and the IoT server sends instructions to the IoT device;
[0028] When the IoT device and the IoT server exchange data based on the HTTP protocol, the following steps are included:
[0029] After the IoT device is started, it sends registration information to the IoT server based on HTTP network request to register the device and report the device status and data;
[0030] After receiving the HTTP network request from the IoT device, the IoT server registers the registration information of the IoT device and saves the device status and data reported by the IoT device;
[0031] If the IoT server sends instructions or data to the IoT device, the IoT device will send the instructions or data as a request response to the IoT device through the current HTTP network request of the IoT device.
[0032] After the IoT device receives the request response, if the response to this request contains instructions or data sent by the server, the IoT device will process the instructions and data sent after completing the business processing of this HTTP network request, and report the processed results to the IoT server through a new round of HTTP requests.
[0033] As a preferred embodiment, the IoT server divides the business interaction into multiple topics according to various IoT protocols for business interaction between IoT service front ends. The IoT server implements data conversion between IoT devices and front ends based on topics, including the following operations:
[0034] For the data uploaded by the IoT device, the IoT server converts the data into a format supported by the front-end, divides the converted data into the topic TOPIC_REPORT, and sends the topic TOPIC_REPORT to the front-end. After receiving the data, the front-end returns TOPIC_REPLY to the IoT server as a response. If the front-end cannot effectively process the data after receiving it, it returns TOPIC_ERROR to the IoT server as a response. If the IoT server does not receive a response from the front-end within the specified time, it is considered that the front-end has not received the data, and the IoT server resends the data to the front-end;
[0035] For the instructions sent by the front end, the IoT server converts the instructions into a format supported by the IoT device, divides the converted instructions into the topic TOPIC_REPLY, and sends the topic TOPIC_REPLY to the IoT device. If the IoT device cannot effectively process the data after receiving the response, it returns TOPIC_ERROR to the IoT server as a response.
[0036] The method and system for supporting online debugging of multi-protocol IoT devices of the present invention have the following advantages:
[0037] 1. Provide visual debugging solutions, which are easy to operate and reduce the difficulty of debugging. As long as the debugging personnel understand the business, they can operate it without having in-depth technical level of IoT protocols;
[0038] 2. Support the access of devices with multiple IoT protocols. The IoT server performs protocol conversion on the data between the front end and IoT devices, thereby supporting the debugging of devices with multiple IoT protocols. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] The present invention is further described below in conjunction with the accompanying drawings.
[0041] Figure 1 This is a working block diagram of a method for supporting online debugging of multi-protocol Internet of Things devices in Example 1;
[0042] Figure 2 This is a schematic diagram of the structure of the front end in a method for supporting online debugging of multi-protocol Internet of Things devices in Example 1;
[0043] Figure 3 This is a result block diagram of a system that supports online debugging of multi-protocol Internet of Things devices according to Example 2. DETAILED DESCRIPTION
[0044] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it. However, the embodiments are not intended to limit the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments may be combined with each other.
[0045] The embodiment of the present invention provides a method and system for supporting online debugging of multi-protocol Internet of Things devices, which are used to solve the technical problem of how to visually operate and debug online devices.
[0046] Embodiment 1:
[0047] The present invention discloses a method for online debugging of multi-protocol Internet of Things devices, which is applied between a front end, an Internet of Things service end and Internet of Things devices, and includes three steps: device access, device management and data conversion.
[0048] Step S100: Device access: The IoT device accesses the IoT server and exchanges data with the front end through the IoT server.
[0049] In this embodiment, the IoT device to be debugged is connected to the IoT server, wherein the connected IoT device supports multiple IoT protocols.
[0050] Step S200 device management, select the IoT device to be debugged through the visual interface provided by the front end, and manage the communication method between the IoT device and the IoT server.
[0051] In this embodiment, the communication mode between the IoT device and the IoT server includes two-way communication and one-way communication, wherein the two-way communication mode includes data interaction based on the MQTT protocol and the WebSocket protocol, and the one-way communication mode includes data interaction based on the HTTP protocol and the TCP protocol.
[0052] As a specific implementation of two-way communication, IoT devices and IoT servers communicate data based on the MQTT protocol. The MQTT protocol is a lightweight, simple, open client-server based message publishing / subscription transmission protocol, and is a typical representative of IoT protocols that support two-way communication functions. When IoT devices and IoT servers communicate data based on the MQTT protocol, after the IoT devices and IoT servers establish a connection through the MQTT protocol, the validity of the connection is maintained through heartbeats. The IoT devices actively report their collected data and device status to the IoT server, and the IoT server sends instructions to the IoT devices.
[0053] As a specific implementation of one-way communication, the IoT device and the IoT server exchange data based on the HTTP protocol. The HTTP protocol is a simple request-response protocol based on TCP. Because it is a one-way communication implementation, when implementing communication between IoT devices and cloud services, it is necessary to expand the communication data structure to achieve a "delayed" two-way communication. The steps are as follows:
[0054] (1) After the IoT device is started, it sends registration information to the IoT server based on HTTP network request to register the device and report the device status and data;
[0055] (2) After receiving the HTTP network request from the IoT device, the IoT server registers the registration information of the IoT device and saves the device status and data reported by the IoT device;
[0056] (3) If the IoT server sends instructions or data to the IoT device, the IoT server returns the sent instructions or data to the IoT device as a request response through the current HTTP network request of the IoT device;
[0057] (4) After the IoT device receives the request response, if the response to this request contains instructions or data sent by the server, the IoT device will process the instructions and data sent after completing the business processing of this HTTP network request, and report the processed results to the IoT server through a new round of HTTP requests.
[0058] The above HTTP implementation process will cache the instructions or data that need to be sent to the device on the server side. After the device actively initiates a network request, the cached instructions or data to be sent will be used as the response data of the network request to inform the IoT device, thereby achieving the illusion of "two-way communication".
[0059] The communication method between the front end and the IoT server is two-way communication, which is based on the MQTT protocol and the WebSocket protocol for data interaction.
[0060] Step S300: Data conversion: The data transmitted between the IoT device and the front end is converted into a protocol through the IoT server.
[0061] This embodiment uses front-end visualized online IoT device debugging. The front-end simulates the IoT cloud service in this process, and the IoT service plays the role of IoT device agent and performs joint debugging with the front-end. The front-end can be a system client application or a web-side program. In order to achieve a unified front-end processing method, this solution recommends using websocket or mqtt to communicate between the front-end and the cloud service, which can greatly reduce the threshold for front-end docking and facilitate the implementation of front-end business.
[0062] In order to achieve the above goals, it is necessary to implement the conversion of multiple IoT protocols and MQTT (or WebSocket) protocols and data conversion processing on the server side. Below, the implementation method of this section is explained. Note that the implementation method explained in this summary is a general implementation method. The expansion or detail changes based on this method are all within the scope of the present invention.
[0063] The IoT server divides business interactions into multiple topics according to various IoT protocols for business interactions between IoT service front ends. The definition of the topic TOPIC is shown in Table 1.
[0064] Table 1:
[0065]
[0066] In this embodiment, the IoT server implements data conversion between the IoT device and the front end based on the topic, including the following operations:
[0067] (1) For the data uploaded by the IoT device, the IoT server converts the data into a format supported by the front-end, divides the converted data into the topic TOPIC_REPORT, and sends the topic TOPIC_REPORT to the front-end. After receiving the data, the front-end returns TOPIC_REPLY to the IoT server as a response. If the front-end cannot effectively process the data after receiving it, it returns TOPIC_ERROR to the IoT server as a response. If the IoT server does not receive a response from the front-end within the specified time, it is considered that the front-end has not received the data, and the IoT server resends the data to the front-end;
[0068] (2) For the instructions sent by the front end, the IoT server converts the instructions into a format supported by the IoT device, divides the converted instructions into the topic TOPIC_REPLY, and sends the topic TOPIC_REPLY to the IoT device. If the IoT device cannot effectively process the data after receiving the response, it returns TOPIC_ERROR to the IoT server as a response.
[0069] Based on the characteristics of IoT protocol communication, the front-end online debugging supports MQTT protocol and Websocket protocol, which are mainly divided into two debugging modes: downlink communication and uplink communication. Its main interface is shown as follows Figure 2 As shown, the interface can select uplink communication debugging to actively obtain device data according to debugging requirements, or select downlink debugging to set device properties. It supports custom debugging device properties. The network data generated during the debugging process can be viewed on the right.
[0070] The method of this embodiment supports online device debugging of multiple IoT protocols, including the common MQTT protocol and HTTP protocol, as well as the COAP protocol, LoRaWAN protocol, NB-IoT protocol, etc. Through the device access function, IoT devices of the above protocols can be dynamically connected to the system for management, which is used for subsequent device debugging operations and device status management, and also provides a basis for device protocol conversion and device data conversion.
[0071] The IoT protocol conversion supports the conversion between various IoT protocols and long connection protocols supported by web technology (such as websocket and mqtt protocols). Its main purpose is to provide technical support for the visual data flow on the web side, so as to facilitate the visual debugging operation on the web side; the data conversion function and the protocol conversion function are implemented simultaneously, and the format of the data reported by the device (or the data sent to the IoT device) is converted with the data supported by the web long connection technology.
[0072] The method of this embodiment supports visual device debugging operations, which are displayed to operators in the form of web pages, thus simplifying the complexity of device debugging.
[0073] Embodiment 2:
[0074] The present invention discloses a system supporting online debugging of multi-protocol Internet of Things devices, comprising a front end, an Internet of Things service end and Internet of Things devices.
[0075] The IoT device is connected to the IoT server and exchanges data with the front end through the IoT server. In this embodiment, the IoT device to be debugged is connected to the IoT server, wherein the connected IoT device supports multiple IoT protocols.
[0076] The front end is used to provide a visual interface, which supports users to select IoT devices to be debugged and manages the communication method between IoT devices and IoT servers.
[0077] In this embodiment, the communication mode between the IoT device and the IoT server includes two-way communication and one-way communication, wherein the two-way communication mode includes data interaction based on the MQTT protocol and the WebSocket protocol, and the one-way communication mode includes data interaction based on the HTTP protocol and the TCP protocol.
[0078] As a specific implementation of two-way communication, IoT devices and IoT servers communicate data based on the MQTT protocol. The MQTT protocol is a lightweight, simple, open client-server based message publishing / subscription transmission protocol, and is a typical representative of IoT protocols that support two-way communication functions. When IoT devices and IoT servers communicate data based on the MQTT protocol, after the IoT devices and IoT servers establish a connection through the MQTT protocol, the validity of the connection is maintained through heartbeats. The IoT devices actively report their collected data and device status to the IoT server, and the IoT server sends instructions to the IoT devices.
[0079] As a specific implementation of one-way communication, the IoT device and the IoT server exchange data based on the HTTP protocol. The HTTP protocol is a simple request-response protocol based on TCP. Because it is a one-way communication implementation, when implementing communication between IoT devices and cloud services, it is necessary to expand the communication data structure to achieve a "delayed" two-way communication. The steps are as follows:
[0080] (1) After the IoT device is started, it sends registration information to the IoT server based on HTTP network request to register the device and report the device status and data;
[0081] (2) After receiving the HTTP network request from the IoT device, the IoT server registers the registration information of the IoT device and saves the device status and data reported by the IoT device;
[0082] (3) If the IoT server sends instructions or data to the IoT device, the IoT server returns the sent instructions or data to the IoT device as a request response through the current HTTP network request of the IoT device;
[0083] (4) After the IoT device receives the request response, if the response to this request contains instructions or data sent by the server, the IoT device will process the instructions and data sent after completing the business processing of this HTTP network request, and report the processed results to the IoT server through a new round of HTTP requests.
[0084] The above HTTP implementation process will cache the instructions or data that need to be sent to the device on the server side. After the device actively initiates a network request, the cached instructions or data to be sent will be used as the response data of the network request to inform the IoT device, thereby achieving the illusion of "two-way communication".
[0085] The communication method between the front end and the IoT server is two-way communication, which is based on the MQTT protocol and the WebSocket protocol for data interaction.
[0086] The IoT server is used to perform protocol conversion on data transmitted between IoT devices and the front end.
[0087] This embodiment uses front-end visualized online IoT device debugging. The front-end simulates the IoT cloud service in this process, and the IoT service plays the role of IoT device agent and performs joint debugging with the front-end. The front-end can be a system client application or a web-side program. In order to achieve a unified front-end processing method, this solution recommends using websocket or mqtt to communicate between the front-end and the cloud service, which can greatly reduce the threshold for front-end docking and facilitate the implementation of front-end business.
[0088] In order to achieve the above goals, it is necessary to implement the conversion of multiple IoT protocols and MQTT (or WebSocket) protocols and data conversion processing on the server side. Below, the implementation method of this section is explained. Note that the implementation method explained in this summary is a general implementation method. The expansion or detail changes based on this method are all within the scope of the present invention.
[0089] The IoT server divides business interactions into multiple topics according to various IoT protocols for business interactions between IoT service front ends.
[0090] In this embodiment, the IoT server implements data conversion between the IoT device and the front end based on the topic, including the following operations:
[0091] (1) For the data uploaded by the IoT device, the IoT server converts the data into a format supported by the front-end, divides the converted data into the topic TOPIC_REPORT, and sends the topic TOPIC_REPORT to the front-end. After receiving the data, the front-end returns TOPIC_REPLY to the IoT server as a response. If the front-end cannot effectively process the data after receiving it, it returns TOPIC_ERROR to the IoT server as a response. If the IoT server does not receive a response from the front-end within the specified time, it is considered that the front-end has not received the data, and the IoT server resends the data to the front-end;
[0092] (2) For the instructions sent by the front end, the IoT server converts the instructions into a format supported by the IoT device, divides the converted instructions into the topic TOPIC_REPLY, and sends the topic TOPIC_REPLY to the IoT device. If the IoT device cannot effectively process the data after receiving the response, it returns TOPIC_ERROR to the IoT server as a response.
[0093] Based on the characteristics of IoT protocol communication, front-end online debugging supports MQTT protocol and Websocket protocol, which are mainly divided into two debugging modes: downlink communication and uplink communication.
[0094] The system of this embodiment can execute the method disclosed in Example 1 to realize online debugging of multi-protocol Internet of Things devices.
[0095] The present invention has been shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the means in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the protection scope of the present invention.
Claims
1. A method for supporting online debugging of multi-protocol Internet of Things devices, characterized in that: Applied between the front end, IoT server and IoT devices, including the following steps: The IoT device is connected to the IoT server and exchanges data with the front end through the IoT server; Select the IoT device to be debugged through the visual interface provided by the front end, and manage the communication method between the IoT device and the IoT server; The IoT server performs protocol conversion on the data transmitted between the IoT device and the front end.
2. The method for supporting online debugging of multi-protocol Internet of Things devices according to claim 1, characterized in that: The communication methods between IoT devices and IoT servers include two-way communication and one-way communication. The two-way communication method includes data interaction based on MQTT protocol and WebSocket protocol, and the one-way communication method includes data interaction based on HTTP protocol and TCP protocol. The communication method between the front end and the IoT server is two-way communication, which is based on the MQTT protocol and the WebSocket protocol for data interaction.
3. The method for supporting online debugging of multi-protocol Internet of Things devices according to claim 1 or 2, characterized in that: When data communication is carried out between IoT devices and IoT servers based on the MQTT protocol, after the IoT devices and IoT servers establish a connection through the MQTT protocol, the validity of the connection is maintained through heartbeats. The IoT devices actively report their collected data and device status to the IoT servers, and the IoT servers send instructions to the IoT devices. When the IoT device and the IoT server exchange data based on the HTTP protocol, the following steps are included: After the IoT device is started, it sends registration information to the IoT server based on HTTP network request to register the device and report the device status and data; After receiving the HTTP network request from the IoT device, the IoT server registers the registration information of the IoT device and saves the device status and data reported by the IoT device; If the IoT server sends instructions or data to the IoT device, the IoT device will send the instructions or data as a request response to the IoT device through the current HTTP network request of the IoT device. After the IoT device receives the request response, if the response to this request contains instructions or data sent by the server, the IoT device will process the instructions and data sent after completing the business processing of this HTTP network request, and report the processed results to the IoT server through a new round of HTTP requests.
4. The method for supporting online debugging of multi-protocol Internet of Things devices according to claim 1, characterized in that: The IoT server divides business interactions into multiple topics according to various IoT protocols for business interactions between IoT service front-ends. The IoT server implements data conversion between IoT devices and front-ends based on topics, including the following operations: For the data uploaded by the IoT device, the IoT server converts the data into a format supported by the front-end, divides the converted data into the topic TOPIC_REPORT, and sends the topic TOPIC_REPORT to the front-end. After receiving the data, the front-end returns TOPIC_REPLY to the IoT server as a response. If the front-end cannot effectively process the data after receiving it, it returns TOPIC_ERROR to the IoT server as a response. If the IoT server does not receive a response from the front-end within the specified time, it is considered that the front-end has not received the data, and the IoT server resends the data to the front-end; For the instructions sent by the front end, the IoT server converts the instructions into a format supported by the IoT device, divides the converted instructions into the topic TOPIC_REPLY, and sends the topic TOPIC_REPLY to the IoT device. If the IoT device cannot effectively process the data after receiving the response, it returns TOPIC_ERROR to the IoT server as a response.
5. A system supporting online debugging of multi-protocol IoT devices, characterized in that: It includes a front end, an Internet of Things server and an Internet of Things device, and is used to implement online debugging of the Internet of Things device by a method for supporting online debugging of multi-protocol Internet of Things devices as described in any one of claims 1 to 4; The IoT device is connected to the IoT server and exchanges data with the front end through the IoT server; The front end is used to provide a visual interface, which supports users to select IoT devices to be debugged and manage the communication method between IoT devices and IoT servers; The IoT server is used to perform protocol conversion on data transmitted between IoT devices and the front end.
6. The method for supporting online debugging of multi-protocol Internet of Things devices according to claim 5, characterized in that: The communication methods between IoT devices and IoT servers include two-way communication and one-way communication. The two-way communication method includes data interaction based on MQTT protocol and WebSocket protocol, and the one-way communication method includes data interaction based on HTTP protocol and TCP protocol. The communication method between the front end and the IoT server is two-way communication, which is based on the MQTT protocol and the WebSocket protocol for data interaction.
7. The system for supporting online debugging of multi-protocol IoT devices according to claim 5 or 6, characterized in that: When data communication is carried out between IoT devices and IoT servers based on the MQTT protocol, after the IoT devices and IoT servers establish a connection through the MQTT protocol, the validity of the connection is maintained through heartbeats. The IoT devices actively report their collected data and device status to the IoT servers, and the IoT servers send instructions to the IoT devices. When the IoT device and the IoT server exchange data based on the HTTP protocol, the following steps are included: After the IoT device is started, it sends registration information to the IoT server based on HTTP network request to register the device and report the device status and data; After receiving the HTTP network request from the IoT device, the IoT server registers the registration information of the IoT device and saves the device status and data reported by the IoT device; If the IoT server sends instructions or data to the IoT device, the IoT device will send the instructions or data as a request response to the IoT device through the current HTTP network request of the IoT device. After the IoT device receives the request response, if the response to this request contains instructions or data sent by the server, the IoT device will process the instructions and data sent after completing the business processing of this HTTP network request, and report the processed results to the IoT server through a new round of HTTP requests.
8. The system for supporting online debugging of multi-protocol IoT devices according to claim 5, characterized in that: The IoT server divides business interactions into multiple topics according to various IoT protocols for business interactions between IoT service front-ends. The IoT server implements data conversion between IoT devices and front-ends based on topics, including the following operations: For the data uploaded by the IoT device, the IoT server converts the data into a format supported by the front-end, divides the converted data into the topic TOPIC_REPORT, and sends the topic TOPIC_REPORT to the front-end. After receiving the data, the front-end returns TOPIC_REPLY to the IoT server as a response. If the front-end cannot effectively process the data after receiving it, it returns TOPIC_ERROR to the IoT server as a response. If the IoT server does not receive a response from the front-end within the specified time, it is considered that the front-end has not received the data, and the IoT server resends the data to the front-end; For the instructions sent by the front end, the IoT server converts the instructions into a format supported by the IoT device, divides the converted instructions into the topic TOPIC_REPLY, and sends the topic TOPIC_REPLY to the IoT device. If the IoT device cannot effectively process the data after receiving the response, it returns TOPIC_ERROR to the IoT server as a response.
Citation Information
Patent Citations
Session management method, AF (application function) entity, policy server and PC (protocol converter)
CN104348826A
HTTP (Hyper Text Transfer Protocol) asynchronous request method and device, server, terminal and memory medium
CN108055311A
Information interaction method based on Internet of Things multi-protocol adaptation
CN117478765A
Internet of Things equipment communication protocol visual docking configuration method
CN118055172A