CN112214233A - Method and system for recovering terminal firmware of Internet of things - Google Patents

Method and system for recovering terminal firmware of Internet of things Download PDF

Info

Publication number
CN112214233A
CN112214233A CN202011124081.8A CN202011124081A CN112214233A CN 112214233 A CN112214233 A CN 112214233A CN 202011124081 A CN202011124081 A CN 202011124081A CN 112214233 A CN112214233 A CN 112214233A
Authority
CN
China
Prior art keywords
firmware
internet
things
communication module
backup
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
CN202011124081.8A
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.)
Shanghai Sunmi Technology Group Co Ltd
Citaq Co Ltd
Original Assignee
Shanghai Sunmi Technology Group Co Ltd
Citaq Co Ltd
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 Shanghai Sunmi Technology Group Co Ltd, Citaq Co Ltd filed Critical Shanghai Sunmi Technology Group Co Ltd
Priority to CN202011124081.8A priority Critical patent/CN112214233A/en
Publication of CN112214233A publication Critical patent/CN112214233A/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

Abstract

The embodiment of the invention relates to a method and a system for recovering terminal firmware of an Internet of things. Firstly, storing backup firmware aiming at firmware of an internet of things terminal in the internet of things terminal; then after the Internet of things terminal is powered on and started, a bootstrap program of the Internet of things terminal detects whether the firmware is abnormal, the backup firmware is operated when the firmware is abnormal, the first Internet of things communication module is used for releasing firmware abnormal information, a terminal serial number and a firmware version number of the firmware abnormality, and simultaneously subscribing a firmware upgrading theme; then, the Internet of things server correspondingly binds a firmware downloading task according to the received firmware abnormal information, the terminal serial number of the firmware abnormality and the firmware version number and correspondingly pushes an upgrading task message; then, the backup firmware receives and uses the upgrading task message to download a corresponding firmware upgrading package from the Internet of things server; and finally, judging whether the downloading of the firmware upgrading package is successful, if so, installing the firmware upgrading package, and otherwise, continuing the downloading. The invention can simplify firmware recovery and make recovery automatic.

Description

Method and system for recovering terminal firmware of Internet of things
Technical Field
The embodiment of the invention relates to the field of Internet of things, in particular to a system and a method for recovering terminal firmware of the Internet of things.
Background
Due to the great advantages of the fifth generation mobile communication (5G) in terms of low latency, ultra-low power consumption and multi-terminal compatibility, more industries in which the fifth generation mobile communication (5G) is embedded will gradually appear along with the commercial and popularization of the 5G. An internet of things (IOT) terminal can obtain a low-delay and ultra-low-power-consumption network environment through 5G, and can further realize the interconnection of everything.
In the using process of the internet of things terminal such as a POS machine, for the situation that the firmware is abnormal or lost in the firmware running or upgrading process and cannot work normally, the internet of things terminal usually needs to be returned to a factory for maintenance. In order to avoid such repair, the prior art provides a networked firmware recovery method, but most of the firmware recovery methods are performed on independent operating systems with large memories and large storages, such as a router, a mobile phone, a tablet and the like, for example, Android and the like, and a terminal needs to have a human-computer interaction interface, so that the firmware can be recovered through manual operation. However, for the internet of things terminal belonging to the embedded device, system resources are limited, such as limited network bandwidth and limited memory, and there is no human-computer interaction interface, which cannot be applied to the above-mentioned firmware recovery technology of the prior art that is applicable to large memory, large storage and devices with user interaction interfaces.
In view of the foregoing problems, the present invention needs to provide a method and a system for recovering a terminal firmware of an internet of things, so as to simplify firmware recovery, and automatically download a firmware from an internet of things server when the firmware is abnormal, thereby implementing automatic recovery when the firmware is abnormal.
Disclosure of Invention
In order to solve the problems in the prior art, at least one embodiment of the present invention provides a system and a method for recovering an internet of things terminal firmware.
In a first aspect, an embodiment of the present invention provides a method for recovering an internet of things terminal firmware, where the method includes:
(a) storing backup firmware aiming at the firmware in the Internet of things terminal, wherein the backup firmware comprises a first Internet of things communication module and a first Internet communication module;
(b) after the Internet of things terminal is powered on and started, a bootstrap program of the Internet of things terminal detects whether the firmware of the Internet of things terminal is abnormal or not, the backup firmware is operated when the firmware is abnormal, and the backup firmware issues firmware abnormal information, a terminal serial number and a firmware version number of the firmware abnormality to an Internet of things server through the first Internet of things communication module and subscribes a firmware upgrading theme at the same time;
(c) the Internet of things server receives the firmware abnormal information, the terminal serial number of the firmware abnormality and the firmware version number through the second Internet of things communication module, correspondingly binds a firmware downloading task according to the terminal serial number of the firmware abnormality and the firmware version number, and correspondingly pushes an upgrading task message through the second Internet of things communication module;
(d) receiving the upgrading task message by the backup firmware through the first internet of things communication module, and downloading a corresponding firmware upgrading packet from the internet of things server by using the upgrading task message and through the first internet communication module;
(e) judging whether the backup firmware downloads the firmware upgrade package successfully or not, if so, continuing the step (f), otherwise, continuing the downloading of the firmware upgrade package in the step (d); and
(f) and installing a firmware upgrading package on the corresponding position of the firmware by the boot program.
In some embodiments, the upgrade task message in steps (c) and (d) includes upgrade package information, and the step (e) determines whether the backup firmware downloads the firmware upgrade package successfully through the upgrade package information in the upgrade task message.
In some embodiments, the boot program in step (b) detects whether the firmware is abnormal by detecting the integrity of the firmware, and the boot program runs the backup firmware after copying the backup firmware to a location corresponding to the firmware when the firmware is abnormal.
In some embodiments, in the step (d), the backup firmware sends a request for downloading a corresponding firmware upgrade package to the internet of things server through the first internet communication module, and the internet of things server receives the request through the second internet communication module and sends the firmware upgrade package to the internet of things terminal.
In some embodiments, in step (d), breakpoint resuming is supported when the corresponding firmware upgrade package is downloaded from the internet of things server.
In some embodiments, the first internet of things communication module and the second internet of things communication module both implement internet of things communication based on MQTT protocol.
In some embodiments, the first internet communication module and the second internet communication module both enable internet communication based on the HTTP/HTTPs protocol.
In some embodiments, the internet of things terminal comprises a POS machine.
In a second aspect, an embodiment of the present invention further provides a system for recovering a terminal firmware of an internet of things, where the system includes:
the Internet of things terminal comprises a bootstrap program, firmware and backup firmware, wherein the backup firmware comprises a first Internet of things communication module and a first Internet communication module, the bootstrap program detects whether the firmware is abnormal after the Internet of things terminal is powered on and started, and runs the backup firmware when the firmware is abnormal, and the backup firmware issues firmware abnormal information, a terminal serial number and a firmware version number of the firmware abnormality to an Internet of things server through the first Internet of things communication module and subscribes a firmware upgrading theme at the same time; and
the Internet of things server is provided with a second Internet of things communication module, a processing module and an upgrade package memory for storing a firmware upgrade package, the second Internet of things communication module receives the firmware exception information, the terminal serial number of the firmware exception and the firmware version number, and the processing module correspondingly binds a firmware downloading task according to the terminal serial number of the firmware exception and the firmware version number and correspondingly pushes upgrade task information through the second Internet of things communication module;
the backup firmware receives the upgrading task message through the first internet of things communication module, downloads a corresponding firmware upgrading package from the internet of things server through the first internet of things communication module by utilizing the upgrading task message, judges whether the downloading of the firmware upgrading package is successful, if not, the downloading is continued until the downloading is successful, and if so, the boot program installs the firmware upgrading package on a corresponding position of the firmware.
In some embodiments, the upgrade task message includes upgrade package information, and the backup firmware checks whether the downloaded firmware upgrade package is complete through the upgrade package information, and continues to download the corresponding firmware upgrade package from the internet of things server when the firmware upgrade package is incomplete until the complete firmware upgrade package is downloaded.
In some embodiments, the boot program detects whether the firmware is abnormal by detecting the integrity of the firmware, and the boot program runs the backup firmware after copying the backup firmware to a location corresponding to the firmware when the firmware is abnormal.
In some embodiments, the backup firmware sends a request for downloading a corresponding firmware upgrade package to the internet of things server through the first internet communication module, and the internet of things server receives the request through the second internet communication module and sends the firmware upgrade package to the internet of things terminal.
In some embodiments, the backup firmware supports breakpoint resumption when downloading the corresponding upgrade package from the internet of things server.
In some embodiments, the first internet of things communication module and the second internet of things communication module both implement internet of things communication based on MQTT protocol.
In some embodiments, the first internet communication module and the second internet communication module both enable internet communication based on the HTTP/HTTPs protocol.
In some embodiments, the internet of things terminal comprises a POS machine.
Compared with the prior art that the firmware needs to be restored to the factory or the provided firmware restoration technology is only suitable for equipment with large memory, large storage and user interaction interface, the embodiment of the invention firstly stores the backup firmware aiming at the firmware in the terminal of the Internet of things; then after the Internet of things terminal is powered on and started, a bootstrap program of the Internet of things terminal detects whether the firmware of the Internet of things terminal is abnormal or not, the backup firmware is operated when the firmware is abnormal, the backup firmware issues firmware abnormal information, a terminal serial number and a firmware version number of the firmware abnormality to an Internet of things server through a first Internet of things communication module, and simultaneously subscribes a firmware upgrading theme; then the Internet of things server receives the firmware abnormal information, the terminal serial number of the firmware abnormality and the firmware version number through a second Internet of things communication module, correspondingly binds a firmware downloading task according to the terminal serial number of the firmware abnormality and the firmware version number, and correspondingly pushes an upgrading task message through the second Internet of things communication module; then the backup firmware receives the upgrading task message through a first internet of things communication module, and a corresponding firmware upgrading package is downloaded from the internet of things server through the first internet of things communication module by using the upgrading task message; and finally, judging whether the backup firmware downloads the firmware upgrading package successfully, if so, installing the firmware upgrading package on a corresponding position of the firmware by the boot program, and if not, continuing the downloading of the firmware upgrading package.
The embodiment of the invention can simplify the firmware recovery, and can automatically download the firmware when the firmware is abnormal, thereby realizing the automatic recovery function when the firmware of the Internet of things terminal is lost, enhancing the experience of the user, and avoiding the factory return maintenance caused by the abnormal firmware.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a schematic structural diagram illustrating a composition of a system for recovering firmware of an internet of things terminal according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for recovering an internet of things terminal firmware according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
Fig. 1 is a schematic structural diagram of a system for recovering an internet of things terminal firmware according to an embodiment of the present invention. Referring to fig. 1, a system 1 for recovering the terminal firmware of the internet of things includes an internet of things terminal 10 and an internet of things server 12. Only one internet of things terminal 10 is shown in fig. 1, and in practice, a plurality of internet of things terminals 10 may be included in the system 1. The internet of things terminal 10 comprises a POS machine and the like. The components of the system 1 are described in detail below.
The internet of things terminal 10 includes a boot program 10A, firmware 10B, backup firmware 10C, and a terminal storage module 10D. The backup firmware 10C has a first internet of things communication module 100C and a first internet communication module 102C, and the backup firmware 10C has an internet of things communication function and an internet communication function. The terminal storage module 10D is configured to store a terminal serial number 100D and a firmware version number 102D, each internet of things terminal 10 has a unique terminal serial number 100D, and the firmware version number 102D is a version number corresponding to a current firmware. The boot program 10A operates after the internet of things terminal 10 is powered on and started, and the boot program 10A first detects whether the firmware 10B is abnormal. In the present embodiment, the boot program 10A detects whether the firmware 10B is abnormal by detecting the integrity of the firmware 10B.
The boot program 10A runs the backup firmware 10C when the firmware 10B is abnormal. In this embodiment, the boot program 10A copies the backup firmware 10C to a location corresponding to the firmware 10B when the firmware 10B is abnormal, and then runs the backup firmware 10C. In other embodiments of the present invention, the boot program 10A may directly run the backup firmware 10C without copying the backup firmware 10C to the corresponding location of the firmware 10B.
The backup firmware 10C issues firmware exception information, a terminal serial number 100D of the firmware exception, and a firmware version number 102D to the internet of things server 12 through the first internet of things communication module 100C, and subscribes to a firmware upgrade theme at the same time; the purpose of the backup firmware 10C to publish information and subscribe to an upgrade topic is to tell the internet of things server 12 that the firmware of the internet of things terminal 10 is abnormal, and a download task for downloading the firmware needs to be bound by the internet of things server 12. In this embodiment, the first internet of things communication module 100C implements internet of things communication based on MQTT protocol, and the first internet communication module 102C implements internet of things communication based on HTTP/HTTPs protocol.
The internet-of-things server 12 has a second internet-of-things communication module 12A, a second internet communication module 12B, a processing module 12C, and an upgrade package memory 12D for storing firmware upgrade packages 121D, …, 12nD, the second internet-of-things communication module 12A receiving the firmware exception information, a terminal serial number 100D of the firmware exception, and a firmware version number 102D. The processing module 12C correspondingly binds a firmware download task according to the terminal serial number 100D and the firmware version number 102D of the firmware abnormality, and correspondingly pushes an upgrade task message through the second internet-of-things communication module 12A. The processing module 12C may also correspondingly bind the download task of the firmware of the latest version and correspondingly push an upgrade task message when the firmware version number 102D is lower than the firmware version number of the firmware upgrade package stored in the upgrade package memory 12D for the internet of things terminal 10. In this embodiment, the second internet communication module 12A implements internet of things communication based on MQTT protocol, and the second internet communication module 12B implements internet of things communication based on HTTP/HTTPs protocol; the first internet-of-things communication module 100C and the second internet-of-things communication module 12A are both connected to an internet of things (not shown) and communicate with each other through the internet of things; the first internet communication module 102C and the second internet communication module 12B are connected to an internet (not shown) and communicate with each other through the internet.
The backup firmware 10C receives the upgrade task message through the first internet of things communication module 100C, and downloads the corresponding firmware upgrade packages 121D, …, 12nD from the internet of things server 12 through the first internet communication module 102C by using the upgrade task message. The backup firmware 10C also determines whether the downloading of the firmware upgrade package is successful, if not, the downloading is continued until the downloading is successful, and if so, the boot program 10A installs the firmware upgrade package at the corresponding position of the firmware 10B.
The upgrade task message includes upgrade package information, and the backup firmware 10C determines whether the downloading of the firmware upgrade package is successful by checking whether the downloaded firmware upgrade package is complete using the upgrade package information, and continues to download the corresponding firmware upgrade package from the internet of things server 12 when it is incomplete (i.e., downloading is unsuccessful) until the complete firmware upgrade package is downloaded (i.e., downloading is successful). The backup firmware 10C checks the integrity of the upgrade package before installing it, ensuring the integrity and validity of the upgrade.
The backup firmware 10C sends a request for downloading a corresponding firmware upgrade package to the internet of things server 12 through the first internet communication module 102C, and the internet of things server 12 receives the request through the second internet communication module 12B and sends the firmware upgrade package to the internet of things terminal 10. The backup firmware 10C supports breakpoint resume when downloading the corresponding upgrade package from the internet of things server 12.
When the firmware upgrade package is installed, the internet of things terminal 10 may issue the upgraded information to the internet of things server 12 through the first internet of things communication module 102C or other similar internet of things communication modules. For example, the bootstrap program 10A may issue the upgrade completed information to the internet of things server 12 through a similar internet of things communication module therein.
Referring to fig. 2, with reference to fig. 1 in combination, fig. 2 shows a flowchart of a method for recovering the terminal firmware of the internet of things according to an embodiment of the present invention. As shown in fig. 2, the method 20 for recovering the firmware of the terminal of the internet of things first performs step S200, and stores backup firmware for the firmware of the terminal of the internet of things, where the backup firmware includes a first internet of things communication module and a first internet communication module. In this embodiment, the internet of things terminal includes a POS machine, the first internet of things communication module implements internet of things communication based on an MQTT protocol, and the first internet communication module implements internet of things communication based on an HTTP/HTTPs protocol.
In other embodiments of the present invention, the first internet of things communication module may implement internet of things communication based on other commonly used internet of things protocols in the industry other than MQTT protocol, and the first internet communication module may implement internet communication based on other commonly used internet protocols in the industry other than HTTP/HTTPs protocol.
The method 20 continues to step S210, after the terminal of the internet of things is powered on and started, the bootstrap program detects whether the firmware of the terminal of the internet of things is abnormal, if so, the step S220 is continued, and if not, the firmware of the terminal of the internet of things is operated (S230). In this embodiment, the boot program detects whether the firmware is abnormal by detecting the integrity of the firmware, and the boot program runs the backup firmware after copying the backup firmware to a position corresponding to the firmware when the firmware is abnormal.
In step S220, the backup firmware is operated, and the backup firmware issues firmware exception information, a terminal serial number of the firmware exception, and a firmware version number to the internet of things server through the first internet of things communication module, and subscribes to a firmware upgrade theme at the same time; each terminal of the internet of things has a unique terminal serial number.
The method 20 continues to step S240, where the internet of things server receives the firmware exception information, the terminal serial number of the firmware exception, and the firmware version number through the second internet of things communication module, binds the firmware download task according to the terminal serial number of the firmware exception and the firmware version number, and pushes the upgrade task message through the second internet of things communication module. In this embodiment, the internet of things server may further bind the download task of the latest version of firmware and correspondingly push an upgrade task message when the received firmware version number is lower than the firmware version number of the firmware upgrade package stored in the internet of things server.
The method 20 continues with step S250 in which the backup firmware receives an upgrade task message via the first internet of things communication module. In this implementation, the upgrade task message includes upgrade package information, which may include a size of the upgrade package and a version number of the upgrade package.
The method 20 continues with step S260, where the backup firmware sends a request for downloading a corresponding firmware upgrade package to the internet of things server through the first internet communication module using an upgrade task message.
The method 20 continues with step S270, where the internet of things server receives the request through the second internet communication module and sends the firmware upgrade package to the internet of things terminal. In this embodiment, when the corresponding firmware upgrade package is downloaded from the internet of things server, breakpoint resume is supported.
The method 20 continues to step S280, where it is determined whether the downloading of the firmware upgrade package by the backup firmware is successful, if so, step S290 is continued, otherwise, step S260 is returned to. In this embodiment, whether the firmware upgrade package is successfully downloaded is determined by the upgrade package information in the upgrade task message, for example, whether the firmware upgrade package is successfully downloaded can be directly determined by the size of the upgrade package.
The method 20 continues with step S290, where the boot program installs the firmware upgrade package at the corresponding location of the firmware.
The method 20 may further perform the following steps after step S290: and when the firmware upgrading package is installed, upgrading completion information is issued to the Internet of things server through the first Internet of things communication module.
According to the embodiment of the invention, firstly, backup firmware is stored aiming at the firmware of the terminal of the Internet of things; then after the Internet of things terminal is powered on and started, a bootstrap program of the Internet of things terminal detects whether the firmware of the Internet of things terminal is abnormal or not, the backup firmware is operated when the firmware is abnormal, the backup firmware issues firmware abnormal information, a terminal serial number and a firmware version number of the firmware abnormality to an Internet of things server through a first Internet of things communication module, and simultaneously subscribes a firmware upgrading theme; then the Internet of things server receives the firmware abnormal information, the terminal serial number of the firmware abnormality and the firmware version number through a second Internet of things communication module, correspondingly binds a firmware downloading task according to the terminal serial number of the firmware abnormality and the firmware version number, and correspondingly pushes an upgrading task message through the second Internet of things communication module; then the backup firmware receives the upgrading task message through a first internet of things communication module, and a corresponding firmware upgrading package is downloaded from the internet of things server through the first internet of things communication module by using the upgrading task message; and finally, judging whether the backup firmware downloads the firmware upgrading package successfully, if so, installing the firmware upgrading package on a corresponding position of the firmware by the boot program, and if not, continuing the downloading of the firmware upgrading package.
The embodiment of the invention can simplify the firmware recovery, and can automatically download the firmware when the firmware is abnormal, thereby realizing the automatic recovery function when the firmware of the Internet of things terminal is lost, enhancing the experience of the user, and avoiding the factory return maintenance caused by the abnormal firmware.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units designed to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the execution sequence of the steps of the method embodiments can be arbitrarily adjusted unless there is an explicit precedence sequence. The disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or make a contribution to the prior art, or may be implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Those skilled in the art will appreciate that although some embodiments described herein include some features included in other embodiments instead of others, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. A method for recovering terminal firmware of the Internet of things comprises the following steps:
(a) storing backup firmware aiming at the firmware in the Internet of things terminal, wherein the backup firmware comprises a first Internet of things communication module and a first Internet communication module;
(b) after the Internet of things terminal is powered on and started, a bootstrap program of the Internet of things terminal detects whether the firmware of the Internet of things terminal is abnormal or not, the backup firmware is operated when the firmware is abnormal, and the backup firmware issues firmware abnormal information, a terminal serial number and a firmware version number of the firmware abnormality to an Internet of things server through the first Internet of things communication module and subscribes a firmware upgrading theme at the same time;
(c) the Internet of things server receives the firmware abnormal information, the terminal serial number of the firmware abnormality and the firmware version number through the second Internet of things communication module, correspondingly binds a firmware downloading task according to the terminal serial number of the firmware abnormality and the firmware version number, and correspondingly pushes an upgrading task message through the second Internet of things communication module;
(d) receiving the upgrading task message by the backup firmware through the first internet of things communication module, and downloading a corresponding firmware upgrading packet from the internet of things server by using the upgrading task message and through the first internet communication module;
(e) judging whether the backup firmware downloads the firmware upgrade package successfully or not, if so, continuing the step (f), otherwise, continuing the downloading of the firmware upgrade package in the step (d); and
(f) and installing a firmware upgrading package on the corresponding position of the firmware by the boot program.
2. The method of claim 1, wherein the upgrade task message in steps (c) and (d) includes upgrade package information, and the step (e) determines whether the backup firmware downloads the firmware upgrade package according to the upgrade package information in the upgrade task message.
3. The method of claim 1, wherein the boot program in step (b) detects whether the firmware is abnormal by detecting the integrity of the firmware, and the boot program runs the backup firmware after copying the backup firmware to a location corresponding to the firmware when the firmware is abnormal.
4. The method according to claim 1, wherein in the step (d), the backup firmware sends a request for downloading a corresponding firmware upgrade package to the internet of things server through the first internet communication module, and the internet of things server receives the request through the second internet communication module and sends the firmware upgrade package to the internet of things terminal; and (d) when the corresponding firmware upgrade package is downloaded from the Internet of things server, breakpoint continuous transmission is supported.
5. The method according to claim 4, wherein the first Internet of things communication module and the second Internet of things communication module both realize Internet of things communication based on MQTT protocol, the first Internet of things communication module and the second Internet of things communication module both realize Internet of things communication based on HTTP/HTTPS protocol, and the Internet of things terminal comprises a POS machine.
6. A system for recovering internet of things terminal firmware, comprising:
the Internet of things terminal comprises a bootstrap program, firmware and backup firmware, wherein the backup firmware comprises a first Internet of things communication module and a first Internet communication module, the bootstrap program detects whether the firmware is abnormal after the Internet of things terminal is powered on and started, and runs the backup firmware when the firmware is abnormal, and the backup firmware issues firmware abnormal information, a terminal serial number and a firmware version number of the firmware abnormality to an Internet of things server through the first Internet of things communication module and subscribes a firmware upgrading theme at the same time; and
the Internet of things server is provided with a second Internet of things communication module, a processing module and an upgrade package memory for storing a firmware upgrade package, the second Internet of things communication module receives the firmware exception information, the terminal serial number of the firmware exception and the firmware version number, and the processing module correspondingly binds a firmware downloading task according to the terminal serial number of the firmware exception and the firmware version number and correspondingly pushes upgrade task information through the second Internet of things communication module;
the backup firmware receives the upgrading task message through the first internet of things communication module, downloads a corresponding firmware upgrading package from the internet of things server through the first internet of things communication module by utilizing the upgrading task message, judges whether the downloading of the firmware upgrading package is successful, if not, the downloading is continued until the downloading is successful, and if so, the boot program installs the firmware upgrading package on a corresponding position of the firmware.
7. The system of claim 6, wherein the upgrade task message includes upgrade package information, and the backup firmware determines whether its download of the firmware upgrade package is successful according to the upgrade package information in the upgrade task message.
8. The system of claim 6, wherein the boot program detects whether the firmware is abnormal by detecting integrity of the firmware, and wherein the boot program runs the backup firmware after copying the backup firmware to a location corresponding to the firmware when the firmware is abnormal.
9. The system of claim 6, wherein the backup firmware sends a request for downloading a corresponding firmware upgrade package to the internet of things server through the first internet communication module, and the internet of things server receives the request through the second internet communication module and sends the firmware upgrade package to the internet of things terminal; and the backup firmware supports breakpoint continuous transmission when downloading the corresponding upgrade package from the Internet of things server.
10. The system according to claim 6, wherein the first Internet of things communication module and the second Internet of things communication module both realize Internet of things communication based on MQTT protocol, the first Internet of things communication module and the second Internet of things communication module both realize Internet of things communication based on HTTP/HTTPS protocol, and the Internet of things terminal comprises a POS machine.
CN202011124081.8A 2020-10-20 2020-10-20 Method and system for recovering terminal firmware of Internet of things Pending CN112214233A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011124081.8A CN112214233A (en) 2020-10-20 2020-10-20 Method and system for recovering terminal firmware of Internet of things

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011124081.8A CN112214233A (en) 2020-10-20 2020-10-20 Method and system for recovering terminal firmware of Internet of things

