Method and system for remotely upgrading upper computer of terminal equipment of Internet of Things system
Through the collaborative work of the IoT platform, gateway, central coordinator and communication module, secure and synchronous upgrades of the terminal device's host computer are achieved, solving the problems of high upgrade difficulty, low success rate and insufficient efficiency in existing technologies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU JIXIANG TECH CO LTD
- Filing Date
- 2024-11-19
- Publication Date
- 2026-05-19
AI Technical Summary
In existing technologies, remote upgrades of terminal devices in IoT systems suffer from problems such as high upgrade difficulty, low success rate, weak transmission security, and insufficient efficiency.
The upgrade file is sent to the gateway via the IoT platform. The gateway then sends the upgrade file to the host computer of the terminal device through the central coordinator and communication module. The file transmission security is ensured by using authorized download requests and authorized matching information. After receiving the file, the terminal device is notified to perform the upgrade.
It reduces the technical difficulty of upgrading terminal devices via the host computer, improves the success rate of upgrades and the security of file transfer, simplifies the upgrade process, avoids firmware version confusion, and improves device upgrade efficiency.
Smart Images

Figure CN122069043A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of equipment upgrades, and in particular to a method and system for remotely upgrading terminal equipment in an Internet of Things (IoT) system. Background Technology
[0002] With the continuous development of smart grids, the importance of power grid data acquisition terminals is becoming increasingly prominent. The ever-evolving smart grid technology system requires a massive number of terminal devices in the power grid to continuously and promptly update their firmware as the technology advances. Firmware upgrades for the host computers of these terminal devices often utilize FOTA (Firmware Over-The-Air) technology.
[0003] However, during remote device upgrades using FOTA (Firmware Over-The-Air) technology, the terminal device's host computer often needs to request and obtain upgrade files from the IoT (Internet of Things) platform. During this process, technicians must consider not only the technical difficulties arising from the differences between various terminal device host computers, but also the fact that some terminal device host computers may have complex functional designs or inadequate exception handling, which could easily lead to upgrade failures when obtaining upgrade files from the IoT platform. Furthermore, data security during file transfer must be ensured. Moreover, the asynchronous device upgrades performed by different terminal device host computers can easily lead to firmware version conflicts or incompatibility issues.
[0004] Therefore, the existing technology has significant limitations in the remote firmware upgrade of terminal devices in IoT systems, including high difficulty in remote device upgrades, low success rate of device upgrades, weak security of upgrade file transfer, and insufficient upgrade efficiency. Summary of the Invention
[0005] Based on this, the purpose of the present invention is to provide a method and system for remotely upgrading the host computer of a terminal device in an Internet of Things (IoT) system, which reduces the difficulty of upgrading, improves the success rate of device upgrades, ensures the security of upgrade file transmission, and improves the efficiency of device upgrades by the host computer of the terminal device.
[0006] According to a first aspect of the embodiments of this application, a method for remotely upgrading a terminal device host computer in an Internet of Things (IoT) system is provided. The IoT system includes an IoT platform, a gateway communicatively connected to the IoT platform, at least one central coordinator connected to the gateway, at least one communication module wirelessly connected to the central coordinator, and a terminal device host computer connected to the communication module. The upgrade method includes the following steps: the IoT platform obtains an upgrade file and file self-description information from the terminal device host computer, and sends the upgrade file and file self-description information to the gateway; the gateway, based on the upgrade file and file self-description information, sends a terminal upgrade file authorization download request to the terminal device host computer through the central coordinator and the communication module, wherein the terminal upgrade file authorization download request includes specifying the terminal device host computer to be upgraded. The device upgrade information is provided; the communication module, based on the host computer download authorization information, sends authorization matching information to the gateway through the central coordinator, wherein the host computer download authorization information is the download authorization information fed back to the communication module by the corresponding terminal device host computer based on the terminal upgrade file authorization download request; the gateway, based on the authorization matching information, sends the terminal device host computer upgrade file to the communication module via the central coordinator; the communication module receives the terminal device host computer upgrade file and caches it locally, and sends an upgrade file retrieval notification to the corresponding terminal device host computer; after receiving the upgrade file retrieval notification, the corresponding terminal device host computer obtains the terminal device host computer upgrade file cached locally by the communication module; the corresponding terminal device host computer responds to the host computer upgrade command and performs the device upgrade of the terminal device host computer.
[0007] According to a second aspect of the embodiments of this application, a remote upgrade system for the host computer of a terminal device in an Internet of Things (IoT) system is provided, wherein the remote upgrade system for the host computer of a terminal device in an IoT system is used to execute the remote upgrade method for the host computer of a terminal device in an IoT system described above.
[0008] Compared to existing technologies, the method described in this invention, firstly, involves the IoT platform sending the terminal device's host computer upgrade file to the gateway. Then, the gateway, through a central coordinator and a communication module, sends the terminal device's host computer upgrade file to the corresponding terminal device's host computer. This allows the download of each terminal device's host computer upgrade file to be extracted into a single file download, eliminating the need for each terminal device's host computer to request its own upgrade file from the IoT platform, effectively reducing the technical difficulty of upgrading each terminal device's host computer. Secondly, before transmitting the terminal device's host computer upgrade file to the communication module, the gateway sends a terminal upgrade file authorization download request to the terminal device's host computer through the central coordinator and the communication module. Simultaneously, the communication module, based on the authorized download request... The download request and the download authorization information returned by the terminal device's host computer are sent to the gateway via the central coordinator. The gateway only performs the actual file transfer upon receiving the authorization matching information, thus preventing unauthorized upgrade files from being tampered with and improving data security and device upgrade success rate during file transfer. Finally, after receiving and caching the upgrade file from the terminal device's host computer, the communication module notifies the corresponding terminal device's host computer to extract the file. The terminal device's host computer only executes the device upgrade after receiving the extraction notification, successfully extracting the file, and obtaining the terminal device's host computer upgrade command. This allows different terminal device's host computers to perform device upgrades synchronously, simplifying the device upgrade process, avoiding firmware version confusion or incompatibility, and improving device upgrade efficiency. Therefore, the method described in this invention solves the technical problems of high difficulty in remote device upgrades by the terminal device's host computer, low device upgrade success rate, weak security of upgrade file transfer, and insufficient device upgrade efficiency in the prior art.
[0009] To better understand and implement this invention, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description
[0010] Figure 1 A schematic diagram of the Internet of Things system provided by the present invention;
[0011] Figure 2 A flowchart of a method for remotely upgrading a terminal device in an Internet of Things (IoT) system provided by the present invention;
[0012] Figure 3 A flowchart illustrating the specific steps of sending a terminal upgrade file authorization download request to the host computer of the terminal device in the remote upgrade method for the terminal device of the Internet of Things system provided by the present invention.
[0013] Figure 4A flowchart detailing the steps of sending authorization matching information to the gateway in the method for remote upgrading of terminal devices in an Internet of Things system provided by the present invention.
[0014] Figure 5 A flowchart detailing the steps involved in creating the terminal device host computer upgrade file for the remote upgrade method of the terminal device host computer in the Internet of Things system provided by the present invention.
[0015] Figure 6 A flowchart outlining the steps involved in compressing the terminal device's host computer upgrade file in the remote upgrade method for the terminal device in the Internet of Things system provided by this invention. Detailed Implementation
[0016] This invention provides a method and system for remotely upgrading the host computer of a terminal device in an Internet of Things (IoT) system. To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the invention.
[0017] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0018] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0019] The invention will be further explained below with reference to the accompanying drawings and the description of the embodiments.
[0020] Example 1
[0021] Please refer to the following at the same time Figure 1 and Figure 2 The IoT system of this application embodiment includes an IoT platform 11, a gateway 12 communicatively connected to the IoT platform, at least one central coordinator 13 connected to the gateway, at least one communication module 14 wirelessly connected to the central coordinator, and a terminal device host computer 15 connected to the communication module. The remote upgrade method of the terminal device host computer of the IoT system provided in this application embodiment includes the following steps:
[0022] S10. The IoT platform obtains the terminal device's host computer upgrade file and file self-description information, and sends the terminal device's host computer upgrade file and file self-description information to the gateway.
[0023] S20. Based on the upgrade file and file self-description information of the terminal device's host computer, the gateway sends a terminal upgrade file authorization download request to the terminal device's host computer through the central coordinator and the communication module.
[0024] S30. The communication module downloads authorization information from the host computer and sends authorization matching information to the gateway through the central coordinator.
[0025] S40. Based on the authorization matching information, the gateway sends the terminal device's host computer upgrade file to the communication module via the central coordinator;
[0026] S50. The communication module receives the upgrade file from the host computer of the terminal device and caches it locally, and sends an upgrade file retrieval notification to the corresponding host computer of the terminal device.
[0027] S60. After receiving the upgrade file extraction notification, the corresponding terminal device host computer obtains the upgrade file of the terminal device host computer cached locally by the communication module.
[0028] S70, the corresponding terminal device host computer responds to the host computer upgrade command and performs device upgrade of the terminal device host computer.
[0029] Compared to existing technologies, the method described in this invention, firstly, involves the IoT platform sending the terminal device's host computer upgrade file and file self-description information to the gateway. Then, the gateway, through a central coordinator and communication module, sends the terminal device's host computer upgrade file to the corresponding terminal device's host computer. This allows the download of each terminal device's host computer upgrade file to be extracted into a single file download, eliminating the need for each terminal device's host computer to request its own upgrade file from the IoT platform, effectively reducing the technical difficulty of upgrading each terminal device's host computer. Secondly, before transmitting the terminal device's host computer upgrade file to the communication module, the gateway sends a terminal upgrade file authorization download request to the terminal device's host computer through the central coordinator and the communication module. Simultaneously, the communication module, based on the... The authorized download request and the download authorization information returned by the terminal device's host computer are sent to the gateway via the central coordinator. The gateway will only perform the actual file transfer upon receiving the authorization matching information, thus preventing the tampering and infiltration of unauthorized upgrade files and improving data security and device upgrade success rate during file transfer. Finally, after receiving and caching the upgrade file from the terminal device's host computer, the communication module notifies the corresponding terminal device's host computer to extract the file. The terminal device's host computer will only execute the device upgrade after receiving the extraction notification, successfully extracting the file, and obtaining the terminal device's host computer upgrade command. This allows different terminal device's host computers to perform device upgrades synchronously, simplifying the device upgrade process, avoiding firmware version confusion or incompatibility, and improving device upgrade efficiency. Therefore, the method described in this invention solves the technical problems of high difficulty in remote device upgrades by the terminal device's host computer, low device upgrade success rate, weak security of upgrade file transfer, and insufficient device upgrade efficiency in the prior art.
[0030] For step S10, the IoT platform obtains the terminal device's host computer upgrade file and file self-description information, and sends the terminal device's host computer upgrade file and file self-description information to the gateway.
[0031] In one embodiment, step S10 specifically includes the following steps:
[0032] S101. The IoT platform obtains the terminal device's host computer upgrade file and file self-description information, and creates a terminal device host computer upgrade task based on the terminal device's host computer upgrade file and file self-description information.
[0033] The terminal device host computer upgrade file refers to an upgrade file used to upgrade the version of the terminal device host computer. The file self-description information includes, but is not limited to, the upgrade package version number, upgrade package file name, upgrade package file size, upgrade device type, upgrade package signature information (including but not limited to signature name, signature algorithm, signature hash value and signature key identifier), device manufacturer name, device product model, device access protocol type, upgrade package output time, upgrade package custom description information and upgrade file checksum (e.g., MD5 checksum, a 128-bit hash value calculated by the MD5 algorithm), and also includes the characteristic information of the terminal device host computer that needs to perform the device upgrade.
[0034] The IoT platform is a software platform or cloud service used to connect, manage, and control a large number of IoT devices; these IoT devices include gateways, central coordinators, communication modules, or terminal device host computers, etc. The IoT platform can also be used to manage smart home devices (such as the opening and closing of smart door locks and smart appliances) and monitor the operating status of production equipment (such as the operation of industrial automated production lines).
[0035] In one embodiment, the IoT platform has a southbound interface and a northbound interface. The southbound interface of the IoT platform is used to connect IoT devices, enabling data interaction and management between the IoT platform and the IoT devices. In this embodiment, the southbound interface of the IoT platform is connected to the gateway and used for device upgrade management of the terminal device's host computer. The northbound interface of the IoT platform is used to connect to the user-side application, enabling data interaction and integration between the IoT platform and the application, allowing technicians to log in to the IoT platform or interact with the IoT platform through the user-side application.
[0036] In one embodiment, the user uploads the terminal device's host computer upgrade file to the IoT platform and selects the corresponding power distribution room gateway. This enables the IoT platform to obtain and create the terminal device's host computer upgrade task based on the terminal device's host computer upgrade file and the user's selection information for the power distribution room gateway.
[0037] S102. The IoT platform sends a file transfer request to the corresponding gateway according to the upgrade task of the terminal device's host computer.
[0038] The file transfer request includes, but is not limited to, file name, total file size, download chunk size, and total number of chunks. It is worth mentioning that, in this embodiment, the terminal device's host computer upgrade file will be sliced according to a preset data slicing rule before file transfer is performed.
[0039] The gateway refers to a hardware device or software service responsible for enabling data exchange and communication between different networks. In this embodiment, the gateway refers to a power distribution room gateway, which is used to realize firmware upgrades and file transfers for IoT devices in the digital power grid. In other embodiments, the gateway may also include devices such as firewalls and load balancers to achieve more complex security control and network management.
[0040] In one embodiment, the gateway can either receive and forward instructions from the IoT platform to upgrade IoT devices, or it can complete the upgrade of corresponding devices by calling the interfaces of terminal devices and other devices with different communication protocols, thus having a bridging function.
[0041] In one embodiment, the gateway includes a file management module and an upgrade management module; the file management module is responsible for downloading the terminal device's host computer upgrade file from the IoT platform, initiating the file transfer agent on the terminal device's host computer, and finally transmitting the terminal device's host computer upgrade file to the terminal device's host computer; the upgrade management module is responsible for receiving upgrade commands issued by the IoT platform, notifying the file management module to initiate file transfer, receiving file transfer results, and notifying the device to perform the upgrade update.
[0042] In other alternative implementations, the gateway includes, but is not limited to, the following functions: 1. Receiving upgrade instructions from the IoT platform, such as upgrading the central coordinator or the host computer of the terminal device; 2. Downloading the upgrade file corresponding to the URL (Uniform Resource Locator) of the upgrade instruction, such as downloading the file from the file server via HTTP (Hypertext Transfer Protocol) and saving it; 3. Result feedback, such as after the IoT platform issues an upgrade instruction, the gateway returns a received message, and then reports the transmission result back to the IoT platform after the file transfer is completed; 4. Device upgrade initiation, such as after successful file transfer, the gateway issues an instruction to the corresponding IoT device to notify it to update or feeds back the file transfer result to the IoT platform, which then decides to initiate the upgrade update of the corresponding IoT device; 5. Upgrade result feedback, such as after the IoT device upgrade update is completed and the upgrade result is reported to the gateway, the gateway reports the upgrade result back to the IoT platform.
[0043] S103. In response to the file transfer request, the gateway returns a request success message to the IoT platform and obtains the terminal device host computer upgrade file and file self-description information from the IoT platform.
[0044] The success message refers to the confirmation message returned by the gateway to the IoT platform after the gateway receives and accepts the file transfer request.
[0045] In addition, the remote upgrade method for the terminal device host computer of the Internet of Things system described in this invention further includes some upgrade steps. After step S103 (i.e., the gateway responds to the file transfer request, returns a request success message to the Internet of Things platform, and obtains the terminal device host computer upgrade file and file self-description information from the Internet of Things platform), it is determined whether the gateway has correctly received the terminal device host computer upgrade file. The upgrade steps specifically include:
[0046] S103a. The gateway matches the file information of the received terminal device host computer upgrade file with the file information of the file transfer request, performs version verification and integrity verification on the received terminal device host computer upgrade file, and determines whether the gateway has correctly received the terminal device host computer upgrade file.
[0047] In one embodiment, the file information in the file transfer request includes the MD5 (Message-Digest Algorithm 5) checksum of the terminal device's host computer upgrade file to be transferred, carried in the file transfer request; the received file information of the terminal device's host computer upgrade file refers to the MD5 checksum of the terminal device's host computer upgrade file received by the gateway. Specifically, the gateway matches the received file information of the terminal device's host computer upgrade file with the file information in the file transfer request to determine whether their MD5 checksums match, thereby performing version and integrity checks on the terminal device's host computer upgrade file received by the gateway. If they match, it is determined that the gateway has correctly received the terminal device's host computer upgrade file.
[0048] In addition, the remote upgrade method for the terminal device host computer of the IoT system described in this invention further includes some upgrade steps. After step S103 (i.e., the gateway responds to the file transfer request, returns a request success message to the IoT platform, and obtains the terminal device host computer upgrade file and file self-description information from the IoT platform), the upgrade steps specifically include:
[0049] S103b, The gateway caches the terminal device's host computer upgrade file and file self-description information locally.
[0050] The gateway has Flash space for storing the terminal device's host computer upgrade files and file self-description information.
[0051] In step S20, the gateway, based on the upgrade file and file self-description information of the terminal device's host computer, sends a terminal upgrade file authorization download request to the terminal device's host computer through the central coordinator and the communication module.
[0052] The terminal upgrade file authorization download request includes device upgrade information from the host computer of the specified terminal device to be upgraded. In addition, the terminal upgrade file authorization download request also includes, but is not limited to, file name, file verification code, total file size, download segment size, total number of segments, and private information.
[0053] In one embodiment, since the file transfer request includes, but is not limited to, file name, total file size, download chunk size, and total number of chunks, the terminal upgrade file authorization download request can be reconstructed based on the content included in the file transfer request to obtain the corresponding information.
[0054] In one embodiment, please refer to Figure 3 Step S20 specifically includes the following steps:
[0055] S201. Based on the upgrade file and file self-description information of the terminal device's host computer, the gateway sends a command to the corresponding central coordinator to clear the old version file.
[0056] The "old version file" refers to the firmware file (including but not limited to upgrade files for IoT devices) that has been previously installed on the central coordinator and is stored in the central coordinator.
[0057] S202, the corresponding central coordinator responds to the command to clear old version files, executes the clearing of old version files, and returns the confirmation information of clearing old version files to the gateway.
[0058] S203. Based on the old version file clearing confirmation information, the gateway sends a file matching request to the corresponding central coordinator.
[0059] The file matching request includes, but is not limited to, the file version number, file name, file size, upgrade device type, signature information, manufacturer name, product model, device access protocol type, packet output time, custom description, and version check code in the file self-description information.
[0060] In one embodiment, the file matching request includes, but is not limited to: file ID, file size, target version number, current version number, file nature (representing upgrade files for different node types), device model length, device model, total number of devices in this upgrade, and device ID for each device (each ID occupies 6 bytes).
[0061] S204. The corresponding central coordinator responds to the file matching request, sends a file matching response to the gateway, and then sends a file download request to the communication module.
[0062] The file matching response information includes file matching confirmation information or file matching denial information.
[0063] In one embodiment, the file download request includes, but is not limited to: protocol version, file size, chunk size, total number of file packets, upgrade file MD5, private information, current version number, target version number, device model length, and device model.
[0064] S205. The communication module responds to the file download request and sends a terminal upgrade file authorization download request to the host computer of the terminal device. The terminal upgrade file authorization download request includes private information.
[0065] In step S30, the communication module downloads authorization information from the host computer and sends authorization matching information to the gateway through the central coordinator.
[0066] The host computer download authorization information is the download authorization information fed back to the communication module by the host computer of the corresponding terminal device based on the terminal upgrade file authorization download request.
[0067] In one embodiment, please refer to Figure 4 Step S30 specifically includes the following steps:
[0068] S301. In response to the file download request, the communication module determines whether it can download the corresponding terminal device host computer upgrade file based on the device upgrade information of the file download request and the device capability information of the communication module, and obtains the communication module file matching result.
[0069] S302, the corresponding terminal device host computer receives the terminal upgrade file authorization download request, and after verifying the private information according to the terminal private verification information of the terminal device host computer, sends the host computer download authorization information to the communication module.
[0070] S303. The communication module generates authorization matching information based on the communication module file matching result and the host computer download authorization information, and sends it to the central coordinator.
[0071] S304. The central coordinator sends the authorization matching information to the gateway.
[0072] The authorized matching information includes file ID, file size, file type, device ID, and matching result code.
[0073] In one embodiment, the authorized matching information includes, but is not limited to: file ID, file size, file nature (representing upgrade files for different node types), device ID (6 bytes), and matching result code.
[0074] In one embodiment, after receiving the terminal upgrade file authorization download request, the terminal device host computer determines whether to authorize it. If so, it sends download authorization information back to the communication module. After receiving the download authorization information, the communication module, based on the corresponding terminal upgrade file authorization download request and its own device capability information, determines whether it can download the corresponding terminal device host computer upgrade file and obtains a file matching result. Based on the download authorization information and the file matching result, the communication module generates and sends authorization matching information to the gateway through the central coordinator.
[0075] In one embodiment, the order of steps S301 and S302 can be arbitrarily changed by technicians according to the actual situation. The step numbers are only used for specific descriptions and should not be construed as limiting their order of implementation.
[0076] In step S40, the gateway sends the terminal device's host computer upgrade file to the communication module via the central coordinator based on the authorization matching information.
[0077] In one embodiment, step S40 specifically includes the following steps:
[0078] S401. Based on the authorization matching information, the gateway sends a file transfer request to the central coordinator.
[0079] The startup file transfer request includes the number of devices and the device ID of each device.
[0080] In one embodiment, the initiation file transfer request includes, but is not limited to, the number of devices and the device ID of each device (each ID occupies 6 bytes).
[0081] S402. In response to the startup file transfer request, the central coordinator returns a startup file transfer request confirmation message to the gateway.
[0082] S403. In response to the startup file transfer request confirmation information, the gateway slices the terminal device host computer upgrade file cached locally and transmits the sliced terminal device host computer upgrade file to the central coordinator piece by piece.
[0083] In one embodiment, the gateway opens a serial port interface to the south to send the terminal device's host computer upgrade file to the central coordinator.
[0084] In one embodiment, the gateway's southbound open interface is invoked by the caller (e.g., the central coordinator) to implement the functions required to jointly complete different stages of file transfer, such as opening a file transfer result receiving interface; after the file transfer is completed, the central coordinator notifies the gateway of the file transfer result through the file transfer result receiving interface; the central coordinator's northbound open interface is invoked by the caller (e.g., the gateway) to implement the functions required for file proxy transfer, such as initiating a file transfer or querying file transfer results.
[0085] S404, The central coordinator sends the file verification code of the corresponding terminal device host computer upgrade file to the communication module.
[0086] In one embodiment, the file verification code of the terminal device host computer upgrade file can be the MD5 checksum of the terminal device host computer upgrade file (a 128-bit hash value calculated by the MD5 algorithm).
[0087] S405. After receiving the file verification code, the communication module returns a file verification code reception confirmation message to the central coordinator.
[0088] The file verification code reception confirmation information refers to the confirmation information returned by the communication module to the central coordinator after receiving the file verification code.
[0089] S406. In response to the file verification code reception confirmation information, the central coordinator transmits the sliced terminal device host computer upgrade file to the communication module piece by piece.
[0090] If the central coordinator is interrupted while transmitting the sliced terminal device host computer upgrade file to the communication module piece by piece, the transmission of the terminal device host computer upgrade file will continue from the position of the previously transmitted slice.
[0091] In one embodiment, the data transmission between the central coordinator and the communication module is designed with a breakpoint resume function. When the central coordinator transmits the sliced terminal device host computer upgrade file to the communication module piece by piece, the central coordinator will record the position of the transmitted slice in real time. If an unexpected situation occurs (such as power failure or equipment failure), after the unexpected situation is repaired and the terminal device host computer upgrade file is transmitted again, the central coordinator reads the recorded position of the transmitted slice and continues to transmit the subsequent slice file from the position of the transmitted slice.
[0092] In addition, the remote upgrade method for the terminal device host computer of the IoT system described in this invention further includes some upgrade steps. After step S403 (i.e., the gateway responds to the start file transmission request confirmation information, slices the terminal device host computer upgrade file cached locally, and transmits the sliced terminal device host computer upgrade file piece by piece to the central coordinator), it is used to determine whether the central coordinator has correctly received the terminal device host computer upgrade file. The upgrade steps specifically include:
[0093] S4031, The gateway sends a proxy file transfer status query to the central coordinator.
[0094] The proxy file transfer status query includes file ID, file type, number of devices, and device ID for each device.
[0095] In one embodiment, the proxy file transfer status query includes, but is not limited to: file ID, file nature (representing upgrade files for different node types), number of devices, and device ID for each device (each ID occupies 6 bytes).
[0096] S4032. In response to the proxy file status query, the central coordinator reports the file proxy transmission status result to the gateway.
[0097] The file proxy transmission status result includes file ID, file type, number of devices, and device ID and transmission status code for each device.
[0098] In one embodiment, the file agent transmission status result includes, but is not limited to: file ID, file nature (representing upgrade files for different node types), number of devices and device ID for each device (each ID occupies 6 bytes) and transmission status code.
[0099] S4033. The gateway generates a host computer upgrade command based on the reported file proxy transmission status result.
[0100] In step S50, the communication module receives the upgrade file from the host computer of the terminal device and caches it locally, and sends an upgrade file retrieval notification to the corresponding host computer of the terminal device.
[0101] The upgrade file extraction notification includes, but is not limited to, the file name, file verification code, total file size, download segment size, and total number of segments.
[0102] In one embodiment, the communication module has Flash space for caching the host computer upgrade files of the terminal device.
[0103] In step S60, after the corresponding terminal device host computer receives the upgrade file extraction notification, it obtains the upgrade file of the terminal device host computer cached locally by the communication module.
[0104] In one embodiment, the terminal device host computer downloads the terminal device host computer upgrade file cached locally by the communication module from the communication module via AT commands (i.e., Attention commands). The AT commands are commands applied to the connection and communication between terminal devices. Each commonly used AT command line can only contain one AT command. In addition, the maximum length of the AT command sent can be 1056 characters, excluding the two characters AT.
[0105] In one embodiment, step S60 specifically includes the following steps:
[0106] S601. After receiving the upgrade file extraction notification, the corresponding terminal device host computer sends a file extraction request to the communication module.
[0107] The file extraction request includes the identifiers of each slice of the terminal device's host computer upgrade file.
[0108] S602. The communication module slices the locally cached upgrade file of the terminal device host computer according to the file extraction request, and sends the slices to the terminal device host computer one by one according to the slice identifier.
[0109] In one embodiment, the terminal device host computer sends an AT command carrying the segment identifiers of the terminal device host computer upgrade file to the communication module, controlling the communication module to slice the terminal device host computer upgrade file cached locally, and send the slices to the terminal device host computer one by one according to the segment identifiers.
[0110] In addition, the remote upgrade method for the terminal device host computer of the IoT system described in this invention further includes some upgrade steps. After step S60 (i.e., after the corresponding terminal device host computer receives the upgrade file extraction notification, it obtains the terminal device host computer upgrade file cached locally by the communication module), it is determined whether the terminal device host computer has correctly received the terminal device host computer upgrade file. The upgrade steps specifically include:
[0111] S61. The gateway sends a file information query command to the corresponding terminal device host computer via the central coordinator and the communication module.
[0112] S62. In response to the file information query command, the terminal device host computer reports the file information of the upgrade file received from the terminal device host computer to the gateway via the communication module and the central coordinator.
[0113] The file information of the terminal device's host computer upgrade file includes corresponding file description information.
[0114] S63. The gateway matches the file information of the reported terminal device host computer upgrade file with the terminal device host computer upgrade file, performs packet loss verification and integrity verification on the terminal device host computer upgrade file received by the terminal device host computer, determines whether the terminal device host computer has correctly received the terminal device host computer upgrade file, and reports the result of whether the terminal device host computer has correctly received the terminal device host computer upgrade file to the Internet of Things platform.
[0115] In step S70, the corresponding host computer of the terminal device responds to the host computer upgrade command and performs a device upgrade of the host computer of the terminal device.
[0116] In one embodiment, step S70 specifically includes the following steps:
[0117] S701, The gateway sends a command to the central coordinator to execute the host computer upgrade command;
[0118] The execution of the host computer upgrade command includes the file ID, file type, number of devices, and device ID for each device.
[0119] In one embodiment, the execution of the host computer upgrade command includes, but is not limited to: file ID, file nature (representing upgrade files of different node types), number of devices, and device ID of each device (each ID occupies 6 bytes); the host computer upgrade command is associated with the execution of the host computer upgrade command.
[0120] S702, In response to the execution of the host computer upgrade command, the central coordinator forwards the execution of the host computer upgrade command to the terminal device host computer through the communication module.
[0121] S703, the corresponding terminal device host computer receives the host computer upgrade command and performs the device upgrade of the terminal device host computer.
[0122] In one embodiment, after the terminal device host computer completes receiving the terminal device host computer upgrade file and receives the terminal device host computer upgrade command, it sets an upgrade flag for itself. After the terminal device host computer restarts and detects the upgrade flag, it calls the terminal device host computer upgrade file stored in itself to complete the upgrade.
[0123] In addition, the remote upgrade method for the terminal device host computer of the IoT system described in this invention further includes some upgrade steps. After step S70 (i.e., the corresponding terminal device host computer responds to the execution of the host computer upgrade command and performs a device upgrade), it is determined whether the terminal device host computer has been successfully upgraded, and the upgrade result of the terminal device host computer is reported to the IoT platform. The upgrade steps specifically include:
[0124] S71. The gateway sends the host computer upgrade result query to the terminal host computer through the central coordinator and the communication module according to the preset upgrade result query period.
[0125] The preset upgrade result query period can be set in advance by technical personnel and the specific value can be adjusted according to the actual situation, such as 10,000 milliseconds.
[0126] S72. The corresponding terminal device host computer responds to the host computer upgrade result query and returns its corresponding version information to the gateway through the communication module and the central coordinator.
[0127] S73. The gateway determines whether the terminal device host computer has been successfully upgraded based on the version information returned by the corresponding terminal device host computer and the upgrade file of the terminal device host computer, and reports the upgrade result of the terminal device host computer to the Internet of Things platform.
[0128] In one embodiment, the file self-description information includes a file version number. The gateway can determine whether the terminal device host computer has successfully upgraded by judging whether the version information returned by the terminal device host computer matches the file version number.
[0129] Alternatively, those skilled in the art can use the following steps instead of steps S71-S73 to determine whether the terminal device's host computer has been successfully upgraded, while continuing to implement other steps of the remote upgrade method for the terminal device's host computer in the IoT system of the present invention. The specific steps are as follows:
[0130] S74. The corresponding terminal device host computer returns its version information to the gateway through the communication module and the central coordinator.
[0131] S75. The gateway determines whether the terminal device host computer has been successfully upgraded based on the version information returned by the corresponding terminal device host computer and the upgrade file of the terminal device host computer, and reports the upgrade result of the terminal device host computer to the Internet of Things platform.
[0132] In addition, the IoT system is equipped with an upgrade file generation tool, which is used to remotely upgrade the terminal device's host computer before step S10 (i.e., the step where the IoT platform obtains the upgrade file from the terminal device's host computer). The method for remotely upgrading the terminal device's host computer in the IoT system of the present invention further includes creating the upgrade file for the terminal device's host computer. Please refer to [link to documentation]. Figure 5 , Figure 5 The flowchart below illustrates the steps involved in creating a terminal device upgrade file for the remote upgrade method of the IoT system provided by this invention. The upgrade steps specifically include:
[0133] S11. The upgrade file generation tool obtains the original full upgrade file or the original differential upgrade file; the original full upgrade file or the original differential upgrade file is used as the upgrade file to be generated; the upgrade file to be generated includes a header description information field and a data field, the header description information field including packet header description information and file header description information.
[0134] S12. The upgrade file generation tool performs hash value calculation on the file header description information and the data field to obtain a first hash value.
[0135] S13. The upgrade file generation tool inserts the first hash value into the packet header description information.
[0136] S14. The upgrade file generation tool performs a hash value calculation on the data field to obtain a second hash value.
[0137] S15. The upgrade file generation tool inserts the second hash value into the file header description information to obtain the terminal device host computer upgrade file.
[0138] In this embodiment, by inserting two different hash values into different parts of the upgrade file, the resulting terminal device host computer upgrade file can subsequently perform integrity verification on itself based on these two hash values, thereby further improving the success rate of device upgrades and increasing upgrade efficiency.
[0139] Meanwhile, if the upgrade file to be generated in step S11 is the original differential upgrade file, then step S15 further includes steps for compressing the differential upgrade file after hash value insertion. Please refer to [link / reference]. Figure 6 , Figure 6 The flowchart illustrates the specific steps of compressing the upgrade file of the terminal device's host computer in the remote upgrade method for the terminal device's host computer in the Internet of Things system provided by the present invention. The specific steps are as follows:
[0140] S1501, The upgrade file generation tool inserts the second hash value into the file header description information to obtain the first upgrade file.
[0141] S1502, the upgrade file generation tool uses the correlation of adjacent data in the first upgrade file to compress the first upgrade file and obtain several literal data pairs and distance-length data pairs in the first upgrade file.
[0142] The literal data pair refers to a data combination of two literal values, which are usually associated in some way. Common literal data pairs include key-value pairs, tuples, and arrays. The distance-length data pair refers to a data combination consisting of distance and length, which is commonly used in maps.
[0143] S1503, the upgrade file generation tool performs data statistics on the literal data pairs and the distance-length data pairs respectively, generates a corresponding first Huffman table, and performs Huffman encoding on the literal data pairs and the distance-length data pairs according to the first Huffman table to obtain a first compressed data stream.
[0144] The Huffman table is a table composed of the characters appearing in a set of data and their frequencies. In this embodiment, the first Huffman table is a table composed of the characters appearing in the literal data pairs and the distance-length data pairs respectively, based on their frequencies. The Huffman coding refers to a commonly used entropy coding algorithm.
[0145] In one embodiment, the data to be compressed is first traversed, and the frequency of each character (or source symbol) is counted. Then, based on the counted character frequencies, a Huffman tree is constructed using a bottom-up approach. In this Huffman tree, characters with higher frequencies are located near the root of the tree, while characters with lower frequencies are located at deeper levels. Finally, after the Huffman tree is constructed, a unique variable-length code is assigned to each character according to the tree structure. These codes and the corresponding characters constitute the corresponding Huffman table.
[0146] S1504. The upgrade file generation tool performs data statistics on the first compressed data stream, generates a corresponding second Huffman table, and performs Huffman encoding on the first compressed data stream according to the second Huffman table to obtain the second compressed data stream.
[0147] S1505, the upgrade file generation tool obtains the terminal device host computer upgrade file based on the first Huffman table, the second Huffman table, and the second compressed data stream.
[0148] In one embodiment, by repeatedly performing Huffman coding, the redundancy of data in the differential upgrade file can be significantly reduced, the compression ratio can be improved, and efficient data compression can be achieved, thereby saving storage space or speeding up data transmission.
[0149] Compared to existing technologies, the method described in this invention coordinates the upgrade process of multiple terminal device host computers through a gateway, central coordinator, and communication module, reducing upgrade time and improving equipment upgrade efficiency. It also effectively avoids anomalies during the upgrade process, increasing the success rate and ensuring upgrade robustness. Furthermore, by designing the method for generating upgrade files for the terminal device host computers, it effectively improves data transmission efficiency, stability, and data integrity during the upgrade process. Moreover, the method described in this invention has good adaptability, accommodating the continuous updates of other technologies during the promotion of the "unified standard for digital power grids," effectively supporting the further development of smart grids.
[0150] Example 2
[0151] The present invention also provides a remote upgrade system for the host computer of a terminal device in an Internet of Things (IoT) system. The remote upgrade system for the host computer of a terminal device in an IoT system is used to execute the remote upgrade method for the host computer of a terminal device in an IoT system described in the above embodiments, so as to realize the steps of the remote upgrade method for the host computer of a terminal device in an IoT system described in the above embodiments.
[0152] It should be noted that, in implementing the remote upgrade method for the terminal device host computer of an IoT system provided in the above embodiments, the functions of the system can be assigned to different functional modules as needed. That is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described in Embodiment 1. Furthermore, the remote upgrade system for the terminal device host computer of an IoT system provided in the above embodiments and the remote upgrade method for the terminal device host computer of an IoT system in Embodiment 1 belong to the same concept, and their implementation process is detailed in the method embodiments, which will not be repeated here.
[0153] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and the present invention also intends to include these modifications and variations.
Claims
1. A method for remotely upgrading a terminal device host computer in an Internet of Things (IoT) system, the IoT system comprising an IoT platform, a gateway communicatively connected to the IoT platform, at least one central coordinator connected to the gateway, at least one communication module wirelessly connected to the central coordinator, and a terminal device host computer connected to the communication module; the upgrade method comprising the following steps: The IoT platform obtains the terminal device's host computer upgrade file and file self-description information, and sends the terminal device's host computer upgrade file and file self-description information to the gateway; Based on the upgrade file and file self-description information from the terminal device's host computer, the gateway sends a terminal upgrade file authorization download request to the terminal device's host computer via the central coordinator and the communication module. The terminal upgrade file authorization download request includes the device upgrade information of the host computer of the terminal device to be upgraded; The communication module sends authorization matching information to the gateway through the central coordinator based on the authorization information downloaded from the host computer. The authorization information downloaded from the host computer is the download authorization information fed back to the communication module by the host computer of the corresponding terminal device based on the authorization download request of the terminal upgrade file. Based on the authorization matching information, the gateway sends the terminal device's host computer upgrade file to the communication module via the central coordinator; The communication module receives the upgrade file from the host computer of the terminal device and caches it locally, and sends an upgrade file retrieval notification to the corresponding host computer of the terminal device. After receiving the upgrade file extraction notification, the corresponding terminal device host computer obtains the upgrade file of the terminal device host computer cached locally by the communication module; The corresponding terminal device host computer responds to the host computer upgrade command and performs the device upgrade of the terminal device host computer.
2. The method for remotely upgrading a terminal device in an Internet of Things (IoT) system according to claim 1, characterized in that, The step of the IoT platform acquiring the terminal device's host computer upgrade file and file self-description information, and sending the terminal device's host computer upgrade file and file self-description information to the gateway includes: The IoT platform obtains the terminal device's host computer upgrade file and file self-description information, and creates a terminal device host computer upgrade task based on the terminal device's host computer upgrade file and file self-description information; The IoT platform sends a file transfer request to the corresponding gateway based on the upgrade task of the terminal device's host computer. In response to the file transfer request, the gateway returns a request success message to the IoT platform and obtains the terminal device host computer upgrade file and file self-description information from the IoT platform; After the step of the IoT platform obtaining the terminal device's host computer upgrade file and file self-description information, and sending the terminal device's host computer upgrade file and file self-description information to the gateway, the following steps are included: The gateway also matches the file information of the received terminal device host computer upgrade file with the file information of the file transfer request, performs version verification and integrity verification on the received terminal device host computer upgrade file, and determines whether the gateway has correctly received the terminal device host computer upgrade file.
3. The method for remotely upgrading a terminal device in an Internet of Things (IoT) system according to claim 2, characterized in that: The file self-description information includes the self-description information version number, upgrade device type, device manufacturer name, device product model, device access protocol type, upgrade package file name, upgrade package version number, upgrade package self-description information, upgrade package file size, upgrade package signature information, upgrade package release time, and upgrade file verification code.
4. The method for remotely upgrading a terminal device in an Internet of Things (IoT) system according to claim 1, characterized in that, The steps of the gateway sending a terminal upgrade file authorization download request to the terminal device's host computer through the central coordinator and the communication module, based on the terminal device's host computer upgrade file and file self-description information, include: Based on the upgrade file and file self-description information of the terminal device's host computer, the gateway sends a command to the corresponding central coordinator to clear the old version file. The corresponding central coordinator responds to the command to clear old version files, executes the clearing of old version files, and returns confirmation information of clearing old version files to the gateway; Based on the old version file clearing confirmation information, the gateway sends a file matching request to the corresponding central coordinator. The corresponding central coordinator responds to the file matching request by sending a file matching response to the gateway and then sending a file download request to the communication module. In response to the file download request, the communication module sends a terminal upgrade file authorization download request to the host computer of the terminal device. The terminal upgrade file authorization download request includes private information.
5. The method for remotely upgrading a terminal device in an Internet of Things (IoT) system according to claim 4, characterized in that: The file matching request includes file ID, file size, target version number, current version number, file type, device model length, device model, total number of devices in this upgrade, and device ID of each device; The file matching response information includes file matching confirmation information or file matching denial information; The file download request includes the protocol version, file size, chunk size, total number of file packets, upgrade file MD5, and private information; The private information includes file size, current version number, target version number, device model length, and device model.
6. The method for remotely upgrading a terminal device in an Internet of Things (IoT) system according to claim 5, characterized in that, The step of the communication module sending authorization matching information to the gateway through the central coordinator based on the authorization information downloaded from the host computer includes: In response to the file download request, the communication module determines whether it can download the corresponding terminal device host computer upgrade file based on the device upgrade information of the file download request and the device capability information of the communication module, and obtains the communication module file matching result. The corresponding terminal device host computer receives the terminal upgrade file authorization download request, and after verifying the private information according to the terminal private verification information of the terminal device host computer, sends the host computer download authorization information to the communication module; The communication module generates authorization matching information based on the file matching result of the communication module and the download authorization information of the host computer, and sends it to the central coordinator; The central coordinator sends the authorization matching information to the gateway.
7. The method for remotely upgrading a terminal device in an Internet of Things (IoT) system according to claim 6, characterized in that: The authorized matching information includes file ID, file size, file type, device ID, and matching result code.
8. The method for remotely upgrading a terminal device in an Internet of Things (IoT) system according to claim 2, characterized in that, After the gateway responds to the file transfer request by returning a request success message to the IoT platform and obtaining the terminal device's host computer upgrade file and file self-description information from the IoT platform, the process includes: The gateway caches the terminal device's host computer upgrade file and file self-description information locally; The step of the gateway sending the terminal device's host computer upgrade file to the communication module via the central coordinator based on the authorization matching information includes: Based on the authorization matching information, the gateway sends a file transfer request to the central coordinator. In response to the startup file transfer request, the central coordinator returns a confirmation message for the startup file transfer request to the gateway. In response to the confirmation information of the startup file transfer request, the gateway slices the terminal device host computer upgrade file cached locally and transmits the sliced terminal device host computer upgrade file to the central coordinator piece by piece. The central coordinator sends the file verification code of the corresponding terminal device host computer upgrade file to the communication module; After receiving the file verification code, the communication module returns a file verification code reception confirmation message to the central coordinator. In response to the file verification code confirmation information, the central coordinator transmits the sliced terminal device host computer upgrade file piece by piece to the communication module. If the transmission of the sliced terminal device host computer upgrade file piece by piece to the communication module is interrupted, the transmission of the terminal device host computer upgrade file will continue from the position of the previously transmitted slice when transmitting the slice file again.
9. The method for remotely upgrading a terminal device in an Internet of Things (IoT) system according to claim 8, characterized in that, Following the step of the gateway responding to the startup file transfer request confirmation information, slicing the terminal device host computer upgrade file cached locally, and transmitting the sliced terminal device host computer upgrade file piece by piece to the central coordinator, the following steps are included: The gateway sends a file information query command to the central coordinator; In response to the file information query command, the central coordinator reports the file information of the received terminal device host computer upgrade file to the gateway, wherein the file information of the terminal device host computer upgrade file includes corresponding file description information; The gateway matches the file information of the reported terminal device upgrade file with the terminal device upgrade file, performs packet loss verification and integrity verification on the terminal device upgrade file received by the terminal device, determines whether the central coordinator has correctly received the terminal device upgrade file, and reports the result of whether the central coordinator has correctly received the terminal device upgrade file to the IoT platform.
10. The method for remotely upgrading a terminal device in an Internet of Things (IoT) system according to claim 1, characterized in that, The step of the corresponding terminal device host computer obtaining the terminal device host computer upgrade file cached locally by the communication module after receiving the upgrade file extraction notification includes: After receiving the upgrade file extraction notification, the corresponding terminal device host computer sends a file extraction request to the communication module; the file extraction request includes the segment identifiers of the upgrade file of the terminal device host computer; According to the file extraction request, the communication module slices the locally cached upgrade file of the terminal device host computer and sends it to the terminal device host computer slice by slice according to the slice identifier; After the corresponding terminal device host computer receives the upgrade file extraction notification and obtains the upgrade file of the terminal device host computer cached locally by the communication module, the following steps are included: The gateway sends a proxy file transfer status query to the central coordinator. In response to the proxy file status query, the central coordinator reports the file proxy transmission status result to the gateway. The gateway generates a host computer upgrade command based on the reported file proxy transmission status result.
11. The method for remotely upgrading a terminal device in an Internet of Things system according to claim 10, characterized in that: The proxy file transfer status query includes file ID, file type, number of devices, and device ID for each device; The file proxy transmission status result includes file ID, file type, number of devices, and device ID and transmission status code for each device.
12. The method for remotely upgrading a terminal device in an Internet of Things (IoT) system according to claim 1, characterized in that, The corresponding terminal device host computer responds to the host computer upgrade command by executing the device upgrade steps of the terminal device host computer, including: The gateway sends a command to the central coordinator to execute the host computer upgrade command; In response to the command to execute the host computer upgrade, the central coordinator forwards the command to the host computer of the terminal device via the communication module. The corresponding terminal device host computer receives the host computer upgrade command and performs the device upgrade on the terminal device host computer. The corresponding terminal device host computer responds to the host computer upgrade command, and after executing the device upgrade step of the terminal device host computer, it includes: According to a preset upgrade result query cycle, the gateway sends the host computer upgrade result query to the terminal host computer through the central coordinator and the communication module. The corresponding terminal device host computer responds to the host computer upgrade result query by returning its own version information to the gateway through the communication module and the central coordinator; The gateway determines whether the terminal device host computer has been successfully upgraded based on the version information returned by the corresponding terminal device host computer and the upgrade file of the terminal device host computer, and reports the upgrade result of the terminal device host computer to the Internet of Things platform; or, The corresponding terminal device host computer returns its version information to the gateway through the communication module and the central coordinator; The gateway determines whether the terminal device host computer has been successfully upgraded based on the version information returned by the corresponding terminal device host computer and the upgrade file of the terminal device host computer, and reports the upgrade result of the terminal device host computer to the Internet of Things platform.
13. The method for remotely upgrading a terminal device in an Internet of Things (IoT) system according to claim 12, characterized in that: The execution of the host computer upgrade command includes the file ID, file type, number of devices, and device ID for each device.
14. The method for remotely upgrading a terminal device in an Internet of Things (IoT) system according to any one of claims 1 to 13, characterized in that, The IoT system is equipped with an upgrade file generation tool; before the IoT platform obtains the upgrade file from the terminal device's host computer, the following steps are included: The upgrade file generation tool obtains the original full upgrade file or the original differential upgrade file; it uses the original full upgrade file or the original differential upgrade file as the upgrade file to be generated; the upgrade file to be generated includes a header description information field and a data field, and the header description information field includes packet header description information and file header description information; The upgrade file generation tool performs hash value calculation on the file header description information and the data fields to obtain a first hash value; The upgrade file generation tool inserts the first hash value into the packet header description information; The upgrade file generation tool performs hash value calculation on the data field to obtain a second hash value; The upgrade file generation tool inserts the second hash value into the file header description information to obtain the terminal device host computer upgrade file; Wherein, if the upgrade file to be generated is an original differential upgrade file, the step of the upgrade file generation tool inserting the second hash value into the file header description information to obtain the terminal device host computer upgrade file includes: The upgrade file generation tool inserts the second hash value into the file header description information to obtain the first upgrade file; The upgrade file generation tool uses the correlation of adjacent data in the first upgrade file to compress the first upgrade file and obtain several literal data pairs and distance-length data pairs from the first upgrade file; The upgrade file generation tool performs data statistics on the literal data pairs and the distance-length data pairs respectively, generates a corresponding first Huffman table, and performs Huffman encoding on the literal data pairs and the distance-length data pairs according to the first Huffman table to obtain a first compressed data stream; The upgrade file generation tool performs data statistics on the first compressed data stream, generates a corresponding second Huffman table, and performs Huffman encoding on the first compressed data stream according to the second Huffman table to obtain the second compressed data stream. The upgrade file generation tool obtains the terminal device host computer upgrade file based on the first Huffman table, the second Huffman table, and the second compressed data stream.
15. A remote upgrade system for terminal equipment in an Internet of Things (IoT) system, characterized in that, The terminal device host computer remote upgrade system of the Internet of Things system is used to execute the terminal device host computer remote upgrade method of the Internet of Things system according to any one of claims 1 to 14.