A remote upgrade method based on multi-layer grading of the Internet of Things

Through the multi-layer and hierarchical remote upgrade method of the Internet of Things, specific upgrade methods are adopted for devices at different levels, which solves the problems of long upgrade time and low success rate in existing technologies and realizes efficient upgrade of devices in complex environments.

CN115883360BActive Publication Date: 2025-09-16SUZHOU HELIO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211489045.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-25
Publication Date
2025-09-16
Estimated Expiration
2042-11-25

AI Technical Summary

Technical Problem

In existing IoT systems, the unified OTA management method of the cloud service platform results in long device upgrade times and low success rates, and affects the normal operation of other terminal nodes under the same route. This is especially difficult to apply when there are a large number of devices and a complex environment.

Method used

A remote upgrade method based on the multi-layer hierarchy of the Internet of Things is adopted. Different upgrade methods are adopted for devices at the perception layer, network layer, and application layer. Firmware is transmitted through FTP tools, script files, gateway configuration tools, and a response retransmission mechanism. The upgrade is performed by utilizing the legitimacy verification of the gateway core module and wireless module and dual wireless communication links.

Benefits of technology

It improves the success rate and efficiency of remote device upgrades, reduces the impact on other device services, and is suitable for multi-device upgrades in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115883360B_ABST
    Figure CN115883360B_ABST
Patent Text Reader

Abstract

The present invention discloses a remote upgrade method based on multi-layer grading of the Internet of Things, comprising: sending a core module upgrade file to a first designated directory by using an FTP tool; performing legitimacy verification on the core module upgrade file by using a script file and moving the file to an execution file directory, thereby realizing gateway core module upgrade; sending a gateway wireless module upgrade file to a second designated directory by using a gateway configuration tool; performing legitimacy verification on the gateway wireless module upgrade file by using the gateway core module and sending the file to the gateway wireless module in a digital stream manner, thereby realizing gateway wireless module upgrade; if the upgrade instruction is a coordinator upgrade instruction, unpacking the coordinator upgrade firmware and sending it to a target coordinator, and realizing firmware transmission by using a response and retransmission mechanism; if the upgrade instruction is a terminal node upgrade instruction, performing normal business data communication via a primary communication link, and transmitting terminal node firmware via a secondary communication link.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a remote upgrade method based on multi-layer grading of the Internet of Things. Background Art

[0002] With the development of the Internet of Things (IoT), IoT networks are no longer simply about connecting things to one another; rather, they are leveraging the IoT to form a unique system or ecosystem. The IoT network architecture consists of the perception layer, the network layer, and the application layer. The perception layer implements intelligent perception and recognition of the physical world, information collection, processing, and automatic control, and connects physical entities to the network and application layers through communication modules. The network layer primarily implements information transmission, routing, and control, and includes extension networks, access networks, and core networks. The application layer encompasses application infrastructure and various IoT applications. In today's IoT development, over-the-air (OTA) technology has become an indispensable feature and is particularly crucial in practical IoT project systems.

[0003] Currently, most OTA (Over-the-Air) updates for IoT devices are centrally managed by cloud service platforms, where all versions of different devices are stored. To upgrade a specific end-node device, the user uses the platform's interface to issue a firmware upgrade instruction for the device in question. The platform then unpacks the firmware and distributes it to the device in question via a data link, traversing the gateway, router, and device node. The platform and end-node devices aren't directly connected; communication requires multi-layered forwarding of service data links. This upgrade approach is extremely unstable, especially in wireless IoT systems, where device upgrades take a long time and have a low success rate. Furthermore, the device upgrade process can impact the normal operations of other end-nodes on the same router, such as delayed data responses and no response to queries. While this approach is feasible for relatively simple IoT systems with a small number of devices, it is unsuitable for complex connections, a large number of devices, and particularly when multiple relay bridges are required. The upgrade data packets occupy regular service data channels, disrupting the normal operation of other devices. Upgrading multiple devices is particularly challenging. Summary of the Invention

[0004] In view of this, an embodiment of the present invention provides a remote upgrade method based on multi-layer grading of the Internet of Things to solve the problems in the existing technology of the OTA method for unified management of the Internet of Things system for multiple devices using a cloud service platform, which has long upgrade time, low success rate, and affects the normal work and business of other terminal nodes under the same route.

[0005] The embodiment of the present invention provides a remote upgrade method based on multi-layer grading of the Internet of Things, including:

[0006] Determine the type of upgrade instructions generated by the IoT platform;

