CN113225397A - Firmware upgrading method and device for embedded equipment, terminal and storage medium - Google Patents

Firmware upgrading method and device for embedded equipment, terminal and storage medium Download PDF

Info

Publication number
CN113225397A
CN113225397A CN202110490946.0A CN202110490946A CN113225397A CN 113225397 A CN113225397 A CN 113225397A CN 202110490946 A CN202110490946 A CN 202110490946A CN 113225397 A CN113225397 A CN 113225397A
Authority
CN
China
Prior art keywords
firmware
preset
storage area
file
embedded
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
CN202110490946.0A
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.)
Shenzhen Wodi Sound Technology Co ltd
Original Assignee
Shenzhen Wodi Sound Technology 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 Shenzhen Wodi Sound Technology Co ltd filed Critical Shenzhen Wodi Sound Technology Co ltd
Priority to CN202110490946.0A priority Critical patent/CN113225397A/en
Publication of CN113225397A publication Critical patent/CN113225397A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1744Redundancy elimination performed by the file system using compression, e.g. sparse files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC

Abstract

The embodiment of the invention discloses a firmware upgrading method, a device, a terminal and a storage medium of embedded equipment, wherein the method comprises the following steps: acquiring a firmware compression file; transmitting the firmware compression file to a preset first storage area of the embedded equipment; verifying the firmware compression file in a preset first storage area; if the verification is passed, the firmware compressed file is decompressed to a preset second storage area of the embedded equipment; and restarting the embedded equipment to enable the embedded equipment to execute the decompressed firmware, thereby finishing firmware upgrading. According to the scheme, the firmware compressed file is obtained by compressing the firmware, the firmware compressed file is transmitted subsequently, the data volume needing to be transmitted is reduced in the transmission process, the data transmission speed is improved, the storage space of the preset first storage area is reduced, the storage space of the embedded equipment is further reduced, and the cost for purchasing a large storage space is reduced.

Description

