CN112148326A - Remote updating method, device and system for Internet of things equipment firmware - Google Patents

Remote updating method, device and system for Internet of things equipment firmware Download PDF

Info

Publication number
CN112148326A
CN112148326A CN202010897113.1A CN202010897113A CN112148326A CN 112148326 A CN112148326 A CN 112148326A CN 202010897113 A CN202010897113 A CN 202010897113A CN 112148326 A CN112148326 A CN 112148326A
Authority
CN
China
Prior art keywords
firmware
version
updating
internet
new
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010897113.1A
Other languages
Chinese (zh)
Inventor
孙常青
郑富全
周广旭
邢仁鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Automation Shandong Academy of Sciences
Original Assignee
Institute of Automation Shandong Academy of Sciences
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Automation Shandong Academy of Sciences filed Critical Institute of Automation Shandong Academy of Sciences
Priority to CN202010897113.1A priority Critical patent/CN112148326A/en
Publication of CN112148326A publication Critical patent/CN112148326A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1433Saving, restoring, recovering or retrying at system level during software upgrading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Abstract

The invention provides a method, a device and a system for remotely updating firmware of equipment of the Internet of things, wherein the method comprises the following steps: the cloud server receives the new version firmware and the updating request through the network, and carries out version verification on the current version firmware; after the verification is passed, the new firmware is transmitted to the Internet of things equipment, version mark information is set for the new firmware, and the version mark information is stored in a database for the Internet of things equipment to inquire; the method comprises the steps that the Internet of things equipment receives new-version firmware of a cloud server and verifies the information of the new-version firmware; when the updating condition is reached, version updating is started to be executed; if the abnormal updating condition occurs in the middle of the version updating, executing the version rollback operation and recovering to the current version firmware; if no abnormal updating condition exists, fixedly upgrading the current version to the new version firmware; through a hardware multi-column storage system structure and a software rollback processing mechanism, the firmware can be safely updated under any condition, the resource use of the Internet of things is optimized, and the bandwidth constraint and allocation are adapted.

Description

