CN113127029A - Firmware updating method and device, electronic equipment and storage medium - Google Patents

Firmware updating method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113127029A
CN113127029A CN202110247259.6A CN202110247259A CN113127029A CN 113127029 A CN113127029 A CN 113127029A CN 202110247259 A CN202110247259 A CN 202110247259A CN 113127029 A CN113127029 A CN 113127029A
Authority
CN
China
Prior art keywords
firmware
type
electronic equipment
updated
updating
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
CN202110247259.6A
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.)
Deep Blue Technology Shanghai Co Ltd
Original Assignee
Deep Blue Technology Shanghai 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 Deep Blue Technology Shanghai Co Ltd filed Critical Deep Blue Technology Shanghai Co Ltd
Priority to CN202110247259.6A priority Critical patent/CN113127029A/en
Publication of CN113127029A publication Critical patent/CN113127029A/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
    • 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/1438Restarting or rejuvenating

Abstract

The application provides a firmware updating method, a firmware updating device, electronic equipment and a computer readable storage medium, wherein the method comprises the following steps: responding to the starting of the electronic equipment, and acquiring the identification type of the electronic equipment; when the identification type is the updating type, detecting whether the electronic equipment can be started normally; when the electronic equipment cannot be normally started, adding one to the restart times within a preset time period, and detecting whether the restart times are not less than the preset times; when the restarting times are not less than the preset times, determining that the electronic equipment fails to be updated, and executing at least one of the following processes: controlling the electronic equipment to stop restarting; setting the identification type of the electronic equipment as an update failure type; sending prompt information of firmware updating failure to a cloud server and/or user equipment; and receiving the first firmware to be updated sent by the upper computer and updating the firmware of the electronic equipment again. Compared with the traditional update state detection method, the method has high reliability and better user experience.

Description

Firmware updating method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a firmware updating method and apparatus, an electronic device, and a computer-readable storage medium.
Background
Firmware is a program written in EPROM (erasable programmable read only memory) or EEPROM (electrically erasable programmable read only memory). The firmware refers to a device "driver" stored in the device, and through the firmware, the operating system can implement the operation of a specific machine according to the standard device driver, for example, the optical disc drive and the recorder have internal firmware. Firmware is the software that works at the very bottom of the system's foundation. For independently operable electronic products, firmware generally refers to its operating system.
In the prior art, when software on equipment is updated, due to reasons such as equipment function interruption (software error/communication interruption) or compatibility, an update failure situation occurs, however, whether the equipment fails to be updated does not have a proper judgment standard, when the equipment is restarted once, the equipment is not normally started, the equipment is judged to fail to be updated, and the equipment can be normally started to complete the update possibly through the second restart; or, when the device is restarted for 100 times, the device is not normally started and is found by personnel, and the device update failure is manually judged, a large amount of time is consumed for verifying the device update failure, and hardware damage may be caused by restarting the device for multiple times in a short time. Both of the above two criteria for determining the failure of updating the device cannot meet the needs of the user.
Disclosure of Invention
The application aims to provide a firmware updating method, a firmware updating device, an electronic device and a computer readable storage medium, whether the updating of the electronic device fails or not can be judged by comparing the restarting times and the preset times of the electronic device in a preset time period, the reliability is high, and the user experience is better.
The purpose of the application is realized by adopting the following technical scheme:
in a first aspect, the present application provides a firmware update method for updating firmware of an electronic device, where the method includes: responding to the starting of the electronic equipment, and acquiring the identification type of the electronic equipment; when the identification type is an updating type, detecting whether the electronic equipment can be started normally; when the electronic equipment cannot be normally started, adding one to the restart times within a preset time period, and detecting whether the restart times are not less than the preset times; when the restarting times are not less than the preset times, determining that the electronic equipment fails to be updated, and executing at least one of the following processes: controlling the electronic equipment to stop restarting; setting the identification type of the electronic equipment as an update failure type; sending prompt information of firmware updating failure to a cloud server and/or user equipment; receiving a first firmware to be updated sent by an upper computer, and updating the firmware of the electronic equipment again by using the first firmware to be updated. The technical scheme has the advantages that after the electronic equipment is started, the identification type of the electronic equipment is detected, when the identification type is the updating type, whether the electronic equipment can be normally started is judged, if the electronic equipment cannot be normally started, the restarting frequency in the preset time period can be compared with the preset frequency, so that whether the electronic equipment is failed to be updated is judged, if the restarting frequency is not less than the preset frequency, the electronic equipment is determined to be failed to be updated and corresponding operation is executed, on one hand, the electronic equipment can be controlled to stop restarting, and the electronic equipment is prevented from being continuously restarted; in one aspect, the identification type of the electronic device may be set as an update failure type, distinguishing the electronic device from the electronic device being updated; on one hand, prompt information of firmware updating failure can be sent to the cloud server and/or the user equipment, so that a user can know the firmware updating failure condition in time; on the other hand, the first firmware to be updated can be received, and the firmware of the electronic device is updated again by using the first firmware to be updated, so that when the electronic device cannot be started normally in the updating process, whether the electronic device fails to be updated can be judged by comparing the restart times and the preset times of the electronic device in a preset time period, if the electronic device fails to be updated, corresponding operation can be executed, and compared with the traditional updating state detection method, the method is high in reliability and better in user experience.
In some optional embodiments, the method further comprises: setting the identification type as a type to be updated in response to the electronic equipment receiving a second firmware to be updated; and when the identification type is the type to be updated, updating the firmware of the electronic equipment by using the second firmware to be updated, setting the identification type as the updating type, and setting the restarting number as 0. The technical scheme has the advantages that when the electronic equipment receives the second firmware to be updated, the identification type of the electronic equipment can be set to be the type to be updated, the electronic equipment enters a firmware updating preparation stage, when the second firmware to be updated is used for updating the firmware of the electronic equipment, the identification type of the electronic equipment can be set to be the updating type, the restarting frequency is set to be 0, the electronic equipment is in the updating state at the moment, and misjudgment caused by the fact that the restarting frequency is not clear is avoided.
In some optional embodiments, the method further comprises: and when the electronic equipment can be started normally, determining that the electronic equipment is updated successfully, and setting the identification type as a normal type. The technical scheme has the advantages that when the electronic equipment can be started normally, the electronic equipment can be determined to be updated successfully, the identification of the electronic equipment is set to be of a normal type, and the electronic equipment is updated successfully and is in a normal working state.
In some optional embodiments, the identifier type is represented by an identifier bit, where the identifier bit corresponding to the normal type is a first identifier, the identifier bit corresponding to the type to be updated is a second identifier, the identifier bit corresponding to the type being updated is a combination of a third identifier and the number of restarts, and the identifier bit of the type that fails to be updated is a fourth identifier. The technical scheme has the advantages that the identification type is represented by the identification bit, so that the electronic equipment in different states can be distinguished, and the classification management of the electronic equipment is facilitated; by setting the first to fourth identifiers, on one hand, the current working state of the electronic equipment can be displayed, for example, any one of a normal state, a state to be updated, a state being updated and a state failing to be updated; on the other hand, the restart times of the electronic device in the updating process can be acquired according to the combination of the third identifier and the restart times, and whether the electronic device fails to be updated is judged.
In some optional embodiments, the first identifier is 0, the second identifier is 1, the third identifier is 2, the fourth identifier is 3, and a combination of the third identifier and the number of reboots is 2+ N, where N is the number of reboots and N is a non-negative integer. The technical scheme has the advantages that the first mark to the fourth mark can be represented by numbers, the representing mode is small in calculation amount and high in working efficiency.
In a second aspect, the present application provides a firmware updating apparatus for updating firmware of an electronic device, the apparatus comprising: the type obtaining module is used for responding to the starting of the electronic equipment and obtaining the identification type of the electronic equipment; the starting detection module is used for detecting whether the electronic equipment can be normally started or not when the identification type is the updating type; the frequency detection module is used for adding one to the restart frequency in a preset time period when the electronic equipment cannot be normally started, and detecting whether the restart frequency is not less than the preset frequency or not; an update failure module, configured to determine that the electronic device fails to update when the restart times are not less than the preset times, and execute at least one of the following processes: controlling the electronic equipment to stop restarting; setting the identification type of the electronic equipment as an update failure type; sending prompt information of firmware updating failure to a cloud server and/or user equipment; receiving a first firmware to be updated sent by an upper computer, and updating the firmware of the electronic equipment again by using the first firmware to be updated.
In some optional embodiments, the apparatus further comprises: the to-be-updated module is used for setting the identification type as the to-be-updated type in response to the electronic equipment receiving a second to-be-updated firmware; and the firmware updating module is used for updating the firmware of the electronic equipment by using the second firmware to be updated when the identification type is the type to be updated, setting the identification type as the updating type and setting the restarting number as 0.
In some optional embodiments, the apparatus further comprises: and the updating success module is used for determining that the electronic equipment is updated successfully when the electronic equipment can be started normally, and setting the identification type as a normal type.
In some optional embodiments, the identifier type is represented by an identifier bit, where the identifier bit corresponding to the normal type is a first identifier, the identifier bit corresponding to the type to be updated is a second identifier, the identifier bit corresponding to the type being updated is a combination of a third identifier and the number of restarts, and the identifier bit of the type that fails to be updated is a fourth identifier.
In some optional embodiments, the first identifier is 0, the second identifier is 1, the third identifier is 2, the fourth identifier is 3, and a combination of the third identifier and the number of reboots is 2+ N, where N is the number of reboots and N is a non-negative integer.
In a third aspect, the present application provides an electronic device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of any of the above methods when executing the computer program.
In some optional embodiments, the electronic device further comprises a backup memory; the backup memory receives a first firmware to be updated sent by an upper computer and sends the first firmware to be updated to the memory; and the backup memory receives a second firmware to be updated and sends the second firmware to be updated to the memory.
In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of any of the methods described above.
Drawings
The present application is further described below with reference to the drawings and examples.
Fig. 1 is a flowchart illustrating a firmware updating method according to an embodiment of the present application;
fig. 2 is a flowchart illustrating a firmware updating method according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a firmware updating method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a firmware updating method according to an embodiment of the present application;
fig. 5 is a flowchart illustrating a firmware updating method according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of a firmware update apparatus according to an embodiment of the present disclosure;
FIG. 7 is a schematic structural diagram of a firmware update apparatus according to an embodiment of the present disclosure;
FIG. 8 is a schematic structural diagram of a firmware update apparatus according to an embodiment of the present disclosure;
fig. 9 is a block diagram of an electronic device according to an embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of a program product for implementing a firmware update method according to an embodiment of the present application.
Detailed Description
The present application is further described with reference to the accompanying drawings and the detailed description, and it should be noted that, in the present application, the embodiments or technical features described below may be arbitrarily combined to form a new embodiment without conflict.
Referring to fig. 1, an embodiment of the present application provides a firmware update method for updating firmware of an electronic device, where the method includes steps S101 to S104.
Step S101: and responding to the starting of the electronic equipment, and acquiring the identification type of the electronic equipment. The identification type may be an operating status type of the electronic device, such as a normal type, a to-be-updated type, an updating-in-progress type, an updating-failure type, and the like.
Step S102: when the identification type is an updating type, whether the electronic equipment can be started normally is detected.
Step S103: and when the electronic equipment cannot be normally started, adding one to the restart times in a preset time period, and detecting whether the restart times are not less than the preset times. The preset time period may be a time period preset by a user, for example, from a preset starting time to a current time, or within 5 minutes after the update starts, and the preset times may be times preset by the user, for example, 2 times, 5 times, and the like.
Step S104: when the restarting times are not less than the preset times, determining that the electronic equipment fails to be updated, and executing at least one of the following processes: controlling the electronic equipment to stop restarting; setting the identification type of the electronic equipment as an update failure type; sending prompt information of firmware updating failure to a cloud server and/or user equipment; receiving a first firmware to be updated sent by an upper computer, and updating the firmware of the electronic equipment again by using the first firmware to be updated. The user equipment is, for example, a mobile phone, a computer, a tablet computer, a smart wearable device, and the like.
Therefore, after the electronic equipment is started, the identification type of the electronic equipment is detected, when the identification type is an updating type, whether the electronic equipment can be normally started is judged, if the electronic equipment cannot be normally started, the restarting frequency in a preset time period can be compared with the preset frequency, so that whether the electronic equipment fails to be updated is judged, if the restarting frequency is not less than the preset frequency, the electronic equipment is determined to fail to be updated and corresponding operation is executed, on one hand, the electronic equipment can be controlled to stop restarting, and the electronic equipment is prevented from being continuously restarted; in one aspect, the identification type of the electronic device may be set as an update failure type, distinguishing the electronic device from the electronic device being updated; on one hand, prompt information of firmware updating failure can be sent to the cloud server and/or the user equipment, so that a user can know the firmware updating failure condition in time; on the other hand, the first firmware to be updated can be received, and the firmware of the electronic device is updated again by using the first firmware to be updated, so that when the electronic device cannot be started normally in the updating process, whether the electronic device fails to be updated can be judged by comparing the restart times of the electronic device in a preset time period with the preset times, if the electronic device fails to be updated, corresponding operation can be executed.
Compared with the prior art, in the firmware updating process, a more reasonable judgment standard is set for whether the equipment fails to be updated or not, whether the equipment fails to be updated or not is judged by using the comparison result of the preset times and the restarting times, for example, when the preset times are 3 times, if the equipment is not normally started after being restarted once, the equipment cannot be immediately judged to fail to be updated, and the equipment can be normally started after being restarted for the second time, so that the manual early intervention is not needed, and the labor cost is increased; in addition, reasonable preset times are set, so that the hardware damage of the equipment caused by repeated restarting of the equipment in a short time is avoided, a large amount of time for verifying the updating failure of the equipment is avoided, and the needs of users are met.
Referring to fig. 2, in a specific embodiment, the method may further include steps S105 to S106.
Step S105: and setting the identification type as a type to be updated in response to the electronic equipment receiving a second firmware to be updated. In a specific embodiment, the preset starting time may be a time when the electronic device receives the second firmware to be updated.
Step S106: and when the identification type is the type to be updated, updating the firmware of the electronic equipment by using the second firmware to be updated, setting the identification type as the updating type, and setting the restarting number as 0. In a specific embodiment, the preset starting time may be a time when it is detected that the identifier type is the to-be-updated type.
Therefore, when the electronic equipment receives the second firmware to be updated, the identification type of the electronic equipment can be set to be the type to be updated, the electronic equipment enters a firmware update preparation stage, when the second firmware to be updated is used for updating the firmware of the electronic equipment, the identification type of the electronic equipment can be set to be the updating type, the restarting frequency is set to be 0, the electronic equipment is in the updating state at the moment, and misjudgment caused by the fact that the restarting frequency is not clear is avoided.
Referring to fig. 3, in another embodiment, the method may further include step S105 and step S107.
Step S107: and when the identification type is the type to be updated, updating the firmware of the electronic equipment by using the second firmware to be updated, setting the identification type as the updating type, and executing M adding operation for preset times, wherein M is the restarting time.
Referring to fig. 4, in a specific embodiment, the method may further include step S108.
Step S108: and when the electronic equipment can be started normally, determining that the electronic equipment is updated successfully, and setting the identification type as a normal type.
Therefore, when the electronic equipment can be started normally, the electronic equipment can be determined to be updated successfully, the identifier of the electronic equipment is set to be of a normal type, and the electronic equipment is updated successfully and is in a normal working state.
In a specific embodiment, the identifier type may be represented by an identifier bit, where the identifier bit corresponding to the normal type may be a first identifier, the identifier bit corresponding to the type to be updated may be a second identifier, the identifier bit corresponding to the type being updated may be a combination of a third identifier and the number of restarts, and the identifier bit of the update failure type may be a fourth identifier. In particular, the identification bits may be letters and/or numbers.
Therefore, the identification types are represented by the identification bits, so that the electronic equipment in different states can be distinguished, and the classification management of the electronic equipment is facilitated; by setting the first to fourth identifiers, on one hand, the current working state of the electronic equipment can be displayed, for example, any one of a normal state, a state to be updated, a state being updated and a state failing to be updated; on the other hand, the restart times of the electronic device in the updating process can be acquired according to the combination of the third identifier and the restart times, and whether the electronic device fails to be updated is judged.
In a specific embodiment, the first flag may be 0, the second flag may be 1, the third flag may be 2, the fourth flag may be 3, and a combination of the third flag and the number of reboots may be 2+ N, where N is the number of reboots and N is a non-negative integer.
Therefore, the first mark to the fourth mark can be represented by numbers, and the representation mode has small calculation amount and high working efficiency.
In a specific embodiment, the first identifier may be a, the second identifier may be B, the third identifier may be C, the fourth identifier may be D, and a combination of the third identifier and the number of reboots may be C + N, where N is the number of reboots and N is a non-negative integer.
In a specific embodiment, the first marker may be a00, the second marker may be B00, the third marker may be C00, the fourth marker may be D00, and when the number of reboots is 5, the combination of the third marker and the number of reboots may be C05; when the number of restarts is 8, the combination of the third flag and the number of restarts may be C08.
In a specific embodiment, the first flag may be a1, the second flag may be B2, the third flag may be C3, the fourth flag may be D4, and a combination of the third flag and the number of reboots may be C3+ N, where N is the number of reboots and N is a non-negative integer.
Referring to fig. 5, in a specific embodiment, the electronic device is, for example, a lower computer, and a firmware updating method of the lower computer is as follows:
step S1: when the lower computer receives the firmware to be updated, the identification bit of the lower computer is set to be 1.
Step S2: and when the lower computer is started or powered on, detecting the identification bit, executing the step S3 if the identification bit is 1, and executing the step S4 if the identification bit is 2.
Step S3: and when the identification bit is 1, updating the lower computer by using the firmware to be updated, changing the identification bit to be 2, and setting the restart frequency to be 0.
Step S4: when the identification bit is 2, detecting whether the lower computer can be started normally; if the normal start is performed, step S5 is executed; and if the normal start cannot be performed, step S6 is performed.
Step S5: the lower computer is started normally, the update success of the lower computer is determined, and the identification bit is changed into 0.
Step S6: when the lower computer cannot be normally started, acquiring the restarting times N of the lower computer in a preset time period, recording the identification position of the lower computer as 2+ N, comparing N with the preset times, determining that the update of the lower computer fails when N is not less than the preset times, and setting the identification position of the lower computer to be 3.
Step S7: and controlling the lower computer to stop restarting, and sending prompt information of update failure to the cloud server and/or the user equipment.
Step S8: and receiving the new firmware to be updated sent by the upper computer, and updating the lower computer again by using the new firmware to be updated.
Referring to fig. 6, an embodiment of the present application provides a firmware updating apparatus, and a specific implementation manner of the firmware updating apparatus is consistent with the implementation manner and the achieved technical effect described in the embodiment of the firmware updating method, and a part of the details are not repeated.
The device is used for updating the firmware of the electronic equipment, and comprises: the type obtaining module 101 is configured to obtain an identifier type of the electronic device in response to the start of the electronic device; a start detection module 102, configured to detect whether the electronic device can be started normally when the identification type is an updating type; the frequency detection module 103 is configured to, when the electronic device cannot be normally started, add one to the restart frequency within a preset time period, and detect whether the restart frequency is not less than a preset frequency; an update failure module 104, configured to determine that the electronic device fails to update when the restart time is not less than the preset time, and perform at least one of the following processes: controlling the electronic equipment to stop restarting; setting the identification type of the electronic equipment as an update failure type; sending prompt information of firmware updating failure to a cloud server and/or user equipment; receiving a first firmware to be updated sent by an upper computer, and updating the firmware of the electronic equipment again by using the first firmware to be updated.
Referring to fig. 7, in a specific embodiment, the apparatus may further include: a to-be-updated module 105, configured to set the identifier type to be an to-be-updated type in response to the electronic device receiving a second to-be-updated firmware; the firmware updating module 106 may be configured to, when the identifier type is the to-be-updated type, perform firmware update on the electronic device using the second to-be-updated firmware, set the identifier type to be an updating type, and set the number of reboots to 0.
Referring to fig. 8, in a specific embodiment, the apparatus may further include: an update success module 107, configured to determine that the electronic device is successfully updated when the electronic device can be normally started, and set the identifier type to a normal type.
In a specific embodiment, the identifier type may be represented by an identifier bit, where the identifier bit corresponding to the normal type may be a first identifier, the identifier bit corresponding to the type to be updated may be a second identifier, the identifier bit corresponding to the type being updated may be a combination of a third identifier and the number of restarts, and the identifier bit of the update failure type may be a fourth identifier.
In a specific embodiment, the first flag may be 0, the second flag may be 1, the third flag may be 2, the fourth flag may be 3, and a combination of the third flag and the number of reboots may be 2+ N, where N is the number of reboots and N is a non-negative integer.
Referring to fig. 9, an embodiment of the present application further provides an electronic device 200, where the electronic device 200 includes at least one memory 210, at least one processor 220, and a bus 230 connecting different platform systems.
The memory 210 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)211 and/or cache memory 212, and may further include Read Only Memory (ROM) 213.
The memory 210 further stores a computer program, and the computer program can be executed by the processor 220, so that the processor 220 executes the steps of the firmware updating method in the embodiment of the present application, and the specific implementation manner of the method is consistent with the implementation manner and the achieved technical effect described in the embodiment of the firmware updating method, and some contents are not described again.
Memory 210 may also include a program/utility 214 having a set (at least one) of program modules 215, such program modules 215 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Accordingly, processor 220 may execute the computer programs described above, as well as may execute programs/utilities 214.
Bus 230 may be a local bus representing one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or any other type of bus structure.
The electronic device 200 may also communicate with one or more external devices 240, such as a keyboard, pointing device, Bluetooth device, etc., and may also communicate with one or more devices capable of interacting with the electronic device 200, and/or with any devices (e.g., routers, modems, etc.) that enable the electronic device 200 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 250. Also, the electronic device 200 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 260. The network adapter 260 may communicate with other modules of the electronic device 200 via the bus 230. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 200, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, to name a few.
In a specific embodiment, the electronic device 200 may further include a backup memory (not shown in the figure); the backup memory may receive a first firmware to be updated sent by an upper computer, and send the first firmware to be updated to the memory 210; and, the backup memory may receive a second firmware to be updated and send the second firmware to be updated to the memory 210.
The embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium is used for storing a computer program, and when the computer program is executed, the steps of the firmware updating method in the embodiment of the present application are implemented, and a specific implementation manner of the steps is consistent with the implementation manner and the achieved technical effect described in the embodiment of the firmware updating method, and some details are not repeated.
Fig. 10 shows a program product 300 provided by the present embodiment for implementing the firmware updating method, which may employ a portable compact disc read only memory (CD-ROM) and include program codes, and may be run on a terminal device, such as a personal computer. However, the program product 300 of the present invention is not so limited, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. Program product 300 may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing. Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The foregoing description and drawings are only for purposes of illustrating the preferred embodiments of the present application and are not intended to limit the present application, which is, therefore, to the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the present application.

Claims (13)

1. A firmware update method for updating firmware of an electronic device, the method comprising:
responding to the starting of the electronic equipment, and acquiring the identification type of the electronic equipment;
when the identification type is an updating type, detecting whether the electronic equipment can be started normally;
when the electronic equipment cannot be normally started, adding one to the restart times within a preset time period, and detecting whether the restart times are not less than the preset times;
when the restarting times are not less than the preset times, determining that the electronic equipment fails to be updated, and executing at least one of the following processes:
controlling the electronic equipment to stop restarting;
setting the identification type of the electronic equipment as an update failure type;
sending prompt information of firmware updating failure to a cloud server and/or user equipment;
receiving a first firmware to be updated sent by an upper computer, and updating the firmware of the electronic equipment again by using the first firmware to be updated.
2. The firmware updating method according to claim 1, further comprising:
setting the identification type as a type to be updated in response to the electronic equipment receiving a second firmware to be updated;
and when the identification type is the type to be updated, updating the firmware of the electronic equipment by using the second firmware to be updated, setting the identification type as the updating type, and setting the restarting number as 0.
3. The firmware update method according to claim 2, further comprising:
and when the electronic equipment can be started normally, determining that the electronic equipment is updated successfully, and setting the identification type as a normal type.
4. The firmware updating method according to claim 3, wherein the flag type is represented by a flag bit, wherein the flag bit corresponding to the normal type is a first flag, the flag bit corresponding to the type to be updated is a second flag, the flag bit corresponding to the type being updated is a combination of a third flag and the number of restarts, and the flag bit of the update failure type is a fourth flag.
5. The firmware updating method according to claim 4, wherein the first flag is 0, the second flag is 1, the third flag is 2, the fourth flag is 3, and a combination of the third flag and the number of reboots is 2+ N, where N is the number of reboots and N is a non-negative integer.
6. A firmware update apparatus for updating firmware of an electronic device, the apparatus comprising:
the type obtaining module is used for responding to the starting of the electronic equipment and obtaining the identification type of the electronic equipment;
the starting detection module is used for detecting whether the electronic equipment can be normally started or not when the identification type is the updating type;
the frequency detection module is used for adding one to the restart frequency in a preset time period when the electronic equipment cannot be normally started, and detecting whether the restart frequency is not less than the preset frequency or not;
an update failure module, configured to determine that the electronic device fails to update when the restart times are not less than the preset times, and execute at least one of the following processes:
controlling the electronic equipment to stop restarting;
setting the identification type of the electronic equipment as an update failure type;
sending prompt information of firmware updating failure to a cloud server and/or user equipment;
receiving a first firmware to be updated sent by an upper computer, and updating the firmware of the electronic equipment again by using the first firmware to be updated.
7. The firmware updating apparatus according to claim 6, wherein the apparatus further comprises:
the to-be-updated module is used for setting the identification type as the to-be-updated type in response to the electronic equipment receiving a second to-be-updated firmware;
and the firmware updating module is used for updating the firmware of the electronic equipment by using the second firmware to be updated when the identification type is the type to be updated, setting the identification type as the updating type and setting the restarting number as 0.
8. The firmware updating apparatus according to claim 7, further comprising:
and the updating success module is used for determining that the electronic equipment is updated successfully when the electronic equipment can be started normally, and setting the identification type as a normal type.
9. The firmware updating apparatus according to claim 8, wherein the flag type is represented by a flag bit, wherein the flag bit corresponding to the normal type is a first flag, the flag bit corresponding to the type to be updated is a second flag, the flag bit corresponding to the type being updated is a combination of a third flag and the number of restarts, and the flag bit of the update failure type is a fourth flag.
10. The firmware updating apparatus according to claim 9, wherein the first flag is 0, the second flag is 1, the third flag is 2, the fourth flag is 3, and a combination of the third flag and the number of reboots is 2+ N, where N is the number of reboots and N is a non-negative integer.
11. An electronic device, characterized in that the electronic device comprises a memory storing a computer program and a processor implementing the steps of the method according to any of claims 1-5 when the processor executes the computer program.
12. The electronic device of claim 11, further comprising a backup memory;
the backup memory receives a first firmware to be updated sent by an upper computer and sends the first firmware to be updated to the memory; and the number of the first and second groups,
and the backup memory receives a second firmware to be updated and sends the second firmware to be updated to the memory.
13. 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 method according to any one of claims 1 to 5.
CN202110247259.6A 2021-03-05 2021-03-05 Firmware updating method and device, electronic equipment and storage medium Pending CN113127029A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110247259.6A CN113127029A (en) 2021-03-05 2021-03-05 Firmware updating method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110247259.6A CN113127029A (en) 2021-03-05 2021-03-05 Firmware updating method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113127029A true CN113127029A (en) 2021-07-16

Family

ID=76772727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110247259.6A Pending CN113127029A (en) 2021-03-05 2021-03-05 Firmware updating method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113127029A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114879991A (en) * 2022-04-25 2022-08-09 杭州振华仪表有限公司 Software upgrading method, system and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150143098A1 (en) * 2013-11-21 2015-05-21 Lenovo (Singapore) Pte. Ltd. Method for updating firmware of an electronic device within a computer
CN108681459A (en) * 2018-03-26 2018-10-19 深圳前海有电物联科技有限公司 A kind of firmware update of intelligent hardware devices, apparatus and system
CN108845814A (en) * 2018-06-14 2018-11-20 郑州云海信息技术有限公司 A kind of guard method of firmware update, device and computer readable storage medium
CN110221852A (en) * 2019-05-15 2019-09-10 深兰科技(上海)有限公司 A kind of firmware upgrade method and device
CN110347414A (en) * 2019-07-15 2019-10-18 西安易朴通讯技术有限公司 Firmware update, device, equipment and computer readable storage medium
CN110688139A (en) * 2019-09-29 2020-01-14 深圳市艾威图技术有限公司 Servo driver, firmware updating method thereof and computer readable storage medium
CN111367545A (en) * 2020-02-13 2020-07-03 北京三快在线科技有限公司 Terminal upgrading method and device, server, terminal equipment and readable storage medium
CN112148326A (en) * 2020-08-31 2020-12-29 山东省科学院自动化研究所 Remote updating method, device and system for Internet of things equipment firmware

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150143098A1 (en) * 2013-11-21 2015-05-21 Lenovo (Singapore) Pte. Ltd. Method for updating firmware of an electronic device within a computer
CN108681459A (en) * 2018-03-26 2018-10-19 深圳前海有电物联科技有限公司 A kind of firmware update of intelligent hardware devices, apparatus and system
CN108845814A (en) * 2018-06-14 2018-11-20 郑州云海信息技术有限公司 A kind of guard method of firmware update, device and computer readable storage medium
CN110221852A (en) * 2019-05-15 2019-09-10 深兰科技(上海)有限公司 A kind of firmware upgrade method and device
CN110347414A (en) * 2019-07-15 2019-10-18 西安易朴通讯技术有限公司 Firmware update, device, equipment and computer readable storage medium
CN110688139A (en) * 2019-09-29 2020-01-14 深圳市艾威图技术有限公司 Servo driver, firmware updating method thereof and computer readable storage medium
CN111367545A (en) * 2020-02-13 2020-07-03 北京三快在线科技有限公司 Terminal upgrading method and device, server, terminal equipment and readable storage medium
CN112148326A (en) * 2020-08-31 2020-12-29 山东省科学院自动化研究所 Remote updating method, device and system for Internet of things equipment firmware

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
SUBIRHALDER ET AL: "Secure over-the-air software updates in connected vehicles: A survey", 《COMPUTER NETWORKS》 *
SUBIRHALDER ET AL: "Secure over-the-air software updates in connected vehicles: A survey", 《COMPUTER NETWORKS》, vol. 178, 4 September 2020 (2020-09-04), pages 166 - 170 *
黄飞龙等: "基于无线分包传输的气象站固件无感升级方法", 《计算机测量与控制》 *
黄飞龙等: "基于无线分包传输的气象站固件无感升级方法", 《计算机测量与控制》, vol. 28, no. 1, 31 December 2020 (2020-12-31), pages 1 - 19 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114879991A (en) * 2022-04-25 2022-08-09 杭州振华仪表有限公司 Software upgrading method, system and storage medium