[0007] If the upgrade instruction is a gateway core module upgrade instruction, the core module upgrade file is sent to the first designated directory through the FTP tool;

[0008] The script file verifies the legitimacy of the core module upgrade file and moves it to the execution file directory to implement the gateway core module upgrade;

[0009] If the upgrade instruction is a gateway wireless module upgrade instruction, the gateway configuration tool sends the gateway wireless module upgrade file to the second designated directory;

[0010] The gateway core module verifies the legitimacy of the gateway wireless module upgrade file and sends it to the gateway wireless module in the form of a digital stream to implement the gateway wireless module upgrade;

[0011] If the upgrade instruction is a coordinator upgrade instruction, the coordinator upgrade firmware is unpacked and sent to the target coordinator, and the firmware transmission is realized by using the response and retransmission mechanism;

[0012] If the upgrade instruction is a terminal node upgrade instruction, normal business data communication is performed through the primary communication link, and terminal node firmware transmission is performed through the secondary communication link.

[0013] Optionally, the gateway core module and the gateway wireless module are communicatively connected via an SPI bus or a UART.

[0014] Optionally, the gateway wireless module implements gateway wireless module upgrade through a boot loader.

[0015] Optionally, it also includes:

[0016] Determine whether the wireless module upgrade file exists and is valid;

[0017] Initialize or restore upgrade parameters; upgrade parameters include total file size and file transfer size;

[0018] Determine whether the wireless module upgrade file has been sent;

[0019] If the transmission is successful, the upgrade progress will be fed back to the IoT platform;

[0020] If the sending fails, clear the upgrade file and the identification bit, restart the gateway wireless module, and exit the gateway wireless module upgrade process;

[0021] If the status of the wireless module upgrade file is non-existent or invalid, the gateway wireless module upgrade process will be exited.

[0022] Optionally, it also includes:

[0023] The coordinator upgrade firmware is stored in the dedicated storage space of the upper gateway corresponding to the coordinator;

[0024] The gateway unpacks and sends the firmware according to the serial number of the device to be upgraded and the type and version number of the coordinator upgrade firmware in the coordinator upgrade instruction, and interacts with the upgrade data of the target coordinator.

[0025] Optionally, it also includes:

[0026] Segment the binary file to be updated into several data packets;

[0027] The data packet header, current data packet ID, total number of data packets, data packet length, first data packet and CRC check code are combined into a data frame and sent to the serial port receiving module;

[0028] The serial port receiving module performs CRC check and replies to the serial port sending module whether the data frame is correct or wrong;

[0029] If the data frame is correct, the serial port receiving module stores the first data packet into the flash, and the serial port sending module sends the second data packet until the last data packet, and then powers on and restarts to jump to the new program address space;

[0030] If the data frame is wrong, it is determined that the upgrade has failed, and the upgrade main process of the serial port sending module and the serial port receiving module is stopped.

[0031] Optionally, the coordinator is configured to be in a dual wireless communication mode by adding a wireless radio frequency module or a SOC chip with a wireless radio frequency function.

[0032] Optionally, it also includes:

[0033] When the terminal device receives the upgrade task, it stops reporting and receiving business-related data and switches from the primary communication link of the current coordinator to the secondary communication link of the current coordinator;

[0034] The current coordinator unpacks and distributes the terminal node firmware package stored in itself, and uses the data stream response and retransmission mechanism to upgrade the terminal device.

[0035] Beneficial effects of the embodiments of the present invention:

[0036] An embodiment of the present invention provides a remote upgrade method based on multi-layer grading of the Internet of Things. All versions of firmware for all devices in the Internet of Things system are centrally managed by a cloud server. Different upgrade methods are adopted for the three levels of the Internet of Things. In industrial Internet of Things project systems with numerous devices and complex environments, the multi-layer OTA method can effectively solve the problems of low success rate and long time required for remote device upgrades. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The features and advantages of the present invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present invention in any way. In the accompanying drawings:

[0038] Figure 1 A schematic diagram of a coordinator upgrade process in a remote upgrade method based on multi-layer grading of the Internet of Things according to an embodiment of the present invention is shown;

[0039] Figure 2 A schematic diagram of a terminal node upgrade process in a remote upgrade method based on multi-layer grading of the Internet of Things according to an embodiment of the present invention is shown;

[0040] Figure 3 A schematic diagram of a gateway wireless module upgrade process in a remote upgrade method based on multi-layer grading of the Internet of Things in an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0041] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.