Firmware upgrading method and device for embedded equipment, terminal and storage medium
Technical Field
The present invention relates to the field of firmware upgrading technologies, and in particular, to a firmware upgrading method and apparatus for an embedded device, a terminal, and a storage medium.
Background
In recent years, the speed of updating products and technologies in the field of embedded devices is increased, new products are put into the market as soon as possible, the new products are on the market immediately after the basic functions of the new products are developed, and subsequent new functions or defect repair and the like need to be updated in an Over-the-Air Technology (OTA) mode so as to update new functional firmware or repair firmware for defects to clients. Therefore, OTA technology becomes more important in these products.
In the prior art of the OTA, the firmware needs to be directly transmitted to the embedded device, and the data volume is large, so that the transmission time is long, the firmware updating time is prolonged, the user experience is reduced, the chip needs to occupy a large storage space, and the hardware cost of the product is increased due to the fact that the chip with a large storage space needs to be selected.
Thus, there is a need for a better solution to the problems of the prior art.
Disclosure of Invention
In view of this, the invention provides a firmware upgrading method, device, terminal and storage medium for an embedded device.
The embodiment of the invention provides a firmware upgrading method of embedded equipment, which comprises the following steps:
acquiring a firmware compression file;
transmitting the firmware compression file to a preset first storage area of the embedded equipment;
verifying the firmware compression file in the preset first storage area;
if the verification is passed, decompressing the firmware compressed file to a preset second storage area of the embedded device;
and restarting the embedded equipment to enable the embedded equipment to execute the firmware obtained by decompression so as to finish firmware upgrading.
In a specific embodiment, the firmware compressed file is obtained by compressing firmware into a specified compression format, and the name of the firmware compressed file contains a specified identifier;
the step of transmitting the firmware compression file to the preset first storage area of the embedded device comprises the following steps:
if an OTA instruction is acquired, controlling the embedded equipment to enter an OTA mode; controlling the embedded equipment to perform data receiving operation in an OTA mode; judging whether the received data is a compressed packet or not; if so, judging whether the compression format of the compression packet is the specified compression format; if so, judging whether the name of the data comprises the specified identification; and if so, determining the received data as the firmware compressed file and storing the firmware compressed file in a preset first storage area.
In a specific embodiment, the method further comprises:
and if the time for receiving the firmware compressed file exceeds the preset time or the time for interruption during receiving the firmware compressed file exceeds the specified time or the verification fails, exiting the OTA mode.
In a specific embodiment, the "transferring the firmware compression file to the preset first storage area of the embedded device" includes:
if the embedded equipment supports a direct-connection OTA server, the firmware compression file is stored in the OTA server, and the firmware compression file is acquired from the OTA server through the embedded equipment and is stored in a preset first storage area;
if the embedded equipment does not support the direct connection of the OTA server, the firmware compression file is stored in the OTA server, the firmware compression file is acquired from the OTA server through third-party equipment, and the firmware compression file is acquired from the third-party equipment through the embedded equipment and is stored in a preset first storage area; the third-party equipment is a terminal supporting direct connection with the embedded equipment.
In a specific embodiment, before restarting the embedded device, the method further includes:
carrying out integrity detection on the firmware decompressed into a preset second storage area of the embedded equipment;
and if the integrity detection is passed, executing the step of restarting the embedded equipment.
In a specific embodiment, if the integrity check fails, the step of "decompressing the firmware compressed file to the preset second storage area of the embedded device" is performed.
In a specific embodiment, the method further comprises:
recording the number of times that the integrity check fails;
and if the times reach a preset value within preset time, executing a preset warning process.
The embodiment of the present invention further provides a firmware upgrading apparatus for an embedded device, including:
the acquisition module is used for acquiring the firmware compressed file;
the transmission module is used for transmitting the firmware compression file to a preset first storage area of the embedded equipment;
the verification module is used for verifying the firmware compressed file in the preset first storage area;
the decompression module is used for decompressing the firmware compressed file to a preset second storage area of the embedded device if the verification is passed;
and the upgrading module is used for restarting the embedded equipment so as to enable the embedded equipment to execute the firmware obtained by decompression and finish firmware upgrading.
The embodiment of the invention also provides a terminal, which comprises a processor and a memory, wherein an application program is stored in the memory, and the firmware upgrading method of the embedded equipment is executed when the application program runs on the processor.
The embodiment of the invention also provides a storage medium, wherein an application program is stored in the storage medium, and the firmware upgrading method of the embedded device is executed when the application program runs on the processor.
Therefore, the embodiment of the invention provides a firmware upgrading method, a firmware upgrading device, a firmware upgrading terminal and a firmware upgrading storage medium for embedded equipment, wherein the method comprises the following steps: acquiring a firmware compression file; transmitting the firmware compression file to a preset first storage area of the embedded equipment; verifying the firmware compression file in the preset first storage area; if the verification is passed, decompressing the firmware compressed file to a preset second storage area of the embedded device; and restarting the embedded equipment to enable the embedded equipment to execute the firmware obtained by decompression so as to finish firmware upgrading. According to the scheme, the firmware compressed file is obtained by compressing the firmware, the firmware compressed file is transmitted subsequently, the data volume needing to be transmitted is reduced in the transmission process, the data transmission speed is improved, the storage space of the preset first storage area is reduced, the storage space of the embedded equipment is further reduced, and the cost for purchasing a large storage space is reduced.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings required to be used in the embodiments will be briefly described below, and it should be understood that the following drawings only illustrate some embodiments of the present invention, and therefore should not be considered as limiting the scope of the present invention. Like components are numbered similarly in the various figures.
FIG. 1 is a flow chart diagram illustrating a firmware upgrade method for an embedded device;
FIG. 2 is a flow chart illustrating a firmware upgrading method for an embedded device in a specific environment;
FIG. 3 is a schematic diagram showing a framework structure of a firmware upgrading device of an embedded device;
fig. 4 is a schematic diagram showing a framework structure of a firmware upgrading apparatus of another embedded device.
Illustration of the drawings:
201-an acquisition module; 202-a transmission module; 203-a check module; 204-a decompression module;
205-upgrade module; 206-exit module.
Detailed Description
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 only a part of the embodiments of the present invention, and not all of the embodiments.
The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Hereinafter, the terms "including", "having", and their derivatives, which may be used in various embodiments of the present invention, are only intended to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing, and should not be construed as first excluding the existence of, or adding to, one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing.
Furthermore, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the present invention belong. The terms (such as those defined in commonly used dictionaries) should be interpreted as having a meaning that is consistent with their contextual meaning in the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in various embodiments of the present invention.
Example 1
Embodiment 1 of the present invention discloses a firmware upgrading method for an embedded device, as shown in fig. 1, including the following steps:
s101, acquiring a firmware compression file; the firmware compression file is obtained by compressing the firmware;
specifically, the firmware is downloaded from an official website of firmware update through a terminal such as a PC (Personal Computer) device or a mobile phone, for example, the firmware with the newest version may be downloaded, or the firmware with another version may be downloaded.
The specific compression software can be selected from compression software such as WINRAR, 7ZIP, etc. The format of the corresponding firmware compression file may also be one of a plurality of compression formats.
Step S102, transmitting the firmware compressed file to a preset first storage area of the embedded equipment;
specifically, 3 regions are divided in advance on the chip storage space of the embedded device: OTA BIN region, APP BIN region, NEW APP BIN region.
The OTA BIN area is used for storing an instruction or parameter OTA BIN for OTA transmission so as to ensure that the embedded equipment can smoothly acquire the firmware;
here, the preset first storage area corresponds to an area storing the NEW APP BIN, and is used for storing an area of firmware to be updated, for example, in a general case, for example, to store firmware with a latest version, and here, to store a firmware compressed file, a size of a required space can be effectively reduced, for example, a size of an original firmware is 1152KB, and after compression, for example, a compression ratio is about 0.6, in this case, for example, an obtained firmware compressed file size is 684KB (in a compression process, due to a difference in format of compressed files, an actual compression ratio generally has a certain difference from an expected compression ratio, but in a case of no difference, the actual compression ratio is within an allowable range);
and the subsequent preset second memory area corresponds to the area for storing the APP BIN, so that the APP BIN is the currently operated firmware.
As shown in table 1, the distribution and occupied space size of the memory area of the chip that does not adopt the compression algorithm are:
TABLE 1
Serial number Firmware name Firmware size
1 OTA BIN 128(KB)
2 APP BIN 1152(KB)
3 NEW APP BIN 684(KB)
The sum of the OTA BIN, the APP BIN and the NEW APP BIN is 2432K bytes which are larger than 2M bytes (2048K bytes), and if the size of a chip memory is only 2M bytes and 4Mbytes 2, only 4M bytes can be selected.
If the scheme is adopted, the distribution and occupied space size of the chip storage area are shown in the following table 2:
TABLE 2
Serial number Firmware name Firmware size
1 OTA BIN 128(KB)
2 APP BIN 1152(KB)
3 NEW APP BIN 684(KB)
It can be seen that OTA BIN, after the three BINs of APP BIN and NEW APP BIN are added, 1964Kbytes are obtained, and the 2M bytes (2048K bytes) can be selected. Therefore, the cost of purchasing the memory chip can be reduced.
Specifically, the firmware compressed file is obtained by compressing the firmware into a specified compression format, and the name of the firmware compressed file contains a specified identifier; for example, a firmware compression file is a file named "upgrade 0001.7 z", where 7z is a specified compression format and "upgrade" is a specified identification; the specified compression format and the specified identifier are only taken as examples, and the specific specified compression format and the specified identifier may be customized according to actual needs, and are not limited to the above examples.
As shown in fig. 2, the step S101 of "transferring the firmware compression file to the preset first storage area of the embedded device" includes:
if the OTA instruction is acquired, controlling the embedded equipment to enter an OTA mode;
controlling the embedded equipment to perform data receiving operation in the OTA mode;
judging whether the received data is a compressed packet or not; specifically, if the packet is not a compressed packet, the subsequent processing of the scheme is not performed;
if so, judging whether the compression format of the compression packet is the specified compression format; specifically, if the compression format is not the specified compression format, for example, the compression format is not the 7z format, the subsequent processing of the scheme is not performed;
if the judgment result is yes, judging whether the name of the data comprises the specified identification; for example, if the name does not protect the designated identifier of "upgrade", the subsequent processing of the scheme is not performed.
If the judgment result is yes, the received data is determined to be a firmware compressed file and is stored in a preset first storage area.
Specifically, after receiving the OAT instruction, the APP BIN controls the embedded device to enter an OTA mode to receive a firmware compression file in the OTA mode, and stores the firmware compression file in a preset first storage area for subsequent firmware upgrade.
In addition, since it is necessary to control the time of firmware upgrade, the method further includes:
and if the time for receiving the firmware compressed file exceeds the preset time or the time for interruption during receiving the firmware compressed file exceeds the specified time or the verification fails, exiting the OTA mode.
Specifically, the time for receiving the firmware compressed file may include a receiving time when the connection is not interrupted, and if the interruption occurs while receiving the firmware compressed packet and the interruption time exceeds a certain time, the OTA mode is also exited.
In a specific embodiment, the "transferring the firmware compression file to the preset first storage area of the embedded device" includes: if the embedded equipment supports the direct connection OTA server, the firmware compression file is stored in the OTA server, and the firmware compression file is acquired from the OTA server through the embedded equipment and is stored in a preset first storage area; if the embedded equipment does not support the direct connection OTA server, the firmware compression file is stored in the OTA server, the firmware compression file is acquired from the OTA server through the third-party equipment, and the firmware compression file is acquired from the third-party equipment through the embedded equipment and stored in a preset first storage area; the third-party equipment is a terminal supporting direct connection with the embedded equipment.
Specifically, firstly, a firmware compression file is placed on an OTA server, and an embedded device downloads APP BIN through a certain way;
if the equipment supports direct connection with the OTA server, the embedded equipment is directly connected with the OTA server for downloading; if the embedded equipment does not support the direct connection with the OTA server, the embedded equipment is transferred by third-party equipment, generally, a mobile phone APP is firstly downloaded from the OTA server, then the mobile phone APP is connected with the equipment through Bluetooth, and then the embedded equipment is downloaded from the mobile phone; and finally, storing the firmware compression file downloaded by the embedded equipment into a preset first storage area, namely a NEW APP BIN area.
Step S103, verifying the firmware compression file in the preset first storage area;
specifically, after the firmware compressed file is stored in the preset first storage area, verification is required, and the specific verification may be hash value verification, in a specific application process, after the firmware compressed file is obtained in step S101, hash value calculation is performed on the firmware compressed file to obtain a first hash value of the current firmware compressed file, and then the firmware compressed file stored in the preset first storage area is subjected to hash value calculation again to obtain a second hash value, where the verification is to compare whether the first hash value is the same as the second hash value, and if the first hash value is the same as the second hash value, it is indicated that the firmware compressed file stored in the preset first storage area is the same as the firmware compressed file in step S101, and the file is not tampered or damaged in the transmission process; if the first hash value is different from the second hash value, it indicates that the firmware compressed file stored in the preset first storage area is inconsistent with the firmware compressed file in step S101, and the present scheme needs to be exited, that is, the firmware upgrade needs to be exited.
Step S104, if the verification is passed, decompressing the firmware compressed file to a preset second storage area of the embedded device;
in this step, the firmware compression file is decompressed to a preset second storage area of the embedded device, and the firmware corresponding to the firmware compression file replaces the firmware that was previously run in the preset second storage area (for example, an APP BIN area).
And step S105, restarting the embedded equipment to enable the embedded equipment to execute the decompressed firmware, and finishing firmware upgrading.
Specifically, before restarting the embedded device, the method further includes:
carrying out integrity detection on the firmware decompressed into a preset second storage area of the embedded equipment;
and if the integrity detection is passed, executing the step of restarting the embedded equipment.
Specifically, in consideration that there is a small probability that an error may occur during decompression, which results in incomplete firmware obtained after decompression, in this case, integrity check may be performed between step S104 and step S105, so as to ensure that the file decompressed into the preset second storage area is completely executable.
The specific decompression can be the same software as the compression, or different software, as long as the normal decompression can be performed.
If the integrity detection is not passed, executing a step of decompressing the firmware compressed file to a preset second storage area of the embedded device.
Specifically, if the integrity check fails, it indicates that the firmware compressed file has no problem due to the previous check, and in this case, it indicates that the decompression has a problem, the firmware compressed file is decompressed to the preset second storage area again to cover the original firmware.
In a specific embodiment, the method further comprises: recording the number of times that the integrity detection fails; and if the times reach the preset value within the preset time, executing a preset warning process.
Specifically, if the number of times that the integrity detection fails exceeds a certain value, it indicates that there is a problem with decompression, and in this case, an alert process is performed, for example, a maintenance engineer may be notified to perform field processing, so as to solve the problem in time and avoid waiting for a delay time.
Example 2
Embodiment 2 of the present invention further discloses a firmware upgrading apparatus for an embedded device, as shown in fig. 3, including:
an obtaining module 201, configured to obtain a firmware compression file;
the transmission module 202 is used for transmitting the firmware compression file to a preset first storage area of the embedded device;
the verification module 203 is used for verifying the firmware compression file in the preset first storage area;
the decompression module 204 is configured to decompress the firmware compressed file to a preset second storage area of the embedded device if the verification passes;
and the upgrading module 205 is configured to restart the embedded device, so that the embedded device executes the firmware obtained by decompression, thereby completing firmware upgrading.
In a specific embodiment, the firmware compressed file is obtained by compressing the firmware into a specified compression format, and the name of the firmware compressed file contains a specified identifier;
a transmission module 202 configured to: if the OTA instruction is acquired, controlling the embedded equipment to enter an OTA mode;
controlling the embedded equipment to perform data receiving operation in the OTA mode; judging whether the received data is a compressed packet or not; if so, judging whether the compression format of the compression packet is the specified compression format; if the judgment result is yes, judging whether the name of the data comprises the specified identification; if the judgment result is yes, the received data is determined to be a firmware compressed file and is stored in a preset first storage area.
In one embodiment, as shown in fig. 4, the apparatus further comprises:
the exit module 206 is configured to exit the OTA mode if the time for receiving the firmware compressed file exceeds a preset time or the time for generating an interrupt when receiving the firmware compressed file exceeds a specified time or the verification fails.
In a specific embodiment, the transmission module 202 is configured to: if the embedded equipment supports the direct connection OTA server, the firmware compression file is stored in the OTA server, and the firmware compression file is acquired from the OTA server through the embedded equipment and is stored in a preset first storage area;
if the embedded equipment does not support the direct connection OTA server, the firmware compression file is stored in the OTA server, the firmware compression file is acquired from the OTA server through the third-party equipment, and the firmware compression file is acquired from the third-party equipment through the embedded equipment and stored in a preset first storage area; the third-party equipment is a terminal supporting direct connection with the embedded equipment.
In a specific embodiment, the method further comprises the following steps: an integrity detection module to:
before restarting the embedded device, carrying out integrity detection on the firmware decompressed into a preset second storage area of the embedded device; and if the integrity detection is passed, executing the step of restarting the embedded equipment.
In a specific embodiment, the method further comprises the following steps: and the processing module is used for executing a step of decompressing the firmware compressed file to a preset second storage area of the embedded device through the decompressing module 204 if the integrity detection fails.
In a specific embodiment, the method further comprises the following steps: the warning module is used for recording the number of times of failure of integrity detection; and if the times reach the preset value within the preset time, executing a preset warning process.
Example 3
The embodiment 3 of the present invention further discloses a terminal, which includes a processor and a memory, wherein an application program is stored in the memory, and the firmware upgrade method of the embedded device in the embodiment 1 is executed when the application program runs on the processor.
Example 4
The embodiment 4 of the present invention further discloses a storage medium, in which an application program is stored, and the firmware upgrade method of the embedded device in the embodiment 1 is executed when the application program runs on the processor.
Therefore, the embodiment of the invention provides a firmware upgrading method, a firmware upgrading device, a firmware upgrading terminal and a firmware upgrading storage medium for embedded equipment, wherein the method comprises the following steps: acquiring a firmware compression file; the firmware compression file is obtained by compressing the firmware; transmitting the firmware compression file to a preset first storage area of the embedded equipment; verifying the firmware compression file in a preset first storage area; if the verification is passed, the firmware compressed file is decompressed to a preset second storage area of the embedded equipment; and restarting the embedded equipment to enable the embedded equipment to execute the decompressed firmware, thereby finishing firmware upgrading. According to the scheme, the firmware compressed file is obtained by compressing the firmware, the firmware compressed file is transmitted subsequently, the data volume needing to be transmitted is reduced in the transmission process, the data transmission speed is improved, the storage space of the preset first storage area is reduced, the storage space of the embedded equipment is further reduced, and the cost for purchasing a large storage space is reduced.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, each functional module or unit in each embodiment of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention or a part of the technical solution that contributes to the prior art in essence can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention.