Remote updating method, device and system for Internet of things equipment firmware
Technical Field
The disclosure relates to a method, a device and a system for remotely updating firmware of equipment of the Internet of things.
Background
With the development of internet and information technology, internet of things (IoT) technology and devices are spreading out in many areas of application and deployment speed, and it is expected that about 410 million devices will come online in 2027. The internet of things is deployed in many environments with its large connected device ecosystem, bringing complications related to the update process. Updating firmware after product delivery has many reasons, including fixing errors, adding new functionality, or improving security. At present, this task is generally accomplished by adopting an update mechanism, however, once the internet of things device is deployed, because the life cycle of the internet of things device is long, especially when the number of devices is large, the device is also deployed in a remote or inaccessible unattended area, the manual intervention cost is high, and the like, the firmware update plays a crucial role in the life cycle, and there is a strong market demand for a convenient, reliable and safe firmware update mechanism and solution.
In the early stage of development and application of the internet of things, when a problem or a defect is found after equipment is deployed on the site, the equipment can only be taken back on the site, disassembled, connected to a computer or a tool such as a development system/simulator and the like, reprogrammed or refreshed, and then taken back to the site for installation and use, the equipment is updated, intermittent interruption and performance reduction are often caused, and the defect of the mode is more and more obvious along with the increase of the deployment number of the equipment, the process is too complicated, time-consuming and labor-consuming, the cost is high, and the safety is poor.
The inventor finds that with the development and maturity of the technology of the internet of things, corresponding new technology is endlessly developed, and an Over-the-air (OTA) wireless firmware updating technology appears, wherein an OTA is a technical means for remotely updating codes on an embedded device, and by using the OTA technology, defects can be repaired, new functions can be added and product performance can be improved for remote internet of things devices without field and manual intervention. Successful OTA updates require complex coordination between the internet of things hardware, device firmware, network connections, and the cloud platform, and all these components or links must be visible and controllable to successfully implement the OTA updates. At present, few internet of things equipment development companies have internet of things hardware, software, connection and cloud ecosystems, the capacity and the overall solution for autonomously processing OTA firmware updating and managing remote equipment are lacked, public internet of things platforms such as Ali cloud and Baidu cloud are concerned with the internet of things large enterprises mainly in the aspects of platforms and software, internet of things hardware and firmware are generally not related, although some internet of things OTA functions are also provided, only a small part of functions required for realizing complete, reliable and safe updating are provided actually, and the firmware updating requirements of most internet of things equipment cannot be fully met. Based on the above reasons, in order to ensure that the internet of things equipment is deployed, updated and used in a longer life cycle, and to avoid expensive, time-consuming and labor-consuming recalls and field services, a new method and a solution capable of comprehensively improving the remote updating of the firmware of the internet of things equipment are urgently needed to be sought.
Disclosure of Invention
In order to solve the technical problem, the disclosure further provides a method, a device and a system for remotely updating the firmware of the internet of things equipment.
In a first aspect, the present disclosure provides a method for remotely updating a firmware of an internet of things device, which is applied to the internet of things device, and includes:
receiving new firmware version transmitted by the cloud server, verifying the new firmware version information after the new firmware version information is received, and judging whether an updating condition is met or not after the new firmware version information passes the verification;
when the updating condition is reached, version updating is started to be executed; if the abnormal updating condition occurs in the middle of the version updating, executing the version rollback operation and recovering to the current version firmware; and if the update exception condition does not exist, fixedly upgrading the current version to the new version firmware.
In a second aspect, the present disclosure further provides an internet of things device firmware remote updating apparatus, which is applied to an internet of things device, and includes:
an information verification module configured to: receiving new firmware version transmitted by the cloud server, verifying the new firmware version information after the new firmware version information is received, and judging whether an updating condition is met or not after the new firmware version information passes the verification;
a version update module configured to: when the updating condition is reached, version updating is started to be executed; if the abnormal updating condition occurs in the middle of the version updating, executing the version rollback operation and recovering to the current version firmware; and if the update exception condition does not exist, fixedly upgrading the current version to the new version firmware.
In a third aspect, the present disclosure also provides a computer-readable storage medium for storing computer instructions, which when executed by a processor, implement the method for remotely updating the firmware of the internet of things device according to the first aspect.
In a fourth aspect, the present disclosure also provides an internet of things device, including a memory, a processor, and computer instructions stored in the memory and executed on the processor, where the computer instructions, when executed by the processor, implement the method for remotely updating firmware of an internet of things device according to the first aspect.
In a fifth aspect, the present disclosure further provides an internet of things device firmware remote updating system, including: a cloud server and an Internet of things device,
the cloud server is configured to: receiving the new version firmware and the updating request through a network, and after receiving the updating request, performing version verification on the current version firmware; after the verification is passed, the cloud server transmits the new version firmware to the Internet of things equipment, sets version mark information for the new version firmware, and stores the version mark information in a database for the Internet of things equipment to inquire;
the internet of things device is configured to: receiving new firmware versions of the cloud server, verifying the new firmware versions after the new firmware versions are received, and judging whether update conditions are met or not after the new firmware versions pass the verification; when the updating condition is reached, version updating is started to be executed; if the abnormal updating condition occurs in the middle of the version updating, executing the version rollback operation and recovering to the current version firmware; and if the update exception condition does not exist, fixedly upgrading the current version to the new version firmware.
Compared with the prior art, this disclosure possesses following beneficial effect:
1. the design method and the whole solution covering the Internet of things equipment firmware, the gateway, the connection and the cloud application are provided by adopting a cloud technology and Internet of things equipment software and hardware collaborative design method, the equipment management of the cloud adopts an RESTAPI application program which is used for processing the uploading firmware and the downloading firmware, and the processing comprises the encryption and verification of the firmware and the management of the historical firmware version. The design method of the boot loader Bootloader at the equipment end of the Internet of things adopts a hardware multi-column storage system structure and a software rollback processing mechanism, supports rollback to the last correct version of firmware under abnormal conditions such as power failure, system crash and the like in the firmware upgrading process, and ensures that the firmware can be safely updated under any conditions. According to a specific application scene, a push/pull updating mode and a difference/complete firmware updating strategy are selected, the resource use of the Internet of things is optimized, and the bandwidth constraint and allocation are adapted.
2. According to the method, the cloud server is adopted to transmit data to the Internet of things equipment, the version mark information is set for the new version firmware, and the version mark information is stored in the database for the Internet of things equipment to inquire.
2. The method tests new functions by sending updates to one or more devices, developers can frequently and reliably deploy the Internet of things, update and release new firmware at any time, products can keep the latest functions and versions, all communication channels between the devices and the cloud platform adopt encryption and authorization mechanisms, safe updates are provided, and the firmware is managed across device groups through seamless and uniform cloud platforms, so that the cost is saved, the expandability of hardware and software is high, and the OTA firmware updates are easily sent by expanding 1 device to 1000 devices.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application.
FIG. 1 is a general block diagram of the system of the present disclosure;
FIG. 2 is a block diagram of the overall data and processing flow of the present disclosure;
FIG. 3 is a diagram illustrating a data structure of metadata in a firmware update according to the present disclosure;
fig. 4 is a structural and functional block diagram of a Bootloader at an internet of things device side according to the present disclosure;
FIG. 5 is a diagram illustrating a conventional or early IOT device firmware update in the background art;
fig. 6 is a schematic view of a life cycle of a general internet of things device in the background art.
The specific implementation mode is as follows:
the present disclosure is further described with reference to the following drawings and examples.
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the disclosure. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments according to the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
Fig. 5 shows an example of the firmware update of the conventional or early internet of things device, when the software of the ECU (108 in fig. 5) of the electronic control unit in the vehicle needs to be updated, the firmware required for the update is released by the vehicle manufacturer or the third party technology company 100, then the vehicle user or customer must be contacted and informed to take the vehicle to the dealer 4S shop or repair shop (recall) for updating, and the updated firmware released by 100 is written into the ECU by the professional 102 through the use of the notebook or desktop computer 104 and the special development tool 106. The most obvious defects of the method are that expensive recalls and field services are needed, the manual updating process is complicated, the safety is poor, the firmware updating cannot be completed by the end user, meanwhile, the expandability of the method is poor, new functions or safety patch adding cannot be completed quickly basically as the number of automobiles of the type increases nationwide or even worldwide, the software needs to be kept up to date in the whole life cycle, and the cost of labor, time and the like is very high, or even cannot be realized.
Fig. 6 is a schematic diagram of a life cycle of a general internet of things device, where the life cycle of the internet of things device generally includes four links, that is, a refresh firmware 200, a deployment device 202, a device service period 204, and a decommissioning 206 in the diagram. The initial firmware is written to the flash memory 200 of the internet of things device and starts, and the device 202 deployment phase begins, at which the device joins the internet of things, goes online, and registers with a remote server (e.g., a cloud service). After this, a device service period 204 begins during which firmware/software updates will be needed from time to time. Finally, during decommissioning 206, the internet of things device is deactivated and may require explicit instructions to decommission the device. The device service period 204 accounts for the longest proportion in the whole life cycle, and the firmware update needs the most in the period, and the frequency is the largest, and accounts for more than 90%. The useful life of the equipment is typically over 10 years (and even longer in some vertical industries). The internet of things involves a wide range of device manufacturers, who may vary greatly in dealing with the entire device lifecycle, who themselves may not wish to, or be able to, support software and services for such a long time.
The noun explains:
IoT (Internet of things) Internet of things;
OTA (Over-the-air) wireless firmware update techniques;
bootloader embedded and Internet of things equipment guides and loads programs;
API (application Programming interface) application program interface;
REST API (Representational State Transfer), a lightweight web services API;
an ECU (electronic Control unit) electronic Control unit;
a CPU (Central Processing Unit);
tls (transport Layer security) transport Layer security;
APP: an application program;
mqtt (message Queuing Telemetry transport) message queue Telemetry transport protocol.
Example 1
As shown in fig. 1-4, the present disclosure provides a method for remotely updating firmware of an internet of things device, including:
step S1, uploading the new firmware to a cloud server through a network, and sending an update request; after receiving the updating request, the cloud server carries out version verification on the current version firmware;
step S2: after the verification is passed, the cloud server transmits data to the Internet of things equipment, sets version mark information for the new version firmware, and stores the version mark information in a database for the Internet of things equipment to inquire;
step S3: after the data transmission is finished, the Internet of things equipment verifies the information of the new firmware version, and judges whether the updating condition is met or not after the verification is passed;
step S4: when the updating condition is reached, version updating is started to be executed; if the abnormal updating condition occurs in the middle of the version updating, executing the version rollback operation and recovering to the current version firmware; and if the update exception condition does not exist, fixedly upgrading the current version to the new version firmware.
Further, uploading the new version firmware to the cloud server through the network, and sending an update request specifically includes: and the firmware release/update manager adds the new firmware version through an API (application program interface) or webpage mode provided by the OTA cloud service, modifies the metadata and sends an update request.
Further, after receiving the update request, the cloud server performs version verification on the current version firmware by the specific steps of: after receiving the update request, the OTA cloud service 402 needs to perform firmware version verification and historical version management 410, including verifying the device type, the device number, and whether the firmware version is the latest firmware version.
Further, the step of performing version verification of the current version of firmware includes: and detecting whether an update version 408 exists or not, supporting bidirectional operation according to the setting of metadata, and dividing the two modes into a push mode and a pull mode, wherein the push mode refers to that the OTA cloud service 402 pushes a firmware update message to the Internet of things equipment 404, the update command can be immediately received as long as the Internet of things equipment 404 is online, and then the next update process is carried out. The "pull" mode refers to the internet of things device 404 sending an inquiry to the OTA cloud service 402 on an irregular basis to determine whether there are new update instructions, and has the advantage that the user can freely schedule downtime to enable firmware upgrade on a schedule. Next, the OTA cloud service 402 starts to send or download data 412 to the internet of things device 404, the data includes a firmware image and metadata, once the data is downloaded, the internet of things device 404 starts to execute 414, including firmware decryption verification, check whether the device type and the device ID are consistent, whether the version number is latest, and the like, further, after the OTA management 400 sends an update request, the OTA management 400 may autonomously query 418 the firmware update progress at any time, or receive a final report 420 of firmware update pushed by the OTA cloud service 402, the time from sending the update request to finishing the update is uncertain, and many factors may affect the time, such as that the internet of things device to be updated is not online, is in a sleep state, or does not suggest immediate update at this time for security reasons.
Further, after the verification is passed, the cloud server transmits data to the internet of things device, specifically: the cloud service 402 sends or downloads data 412, including firmware images and metadata, to the internet of things device 404.
Further, after the data transmission is completed, the internet of things device performs new version firmware information verification, specifically: after the data transmission is completed, the internet of things device 404 starts to execute new firmware information verification, where the new firmware information verification includes firmware decryption verification, device type checking, device ID detection whether the device ID matches, version number detection whether the version number is up-to-date, update mode selection, and the like. Specifically, the setting and modification of metadata (described with reference to fig. 3 and fig. 4) are used to control some program trends and processing flows of the firmware updating process, where the firmware maps the device information 502, including the device type, the device ID, and the version number, and the boot program of the device needs to use these parameters to verify whether the device type and the device ID are consistent, and whether the version number is latest; the updating mode selection 504 includes two updating modes, namely differential firmware updating and complete firmware updating, if the uploaded firmware file only contains the difference part between the new version firmware and the previous version, only the difference part is updated or upgraded to the equipment, and the differential updating can effectively reduce the occupation of equipment resources and reduce the flow consumption of the issued firmware. The firmware image authentication selection 506 may set different authentication modes including non-authentication, simple authentication (such as password authentication), complex authentication (such as symmetric/asymmetric key method), and the like, in combination with different security requirements due to different software and hardware resource configurations at the internet of things device side. The firmware update timing selection 508 is that some internet of things devices are online control type devices, and it is preferable to update the firmware in a safe or idle state, and immediate update, update in a fixed time period, or update in a certain state may be set, and the default is immediate update. The update status upload mode 510 may select real-time upload, fixed frequency upload, or update end upload. The update failure processing 512 may encounter many unexpected situations in the firmware upgrade process, such as power failure, random restart, system crash, etc., and may choose to restart the firmware for another update, automatically roll back to the last normal firmware operation, or manually intervene in the update.
Further, after the verification is passed, whether the update condition is reached is judged, and when the update condition is reached, version update is started, specifically: and evaluating the updating time, and setting various evaluation preset conditions, for example, after the preset work of the firmware equipment is located at the expected updating time, namely after the firmware equipment finishes processing the processing data, the reserved processing data reaches the preset conditions after the expected updating time, and the Bootloader starts to execute updating.
Further, if an abnormal update condition occurs in the middle of the version update, a version rollback operation is executed to recover to the current version firmware, specifically: in the process of upgrading the firmware, abnormal conditions such as power failure, system crash and the like support rollback to the last correct version of firmware, namely the current version of firmware, and the mechanism ensures that the firmware can be safely updated under any condition.
Further, if there is no update exception, the method fixedly upgrades the current version to the new version firmware, which specifically includes: updating successfully, and performing version management, such as marking and storing a whole image package and difference codes of last several times, and the like to prepare for next updating or upgrading; when the updating process is completed, whether the new firmware is started to run successfully or the old firmware is not run successfully or is rolled back, the system needs to be restarted, not only the MCU needs to be restarted, but also the corresponding peripheral chip or module (e.g., 4G communication module) needs to be restarted.
Further, when the update condition is reached, version update is started to be executed, specifically: and the Bootloader is used for conducting authentication decryption, multi-storage block management and restarting operation, and conducting overall update management or difference update management, and version management or rollback mechanism.
Further, the authentication decryption is to authenticate the downloaded new firmware, judge whether the firmware is for the device, and perform corresponding decryption operation according to the metadata; the multi-storage block is managed to write the processed firmware image and data into corresponding storage areas respectively; the whole update management or the difference update management is generation and synthesis of firmware images for processing two different update modes of whole update and difference update; the version management or rollback mechanism is used for updating failure, executing and finishing the rollback process, updating success, performing version management, such as marking and storing a whole image package and difference codes of last several times, and the like, and preparing for next updating or upgrading.
Further, the Bootloader unit adopts a dual storage structure 600, and includes a first Flash unit 602, a second Flash unit 604, a first EEPROM unit 606, and a second EEPROM unit 608. Flash is generally used for storing program codes and data, and an electrically erasable programmable read-only memory EEPROM is used for storing data, furthermore, a scheme of combining an on-chip with an off-chip can be selected, a Flash and an EEPROM in an MCU chip are adopted, an external independent Flash chip and an EEPROM chip are adopted, or other combination modes are adopted.
Further, the restart operation is: when the updating process is completed, whether new firmware is successfully started to run or old firmware is failed to be rolled back to run, the system needs to be restarted, not only the MCU needs to be restarted, but also the corresponding peripheral chip or module (e.g., 4G communication module) needs to be restarted, so a reset restart module 618 is provided, a plurality of restart commands are started by the Bootloader 610 to control the peripheral chip or module 616, and control signals sent by the reset module include level signals and pulse signals, which can control the on-off of the reset terminal of the peripheral chip or the power supply of the module, thereby ensuring the reliable restart operation of each relevant chip and component in the internet of things device.
Further, the Bootloader unit 610 is a key component of the embedded/internet of things software stack, and once the device is powered on or reset, the microcontroller MCU or the central processing unit CPU transfers the control right to the Bootloader.
Further, version flag information is set for the new version firmware, and the version flag information is stored in a database for the internet of things equipment to query, specifically: after the verification is passed, setting a corresponding agreed mark for the internet of things equipment 404 to inquire; after sending the update request, the OTA management 400 may autonomously perform a firmware update progress query 418 at any time, or receive a firmware update final report 420 pushed by the OTA cloud service 402, where a time period from sending the update request to finishing the update is uncertain, and there are many factors that may affect the time, such as that the internet of things device to be updated is not online, is in a dormant state, or does not suggest immediate update at this time due to security reasons. The firmware update process sometimes needs to be performed for a period of time, during which the internet of things device sends an update progress 416, generally expressed in percentage, to the OTA cloud service, and in addition, at the end of the process, the internet of things device sends update success or failure information 422 to the OTA cloud service, and the OTA management 400 can query or receive the pushed data and information, so as to facilitate the control of the firmware update process.
Example 2
The present disclosure also provides a remote update management device for firmware of an internet of things device, which is applied to the internet of things device, and includes:
an information verification module configured to: receiving new firmware version transmitted by the cloud server, verifying the new firmware version information after the new firmware version information is received, and judging whether an updating condition is met or not after the new firmware version information passes the verification;
a version update module configured to: when the updating condition is reached, version updating is started to be executed; if the abnormal updating condition occurs in the middle of the version updating, executing the version rollback operation and recovering to the current version firmware; and if the update exception condition does not exist, fixedly upgrading the current version to the new version firmware.
Further, the specific configuration modes of the information verification module and the version update module respectively correspond to the specific steps of the method for remotely updating the firmware of the internet of things device in the embodiment.
Further, the version update module includes a Bootloader unit 610, which is a key component of the embedded/internet of things software stack, and once the device is powered on or reset, the microcontroller MCU or the central processing unit CPU transfers control to the Bootloader, which is generally divided into multiple stages, including an authentication decryption module 620, multiple storage block management 612, integrity/difference update management 614, and a version management/rollback mechanism 622.
To ensure the safety and reliability of the update process, the present disclosure employs a dual storage architecture 600, including 602 a first Flash, 604 a second Flash, 606 a first EEPROM, and 608 a second EEPROM. Flash memory is generally used for storing program codes and data, and an electrically erasable programmable read-only memory (EEPROM) is used for storing data, further, a scheme of combining the inside and the outside of a chip can be selected, for example, the Flash and the EEPROM in a first selected MCU chip, a Flash chip and the EEPROM chip which are independent from the outside are selected in a second selected MCU chip, or other combination modes. In the figure, the authentication decryption module 620 authenticates the downloaded new firmware, determines whether the new firmware is the firmware for the device, and performs the corresponding decryption operation according to the metadata. The multi-bank management 612 is responsible for writing the processed firmware image and data into the corresponding memory areas. The global/differential update management 614 is responsible for handling the generation and composition of firmware images for different update modes. The version management/rollback mechanism 622 is used to handle update failures, perform a rollback procedure, complete a successful update, perform version management, such as marking and storing an entire package of images and difference codes of recent times, and prepare for the next update or upgrade. In addition, when the updating process is completed, whether the new firmware is successfully started to run or the old firmware is failed to be rolled back to run, the system needs to be restarted, not only the MCU needs to be restarted, but also the corresponding peripheral chips or modules (such as the 4G communication module) need to be restarted, so a reset restart module 618 is provided, a plurality of restart commands are started by the Bootloader 610 to control the peripheral chips or modules 616, and control signals sent by the reset module include level signals and pulse signals, which can control the on-off of the reset terminals of the peripheral chips or the power supplies of the modules, thereby ensuring the reliable restart operation of each relevant chip and component in the internet of things device.
Further, the cloud service includes API programs and a firmware historical version database required for updating, OTA publishing and management is composed of a manager 318 and an application 310 for firmware publishing or updating in fig. 3, and the application 310 includes a desktop PC client application 308 and a mobile APP mobile phone application 306; generally, the mobile APP generally supports the apple IOS and the android system, the application program communicates and exchanges information with the OTA cloud service 300 through the REST API 304, and completes functions such as setting and modifying metadata (for example, setting an update mode, setting an update time window, selecting a rollback mechanism after an update failure, and the like), uploading of an update firmware image, managing a history version, and the like, in addition, a corresponding publish/subscribe policy is set, and the application program 310 can also receive a status message related to an update process, such as an update progress percentage, an update success/failure status, and the like, pushed by the OTA cloud service 300 through the MQTT protocol 312.
Further, the internet of things device end has two situations, one is the internet of things device one 328 in fig. 3, which has rich software and hardware resources, generally adopts an embedded operating system or a small real-time operating system such as FreeRTOS or uC/OS, etc., has network functions such as TCP/IP and HTTP, selects to adopt an OSI data link layer and a physical layer 320 including an Ethernet 322, a Wi-Fi wireless network 324 and a 3G/4G/5G mobile network 326, and communicates and exchanges data with the OTA cloud service 300 through a TLS transport layer security protocol/measure 316 to complete the OTA firmware update of the internet of things device. The other is an internet of things device two 332 in fig. 3, which is mostly a small embedded device, and has limited software and hardware resources, for example, the MCU has weak processing capability, the RAM memory is small, and the peripheral hardware devices are few, and such devices are generally sensitive to cost, power consumption, physical size, and the like, and generally use a single chip or microcontroller with less than 32 bits, without an operating system, and do not have a TCP/IP network function, so the network function must be implemented through the internet of things gateway 330. The second internet of things device 332 and the internet of things gateway 330 may be connected in a plurality of physical ways, for example, in wired ways such as CAN and Modbus/RS-485, and in wireless ways such as Lora or ZigBee. In addition, the internet of things gateway 330 provides a network function, and also bears part of Edge Computing function in the whole system, when a plurality of second internet of things devices 332 need to update firmware, the internet of things gateway 330 downloads firmware and metadata from the OTA cloud service 300, the gateway completes authentication/decryption and other operations of the firmware, and then re-processes the firmware in the gateway, adds special information related to each second internet of things device 332, such as product ID numbers and the like, to form a new operable firmware image, and on the next step, the gateway opens a plurality of threads or processes, executes a plurality of device firmware updating processes at the same time, and in the whole updating process, the gateway issues uplink to transmit state information such as updating process progress and the like, so that the workload of a cloud end and a device end is greatly reduced, communication flow is reduced, and the network load of the system is relieved.
The design method and the whole solution covering the Internet of things equipment firmware, the gateway, the connection and the cloud application are provided by adopting a cloud technology and Internet of things equipment software and hardware collaborative design method, the equipment management of the cloud adopts a REST API application program for processing the uploading and downloading of the firmware, and the processing comprises the encryption and verification of the firmware and the management of the historical firmware version. The design method of the boot loader Bootloader at the equipment end of the Internet of things adopts a hardware multi-column flash memory system structure and a software rollback processing mechanism, supports rollback to the last correct version of firmware under abnormal conditions such as power failure, system crash and the like in the firmware upgrading process, and ensures that the firmware can be safely updated under any conditions. According to a specific application scene, a push/pull updating mode and a differential firmware/complete firmware updating strategy are selected, the resource use of the Internet of things is optimized, and the bandwidth constraint and allocation are adapted.
In other embodiments, the present disclosure also provides:
a computer readable storage medium for storing computer instructions, which when executed by a processor, perform a method for remotely updating firmware of an internet of things device as described in the above embodiments.
An electronic device comprising a memory and a processor, and computer instructions stored on the memory and executed on the processor, wherein the computer instructions, when executed by the processor, implement the method for remotely updating the firmware of the internet of things device as described in the above embodiments.
An internet of things device firmware remote update system, comprising: a cloud server and an Internet of things device,
the cloud server is configured to: receiving the new version firmware and the updating request through a network, and after receiving the updating request, performing version verification on the current version firmware; after the verification is passed, the cloud server transmits the new version firmware to the Internet of things equipment, sets version mark information for the new version firmware, and stores the version mark information in a database for the Internet of things equipment to inquire;
the internet of things device is configured to: receiving new firmware versions of the cloud server, verifying the new firmware versions after the new firmware versions are received, and judging whether update conditions are met or not after the new firmware versions pass the verification; when the updating condition is reached, version updating is started to be executed; if the abnormal updating condition occurs in the middle of the version updating, executing the version rollback operation and recovering to the current version firmware; and if the update exception condition does not exist, fixedly upgrading the current version to the new version firmware.
Although the present disclosure has been described with reference to specific embodiments, it should be understood that the scope of the present disclosure is not limited thereto, and those skilled in the art will appreciate that various modifications and changes can be made without departing from the spirit and scope of the present disclosure.