[0042] The embodiment of the present invention provides a remote upgrade method based on multi-layer grading of the Internet of Things, such as Figures 1 to 3 Shown, including:

[0043] Determine the type of upgrade instruction generated by the IoT platform.

[0044] If the upgrade instruction is a gateway core module upgrade instruction, the core module upgrade file is sent to the first designated directory through the FTP tool.

[0045] The script file verifies the legitimacy of the core module upgrade file and moves it to the execution file directory to implement the gateway core module upgrade.

[0046] The gateway is primarily responsible for parsing and issuing platform commands and analyzing and uploading front-end data. Depending on requirements, the gateway also includes functions such as storage of important data, primary and backup gateway backup, and the definition, storage, and recovery of business logic. Gateways are typically powered by high-performance processors, offering a variety of upgrade options. Most gateways utilize wired network access, resulting in diverse upgrade options, high efficiency, and high stability. The gateway consists of two major modules: the gateway core module and the wireless data communication module. The data communication module is primarily responsible for command and data transmission, typically using a module with wireless communication capabilities for transparent data transmission or a system-on-chip (SoC) chip for customized data packet reception and transmission. The gateway core module is primarily responsible for command and data parsing, as well as business logic processing. It is responsible for implementing all gateway functions. Communication between the gateway core module and the data communication module is typically via the SPI bus or UART.

[0047] In this embodiment, at the gateway level, core module upgrades are implemented using an FTP tool and a script file. The FTP tool sends the core module files to a designated directory. The script verifies the validity of the upgrade files and moves them to the designated executable directory, completing the gateway core module upgrade.

[0048] FTP is implemented using underlying sockets. For data exchange between an FTP client and server, two sockets must be established: one for the command channel and one for the data channel. The former is used by the client to send commands to the server, such as logging in or downloading / deleting a file. The latter is used to receive data, such as downloading or uploading files. These two ports are typically used: the command port and the data port.

[0049] If the upgrade instruction is a gateway wireless module upgrade instruction, the gateway wireless module upgrade file is sent to the second designated directory by the gateway configuration tool.

[0050] The gateway core module verifies the legitimacy of the gateway wireless module upgrade file and sends it to the gateway wireless module in the form of a digital stream to implement the gateway wireless module upgrade.

[0051] In this embodiment, when upgrading the gateway wireless module, the gateway configuration tool sends the upgrade file to a designated directory. The gateway core program verifies the legitimacy of the upgrade bin file and then sends the upgrade file to the wireless module as a digital stream via SPI or UART. The wireless module's bootloader implements the system upgrade.

[0052] If the upgrade instruction is a coordinator upgrade instruction, the coordinator upgrade firmware will be unpacked and sent to the target coordinator, and the response and retransmission mechanism will be used to realize the firmware transmission.

[0053] In this embodiment, considering the cost and actual project application scenarios, such devices are basically composed of a low-performance single-chip microcomputer as the main control plus a wireless radio frequency module or a SOC chip with wireless communication function. Regardless of the composition structure, the firmware upgrade of the device is an upgrade of the main control chip. The firmware of the coordinator layer is stored in the corresponding upper-level gateway. The gateway allocates a dedicated storage space to store the firmware of the next layer, namely the coordinator layer. The gateway manages these firmwares by itself, and users can update these firmwares through the platform.

[0054] If the upgrade instruction is a terminal node upgrade instruction, normal business data communication is performed through the primary communication link, and terminal node firmware transmission is performed through the secondary communication link.

[0055] In this embodiment, the primary and secondary wireless communication links are independent of each other; the software processes the two wireless communication links separately. Due to the increase in data bandwidth, the software can process data more flexibly.

[0056] In this embodiment, all versions of firmware for all devices in the IoT system are centrally managed by the cloud server, and different upgrade methods are adopted for the three levels of the IoT. In industrial IoT project systems with numerous devices and complex environments, the multi-layer hierarchical OTA method can effectively solve the problems of low success rate and long time required for remote device upgrades.

[0057] As an optional implementation, it also includes:

[0058] Determine whether the wireless module upgrade file exists and is valid;

[0059] Initialize or restore upgrade parameters; upgrade parameters include total file size and file transfer size;

[0060] Determine whether the wireless module upgrade file has been sent;

[0061] If the transmission is successful, the upgrade progress will be fed back to the IoT platform;

[0062] If the sending fails, clear the upgrade file and the identification bit, restart the gateway wireless module, and exit the gateway wireless module upgrade process;

[0063] If the status of the wireless module upgrade file is non-existent or invalid, the gateway wireless module upgrade process will be exited.

[0064] As an optional implementation, it also includes:

[0065] The coordinator upgrade firmware is stored in the dedicated storage space of the upper gateway corresponding to the coordinator;

[0066] The gateway unpacks and sends the firmware according to the serial number of the device to be upgraded and the type and version number of the coordinator upgrade firmware in the coordinator upgrade instruction, and interacts with the upgrade data of the target coordinator.

[0067] In this embodiment, when there is a need to upgrade the coordinator-level device, the platform upgrade instructions are sent to the gateway, and the gateway receives the corresponding upgrade information, such as the serial number of the device to be upgraded, the type and version number of the firmware to be issued, etc. The specific unpacking and issuance of the firmware and the upgrade data interaction of the target device are completed by the gateway itself. The response and retransmission mechanism is adopted for the interaction process. The response method is the ack method of communication between devices, which is combined with the retransmission of data packets to ensure the accurate transmission of data packets and the reliability of the upgrade data. The advantage of this method is that it reduces the data interaction of one link, and eliminates the data interaction between the platform and the gateway in the upgrade process of the coordinator, reducing the possibility of errors. At the same time, the shortening of the communication data link also improves the efficiency of remote upgrades and shortens the time required for upgrades. The performance of the gateway itself will not affect the normal business data interaction of other devices, which greatly utilizes the advantages of the good performance of the gateway.

[0068] As an optional implementation, it also includes:

[0069] Segment the binary file to be updated into several data packets;

[0070] The data packet header, current data packet ID, total number of data packets, data packet length, first data packet and CRC check code are combined into a data frame and sent to the serial port receiving module;

[0071] The serial port receiving module performs CRC check and replies to the serial port sending module whether the data frame is correct or wrong;

[0072] If the data frame is correct, the serial port receiving module stores the first data packet into the flash, and the serial port sending module sends the second data packet until the last data packet, and then powers on and restarts to jump to the new program address space;

[0073] If the data frame is wrong, it is determined that the upgrade has failed, and the upgrade main process of the serial port sending module and the serial port receiving module is stopped.

[0074] In this embodiment, the bin file to be updated is segmented, with PACK_LEN bytes as one segment, plus a 7-byte segment header and a 2-byte CRC check at the end, and the data is sent to the RX module. The data frame structure is shown in Table 1.

[0075] Table 1 Data frame structure

[0076]

[0077] The RX side receives the wireless data and verifies the CRC check, and replies to the TX side whether the data frame is correct or incorrect. If it is incorrect, it is considered that the upgrade has failed, and the upgrade main process of the TX and RX modules is stopped; if it is correct, the RX stores the PACK_LEN byte into the flash, and the TX module continues to send the next segment of data.

[0078] RX receives the last piece of data and stores it in the flash. It then powers on and restarts to jump to the new program address space.

[0079] As an optional implementation, the coordinator is configured to be in a dual wireless communication mode by adding a wireless radio frequency module or a SOC chip with a wireless radio frequency function.

[0080] As an optional implementation, it also includes:

[0081] When the terminal device receives the upgrade task, it stops reporting and receiving business-related data and switches from the primary communication link of the current coordinator to the secondary communication link of the current coordinator;

[0082] The current coordinator unpacks and distributes the terminal node firmware package stored in itself, and uses the data stream response and retransmission mechanism to upgrade the terminal device.

[0083] Devices at the coordinator level generally use low-cost single-chip microcomputers as the main control. In a complex IoT networking environment, a coordinator often mounts several terminal node devices. When a terminal node in the lower layer receives an upgrade task, the firmware upgrade package sent by the coordinator to the device occupies a large part of the data interaction bandwidth. In this case, it is bound to affect the normal business data communication of other terminal devices under the coordinator, and will also affect the upgrade of the device.

[0084] In response to the above situation, the coordinator level is modified accordingly: the hardware adopts dual wireless communication. Whether adding a wireless RF module or a SoC chip with wireless RF function, the two wireless communication channels are independent of each other; the software handles the two wireless communication links separately. Due to the increase in data bandwidth, the software can process data more flexibly.

[0085] In this embodiment, the firmware package at the terminal node level is managed by the upper coordinator level.