Claims (10)

1. A method for upgrading firmware of an embedded device is characterized by comprising the following steps:
acquiring a firmware compression file;
transmitting the firmware compression file to a preset first storage area of the embedded equipment;
verifying the firmware compression file in the preset first storage area;
if the verification is passed, decompressing the firmware compressed file to a preset second storage area of the embedded device;
and restarting the embedded equipment to enable the embedded equipment to execute the firmware obtained by decompression so as to finish firmware upgrading.
2. The method of claim 1, wherein the firmware compressed file is obtained by compressing firmware into a specified compression format, and the name of the firmware compressed file contains a specified identifier;
the step of transmitting the firmware compression file to the preset first storage area of the embedded device comprises the following steps:
if an OTA instruction is acquired, controlling the embedded equipment to enter an OTA mode;
controlling the embedded equipment to perform data receiving operation in an OTA mode;
judging whether the received data is a compressed packet or not;
if so, judging whether the compression format of the compression packet is the specified compression format;
if so, judging whether the name of the data comprises the specified identification;
and if so, determining the received data as the firmware compressed file and storing the firmware compressed file in a preset first storage area.
3. The method of claim 2, further comprising:
and if the time for receiving the firmware compressed file exceeds the preset time or the time for interruption during receiving the firmware compressed file exceeds the specified time or the verification fails, exiting the OTA mode.
4. The method of claim 1, wherein the transferring the firmware compression file to the preset first storage area of the embedded device comprises:
if the embedded equipment supports a direct-connection OTA server, the firmware compression file is stored in the OTA server, and the firmware compression file is acquired from the OTA server through the embedded equipment and is stored in a preset first storage area;
if the embedded equipment does not support the direct connection of the OTA server, the firmware compression file is stored in the OTA server, the firmware compression file is acquired from the OTA server through third-party equipment, and the firmware compression file is acquired from the third-party equipment through the embedded equipment and is stored in a preset first storage area; the third-party equipment is a terminal supporting direct connection with the embedded equipment.
5. The method of claim 1, prior to restarting the embedded device, further comprising:
carrying out integrity detection on the firmware decompressed into a preset second storage area of the embedded equipment;
and if the integrity detection is passed, executing the step of restarting the embedded equipment.
6. The method of claim 5, wherein the step of decompressing the firmware compression file to a predetermined second storage area of the embedded device is performed if the integrity check fails.
7. The method of claim 6, further comprising:
recording the number of times that the integrity check fails;
and if the times reach a preset value within preset time, executing a preset warning process.
8. An apparatus for upgrading firmware of an embedded device, comprising:
the acquisition module is used for acquiring the firmware compressed file;
the transmission module is used for transmitting the firmware compression file to a preset first storage area of the embedded equipment;
the verification module is used for verifying the firmware compressed file in the preset first storage area;
the decompression module is used for decompressing the firmware compressed file to a preset second storage area of the embedded device if the verification is passed;
and the upgrading module is used for restarting the embedded equipment so as to enable the embedded equipment to execute the firmware obtained by decompression and finish firmware upgrading.
9. A terminal, characterized in that it comprises a processor and a memory, in which an application program is stored, which, when running on the processor, performs the firmware upgrade method of an embedded device according to any one of claims 1 to 7.
10. A storage medium having stored therein an application program which, when run on a processor, performs the firmware upgrade method for an embedded device according to any one of claims 1 to 7.
CN202110490946.0A 2021-05-06 2021-05-06 Firmware upgrading method and device for embedded equipment, terminal and storage medium Pending CN113225397A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110490946.0A CN113225397A (en) 2021-05-06 2021-05-06 Firmware upgrading method and device for embedded equipment, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110490946.0A CN113225397A (en) 2021-05-06 2021-05-06 Firmware upgrading method and device for embedded equipment, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN113225397A true CN113225397A (en) 2021-08-06