Claims (10)

1. A remote updating method for firmware of Internet of things equipment is applied to the Internet of things equipment and is characterized by comprising the following steps:
receiving new firmware version transmitted by the cloud server, verifying the new firmware version information after the new firmware version information is received, and judging whether an updating condition is met or not after the new firmware version information passes the verification;
when the updating condition is reached, version updating is started to be executed; if the abnormal updating condition occurs in the middle of the version updating, executing the version rollback operation and recovering to the current version firmware; and if the update exception condition does not exist, fixedly upgrading the current version to the new version firmware.
2. The internet of things device firmware remote updating method of claim 1, wherein when the updating condition is reached, version updating is started to be executed, specifically: and the Bootloader is used for conducting authentication decryption, multi-storage block management and restarting operation, and conducting overall update management or difference update management, and version management or rollback mechanism.
3. The internet-of-things equipment firmware remote updating method according to claim 2, wherein the authentication decryption is to authenticate the downloaded new firmware, judge whether the firmware is the firmware for the equipment, and then perform corresponding decryption operation according to the metadata; the multiple memory blocks are managed to write the processed firmware image and data into corresponding memory areas respectively.
4. The internet of things equipment firmware remote updating method of claim 1, wherein the information verification of the new version firmware is performed after the receiving is completed, and specifically: and after the new version firmware is received, the Internet of things equipment starts to execute new version firmware information verification, wherein the new version firmware information verification comprises firmware decryption verification, equipment type checking, equipment ID (identity) detection, version number updating detection and updating mode selection.
5. The method for remotely updating the firmware of the internet of things equipment according to claim 1, wherein the specific step of receiving the new version firmware transmitted by the cloud server comprises the following steps: uploading the new version firmware and the update request to a cloud server through a network; after receiving the updating request, the cloud server carries out version verification on the current version firmware; after the verification is passed, the Internet of things equipment receives the new version firmware data transmitted by the cloud server, and meanwhile, the cloud server sets version mark information for the new version firmware and stores the version mark information in a database for the Internet of things equipment to inquire.
6. The remote updating method of the firmware of the internet of things equipment as claimed in claim 5, wherein the specific step of performing version verification on the firmware of the current version after the cloud server receives the updating request is as follows: and after receiving the update request, the OTA cloud service performs firmware version verification and historical version management, including verifying the equipment type, the equipment number and whether the firmware version is the latest firmware version.
7. The utility model provides a long-range updating device of thing networking equipment firmware, is applied to thing networking equipment, its characterized in that includes:
an information verification module configured to: receiving new firmware version transmitted by the cloud server, verifying the new firmware version information after the new firmware version information is received, and judging whether an updating condition is met or not after the new firmware version information passes the verification;
a version update module configured to: when the updating condition is reached, version updating is started to be executed; if the abnormal updating condition occurs in the middle of the version updating, executing the version rollback operation and recovering to the current version firmware; and if the update exception condition does not exist, fixedly upgrading the current version to the new version firmware.
8. A computer readable storage medium for storing computer instructions, wherein the computer instructions, when executed by a processor, perform a method for remotely updating firmware of an internet of things device according to any one of claims 1 to 6.
9. An internet of things device comprising a memory and a processor, and computer instructions stored on the memory and executed on the processor, wherein the computer instructions, when executed by the processor, perform a method for remotely updating firmware of an internet of things device as claimed in any one of claims 1 to 6.
10. An internet of things device firmware remote updating system, comprising: a cloud server and an Internet of things device,
the cloud server is configured to: receiving the new version firmware and the updating request through a network, and after receiving the updating request, performing version verification on the current version firmware; after the verification is passed, the cloud server transmits the new version firmware to the Internet of things equipment, sets version mark information for the new version firmware, and stores the version mark information in a database for the Internet of things equipment to inquire;
the internet of things device is configured to: receiving new firmware versions of the cloud server, verifying the new firmware versions after the new firmware versions are received, and judging whether update conditions are met or not after the new firmware versions pass the verification; when the updating condition is reached, version updating is started to be executed; if the abnormal updating condition occurs in the middle of the version updating, executing the version rollback operation and recovering to the current version firmware; and if the update exception condition does not exist, fixedly upgrading the current version to the new version firmware.
CN202010897113.1A 2020-08-31 2020-08-31 Remote updating method, device and system for Internet of things equipment firmware Pending CN112148326A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010897113.1A CN112148326A (en) 2020-08-31 2020-08-31 Remote updating method, device and system for Internet of things equipment firmware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010897113.1A CN112148326A (en) 2020-08-31 2020-08-31 Remote updating method, device and system for Internet of things equipment firmware

