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

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

Info

Publication number
CN112148326B
CN112148326B CN202010897113.1A CN202010897113A CN112148326B CN 112148326 B CN112148326 B CN 112148326B CN 202010897113 A CN202010897113 A CN 202010897113A CN 112148326 B CN112148326 B CN 112148326B
Authority
CN
China
Prior art keywords
firmware
version
update
internet
things
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.)
Active
Application number
CN202010897113.1A
Other languages
Chinese (zh)
Other versions
CN112148326A (en
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/CN112148326B/en
Publication of CN112148326A publication Critical patent/CN112148326A/en
Application granted granted Critical
Publication of CN112148326B publication Critical patent/CN112148326B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Medical Informatics (AREA)
  • Power Engineering (AREA)
  • Quality & Reliability (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure provides a method, a device and a system for remotely updating firmware of internet of things equipment, comprising the following steps: the cloud server receives the firmware of the new version and the update request through the network and performs the version verification of the firmware of the current version; transmitting the new version firmware to the Internet of things equipment after verification is passed, setting version mark information for the new version firmware, and storing the version mark information in a database for inquiry of the Internet of things equipment; the method comprises the steps that the Internet of things equipment receives new version firmware of a cloud server and verifies new version firmware information; when the update condition is reached, starting to execute version update; if the update abnormal condition occurs in the middle of the version update, executing the version rollback operation and recovering to the current version firmware; if no update abnormal condition exists, the current version is fixedly updated to the firmware of the new version; through a hardware multi-column storage system structure and a software rollback processing mechanism, the firmware can be ensured to 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 firmware updating method, device and system for Internet of things equipment
Technical Field
The disclosure relates to a method, a device and a system for remotely updating firmware of Internet of things equipment.
Background
With the evolution of the internet and information technology, internet of things (IoT) technology and devices are expanding in many areas of application and deployment speed, and it is expected that about 410 billions of devices will be on line in 2027. The internet of things is deployed in many environments with its vast connected device ecosystems, bringing about the complexity associated with the update process. There are many reasons to update firmware after product delivery, including repairing errors, adding new functionality, or improving security. At present, an update mechanism is generally adopted to complete the task, however, once the internet of things equipment is deployed, due to the long life cycle of the internet of things equipment, especially when the number of the equipment is large, the equipment is deployed in remote or inaccessible unattended areas, manual intervention is high in cost and the like, firmware update plays a crucial role in the life cycle of the equipment, and strong market demands are brought to convenient, reliable and safe firmware update mechanisms and solutions.
In the early stage of development and application of the Internet of things, when the equipment is deployed on the scene, the problem or defect is found, the equipment can only be retrieved on the scene, the equipment can be disassembled and connected to tools such as a computer or a development system/simulator, the equipment is reprogrammed or refreshed, then the equipment is taken back to the scene for installation and use, intermittent interruption and performance reduction are often caused by updating the equipment, and the defect of the mode is more and more obvious along with the increase of the deployment quantity of the equipment, the process is too complicated, time and labor are wasted, 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, the corresponding new technology is layered endlessly, an Over-the-air (OTA) wireless firmware updating technology appears, OTA is a technical means for remotely updating codes on embedded equipment, defects can be repaired, new functions can be added and product performance can be improved for the remote internet of things equipment without on-site and manual intervention by using the OTA technology, the problems described above can be basically solved, but things are divided into two, disadvantages are beneficial, OTA updating is one of the most dangerous operations on the technical chain of the internet of things, the system is temporarily interrupted due to the fact that the OTA updating is light, and the equipment can enter an unrecoverable state due to the fact that the OTA updating is light. Successful OTA updates require complex coordination between the Internet of things hardware, device firmware, network connections, and cloud platforms, and must have visibility and control capabilities for all of these components or links 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, lack the capability and overall solution of autonomously processing OTA firmware update and managing remote equipment, and public internet of things platforms such as the Arian cloud, the Baidu cloud and the like, and the focus of these internet major enterprises is mainly in terms of platforms and software, generally does not relate to the internet of things hardware and firmware, and although some internet of things OTA functions are also proposed, only a small part of functions required for realizing complete, reliable and safe update are actually provided, and the firmware update requirements of most of the internet of things equipment cannot be fully met. For the above reasons, in order to ensure deployment, update and use of the internet of things device in a longer life cycle, avoiding costly, time-consuming and laborious recall and field services, a new method and solution capable of comprehensively improving the remote update of the firmware of the internet of things device are urgently sought.
Disclosure of Invention
In order to solve the technical problems, the present disclosure further provides a method, a device and a system for remotely updating firmware of an internet of things device.
In a first aspect, the present disclosure provides a method for remotely updating firmware of an internet of things device, which is applied to the internet of things device, including:
Receiving a new version firmware transmitted by a cloud server, performing new version firmware information verification after receiving, and judging whether an updating condition is reached after verification is passed;
when the update condition is reached, starting to execute version update; if the update abnormal condition occurs in the middle of the version update, executing the version rollback operation and recovering to the current version firmware; and if no updating abnormal condition exists, the current version is fixedly updated to the firmware of the new version.
In a second aspect, the present disclosure further provides a device for remotely updating firmware of an internet of things device, which is applied to the internet of things device, including:
An information verification module configured to: receiving a new version firmware transmitted by a cloud server, performing new version firmware information verification after receiving, and judging whether an updating condition is reached after verification is passed;
A version update module configured to: when the update condition is reached, starting to execute version update; if the update abnormal condition occurs in the middle of the version update, executing the version rollback operation and recovering to the current version firmware; and if no updating abnormal condition exists, the current version is fixedly updated to the firmware of the new version.
In a third aspect, the present disclosure further provides a computer readable storage medium storing computer instructions that, when executed by a processor, perform the method for remotely updating firmware of an internet of things device according to the first aspect.
In a fourth aspect, the present disclosure further provides an internet of things device, including a memory and a processor, and computer instructions stored on the memory and running on the processor, which when executed by the processor, perform the method for remotely updating firmware of the internet of things device according to the first aspect.
In a fifth aspect, the present disclosure further provides a system for remotely updating firmware of an internet of things device, including: cloud server and internet of things device,
The cloud server is configured to: receiving the new version firmware and the update request through the network, and after receiving the update request, performing version verification of the current version firmware; after 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 inquiry of the Internet of things equipment;
The internet of things device is configured to: receiving new version firmware of the cloud server, performing new version firmware information verification after receiving, and judging whether an updating condition is reached after verification is passed; when the update condition is reached, starting to execute version update; if the update abnormal condition occurs in the middle of the version update, executing the version rollback operation and recovering to the current version firmware; and if no updating abnormal condition exists, the current version is fixedly updated to the firmware of the new version.
Compared with the prior art, the present disclosure has the following beneficial effects:
1. The method comprises the steps of providing a design method and an overall solution for covering firmware, a gateway, connection and cloud application of the Internet of things equipment based on a cloud technology and the Internet of things equipment software and hardware collaborative design method, wherein the cloud equipment management adopts a RESTAPI application program for processing the uploading firmware and the downloading firmware, and comprises encryption and verification of the firmware and management of firmware historical versions. The design method of the boot loader Bootloader of the equipment end of the Internet of things is provided, a hardware multi-column storage system structure and a software rollback processing mechanism are adopted, abnormal conditions such as power failure, system breakdown and the like in the firmware upgrading process are supported, rollback to the firmware of the last correct version is supported, and the mechanism ensures that the firmware can be safely updated under any condition. According to a specific application scene, a push/pull update mode and a differential/complete firmware update strategy are selected, the resource use of the Internet of things is optimized, and bandwidth constraint and allocation are adapted.
2. The cloud server is adopted to transmit data to the Internet of things equipment, version mark information is set for the new version firmware, the version mark information is stored in the database for the inquiry of the Internet of things equipment, the cloud server is suitable for remote updating and management of development and deployment firmware of various personal/enterprise Internet of things equipment, and the cloud server can also be used as a third party to host the existing Internet of things deployment, so that information service is provided for Internet of things equipment developers and operators.
2. According to the method and the system, the new functions are tested by sending the 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 keep the latest functions and versions, all communication channels between the devices and the cloud platform adopt encryption and authorization mechanisms to provide safe updates, the firmware is managed across the device group through a seamless and unified cloud platform, so that cost is saved, the expandability of hardware and software is high, and the OTA firmware update is easily realized by expanding from 1 device to 1000 devices.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application.
FIG. 1 is a general block diagram of a system of the present disclosure;
FIG. 2 is a block diagram of the overall data and process flow of the present disclosure;
FIG. 3 is a diagram illustrating a data structure of metadata in a firmware update of the present disclosure;
FIG. 4 is a functional block diagram and Bootloader structure of the device side Bootloader of the Internet of things of the present disclosure;
FIG. 5 is a schematic diagram of a conventional or early IOT device firmware update in the background;
fig. 6 is a schematic diagram of a lifecycle of a generic internet of things device in the background art.
The specific embodiment is as follows:
The disclosure is further described below with reference to the drawings and examples.
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the application. 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 exemplary embodiments according to the present application. As used herein, the singular is also intended to include the plural unless the context clearly indicates otherwise, and furthermore, it is to be understood that the terms "comprises" and/or "comprising" when used in this specification are taken to specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof.
Fig. 5 shows an example of an application of a conventional or early firmware update for an internet of things device, when it is desired to update the software of an in-car electronic control unit ECU (108 in fig. 5), the firmware required for the update is issued by the car manufacturer or a third party technology company 100, and then the vehicle user or customer must be contacted and notified to drive the car, which requires the update procedure, to a dealer 4S store or repair shop (recall), and the updated firmware issued by 100 is written into the ECU by a professional technician 102 by using a notebook or desktop computer 104, a special development tool 106. The most obvious defects of the mode are that expensive recall and field service are needed, the manual updating process is complicated, the safety is poor, an end user cannot finish firmware updating by himself, the expandability of the mode is poor, as the number of automobiles of the model in the whole country or even worldwide is increased, new functions cannot be added or safety patch procedures cannot be added quickly basically, and the software is kept up to date in the whole life cycle, so that the cost of labor, time and the like is very high and even the mode 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 general internet of things device is generally composed of four links, namely, firmware 200 refreshing, device 202 deploying, device service period 204 and retirement 206. The initial firmware is written to the flash memory 200 of the internet of things device and started, and then the deploy device 202 phase begins, at which the device joins the internet of things, is online and registers with a remote server (e.g., cloud service). After this, a device service period 204 begins during which firmware/software updates will be needed from time to time. Finally, in the decommissioning 206 phase, the internet of things device is disabled and explicit instructions may be required to decommissioning the device. The device service period 204 is the longest in proportion in the whole life cycle, and the firmware update is the most required and the most frequent in this stage, accounting for more than 90%. The service life of the equipment is typically more than 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 terms of handling the entire device lifecycle, who themselves may not wish or be able to support software and services for such a long period of time.
Noun interpretation:
IoT (Internet of Things) Internet of things;
OTA (Over-the-air) wireless firmware update techniques;
bootloader embedded type internet of things equipment Bootloader;
API (Application Programming Interface) application program interfaces;
REST API (Representational STATE TRANSFER) is a lightweight web service API;
ECU (Electronic Control Unit) electronic control units;
CPU (Central Processing Unit) a 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 a new version firmware to a cloud server through a network, and sending an update request; after receiving the update request, the cloud server performs version verification of the current version firmware;
step S2: after 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 inquiry of the Internet of things equipment;
Step S3: after the data transmission is completed, the Internet of things equipment performs new version firmware information verification, and whether an updating condition is reached is judged after the verification is passed;
Step S4: when the update condition is reached, starting to execute version update; if the update abnormal condition occurs in the middle of the version update, executing the version rollback operation and recovering to the current version firmware; and if no updating abnormal condition exists, the current version is fixedly updated to the firmware of the new version.
Further, the new version firmware is uploaded to the cloud server through the network, and the update request is specifically sent as follows: and a manager for releasing/updating the firmware adds the firmware of the new version through an API or a webpage mode provided by the OTA cloud service, modifies metadata and sends an updating request.
Further, after receiving the update request, the cloud server performs the specific steps of verifying the version of the firmware of the current version: upon receipt of the update request, the OTA cloud service 402 needs to perform firmware version verification and historical version management 410, including verifying the device type, device number, and whether it is the latest firmware version.
Further, the step of performing version verification of the current version firmware includes: the update version 408 is detected, according to the metadata setting, two-way operation is supported, namely a push mode and a pull mode, wherein the push mode refers to a mode that the OTA cloud service 402 pushes a firmware update message to the Internet of things device 404, and as long as the Internet of things device 404 is online, an update command can be immediately received, and then the next update process is carried out. The "pull" approach, in which the internet of things device 404 periodically issues a query to the OTA cloud service 402 as to whether there is a new update instruction, has the advantage that the user can freely schedule downtime and enable firmware upgrades as planned. Then, the OTA cloud service 402 starts to send or download data 412 to the internet of things device 404, where the data includes firmware image and metadata, and once the data is downloaded, the internet of things device 404 starts to execute 414, including firmware decryption verification, checking whether the device type and the device ID match, whether the version number is up to date, etc., further, the OTA management 400 may autonomously perform the firmware update progress query 418 at any time after sending the update request, or receive the firmware update final report 420 pushed by the OTA cloud service 402, where the time period from sending the update request to ending 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 dormant state, or does not suggest immediate update at this time due to security reasons, etc.
Further, after verification, the cloud server transmits data to the internet of things device, specifically: cloud service 402 sends or downloads data 412, including firmware images and metadata, to 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 perform new version firmware information verification, where the new version firmware information verification includes firmware decryption verification, checking a device type, detecting whether a device ID matches, detecting whether a version number is up to date, and selecting an update mode. Specifically, metadata is set and modified (see description of fig. 3 and fig. 4) to control some program trend and process flow of the firmware update process, where the firmware images device information 502, including device type, device ID, version number, and the boot program of the device needs to use these parameters to verify whether the device type and the device ID match, and whether the version number is up to date; the update mode selection 504 includes two update modes, namely differential firmware update and complete firmware update, and if the uploaded firmware file only contains the difference part between the new version firmware and the previous version, only the difference part is used for updating or upgrading the device, and the differential update can effectively reduce the occupation of device resources and reduce the flow consumption of the issued firmware. The firmware image authentication selection 506 can set different authentication modes including non-authentication, simple authentication (such as password authentication), complex authentication (such as symmetric/asymmetric key method) and the like according to different software and hardware resource configurations of the equipment end of the internet of things and different security requirements. The firmware update timing 508 is that some devices of the internet of things are online control, and the firmware should be updated in a safe or idle state, and the firmware can be updated immediately, in a fixed time period or in a certain state, and the firmware is updated immediately by default. Update status upload 510 may be selected from a real-time upload, a fixed frequency upload, or an update end upload. The update failure handling mode 512 may encounter many accidents during the firmware upgrade process, such as power down, random reboot, system crash, etc., and may choose to reboot the update again, automatically roll back to the last normal firmware operation, or manually intervene in the update, etc.
Further, after the verification is passed, whether an update condition is reached is judged, and when the update condition is reached, version update is started, specifically: and (3) performing update opportunity assessment, and setting various assessment preset conditions, for example, after the scheduled work of the firmware equipment is located at the scheduled update time, that is, after the firmware equipment finishes processing the processing data, the reserved processing data reaches the preset conditions after the scheduled update time, and the Bootloader starts to execute the update.
Further, if an update exception condition occurs in the middle of version update, a version rollback operation is executed to restore to the current version firmware, specifically: in the process of upgrading the firmware, such as power-off, system breakdown and other abnormal conditions, the method supports 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 no update exception condition exists, the method for fixedly upgrading the current version to the new version firmware specifically includes: the updating is successful, version management is carried out, such as marking and storing the whole package image, the difference codes of the last times and the like, and preparation is carried out for the next updating or upgrading; when the update process is completed, whether the new firmware is successfully started to run or the old firmware is failed to run in a rollback mode, the system needs to be restarted, and not only the MCU needs to be restarted, but also the corresponding chip or module (such as a 4G communication module) at the periphery.
Further, when the update condition is reached, version update is started, specifically: and performing authentication decryption, multi-storage block management and restarting operation through a Bootloader boot loading unit, and performing 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 downloaded new firmware is the firmware of the equipment, and then perform corresponding decryption operation according to metadata; the multi-storage block management is to write the processed firmware image and the data into the corresponding storage areas respectively; the whole update management or the difference update management is used for processing the generation and the synthesis of firmware images with two different update modes of whole update and difference update; the version management or rollback mechanism is used for updating failure, finishing rollback process is executed, updating is successful, version management is carried out, such as marking and storing the whole package image and the difference codes of the last times, and the like, and preparation is carried out for the 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. The Flash charge Flash is generally used for storing program codes and data, and the EEPROM is used for storing data, and furthermore, a scheme of combining on-chip and off-chip can be selected, the Flash and the EEPROM in the MCU chip are adopted, an external independent Flash chip and EEPROM chip are selected, or other combination modes are adopted.
Further, the restarting operation is as follows: when the updating process is completed, whether the updating process is successful or failed, the old firmware is rolled back to run, the system needs to be restarted, not only the MCU needs to be restarted, but also the peripheral corresponding chip or module (such as a 4G communication module) needs to be restarted, so that a reset restarting module 618 is arranged, a plurality of restarting commands are started by the Bootloader 610 to control the peripheral chip or module 616, and a control signal sent by the module has a level signal and a pulse signal, so that the on-off of a reset end of the peripheral chip or a module power supply can be controlled, and the reliable restarting operation of all relevant chips and components in the Internet of things equipment is ensured.
Further, the Bootloader boot loader unit 610 is a key component of the embedded/internet of things software stack, and the microcontroller MCU or the central processing unit CPU transfers control to the Bootloader once the device is powered on or reset.
Further, version mark information is set for the new version firmware, and the version mark information is stored in a database for inquiring the internet of things equipment, specifically: after the verification is passed, a corresponding appointment flag is set for the internet of things device 404 to inquire; after the OTA management 400 issues the update request, the firmware update progress query 418 may be performed autonomously at any time, or the firmware update final report 420 pushed by the OTA cloud service 402 is received, which is uncertain from the time when the update request is issued to the time when the update is completed, and many factors may affect this 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 for security reasons, etc. 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, typically expressed as a percentage, to the OTA cloud service, and, 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 these pushed data and information, so as to facilitate the control of the firmware update process.
Example 2
The present disclosure also provides a remote firmware update management device for an internet of things device, which is applied to the internet of things device, and includes:
An information verification module configured to: receiving a new version firmware transmitted by a cloud server, performing new version firmware information verification after receiving, and judging whether an updating condition is reached after verification is passed;
A version update module configured to: when the update condition is reached, starting to execute version update; if the update abnormal condition occurs in the middle of the version update, executing the version rollback operation and recovering to the current version firmware; and if no updating abnormal condition exists, the current version is fixedly updated to the firmware of the new version.
Further, the specific modes configured by the information verification module and the version updating module correspond to the specific steps of the remote updating method for the firmware of the internet of things device in the above embodiment respectively.
Further, the version update module includes a Bootloader boot loader unit, the Bootloader boot loader 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 control to the Bootloader, typically in multiple stages, including an authentication decryption module 620, a multi-storage block management 612, a bulk/differential update management 614, and a version management/rollback mechanism 622.
To ensure the security and reliability of the update process, the present disclosure employs a dual storage structure 600, including 602 a first Flash, 604 a second Flash, 606 a first EEPROM, and 608 a second EEPROM. Flash memory Flash is typically used to store program code and data, and EEPROM is used for data storage, and further, a combination of on-chip and off-chip schemes may be selected, e.g., flash and EEPROM in the first MCU chip, flash and EEPROM chips in the second external separate Flash and EEPROM chips, or other combinations. In the figure, the authentication decryption module 620 authenticates the downloaded new firmware, determines whether the new firmware is the firmware of the device, and then performs a corresponding decryption operation according to metadata. The multi-bank management 612 is responsible for writing the processed firmware image and data to the corresponding memory regions, respectively. The bulk/differential update management 614 is responsible for handling the generation and synthesis of firmware images for different update modes. Version management/rollback mechanism 622 is used to handle update failures, perform completion rollback procedures, update successfully, and perform version management, such as marking and storing whole package images and just-in-time differential codes, etc., in preparation for the next update or upgrade. In addition, when the updating process is completed, whether the updating process is successful in starting to run the new firmware or failure in running the old firmware in a rollback mode, the system needs to be restarted, not only the MCU needs to be restarted, but also the peripheral corresponding chip or module (such as a 4G communication module) needs to be restarted, so that a reset restarting module 618 is arranged, a Bootloader 610 starts a plurality of restarting commands to control the peripheral chip or module 616, and a control signal sent by the module has a level signal and a pulse signal, so that the on-off state of a reset end of the peripheral chip or a module power supply can be controlled, and the reliable restarting operation of each relevant chip and component in the Internet of things equipment is ensured.
Further, the cloud service includes an API program and a firmware history version database required for updating, and the OTA publishing and management is composed of a manager 318 and an application program 310 for firmware publishing or updating in fig. 3, where the application program 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 with the OTA cloud service 300 and exchanges information with each other through the REST API 304, so as to complete the functions of setting and modifying metadata (for example, setting an update mode, setting an update time window, selecting a rollback mechanism after an update failure, etc.), uploading an update firmware image, managing a history version, etc., and in addition, a corresponding publishing/subscribing policy is set, and through the MQTT protocol 312, the application program 310 can also receive status messages related to an update process, such as update progress percentage, update success/failure status, etc., pushed by the OTA cloud service 300.
Further, there are two cases at the device end of the internet of things, one is the first internet of things device 328 in fig. 3, which has abundant software and hardware resources, and generally selects an embedded operating system or a small real-time operating system such as FreeRTOS or uC/OS, which has network functions such as TCP/IP and HTTP, and selects 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 performs communication and data exchange with the OTA cloud service 300 through a TLS transport layer security protocol/measure 316, so as to complete the OTA firmware update of the internet of things device. The other is the internet of things device two 332 in fig. 3, which is mostly a small embedded device, and has limited software and hardware resources, such as weak processing capability of MCU, small RAM memory and few peripheral hardware devices, and the device is generally sensitive to cost, power consumption, physical size and the like, and is generally a single chip microcomputer or microcontroller with less than 32 bits, without an operating system, and without TCP/IP network function, so the internet of things gateway 330 must be used to realize network function. The second internet of things device 332 and the internet of things gateway 330 may be connected by various physical manners, for example, wired manners such as CAN and Modbus/RS-485, and wireless manners such as Lora or ZigBee. In addition, the gateway 330 of the internet of things also bears a part of Edge Computing function in the whole system besides providing a network function, when the second devices 332 of the internet of things need to update firmware, the gateway of the internet of things 330 downloads firmware and metadata from the OTA cloud service 300, the gateway completes operations such as authentication/decryption of the firmware, and then reprocesses the firmware in the gateway, adds special information related to the second devices 332 of the internet of things, such as a product ID number, to form a new operable firmware image, and next, the gateway opens a plurality of threads or processes, executes a plurality of device firmware update processes at the same time, and in the whole update process, the gateway uplink down transmits status information such as update process progress, thereby greatly reducing workload of cloud end and device end, reducing communication traffic, and relieving network load of the system.
The method comprises the steps of providing a design method and an overall solution for covering firmware, a gateway, connection and cloud application of the Internet of things equipment based on a cloud technology and the hardware and software collaborative design method of the Internet of things equipment, and enabling cloud equipment management to adopt a REST API application program for processing of uploading firmware and downloading firmware, including encryption and verification of the firmware and management of firmware historical versions. The design method of the boot loader Bootloader of the equipment end of the Internet of things is provided, a hardware multi-column flash memory system structure and a software rollback processing mechanism are adopted, abnormal conditions such as power failure, system breakdown and the like in the firmware upgrading process are supported, rollback to the firmware of the last correct version is supported, and the mechanism ensures that the firmware can be safely updated under any condition. According to a specific application scene, a push/pull update mode and a differential firmware/complete firmware update strategy are selected, the resource use of the Internet of things is optimized, and bandwidth constraint and allocation are adapted.
In other embodiments, the present disclosure also provides:
A computer readable storage medium storing computer instructions that, when executed by a processor, perform the method of 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 running on the processor, which when executed by the processor, perform the method of remotely updating firmware of an internet of things device as described in the above embodiments.
An internet of things device firmware remote update system comprising: cloud server and internet of things device,
The cloud server is configured to: receiving the new version firmware and the update request through the network, and after receiving the update request, performing version verification of the current version firmware; after 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 inquiry of the Internet of things equipment;
The internet of things device is configured to: receiving new version firmware of the cloud server, performing new version firmware information verification after receiving, and judging whether an updating condition is reached after verification is passed; when the update condition is reached, starting to execute version update; if the update abnormal condition occurs in the middle of the version update, executing the version rollback operation and recovering to the current version firmware; and if no updating abnormal condition exists, the current version is fixedly updated to the firmware of the new version.
While the specific embodiments of the present disclosure have been described above with reference to the drawings, it should be understood that the present disclosure is not limited to the embodiments, and that various modifications and changes can be made by one skilled in the art without inventive effort on the basis of the technical solutions of the present disclosure while remaining within the scope of the present disclosure.

Claims (6)

1. The remote firmware updating method for the Internet of things equipment is applied to the Internet of things equipment and is characterized by comprising the following steps of:
After receiving the update request, the cloud server performs version verification of the current version firmware; the method comprises the following specific steps: after receiving the update request, the OTA cloud service performs firmware version verification and historical version management, including verifying the type of equipment, the number of equipment and whether the version of the firmware is the latest version;
after 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 inquiry of the Internet of things equipment; the method comprises the following steps: after passing the verification, setting a corresponding appointed mark for inquiring the equipment of the Internet of things; after sending an update request, the OTA management inquires the firmware update progress or receives a final report of firmware update pushed by the OTA cloud service 2;
Receiving a new version firmware transmitted by a cloud server, performing new version firmware information verification after receiving, and judging whether an updating condition is reached after verification is passed; the method comprises the following steps: performing update opportunity assessment, and setting various assessment preset conditions; when the update condition is reached, starting to execute version update; if the update abnormal condition occurs in the middle of the version update, executing the version rollback operation and recovering to the current version firmware; if no update abnormal condition exists, the current version is fixedly updated to the firmware of the new version, and the system is restarted after the update is completed;
After the receiving is completed, the new version firmware information verification is carried out, specifically: 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 detection, latest version number detection and updating mode selection;
When the update condition is reached, version update is started, specifically: the Bootloader guides the loading unit to carry out authentication decryption, multi-storage block management and restarting operation, and carries out integral update management or difference update management, and version management or rollback mechanism; the authentication decryption is to authenticate the downloaded new firmware, judge whether the downloaded new firmware is the firmware aiming at the equipment, and then perform corresponding decryption operation according to metadata; the multi-storage block management is to write the processed firmware image and the data into the corresponding storage areas respectively; the whole update management or the difference update management is used for processing the generation and the synthesis of firmware images with two different update modes of whole update and difference update; the version management or rollback mechanism is used for updating failure, executing the rollback process, updating successfully, and carrying out version management to prepare for the next updating or upgrading.
2. The method for remotely updating firmware of an internet of things device according to claim 1, wherein the specific steps of receiving the new version firmware transmitted by the cloud server are as follows: uploading the new version firmware and the update request to a cloud server through a network; after receiving the update request, the cloud server performs version verification of the current version firmware; and after verification is passed, the internet of things equipment receives the new version firmware data transmitted by the cloud server, and simultaneously the cloud server sets version mark information for the new version firmware and stores the version mark information in a database for inquiry of the internet of things equipment.
3. The device for remotely updating firmware of an internet of things device, which is applied to the internet of things device, and adopts the method for remotely updating firmware of the internet of things device according to any one of claims 1-2, and is characterized by comprising:
An information verification module configured to: receiving a new version firmware transmitted by a cloud server, performing new version firmware information verification after receiving, and judging whether an updating condition is reached after verification is passed;
A version update module configured to: when the update condition is reached, starting to execute version update; if the update abnormal condition occurs in the middle of the version update, executing the version rollback operation and recovering to the current version firmware; and if no updating abnormal condition exists, the current version is fixedly updated to the firmware of the new version.
4. A computer readable storage medium storing computer instructions which, when executed by a processor, perform the method of remotely updating firmware of an internet of things device according to any one of claims 1-2.
5. An internet of things device comprising a memory and a processor and computer instructions stored on the memory and running on the processor, which when executed by the processor, perform the method of remotely updating firmware of an internet of things device as claimed in any one of claims 1-2.
6. A remote firmware update system for an internet of things device, which adopts the remote firmware update method for the internet of things device according to any one of claims 1-2, and is characterized by comprising: cloud server and internet of things device,
The cloud server is configured to: receiving the new version firmware and the update request through the network, and after receiving the update request, performing version verification of the current version firmware; after 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 inquiry of the Internet of things equipment;
The internet of things device is configured to: receiving new version firmware of the cloud server, performing new version firmware information verification after receiving, and judging whether an updating condition is reached after verification is passed; when the update condition is reached, starting to execute version update; if the update abnormal condition occurs in the middle of the version update, executing the version rollback operation and recovering to the current version firmware; and if no updating abnormal condition exists, the current version is fixedly updated to the firmware of the new version.
CN202010897113.1A 2020-08-31 2020-08-31 Remote firmware updating method, device and system for Internet of things equipment Active CN112148326B (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN112148326A CN112148326A (en) 2020-12-29
CN112148326B true CN112148326B (en) 2024-05-31

Family

ID=73890277

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN112148326B (en)

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12039318B2 (en) 2020-10-26 2024-07-16 Micron Technology, Inc. Endpoint customization via online firmware store
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
CN113259249B (en) * 2021-04-22 2023-04-07 东风柳州汽车有限公司 Gateway program initialization method, device 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
CN113419765A (en) * 2021-06-03 2021-09-21 北京闲徕互娱网络科技有限公司 Firmware equipment hot updating system and updating method
CN113596867B (en) * 2021-06-17 2024-05-07 青岛中科英泰商用***股份有限公司 Control method and device for 4g module based on FreeRTOS system
WO2023275589A1 (en) * 2021-06-28 2023-01-05 Sensetime International Pte. Ltd. Methods and apparatuses for installing device application
CN113360173B (en) * 2021-07-01 2024-06-21 无锡摩尔汇萃智能技术有限公司 Device and method for multi-cascade OTA upgrading of industrial equipment
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
CN113778489B (en) * 2021-09-14 2024-01-30 上海芯钛信息科技有限公司 Method and system for supporting non-stop OTA from hardware level
CN114371880A (en) * 2021-12-17 2022-04-19 深圳奥哲网络科技有限公司 Flow switching method and device and computer readable storage medium
CN114448798B (en) * 2022-01-27 2023-12-19 瀚云科技有限公司 Remote firmware upgrading method and device for batch equipment, electronic equipment and medium
CN114710517A (en) * 2022-02-21 2022-07-05 交控科技股份有限公司 Internet of things data model management system
CN114637987B (en) * 2022-05-18 2022-08-12 广州万协通信息技术有限公司 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
CN115987964B (en) * 2022-11-28 2024-01-23 镁佳(北京)科技有限公司 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

Also Published As

Publication number Publication date
CN112148326A (en) 2020-12-29

Similar Documents

Publication Publication Date Title
CN112148326B (en) Remote firmware updating method, device and system for Internet of things equipment
CN102364891B (en) Method for upgrading software of embedded Ethernet equipment and embedded Ethernet equipment
US10042635B2 (en) Method for wireless remote updating vehicle software
US9836300B2 (en) Method for updating vehicle ECUs using differential update packages
US8136108B2 (en) Updating firmware with multiple processors
US10127036B2 (en) Method for OTA updating vehicle electronic control unit
WO2017067448A1 (en) Firmware-over-the-air upgrade method, system and computer storage medium
US9471300B2 (en) Wireless firmware upgrades to an alarm security panel
CN110083374B (en) Upgrade rollback method, system and terminal equipment
EP2456257B1 (en) Method and system for upgrading wireless data card
US20160364225A1 (en) Centralized system for software updating vehicle components
US20160364230A1 (en) Telematics control unit comprising a differential update package
CN1953376A (en) A system and method for updating remote software of wireless terminal equipment
CN109857437A (en) A kind of upgrade method and system of bluetooth equipment
CN111158718A (en) Local communication server, OTA (over the air) upgrading method thereof and cloud server
JP7345921B2 (en) OTA differential update method and system for master-slave architecture
Odat et al. Firmware over the air for automotive, fotamotive
EP4394583A1 (en) Charging stand, charging stand upgrading method and apparatus, device, and storage medium
CN112383908A (en) Bluetooth device upgrading method and system
CN107102849B (en) Method and apparatus for file replacement with periodic ignition switch off
EP3249531B1 (en) Control means, in-vehicle program rewriting device equipped with same, and in-vehicle program rewriting method
CN107766063A (en) A kind of method and system of batch upgrade software
EP3043262A1 (en) Method and device for remote base station version installation
CN116149906A (en) Backup method and device for vehicle mileage information, vehicle and storage medium
US10042677B2 (en) Maintenance conflict tool

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
GR01 Patent grant
GR01 Patent grant