Family

ID=77091307

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110490946.0A Pending CN113225397A (en) 2021-05-06 2021-05-06 Firmware upgrading method and device for embedded equipment, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113225397A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111240724A (en) * 2020-03-13 2020-06-05 苏州浪潮智能科技有限公司 BIOS asynchronous upgrading method and related device
CN114942794A (en) * 2022-06-20 2022-08-26 南京大鱼半导体有限公司 Embedded system firmware processing method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942058A (en) * 2013-01-17 2014-07-23 深圳市潮流网络技术有限公司 Embedded electronic equipment software updating method and system
CN105094903A (en) * 2015-07-16 2015-11-25 广州飞米电子科技有限公司 Method and device for upgrading firmware
CN105808292A (en) * 2016-03-07 2016-07-27 西安诺瓦电子科技有限公司 Firmware upgrade method of embedded terminal device
CN106383692A (en) * 2016-08-25 2017-02-08 中山市天启智能科技有限公司 Single-chip microcomputer embedded equipment OTA upgrade method
CN106815051A (en) * 2016-12-30 2017-06-09 深圳怡化电脑股份有限公司 A kind of firmware upgrade method of embedded device, device and currency examination device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942058A (en) * 2013-01-17 2014-07-23 深圳市潮流网络技术有限公司 Embedded electronic equipment software updating method and system
CN105094903A (en) * 2015-07-16 2015-11-25 广州飞米电子科技有限公司 Method and device for upgrading firmware
CN105808292A (en) * 2016-03-07 2016-07-27 西安诺瓦电子科技有限公司 Firmware upgrade method of embedded terminal device
CN106383692A (en) * 2016-08-25 2017-02-08 中山市天启智能科技有限公司 Single-chip microcomputer embedded equipment OTA upgrade method
CN106815051A (en) * 2016-12-30 2017-06-09 深圳怡化电脑股份有限公司 A kind of firmware upgrade method of embedded device, device and currency examination device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111240724A (en) * 2020-03-13 2020-06-05 苏州浪潮智能科技有限公司 BIOS asynchronous upgrading method and related device
CN114942794A (en) * 2022-06-20 2022-08-26 南京大鱼半导体有限公司 Embedded system firmware processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110058873B (en) Application page updating method, device, equipment and storage medium
CN108228224B (en) Method and device for differential upgrade of embedded system
EP2076834A1 (en) Program upgrade system and method for ota-capable mobile terminal
CN113225397A (en) Firmware upgrading method and device for embedded equipment, terminal and storage medium
CN108241498B (en) Vehicle-mounted equipment upgrading method and device and vehicle
CN110825563B (en) System recovery method and device and electronic equipment
US20060156129A1 (en) System for maintaining data
CN105335181A (en) OTA upgrade realization method and terminal
KR20120063455A (en) Apparatus and method for updating firmware
CN110597545A (en) Hot patch intelligent upgrading method and system based on OTA component
CN110633092A (en) Server for OTA (over the air) upgrading and embedded equipment upgrading method and device
CN108205446A (en) Firmware restorative procedure and device
CN108322540A (en) Customized data lead-in method, terminal and computer readable storage medium
CN110806884A (en) Method and device for repairing operating system fault
CN110750286A (en) Management method, device, system, equipment and medium for upgrading Mbn through OTA
CN114780019A (en) Electronic device management method and device, electronic device and storage medium
CN108196975B (en) Data verification method and device based on multiple checksums and storage medium
CN106775874B (en) System upgrading method of terminal equipment
CN111131861B (en) Upgrading method, terminal and storage medium for recovering partitions
CN110309018B (en) Charging equipment system switching method, charging equipment and readable storage medium
CN114915554A (en) Remote upgrading method and device, computer equipment and storage medium
CN110659052B (en) Method and system for updating system software in network equipment and readable storage medium
CN112118280A (en) Recovery method after OTA upgrade failure of WI-FI equipment
CN110913417A (en) Method, system, equipment and storage medium for protecting radio frequency parameters
CN114090055A (en) Application program updating method and device, terminal and storage medium

Legal Events

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