Remote upgrading method for gateway of Internet of Things

By dividing the FLSAH area of ​​the IoT gateway into multiple areas and using its capacity for block writing and reading, the problem that the gateway cannot receive large firmware upgrade packages at one time is solved, and the remote upgrade and time management of the upgrade process of large-capacity programs is realized, which improves the integrity and reliability of the upgrade.

CN119561923AActive Publication Date: 2025-03-04WUXI GUANZHIJIE DATA INFORMATION TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411761593.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-03-04
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

In the prior art, the Internet of Things gateway cannot receive a large firmware upgrade package at one time through the RAM area, resulting in the inability to complete the remote upgrade.

Method used

By dividing the FLSAH area into a FLSAH buffer, a FLSAH backup area and a FLSAH execution area, the capacity of the FLSAH area of ​​the gateway writes the upgrade data, realizes block writing and reading, makes full use of FLSAH resources, and reduces the use of RAM resources.

Benefits of technology

Remote upgrade of gateway large-capacity programs is realized, firmware upgrade packages that are several times the size of RAM buffers, and avoid upgrade failures or communication interruptions through time management, improving the integrity and reliability of upgrades.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119561923A_ABST
    Figure CN119561923A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Internet of Things gateway management, in particular to a remote upgrading method of an Internet of Things gateway, which comprises an upper computer system equipped with a firmware upgrade package and an Internet of Things gateway to be upgraded, and is characterized in that the Internet of Things gateway is internally provided with a receiving RAM buffer area and an FLSAH area; the FLSAH area is divided into an FLSAH buffer area, an FLSAH backup area and an FLSAH execution area; according to the remote upgrading method, the specified length written into the FLSAH buffer area is set, the written length written into the FLSAH buffer area is recorded, the full-bit length of the current RAM buffer area is recorded, and upgrading data received by the RAM buffer area is repeatedly written into the FLSAH area, so that FLSAH resources are fully utilized, and firmware upgrading packages which are several times as large as the RAM buffer area can be received by occupying less RAM resources; remote upgrading of a gateway high-capacity program is realized; time management is carried out on the whole upgrading process, the problem that the gateway cannot operate normally due to upgrading time abnormity caused by upgrading failure or communication interruption and the like is avoided, and the upgrading effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things gateway management, and in particular to a remote upgrading method for an Internet of Things gateway. Background Art

[0002] The IoT gateway plays a very important role in the IoT era. It is the link between the perception network and the traditional communication network. As a gateway device, the IoT gateway can realize the protocol conversion between the perception network and the communication network, as well as between different types of perception networks, and can realize both wide-area interconnection and local-area interconnection. In addition, the IoT gateway also needs to have device management functions. Operators can manage the underlying perception nodes through the IoT gateway device, understand the relevant information of each node, and realize remote control.

[0003] The method for realizing remote upgrade of gateway in the prior art is: a receiving cache for receiving firmware upgrade packages is reserved in the RAM area of ​​the embedded microprocessor inside the gateway, and after receiving the firmware upgrade package once, the upgrade is written into the program area of ​​the non-volatile storage space FLSAH; however, the RAM capacity inside the embedded microprocessor is generally small but the FLSAH capacity is relatively large, and the program running also needs to occupy RAM space, so the RAM buffer reserved for remote program upgrade cannot be too large. As the program is continuously iterated and upgraded, the upgrade package capacity becomes larger and larger. Once the reserved RAM buffer size is exceeded, the gateway will not be able to receive the firmware upgrade package completely at one time, and the remote upgrade cannot be completed. Summary of the invention

[0004] In view of the shortcomings of the prior art described above, the purpose of the present invention is to provide a remote upgrade method for an Internet of Things gateway, which is used to solve the problem that the gateway in the prior art cannot receive a large firmware upgrade package in full at one time by receiving the firmware upgrade package through the RAM area at one time.

[0005] To achieve the above-mentioned purpose and other related purposes, the present invention provides a remote upgrade method of an Internet of Things gateway, comprising a host computer system equipped with a firmware upgrade package and an Internet of Things gateway to be upgraded, wherein a receiving RAM buffer and a FLSAH area are provided inside the Internet of Things gateway;

[0006] The FLSAH area is divided into a FLSAH buffer area, a FLSAH backup area, and a FLSAH execution area; the remote upgrade method comprises the following steps:

[0007] Step 1: Establish a remote connection between the IoT gateway and the host computer system through the network port;

[0008] Step 2: The gateway starts to receive the upgrade data of the firmware upgrade package and puts the received upgrade data into the RAM buffer;

[0009] Step 3: After the upgrade data received by the gateway reaches the block length, the received length of the current RAM buffer is recorded;

[0010] Step 4: The upgrade data starts to be written from the RAM buffer to the specified length set in the FLSAH buffer;

[0011] Step 5: After the upgrade data is written into the FLSAH buffer, the written length of the FLSAH buffer is recorded;

[0012] Step 6: The gateway continues to receive the upgrade data, and the upgrade data in its RAM buffer is received again starting from the position after the last upgrade data recorded in step 4 reaches the block length; the upgrade data receiving and writing operation in step 4 is repeated until all upgrade data reception is completed;

[0013] Step 7: When the length of the next round of upgrade data received by the gateway exceeds the length of the RAM buffer, the current RAM buffer full length is recorded;

[0014] Step 8: When the upgrade data receiving length reaches the end position of the RAM buffer, the next round of upgrade data will be placed in the first position of the RAM buffer;

[0015] Step 9: When the upgrade data received by the gateway reaches the specified length, the receiving length of the current RAM buffer is re-recorded;

[0016] Step 10, the gateway continues to write the upgrade data into the FLSAH buffer starting from the RAM buffer location recorded in step 8;

[0017] Step 11: After the gateway receives all the required upgrade data, it executes the operation of writing the upgrade data into the FLSAH buffer for the last time;

[0018] Step 12: Verify the upgrade data received in the FLSAH buffer, write the upgrade data into the FLSAH backup area after verification, and send back a signal indicating that the upgrade data has been successfully received by the host computer;

[0019] Step 13: After the FLSAH backup area is written successfully, continue to write the upgrade data into the FLSAH execution area;

[0020] Step 14: After the upgrade data is written into the FLSAH execution area, a success signal is sent back to the upper level;

[0021] Step 15: After the new program is successfully executed, a new version number is sent to the host system to ensure the integrity of the upgrade again.

[0022] In one embodiment of the present invention, in step 4, the specified length of the FLSAH buffer depends on the read and write characteristics of the FLSAH inside the gateway. When the FLSAH supports word writing, the specified length is set to words; when the FLSAH only supports block erasure and block writing, the specified length is set to the block size that supports block writing.

[0023] In one embodiment of the present invention, the specified length of the FLSAH buffer is calculated based on the relationship between the time required to write the upgrade data into the FLSAH and the receiving time, and the calculation is as follows: the size of the FLSAH buffer is set to L1, and the specified length is L2; ​​the time required for the RAM receiving buffer to receive the specified length is T1; the time required for the FLSAH buffer to write the specified length is T2, then L1>([T2 / T1]+2)*L2 must be satisfied.

[0024] In one embodiment of the present invention, in step 7, before the gateway receives the next round of upgrade data, the operation of writing into the FLSAH buffer is completed.

[0025] In one embodiment of the present invention, the remote upgrade method also includes time management of the upgrade process when the gateway is in a state to be upgraded; the time management must be met during the operation of steps 1 to 15. If any process fails in the middle, the gateway will return the relevant status of the upper computer and perform a version rollback.

[0026] A remote upgrade device for an Internet of Things gateway, wherein the host computer system is installed in the remote upgrade device for the Internet of Things gateway; the remote upgrade device for the Internet of Things gateway comprises: a memory and a processor, wherein the memory stores a computer program that can be called by the processor, and when the computer program is executed by the processor, the steps of the remote upgrade method for the Internet of Things gateway are implemented.

[0027] A computer-readable storage medium stores an Internet of Things gateway remote upgrade program, and when the Internet of Things gateway remote upgrade program is executed by a processor, the steps of the Internet of Things gateway remote upgrade method are implemented.

[0028] As described above, the remote upgrade method of the Internet of Things gateway of the present invention has the following beneficial effects:

[0029] The present invention utilizes that the RAM buffer capacity of the gateway for receiving data is small and cannot receive all the upgrade data of the firmware upgrade package at one time, while the capacity of the FLSAH area inside the gateway is large enough, and the rate at which the gateway writes the upgrade data received by the RAM buffer into the FLSAH area is much greater than the upgrade data receiving rate, so the gateway does not affect the upgrade data reception of the firmware upgrade package when writing the upgrade data; after the gateway receives the upgrade data length of the specified firmware upgrade package, the upgrade data received by the RAM buffer is written into the FLSAH buffer, and the current received length of the RAM buffer is recorded. After the upgrade data is written into the FLSAH buffer, the written length written into the FLSAH buffer is recorded, and the gateway continues to wait for reception; the re-reception of the RAM buffer and the re-writing of the FLSAH buffer are executed from the last completed position; when the receiving length of the RAM buffer is full, the receiving length full flag is recorded, and the next round of upgrade data reception continues to be received from the first position of the RAM buffer; after receiving the block length again, the gateway The unwritten upgrade data in the RAM buffer continues to be written into the FLSAH buffer. When the RAM buffer is executed to the end position, the upgrade data to be written continues to be written from the first position of the RAM buffer. After all firmware upgrade packages are received and written into the buffer FLSAH area, the upgrade data is verified and then written into the FLSAH backup area and the FLSAH executes the operation. The remote upgrade method for the Internet of Things gateway provided by the present invention sets the specified length written into the FLSAH buffer, records the written length written into the FLSAH buffer, and records the current RAM buffer full length. The upgrade data received in the RAM buffer is repeatedly written into the FLSAH area, and the FLSAH resources are fully utilized. Less RAM resources can be occupied to receive firmware upgrade packages several times the size of the RAM buffer, thereby realizing remote upgrade of large-capacity programs of the gateway. The present invention manages the time of the entire upgrade process to avoid the problem that the gateway cannot operate normally due to abnormal upgrade time caused by upgrade failure or communication interruption, thereby improving the upgrade effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It shows a schematic diagram of the space comparison of the firmware upgrade package, RAM cache area and FLSAH area in Example 1.

[0031] Figure 2 Shown is a block diagram of the upper computer system establishing a connection with the Internet of Things gateway in step 1 of Example 1.

[0032] Figure 3 It shows the block structure of the RAM buffer in Example 1 and a schematic diagram of the storage direction of the upgrade data in the RAM buffer.

[0033] Figure 4It is a schematic diagram showing that the RAM buffer receives the upgrade data of the firmware upgrade package and writes it into the FLSAH buffer in Example 1.

[0034] Figure 5 A schematic diagram showing the transmission of upgrade data in the FLSAH area in Example 1. DETAILED DESCRIPTION

[0035] The following is a description of the implementation of the present invention by means of specific embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification.

[0036] See also Figures 1 to 5 It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings in this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any structural modification, change in proportion or adjustment of size should still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.

[0037] Example 1, please refer to Figure 1 , Figure 1 Where a is a RAM buffer area, b is a firmware upgrade package, c is a FLSAH buffer area, d is a FLSAH backup area, and e is a FLSAH execution area. This embodiment provides a remote upgrade method for an Internet of Things gateway, including a host computer system equipped with a firmware upgrade package and an Internet of Things gateway to be upgraded, wherein a receiving RAM buffer area and a FLSAH area are provided inside the Internet of Things gateway; the FLSAH area is divided into a FLSAH buffer area, a FLSAH backup area, and a FLSAH execution area; the remote upgrade method comprises the following steps:

[0038] See also Figure 2-5 , Figure 3 In the , a single block S is the specified length written to FLSAH, block 1 is the first address of the RAM buffer area, and block 10 is the last address of the RAM buffer area; Figure 4 In the figure, a1 is the free RAM block for transferred data, a2 is the RAM block for receiving upgrade data, b1 is the data of the received firmware upgrade package, and c1 is the upgrade data written into the FLSAH buffer; Step 1, establish a remote connection between the IoT gateway and the host computer system through the network port;

[0039] Step 2: The gateway starts to receive the upgrade data of the firmware upgrade package and puts the received upgrade data into the RAM buffer;

[0040] Step 3: After the upgrade data received by the gateway reaches the block length, the received length of the current RAM buffer is recorded;