[0086] In a system with a coordinator network with dual communication links, when there is an upgrade task for a terminal node, one of the coordinator's wireless communication links is used to perform the remote upgrade task for the terminal node device. The platform stores and backs up the terminal node firmware package, and the coordinator receives and stores the terminal node firmware package. A separate wireless communication link channel is used for receiving and sending the firmware package, which will not affect the normal business data flow. The terminal device that receives the upgrade task stops reporting and receiving business-related data and switches to another wireless communication link channel of the corresponding upper-layer coordinator. The coordinator unpacks and distributes the terminal node firmware package stored in itself, and also uses the data stream response and retransmission mechanism to upgrade the target device. This point-to-point direct communication method greatly reduces the instability of wireless communication. Compared with the traditional multi-stage relay transmission method, the stability and efficiency are greatly improved.

[0087] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A remote upgrade method based on multi-layer grading of the Internet of Things, characterized in that: include: Determine the type of upgrade instructions generated by the IoT platform; If the upgrade instruction is a gateway core module upgrade instruction, the core module upgrade file is sent to the first designated directory through the FTP tool; The script file verifies the legitimacy of the core module upgrade file and moves it to the execution file directory to implement the gateway core module upgrade; If the upgrade instruction is a gateway wireless module upgrade instruction, the gateway configuration tool sends the gateway wireless module upgrade file to the second designated directory; The gateway core module verifies the legitimacy of the gateway wireless module upgrade file and sends it to the gateway wireless module in the form of a digital stream to implement the gateway wireless module upgrade; If the upgrade instruction is a coordinator upgrade instruction, the coordinator upgrade firmware is unpacked and sent to the target coordinator, and the firmware transmission is realized by adopting the response and retransmission mechanism; If the upgrade instruction is a terminal node upgrade instruction, normal business data communication is performed through the primary communication link, and terminal node firmware transmission is performed through the secondary communication link.

2. The remote upgrade method based on multi-layered Internet of Things according to claim 1 is characterized in that: The gateway core module and the gateway wireless module are communicatively connected via an SPI bus or a UART.

3. The remote upgrade method based on multi-layered Internet of Things according to claim 1 is characterized in that: The gateway wireless module is upgraded by booting a loader.

4. The remote upgrade method based on multi-layered Internet of Things according to claim 3 is characterized in that: Also includes: Determining whether the wireless module upgrade file exists and is valid; Initialize or restore upgrade parameters; The upgrade parameters include the total file size and the file transfer size; Determine whether the wireless module upgrade file has been sent; If the transmission is successful, the upgrade progress will be fed back to the IoT platform; If the sending is unsuccessful, the upgrade file and the identification bit are cleared, the gateway wireless module is restarted, and the gateway wireless module upgrade process is exited; If the status of the wireless module upgrade file is non-existent or invalid, then exit the gateway wireless module upgrade process.

5. The remote upgrade method based on multi-layered Internet of Things according to claim 1 is characterized in that: Also includes: Storing the coordinator upgrade firmware in a dedicated storage space of the upper gateway corresponding to the coordinator; The gateway executes firmware unpacking and delivery and exchanges upgrade data with the target coordinator according to the serial number of the device to be upgraded and the type and version number of the coordinator upgrade firmware in the coordinator upgrade instruction.

6. The remote upgrade method based on multi-layered Internet of Things according to claim 5, characterized in that: Also includes: Segment the binary file to be updated into several data packets; The data packet header, current data packet ID, total number of data packets, data packet length, first data packet and CRC check code are combined into a data frame and sent to the serial port receiving module; The serial port receiving module performs CRC check and replies to the serial port sending module whether the data frame is correct or the data frame is wrong; If the data frame is correct, the serial port receiving module stores the first data packet into the flash, and the serial port sending module sends the second data packet until the last data packet, and then powers on and restarts to jump to the new program address space; If the data frame is wrong, it is determined that the upgrade has failed, and the upgrade main process of the serial port sending module and the serial port receiving module is stopped.

7. The remote upgrade method based on multi-layered Internet of Things according to claim 1, characterized in that: By adding a wireless radio frequency module or a SOC chip with wireless radio frequency function, the coordinator is configured to dual wireless communication mode.

8. The remote upgrade method based on multi-layered Internet of Things according to claim 7 is characterized in that: Also includes: When the terminal device receives the upgrade task, it stops reporting and receiving data related to the service, and switches from the primary communication link of the current coordinator to the secondary communication link of the current coordinator; Currently, the coordinator unpacks and distributes the terminal node firmware package stored in itself, and adopts the response and retransmission mechanism of the data stream to upgrade the terminal device.

Citation Information

Patent Citations

  • Multi-cascade OTA upgrading device and method for industrial equipment

    CN113360173A

  • Upgrading method of Internet of Things terminal equipment and related equipment

    CN114362981A