Similar Documents

Publication Publication Date Title
CN103458086B (en) A kind of smart mobile phone and fault detection method thereof
CN103150231A (en) Computer booting method and computer system
CN103518191A (en) Upgrade method, intelligent terminal and upgrade system
CN108509215B (en) System software replacing method and device, terminal equipment and storage medium
CN115794257B (en) System starting method, device, electronic equipment and storage medium
CN105867962A (en) System upgrading method and device
CN110688305B (en) Test environment synchronization method, device, medium and electronic equipment
CN113760332A (en) Software upgrading method and electronic equipment
CN110502399B (en) Fault detection method and device
CN113672306B (en) Server component self-checking abnormity recovery method, device, system and medium
CN111698558A (en) Television software upgrading method, television terminal and computer readable storage medium
CN113127029A (en) Firmware updating method and device, electronic equipment and storage medium
CN111694684A (en) Abnormal construction method and device of storage equipment, electronic equipment and storage medium
EP3260981B1 (en) Information processing apparatus, information processing system, and information processing method for updating firmware
CN112882743A (en) Software upgrading method
CN109634782B (en) Method and device for detecting system robustness, storage medium and terminal
CN111984287A (en) Equipment upgrading method and system
CN111400085A (en) Transaction rollback exception processing method and device, computer equipment and storage medium
CN115437663A (en) Upgrade strategy updating method and device, electronic equipment, storage medium and vehicle
CN114143308A (en) File uploading information processing method and device, computer equipment and storage medium
CN114153503A (en) BIOS control method, device and medium
CN112559131A (en) Method, device and equipment for updating container mirror image and computer readable storage medium
CN113660635A (en) Connection method, connection device, electronic apparatus, storage medium, and program product
CN112965799A (en) Task state prompting method and device, electronic equipment and medium
CN109976833A (en) Firmware loading method, electronic equipment and the server for storing firmware configuration data

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
AD01 Patent right deemed abandoned

Effective date of abandoning: 20240419