Publications (1)

Publication Number Publication Date
CN112148326A true CN112148326A (en) 2020-12-29

Family

ID=73890277

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010897113.1A Pending CN112148326A (en) 2020-08-31 2020-08-31 Remote updating method, device and system for Internet of things equipment firmware

Country Status (1)

Country Link
CN (1) CN112148326A (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112764801A (en) * 2021-01-19 2021-05-07 浪潮金融信息技术有限公司 Software deployment and version control system, method and medium for self-service terminal
CN112835607A (en) * 2021-03-20 2021-05-25 南京物联传感技术有限公司 System and method for on-line burning of embedded sub-equipment functional firmware
CN113127029A (en) * 2021-03-05 2021-07-16 深兰科技(上海)有限公司 Firmware updating method and device, electronic equipment and storage medium
CN113220330A (en) * 2021-05-25 2021-08-06 杭州海康威视数字技术股份有限公司 Management method and device of electronic equipment
CN113259161A (en) * 2021-05-11 2021-08-13 商汤国际私人有限公司 Application management method and device, electronic equipment and storage medium
CN113259249A (en) * 2021-04-22 2021-08-13 东风柳州汽车有限公司 Gateway program initialization method, device and storage medium
CN113596867A (en) * 2021-06-17 2021-11-02 青岛中科英泰商用系统股份有限公司 4g module control method and device based on FreeRTOS system
CN113687840A (en) * 2021-08-27 2021-11-23 深圳市广和通无线股份有限公司 Firmware burning method, device and related equipment
CN113778489A (en) * 2021-09-14 2021-12-10 上海芯钛信息科技有限公司 Method and system for supporting OTA (over the air) without stopping from hardware level
CN113835726A (en) * 2021-08-16 2021-12-24 青岛海尔科技有限公司 Method for determining upgrade package and server
CN114448798A (en) * 2022-01-27 2022-05-06 瀚云科技有限公司 Batch equipment remote firmware upgrading method and device, electronic equipment and medium
CN114637987A (en) * 2022-05-18 2022-06-17 广州万协通信息技术有限公司 Security chip firmware downloading method and system based on platform verification
CN115037496A (en) * 2021-03-03 2022-09-09 美光科技公司 Endpoint customization via online firmware stores
CN115086169A (en) * 2022-05-23 2022-09-20 宿迁学院产业技术研究院 Remote program updating method and system based on 5G NR
CN115454465A (en) * 2022-08-12 2022-12-09 北京兴汉网际股份有限公司 Automatic updating method of CPLD firmware
WO2023275589A1 (en) * 2021-06-28 2023-01-05 Sensetime International Pte. Ltd. Methods and apparatuses for installing device application
CN115987964A (en) * 2022-11-28 2023-04-18 镁佳(北京)科技有限公司 Whole vehicle FOTA upgrading system and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101436138A (en) * 2007-11-16 2009-05-20 苏州科达通信技术发展有限公司 Control device and control method for software upgrade and dynamic rolling back
CN109905256A (en) * 2017-12-07 2019-06-18 阿里巴巴集团控股有限公司 A kind of firmware update and device
CN110351314A (en) * 2018-04-03 2019-10-18 厦门雅迅网络股份有限公司 The remote upgrade method and computer readable storage medium of automobile controller
CN110413295A (en) * 2019-06-26 2019-11-05 上海电器科学研究所(集团)有限公司 A kind of embedded device remote firmware updating method
CN111212121A (en) * 2019-12-24 2020-05-29 浙江大学 Aerial firmware upgrading method and system for Internet of things equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101436138A (en) * 2007-11-16 2009-05-20 苏州科达通信技术发展有限公司 Control device and control method for software upgrade and dynamic rolling back
CN109905256A (en) * 2017-12-07 2019-06-18 阿里巴巴集团控股有限公司 A kind of firmware update and device
CN110351314A (en) * 2018-04-03 2019-10-18 厦门雅迅网络股份有限公司 The remote upgrade method and computer readable storage medium of automobile controller
CN110413295A (en) * 2019-06-26 2019-11-05 上海电器科学研究所(集团)有限公司 A kind of embedded device remote firmware updating method
CN111212121A (en) * 2019-12-24 2020-05-29 浙江大学 Aerial firmware upgrading method and system for Internet of things equipment

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112764801A (en) * 2021-01-19 2021-05-07 浪潮金融信息技术有限公司 Software deployment and version control system, method and medium for self-service terminal
CN115037496A (en) * 2021-03-03 2022-09-09 美光科技公司 Endpoint customization via online firmware stores
CN113127029A (en) * 2021-03-05 2021-07-16 深兰科技(上海)有限公司 Firmware updating method and device, electronic equipment and storage medium
CN112835607A (en) * 2021-03-20 2021-05-25 南京物联传感技术有限公司 System and method for on-line burning of embedded sub-equipment functional firmware
CN113259249A (en) * 2021-04-22 2021-08-13 东风柳州汽车有限公司 Gateway program initialization method, device and storage medium
CN113259161A (en) * 2021-05-11 2021-08-13 商汤国际私人有限公司 Application management method and device, electronic equipment and storage medium
CN113259161B (en) * 2021-05-11 2024-03-19 商汤国际私人有限公司 Application management method and device, electronic equipment and storage medium
CN113220330A (en) * 2021-05-25 2021-08-06 杭州海康威视数字技术股份有限公司 Management method and device of electronic equipment
CN113596867A (en) * 2021-06-17 2021-11-02 青岛中科英泰商用系统股份有限公司 4g module control method and device based on FreeRTOS system
WO2023275589A1 (en) * 2021-06-28 2023-01-05 Sensetime International Pte. Ltd. Methods and apparatuses for installing device application
CN113835726A (en) * 2021-08-16 2021-12-24 青岛海尔科技有限公司 Method for determining upgrade package and server
CN113835726B (en) * 2021-08-16 2023-11-28 青岛海尔科技有限公司 Method for determining upgrade package and server
CN113687840A (en) * 2021-08-27 2021-11-23 深圳市广和通无线股份有限公司 Firmware burning method, device and related equipment
CN113778489A (en) * 2021-09-14 2021-12-10 上海芯钛信息科技有限公司 Method and system for supporting OTA (over the air) without stopping from hardware level
CN113778489B (en) * 2021-09-14 2024-01-30 上海芯钛信息科技有限公司 Method and system for supporting non-stop OTA from hardware level
CN114448798A (en) * 2022-01-27 2022-05-06 瀚云科技有限公司 Batch equipment remote firmware upgrading method and device, electronic equipment and medium
CN114448798B (en) * 2022-01-27 2023-12-19 瀚云科技有限公司 Remote firmware upgrading method and device for batch equipment, electronic equipment and medium
CN114637987B (en) * 2022-05-18 2022-08-12 广州万协通信息技术有限公司 Security chip firmware downloading method and system based on platform verification
CN114637987A (en) * 2022-05-18 2022-06-17 广州万协通信息技术有限公司 Security chip firmware downloading method and system based on platform verification
CN115086169A (en) * 2022-05-23 2022-09-20 宿迁学院产业技术研究院 Remote program updating method and system based on 5G NR
CN115454465B (en) * 2022-08-12 2023-04-25 北京兴汉网际股份有限公司 Automatic updating method of CPLD firmware
CN115454465A (en) * 2022-08-12 2022-12-09 北京兴汉网际股份有限公司 Automatic updating method of CPLD firmware
CN115987964A (en) * 2022-11-28 2023-04-18 镁佳(北京)科技有限公司 Whole vehicle FOTA upgrading system and method
CN115987964B (en) * 2022-11-28 2024-01-23 镁佳(北京)科技有限公司 Whole vehicle FOTA upgrading system and method

Similar Documents

Publication Publication Date Title
CN112148326A (en) Remote updating method, device and system for Internet of things equipment firmware
CN102364891B (en) Method for upgrading software of embedded Ethernet equipment and embedded Ethernet equipment
WO2017067448A1 (en) Firmware-over-the-air upgrade method, system and computer storage medium
EP2456257B1 (en) Method and system for upgrading wireless data card
CN110083374B (en) Upgrade rollback method, system and terminal equipment
US9471300B2 (en) Wireless firmware upgrades to an alarm security panel
CN1953376A (en) A system and method for updating remote software of wireless terminal equipment
CN107193612B (en) Version upgrading method and device for mobile terminal
CN104572206A (en) Application program self updating and backup recovery method
TWI533216B (en) Operating system updating method
CN106020875B (en) Firmware update management method and device of embedded terminal
CN106572372A (en) Set-top box upgrading method and set-top box
CN109905256A (en) A kind of firmware update and device
JP7345921B2 (en) OTA differential update method and system for master-slave architecture
CN109857437A (en) A kind of upgrade method and system of bluetooth equipment
CN107832065A (en) Firmware upgrade method, water purifier, upgrade-system and readable storage medium storing program for executing
Odat et al. Firmware over the air for automotive, fotamotive
CN110990036A (en) OTA upgrading method and device for power change cabinet, power change equipment and storage medium
CN105045640A (en) Software upgrading method and device and intelligent equipment
CN110597545A (en) Hot patch intelligent upgrading method and system based on OTA component
CN112383908A (en) Bluetooth device upgrading method and system
CN113656056A (en) Charging socket and charging socket upgrading method, device, equipment and storage medium
CN108874410B (en) Patch management method and device
CN113377385A (en) Client automatic deployment method and device
CN109428936B (en) APP upgrading method, device, system, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination