CN110888759A - Firmware upgrade protection method and mobile power supply leasing equipment - Google Patents
Firmware upgrade protection method and mobile power supply leasing equipment Download PDFInfo
- Publication number
- CN110888759A CN110888759A CN201911135490.5A CN201911135490A CN110888759A CN 110888759 A CN110888759 A CN 110888759A CN 201911135490 A CN201911135490 A CN 201911135490A CN 110888759 A CN110888759 A CN 110888759A
- Authority
- CN
- China
- Prior art keywords
- firmware
- upgraded
- boot area
- firmware data
- upgrade
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1441—Resetting or repowering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1433—Saving, restoring, recovering or retrying at system level during software upgrading
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
Abstract
The invention is suitable for the technical field of firmware, and provides a firmware upgrade protection method, a computer readable storage medium and mobile power supply leasing equipment, wherein the method comprises the following steps: receiving a firmware upgrading request issued by a server and firmware data to be upgraded, and caching; controlling the application program to reset and enter a boot area to operate, and transmitting the firmware data to be upgraded in the cache to the boot area; when the upgrading process of transmitting the firmware data to be upgraded in the cache to the boot area is forced to stop, controlling to suspend the upgrading process, recovering the upgrading process after the blocking factors are eliminated, and continuously transmitting the residual firmware data to the boot area; after receiving the complete firmware data, the boot area verifies the complete firmware data; if the verification is successful, the original application program is overwritten, and the new application program is entered into for operation after the upgrade is successful; and if the verification fails, the firmware data to be upgraded in the cache is transmitted to the boot area again until the upgrade is completed. The firmware upgrading process is independent and controllable, and the upgrading efficiency is improved.
Description
Technical Field
The invention belongs to the technical field of firmware, and particularly relates to a firmware upgrade protection method, a computer readable storage medium and mobile power supply leasing equipment.
Background
The mobile power supply leasing equipment is often required to be subjected to firmware upgrading operation, during the firmware upgrading process, the upgrading process is possibly blocked due to the influence of uncontrollable factors, if sudden power failure occurs, the upgrading process is forced to stop, even a program which is upgraded and written into the firmware needs to be deleted and upgraded again, and therefore time and labor are wasted, the upgrading efficiency is low, the upgrading time is long, and the normal use of the equipment is influenced.
Disclosure of Invention
The invention aims to provide a firmware upgrading protection method, a computer readable storage medium and mobile power supply leasing equipment, aiming at solving the problems that the upgrading progress is blocked due to the influence of uncontrollable factors in the firmware upgrading process, even written upgrading data needs to be deleted and upgraded again, the efficiency is low, the upgrading occupation time is long, and the normal use of the equipment is influenced.
In a first aspect, the present invention provides a firmware upgrade protection method, where the method includes:
receiving a firmware upgrading request issued by a server and firmware data to be upgraded;
caching the received firmware data to be upgraded;
after receiving the updated firmware data, triggering the application program to be updated;
controlling the application program to reset and enter a boot area to operate, and transmitting the firmware data to be upgraded in the cache to the boot area;
when the upgrading process of transmitting the firmware data to be upgraded in the cache to the boot area is forced to stop, controlling to suspend the upgrading process, recovering the upgrading process after the blocking factors are eliminated, and continuously transmitting the residual firmware data to the boot area;
when the boot area receives the complete firmware data, verifying the firmware data;
if the verification is successful, overwriting the original application program, and entering a new application program to operate after upgrading is successful;
and if the verification fails, restarting to transmit the firmware data to be upgraded in the cache to the boot area until the upgrade is completed.
In a second aspect, the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the firmware upgrade protection method.
In a third aspect, the present invention provides a mobile power supply leasing device, including: one or more processors, a memory, and one or more computer programs, wherein the processors and the memory are connected by a bus, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, which when executing the computer programs implement the steps of the firmware upgrade protection method.
In the firmware upgrading protection method, the firmware data to be upgraded in the cache is transmitted to the boot area, so that the equipment can be normally upgraded by using the firmware data cached in the boot area under the condition of network disconnection; when upgrading, the application program is controlled to reset and enters the boot area for carrying out, when the upgrading process that the firmware data to be upgraded in the cache is transmitted to the boot area is forced to stop, the boot area suspends the upgrading process, and after the blocking factors are eliminated, the upgrading process is recovered, and the rest firmware data is continuously transmitted; when the application program can not normally run, the hardware part needing to be upgraded is powered off and reset, the hardware part enters a boot area to wait, and when an upgrade request exists, the previous upgrade process is continued; the invention effectively improves the equipment upgrading efficiency and does not influence the normal use of the mobile power supply leasing equipment.
Drawings
Fig. 1 is a flowchart of a firmware upgrade protection method according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a mobile power supply rental apparatus according to an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more clearly apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Referring to fig. 1, an embodiment of the present invention provides a firmware upgrade protection method, which may be executed by a mobile power supply rental apparatus, and the method includes:
and S1, receiving a firmware upgrading request issued by the server and firmware data to be upgraded.
And S2, caching the received firmware data to be upgraded.
And S3, after the firmware data to be upgraded is received, triggering the application program to be upgraded.
And S4, the control application program is reset and enters the boot area to run, and the firmware data to be upgraded in the cache is transmitted to the boot area.
In an embodiment of the present invention, during the process of transmitting the firmware data to be upgraded in the cache to the boot area, handshake is used to ensure accessibility of data transmission.
Before S4, the method may further include the steps of:
and judging whether a task exists at present, and if so, waiting for processing to finish the current task.
And S5, when the upgrading process of transmitting the firmware data to be upgraded in the cache to the boot area is forced to stop, controlling to suspend the upgrading process, and resuming the upgrading process after the blocking factors are eliminated, and continuously transmitting the residual firmware data to the boot area.
S6, when the boot area receives the complete firmware data, verifying the firmware data;
if the verification is successful, overwriting the original application program, and entering a new application program to operate after upgrading is successful;
and if the verification fails, restarting to transmit the firmware data to be upgraded in the cache to the boot area until the upgrade is completed.
In an embodiment of the present invention, the verifying the firmware data specifically may be:
the firmware data is checked by md5, aes, Des, or aDes.
In an embodiment of the present invention, when the application cannot run normally and cannot use the boot area for firmware upgrade, the method further includes:
resetting a hardware part needing to be upgraded, enabling a MCU or a fixed program part boot inside a chip to enter a boot area, waiting for an upgrade request, and when receiving a firmware upgrade request issued by a server, enabling the boot area to enter an upgrade state and starting upgrading.
In an embodiment of the present invention, the resetting of the hardware part that needs to be upgraded specifically includes: and performing power-off reset on the hardware part needing to be upgraded, or automatically resetting the hardware part needing to be upgraded according to a preset program.
An embodiment of the present invention provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the firmware upgrade protection method provided by an embodiment of the present invention.
Fig. 2 is a block diagram showing a specific structure of a mobile power supply rental apparatus provided in an embodiment of the present invention, where a mobile power supply rental apparatus 100 includes: one or more processors 101, a memory 102, and one or more computer programs, wherein the processors 101 and the memory 102 are connected by a bus, the one or more computer programs being stored in the memory 102 and configured to be executed by the one or more processors 101, the processor 101 implementing the steps of the firmware upgrade protection method as provided by an embodiment of the present invention when executing the computer programs.
In the firmware upgrade protection method of the embodiment of the invention, the firmware data to be upgraded in the cache is transmitted to the boot area, so that the equipment can be normally upgraded by using the firmware data cached in the boot area under the condition of network disconnection; when upgrading, controlling the application program to reset, entering a boot area to carry out the upgrading, controlling to suspend the upgrading process when the upgrading process of transmitting the firmware data to be upgraded in the cache to the boot area is forced to stop, recovering the upgrading process after the blocked factors are eliminated, and continuously transmitting the rest firmware data; when the application program can not normally run, the hardware part needing to be upgraded is powered off and reset, the hardware part enters a boot area to wait, and when an upgrade request exists, the previous upgrade process is continued; the invention effectively improves the equipment upgrading efficiency and does not influence the normal use of the mobile power supply leasing equipment.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.
Claims (8)
1. A firmware upgrade protection method, the method comprising:
receiving a firmware upgrading request issued by a server and firmware data to be upgraded;
caching the received firmware data to be upgraded;
after receiving the updated firmware data, triggering the application program to be updated;
controlling the application program to reset and enter a boot area to operate, and transmitting the firmware data to be upgraded in the cache to the boot area;
when the upgrading process of transmitting the firmware data to be upgraded in the cache to the boot area is forced to stop, controlling to suspend the upgrading process, recovering the upgrading process after the blocking factors are eliminated, and continuously transmitting the residual firmware data to the boot area;
when the boot area receives the complete firmware data, verifying the firmware data;
if the verification is successful, overwriting the original application program, and entering a new application program to operate after upgrading is successful;
and if the verification fails, restarting to transmit the firmware data to be upgraded in the cache to the boot area until the upgrade is completed.
2. The method of claim 1, wherein prior to application reset, the method further comprises the steps of:
and judging whether a task exists at present, and if so, waiting for processing to finish the current task.
3. The method of claim 1, wherein when the application program cannot run normally and cannot use the boot area for firmware upgrade, the method further comprises:
resetting a hardware part needing to be upgraded, enabling a MCU or a fixed program part boot inside a chip to enter a boot area, waiting for an upgrade request, and when receiving a firmware upgrade request issued by a server, enabling the boot area to enter an upgrade state and starting upgrading.
4. The method of claim 3, wherein the resetting the hardware portion requiring upgrade specifically comprises: and performing power-off reset on the hardware part needing to be upgraded, or automatically resetting the hardware part needing to be upgraded according to a preset program.
5. The method of claim 1, wherein a handshake is used in transferring the firmware data to be upgraded in the cache to the boot area.
6. The method of claim 1, wherein the verifying the firmware data is specifically:
the firmware data is checked by md5, aes, Des, or aDes.
7. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the firmware upgrade protection method according to any one of claims 1 to 6.
8. A mobile power supply rental device, comprising: one or more processors, a memory, and one or more computer programs, wherein the processors and the memory are connected by a bus, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, wherein the steps of the firmware upgrade protection method according to any one of claims 1 to 6 are implemented when the computer programs are executed by the processors.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911135490.5A CN110888759A (en) | 2019-11-19 | 2019-11-19 | Firmware upgrade protection method and mobile power supply leasing equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911135490.5A CN110888759A (en) | 2019-11-19 | 2019-11-19 | Firmware upgrade protection method and mobile power supply leasing equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110888759A true CN110888759A (en) | 2020-03-17 |
Family
ID=69747967
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911135490.5A Pending CN110888759A (en) | 2019-11-19 | 2019-11-19 | Firmware upgrade protection method and mobile power supply leasing equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110888759A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102866928A (en) * | 2012-10-12 | 2013-01-09 | 福建师范大学 | Watchdog circuit with power supply managing function |
CN103246536A (en) * | 2013-04-28 | 2013-08-14 | 常州南京大学高新技术研究院 | Method for wirelessly upgrading firmware of instrumented positioning system |
CN103455354A (en) * | 2013-09-06 | 2013-12-18 | 南京南自信息技术有限公司 | Method and equipment for preventing hardware update from failing |
CN105573810A (en) * | 2016-03-23 | 2016-05-11 | 重庆邮电大学 | Remote upgrade method and remote upgrade device for wireless sensor network node |
CN109117168A (en) * | 2018-08-29 | 2019-01-01 | 拓攻(南京)机器人有限公司 | Unmanned plane firmware update, device, unmanned plane and storage medium |
-
2019
- 2019-11-19 CN CN201911135490.5A patent/CN110888759A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102866928A (en) * | 2012-10-12 | 2013-01-09 | 福建师范大学 | Watchdog circuit with power supply managing function |
CN103246536A (en) * | 2013-04-28 | 2013-08-14 | 常州南京大学高新技术研究院 | Method for wirelessly upgrading firmware of instrumented positioning system |
CN103455354A (en) * | 2013-09-06 | 2013-12-18 | 南京南自信息技术有限公司 | Method and equipment for preventing hardware update from failing |
CN105573810A (en) * | 2016-03-23 | 2016-05-11 | 重庆邮电大学 | Remote upgrade method and remote upgrade device for wireless sensor network node |
CN109117168A (en) * | 2018-08-29 | 2019-01-01 | 拓攻(南京)机器人有限公司 | Unmanned plane firmware update, device, unmanned plane and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106257417B (en) | Boot program upgrading method, embedded equipment, control equipment and embedded system | |
US7434094B2 (en) | Remote copy processing method, program, and system | |
US9740563B2 (en) | Controlling software processes that are subject to communications restrictions by freezing and thawing a computational process in a virtual machine from writing data | |
US9514070B2 (en) | Debug control circuit | |
US8225289B2 (en) | Method and system for improved tool interaction with a target | |
JP2014501995A (en) | Elastic computing cloud system upgrade | |
WO2017193964A1 (en) | Component upgrade method, apparatus and system | |
CN108563472B (en) | Service plug-in loading method and device based on multi-open application | |
CN110995724A (en) | Remote upgrading method for whole vehicle controller of new energy bus | |
US10795708B1 (en) | Transparent disk caching for virtual machines and applications | |
US8826264B1 (en) | Non-disruptive upgrade of applications | |
CN107391174B (en) | Control method and control device for online upgrading of system | |
CN110888759A (en) | Firmware upgrade protection method and mobile power supply leasing equipment | |
CN112612498A (en) | Embedded equipment upgrading method and embedded equipment | |
WO2024041283A1 (en) | Client upgrading method and apparatus, terminal device, and storage medium | |
CN109284176B (en) | Interrupt response method, device and computer readable storage medium | |
CN114035831B (en) | CPLD upgrading method, system and computer readable storage medium | |
US20110302399A1 (en) | Rapid activation of service management processor subsystem for server device | |
CN105704707A (en) | Slave equipment and air upgrading method thereof | |
EP1856615A1 (en) | Methodology for effectively utilizing processor cache in an electronic system | |
CN111737103A (en) | Processor including debugging unit and debugging system | |
CN114461336A (en) | GPU real-time migration method and device and electronic equipment | |
JP2003345638A5 (en) | ||
CN112685063A (en) | Feature library updating method and device, network equipment and readable storage medium | |
US8543755B2 (en) | Mitigation of embedded controller starvation in real-time shared SPI flash architecture |
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 |