[0041] Step 4, the upgrade data starts to be written from the RAM buffer to the specified length set in the FLSAH buffer; the specified length of the FLSAH buffer depends on the read and write characteristics of the FLSAH inside the gateway. When the FLSAH supports word writing, the specified length is set to word; when the FLSAH only supports block erasing and block writing, the specified length is set to the block size that supports block writing; the specified length of the FLSAH buffer is calculated by the relationship between the time required for writing the upgrade data to the FLSAH and the receiving time, and the calculation is as follows: set the size of the FLSAH buffer area to L1 and the specified length to L2; the time required for the RAM receiving buffer area to receive the specified length is T1; the time required for the FLSAH buffer area to write the specified length is T2, then it is necessary to satisfy L1>([T2 / T1]+2)*L2; in order to prevent unexpected situations such as interruptions, L1 can be appropriately placed in redundancy to ensure that the contents in the RAM receiving buffer area have enough time to be written into the FLSAH buffer area;

[0042] Step 5: After the upgrade data is written into the FLSAH buffer, the written length of the FLSAH buffer is recorded;

[0043] Step 6: The gateway continues to receive the upgrade data, and the upgrade data in its RAM buffer is received again starting from the position after the last upgrade data recorded in step 4 reaches the block length; the upgrade data receiving and writing operation in step 4 is repeated until all upgrade data reception is completed;

[0044] Step 7: When the length of the next round of upgrade data received by the gateway exceeds the length of the RAM buffer, the full length of the current RAM buffer is recorded; before the gateway receives the next round of upgrade data, the operation of writing into the FLSAH buffer is completed to ensure the integrity and reliability of the upgrade data reception;

[0045] Step 8: When the upgrade data receiving length reaches the end position of the RAM buffer, the next round of upgrade data will be placed in the first position of the RAM buffer. Since the upgrade data has been operated from step 3 to step 6, the first position of the RAM buffer has been vacated, ensuring the continuity of the upgrade data reception.

[0046] Step 9: When the upgrade data received by the gateway reaches the specified length, the receiving length of the current RAM buffer is re-recorded;

[0047] Step 10, the gateway continues to write the upgrade data into the FLSAH buffer starting from the RAM buffer location recorded in step 8;

[0048] Step 11: After the gateway receives all the required upgrade data, it executes the operation of writing the upgrade data into the FLSAH buffer for the last time;

[0049] Step 12: Verify the upgrade data received in the FLSAH buffer, write the upgrade data into the FLSAH backup area after verification, and send back a signal indicating that the upgrade data has been successfully received by the host computer;

[0050] Step 13: After the FLSAH backup area is written successfully, continue to write the upgrade data into the FLSAH execution area;

[0051] Step 14: After the upgrade data is written into the FLSAH execution area, a success signal is sent back to the upper level;

[0052] Step 15: After the new program is successfully executed, a new version number is sent to the host system to ensure the integrity of the upgrade again.

[0053] The remote upgrade method also includes time management for the upgrade process when the gateway is in the state of waiting for upgrade; the time management must be met during the operation process of steps 1 to 15, and if any process fails in the middle, the gateway will return the relevant status of the host computer and perform version rollback; time management can be based on laboratory simulation or previous experience of similar equipment upgrades, and detailed time breakdown and estimation of each link of the upgrade process. For example, the time consumption is calculated by combining the network bandwidth (1Gbps bandwidth takes about 4-6 seconds to download a 500MB upgrade package, and 100Mbps takes 40-60 seconds) and server response delay to pull the upgrade package from the server to the local gateway storage; the integrity and legality of the upgrade package is estimated to be 5-10 minutes; execute the upgrade script and update the system files, simple patch operation takes 10-20 minutes, and comprehensive system upgrade takes 30-90 minutes; restart and initialize the gateway device, ordinary restart takes 3-8 minutes, and complex configuration loading and service self-start may be extended to 15-20 minutes. Summarize the time of each link, and add an additional 20%-30% as elastic buffer time to determine the theoretical total upgrade time; during the upgrade process, start the operation on time in the selected upgrade window according to the established plan, use professional network management software and command line tools to track the progress in real time, and record the start and end time of each key node, such as the time when the upgrade package starts downloading, the time when the download is completed, and the time when the upgrade installation starts and ends. If a link exceeds 30% of the estimated time, immediately suspend the operation and find out the cause, which may be network jitter causing slow downloading, device disk read and write failure affecting file updates, etc., quickly eliminate the problem to ensure a close connection between the process; after confirming that the upgrade is successful and the business is running stably, organize the team to review the entire upgrade process, analyze the reasons for the difference between the actual time consumption and the estimate of each link, and formulate targeted optimization strategies for the timeout link, such as optimizing network configuration to improve download speed, streamlining upgrade scripts to reduce execution time, etc., and archive the experience to improve the time management plan for subsequent gateway upgrade iterations.