Publications (1)

Publication Number Publication Date
CN112214233A true CN112214233A (en) 2021-01-12

Family

ID=74056020

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011124081.8A Pending CN112214233A (en) 2020-10-20 2020-10-20 Method and system for recovering terminal firmware of Internet of things

Country Status (1)

Country Link
CN (1) CN112214233A (en)

Similar Documents

Publication Publication Date Title
EP2456257B1 (en) Method and system for upgrading wireless data card
EP1152338A2 (en) Method and apparatus for downloading firmware
CN101594613A (en) The method of terminal equipment and upgrading thereof, system
CN110083374B (en) Upgrade rollback method, system and terminal equipment
US8161474B2 (en) Diagnostic information preservation during installations of over the air update of wireless handset software
CA2875828C (en) Auto-update while running client interface with handshake
CN107193609B (en) Function module calling method and device in application and electronic equipment
CN109857423B (en) Program version updating method and device, server and readable storage medium
CN105260209A (en) Hot-update solution of program
CN106663016A (en) Upgrade method, apparatus and device for terminal device
CN113504922A (en) Robot software upgrading method and device, bridge server and upgrading server
CN108121560A (en) Difference bag upgrade method, device, terminal and computer readable storage medium
CN110007935B (en) Processing method, device and equipment for program upgrading
CN113094064A (en) Gateway software module upgrading method, device, equipment and storage medium
CN112214233A (en) Method and system for recovering terminal firmware of Internet of things
CN117389578A (en) Cloud terminal system upgrading method and device, cloud terminal and storage medium
CN110659052B (en) Method and system for updating system software in network equipment and readable storage medium
CN111475220B (en) Cold start method and device, electronic equipment and computer storage medium
CN113721959A (en) Information processing method and device and electronic equipment
CN109428936B (en) APP upgrading method, device, system, electronic equipment and storage medium
CN115185553A (en) Method for updating device firmware of user and related device
CN112166411A (en) Equipment control method, system and control terminal
CN114064086B (en) Multi-stage processor system and upgrading method thereof
CN112732290B (en) Equipment upgrading method and device, storage medium and electronic device
CN115269442B (en) Debugging method and tool based on graphic interface architecture and management project

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