[0054] The present invention utilizes that the capacity of the RAM buffer used by the gateway for receiving data is small and cannot receive all the upgrade data of the firmware upgrade package at one time, while the capacity of the FLSAH area inside the gateway is large enough, and the rate at which the gateway writes the upgrade data received by the RAM buffer into the FLSAH area is much greater than the rate at which the upgrade data is received, so the gateway does not affect the upgrade data reception of the firmware upgrade package when writing the upgrade data; after the gateway receives the upgrade data length of the specified firmware upgrade package, the upgrade data received by the RAM buffer is written into the FLSAH buffer, and the current received length of the RAM buffer is recorded. After the upgrade data is written into the FLSAH buffer, the written length written into the FLSAH buffer is recorded, and the gateway continues to wait for reception; the re-receiving of the RAM buffer and the re-writing of the FLSAH buffer are from the last completed position The execution starts at the place where the receiving length of the RAM buffer is set; when the receiving length of the RAM buffer is full, the receiving length full flag is recorded, and the next round of upgrade data reception continues to be received from the first position of the RAM buffer; after receiving the block length again, the gateway continues to write the unwritten upgrade data in the RAM buffer into the FLSAH buffer, and when the execution reaches the end position of the RAM buffer, the upgrade data to be written continues to be written from the first position of the RAM buffer; after all firmware upgrade packages are received and written into the buffer FLSAH area, the upgrade data is verified, and then written into the FLSAH backup area, and the FLSAH executes the operation to realize the remote upgrade of the gateway large-capacity program; the present invention manages the time of the entire upgrade process, avoids the problem that the gateway cannot operate normally due to abnormal upgrade time caused by upgrade failure or communication interruption, and improves the upgrade effect.

[0055] Example 2. This example adopts the remote upgrade method of the Internet of Things gateway provided in Example 1 to upgrade a gateway containing an embedded microprocessor. The microprocessor model of the gateway is stm32f103rct6, the operating frequency is 72Mhz, the network port communication baud rate is 115200b / s, the total RAM space is 48K, the total FLSAH space is 256K, and half-word (16bit) writing is supported. The firmware upgrade package size is 50K.

[0056] Since the size of the program upgrade package exceeds the size of the total RAM space, the entire firmware upgrade package cannot be downloaded in one go using RAM. After calculation and testing, the time T≈10 / 115200≈87us for the microprocessor to receive one byte (8 data bits + 1 start bit + 1 end bit, a total of 10 bits) of the firmware upgrade package sent by the host computer, and the time to write a half word (16 bits) of FLSAH is about 69us after testing; taking the half word (16 bits) as the specified length, L2=2Byte, T1≈2*87 (writing RAM time is ignored)≈174us, T2≈69us, substituting into the formula L1>([T2 / T1]+2)*L2, it is obtained that: L1>4Byte, in order to prevent abnormal situations, ensure reliability, and the remaining situation of the program using RAM, necessary redundancy is made for L1, and L1 is selected as 1K.

[0057] The results of using this method to upgrade gateways containing embedded microprocessors are as follows: when the firmware upgrade package is larger than the total RAM space, only 1k of RAM buffer is used to successfully implement remote upgrade of 50K firmware upgrade packages for more than 200 such gateways in a project, indicating that this method is feasible and reliable.

[0058] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0059] In summary, the remote upgrade method for the Internet of Things gateway provided by the present invention sets the specified length written into the FLSAH buffer, records the written length written into the FLSAH buffer, records the full length of the current RAM buffer, and repeatedly writes the upgrade data received by the RAM buffer into the FLSAH area, making full use of the FLSAH resources, occupying less RAM resources to receive firmware upgrade packages several times the size of the RAM buffer, and realizing the remote upgrade of the gateway large-capacity program; the present invention manages the entire upgrade process throughout the time, avoiding the upgrade time abnormality caused by upgrade failure or communication interruption, which leads to the problem that the gateway cannot operate normally, and improves the upgrade effect. Therefore, the present invention effectively overcomes the various shortcomings in the prior art and has a high industrial utilization value.

[0060] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A remote upgrade method for an Internet of Things gateway, comprising a host computer system equipped with a firmware upgrade package and an Internet of Things gateway to be upgraded, wherein a receiving RAM buffer and a FLSAH area are provided inside the Internet of Things gateway; It is characterized in that The FLSAH area is divided into a FLSAH buffer area, a FLSAH backup area, and a FLSAH execution area; the remote upgrade method comprises the following steps: Step 1: Establish a remote connection between the IoT gateway and the host computer system through the network port; Step 2: The gateway starts to receive the upgrade data of the firmware upgrade package and puts the received upgrade data into the RAM buffer; Step 3: After the upgrade data received by the gateway reaches the block length, the received length of the current RAM buffer is recorded; Step 4: The upgrade data starts to be written from the RAM buffer to the specified length set in the FLSAH buffer; Step 5: After the upgrade data is written into the FLSAH buffer, the written length of the FLSAH buffer is recorded; Step 6: The gateway continues to receive the upgrade data, and the upgrade data in its RAM buffer is received again starting from the position after the last upgrade data recorded in step 4 reaches the block length; the upgrade data receiving and writing operation in step 4 is repeated until all upgrade data reception is completed; Step 7: When the length of the next round of upgrade data received by the gateway exceeds the length of the RAM buffer, the current RAM buffer full length is recorded; Step 8: When the upgrade data receiving length reaches the end position of the RAM buffer, the next round of upgrade data will be placed in the first position of the RAM buffer; Step 9: When the upgrade data received by the gateway reaches the specified length, the receiving length of the current RAM buffer is re-recorded; Step 10, the gateway continues to write the upgrade data into the FLSAH buffer starting from the RAM buffer location recorded in step 8; Step 11: After the gateway receives all the required upgrade data, it executes the operation of writing the upgrade data into the FLSAH buffer for the last time; Step 12: Verify the upgrade data received in the FLSAH buffer, write the upgrade data into the FLSAH backup area after verification, and send back a signal indicating that the upgrade data has been successfully received by the host computer; Step 13: After the FLSAH backup area is written successfully, continue to write the upgrade data into the FLSAH execution area; Step 14: After the upgrade data is written into the FLSAH execution area, a success signal is sent back to the upper level; Step 15: After the new program is successfully executed, a new version number is sent to the host system to ensure the integrity of the upgrade again.

2. The remote upgrade method of the Internet of Things gateway according to claim 1, characterized in that: In step 4, the specified length of the FLSAH buffer depends on the read and write characteristics of the FLSAH inside the gateway. When the FLSAH supports word writing, the specified length is set to word; when the FLSAH only supports block erasure and block writing, the specified length is set to the block size that supports block writing.

3. The remote upgrade method of the Internet of Things gateway according to claim 2, characterized in that: The specified length of the FLSAH buffer is calculated based on the relationship between the time required to write the upgrade data to the FLSAH and the receiving time, and the calculation is as follows: set the size of the FLSAH buffer to L1 and the specified length to L2; the time required for the RAM receiving buffer to receive the specified length is T1; the time required for the FLSAH buffer to write the specified length is T2, then L1>([T2 / T1]+2)*L2 must be satisfied.

4. The remote upgrade method of the Internet of Things gateway according to claim 1, characterized in that: In step 7, before the gateway receives the next round of upgrade data, the operation of writing into the FLSAH buffer is completed.

5. The remote upgrade method of the Internet of Things gateway according to claim 1, characterized in that: The remote upgrade method also includes time management of the upgrade process when the gateway is in the state to be upgraded; the time management must be met during the operation of steps 1 to 15. If any process fails in the middle, the gateway will return the relevant status of the host computer and perform version rollback.

6. A remote upgrade device for an Internet of Things gateway, wherein the host computer system is installed in the remote upgrade device for an Internet of Things gateway; characterized in that: The Internet of Things gateway remote upgrade device includes: a memory and a processor, wherein the memory stores a computer program that can be called by the processor, and when the computer program is executed by the processor, the steps of the Internet of Things gateway remote upgrade method as described in any one of claims 1 to 5 are implemented.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an Internet of Things gateway remote upgrade program, and when the Internet of Things gateway remote upgrade program is executed by the processor, the steps of the Internet of Things gateway remote upgrade method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Multimedia conferencing system

    US20030187632A1

  • DSP on-line upgrading method for dynamically adjusting RAM space

    CN108153536A

  • Chip program upgrading method and device and storage medium

    CN111309364A

  • Gateway-based firmware upgrading method and equipment firmware upgrading method

    CN112612497A

  • Firmware upgrading method, control chip and intelligent household electrical appliance

    CN116541042A