Firmware upgrading method and device, electronic equipment and storage medium
By segmenting and verifying the upgraded image file, and generating and storing the mirror clip data, the problem of low space utilization in the firmware upgrade method is solved, and more efficient storage resource management and device stability are achieved.
Patent Information
- Application Number
- CN202510599859.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-08-26
AI Technical Summary
The firmware upgrade method in the prior art has problems with low space utilization, resulting in increased equipment manufacturing costs and wasted storage space, and the backup storage area cannot be reused before the next upgrade.
By segmenting the upgrade image file, multiple upgrade packages are generated, and the target upgrade package is used to perform integrity verification and decompression processing, the mirror segment data is gradually stored in the backup storage area of the target device firmware, and finally the firmware upgrade is carried out.
Optimize storage resource management, reduce space usage during firmware upgrade process, improve space utilization, avoid slow or faulty equipment due to insufficient storage space, and extend the service life of the equipment.
Smart Images

Figure CN120540674A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of embedded systems, and in particular to a firmware upgrade method, device, electronic device, and storage medium. Background Art
[0002] With the rapid advancement of software functionality, many embedded devices now feature over-the-air updates (OTA) to enhance product competitiveness. To ensure that failures and errors during and after firmware upgrades do not impact existing functionality, embedded devices often have two equally sized disk storage areas: one for storing the currently running software and the other for storing the upgraded target software during the upgrade process. Related-art firmware upgrade methods require downloading the complete upgrade image file, which is then decompressed and stored in a backup storage area. However, because the upgrade image file is often the same size as the backup storage area, combined with the additional space required to download and store the upgrade package, the entire upgrade process consumes two to three times the storage resources of the current storage area. This redundant storage configuration not only increases device manufacturing costs but also results in a significant amount of idle storage space during non-upgrade periods, resulting in wasted resources. Furthermore, because some products require software version rollback functionality, the backup storage area stores the previously used software until the next upgrade is triggered, making it unusable before the next upgrade, further limiting the backup storage area's spatial flexibility. Therefore, the firmware upgrade method in the related art has the technical problem of low space utilization.
[0003] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0004] The embodiments of the present disclosure provide a firmware upgrade method, device, electronic device, and storage medium to at least solve the technical problem of low space utilization in the firmware upgrade method provided in the related art.
[0005] According to one aspect of an embodiment of the present disclosure, a firmware upgrade method is provided, including: obtaining a target upgrade package and upgrade information, wherein the target upgrade package is any one of a plurality of upgrade packages, the plurality of upgrade packages being obtained by segmenting an upgrade image file, the upgrade information being used to perform integrity verification on the target upgrade package, the number of upgrade package segmentations corresponding to the upgrade image file being determined according to the firmware storage space of the target device firmware and the upgrade requirement duration; verifying the target upgrade package using the upgrade information to obtain a first verification result, wherein the first verification result is used to represent an integrity verification result corresponding to the target upgrade package; in response to determining that the target upgrade package passes the integrity verification based on the first verification result, decompressing the target upgrade package to obtain image fragment data corresponding to the target upgrade package; in response to completing the decompression processing on the plurality of upgrade packages, upgrading the target device firmware based on the image fragment data corresponding to the plurality of upgrade packages to obtain a target firmware upgrade result.
[0006] Optionally, the upgrade information includes: second verification information, and the target upgrade package is verified using the upgrade information to obtain a first verification result, including: obtaining the first verification information corresponding to the target upgrade package, wherein the first verification information is used to represent the integrity verification information of the target upgrade package calculated in the target device firmware; using the first verification information and the second verification information to perform integrity verification on the target upgrade package to obtain a first verification result, wherein the second verification information is used to represent the integrity verification information of the target upgrade package calculated in the server; if the first verification information matches the second verification information, the first verification result is that the target upgrade package passes the integrity verification; if the first verification information does not match the second verification information, the first verification result is that the target upgrade package fails the integrity verification.
[0007] Optionally, the above-mentioned firmware upgrade method also includes: determining the starting offset and ending offset corresponding to the target upgrade package, wherein the starting offset is the starting data position of the starting content corresponding to the target upgrade package in the upgrade image file, and the ending offset is the ending data position of the ending content corresponding to the target upgrade package in the upgrade image file; based on the starting offset and the ending offset, storing the image fragment data corresponding to the target upgrade package in the backup storage area in the target device firmware; in response to storing the image fragment data corresponding to the target upgrade package in the backup storage area in the target device firmware, deleting the target upgrade package.
[0008] Optionally, the upgrade information includes: third verification information, upgrading the target device firmware based on the mirror fragment data corresponding to multiple upgrade packages to obtain a target firmware upgrade result, including: combining the mirror fragment data corresponding to multiple upgrade packages to obtain firmware upgrade data; obtaining fourth verification information corresponding to the firmware upgrade data, wherein the fourth verification information is integrity verification information calculated for the firmware upgrade data in the target device firmware; using the third verification information and the fourth verification information to perform integrity verification on the firmware upgrade data to obtain a second verification result, wherein the third verification information is integrity verification information calculated for the upgrade image file in the server, and the second verification result is used to determine whether the firmware upgrade data passes the integrity verification; in response to determining that the firmware upgrade data passes the integrity verification according to the second verification result, upgrading the target device firmware based on the firmware upgrade data to obtain a target firmware upgrade result.
[0009] Optionally, the firmware upgrade data is verified using the third verification information and the fourth verification information to obtain a second verification result, including: responding based on a match between the third verification information and the fourth verification information, determining that the firmware upgrade data passes the integrity check; responding based on a mismatch between the third verification information and the fourth verification information, determining that the firmware upgrade data fails the integrity check.
[0010] Optionally, the firmware upgrade method further includes: switching the backup storage area in the target device to the current storage area; and restarting the target device in response to completion of the switching of the backup storage area.
[0011] According to another aspect of an embodiment of the present disclosure, a firmware upgrade device is also provided, including: an acquisition module, used to acquire a target upgrade package and upgrade information, wherein the target upgrade package is any one of a plurality of upgrade packages, and the plurality of upgrade packages are obtained by segmenting an upgrade image file, and the upgrade information is used to perform integrity verification on the target upgrade package, and the number of upgrade package segmentations corresponding to the upgrade image file is determined according to the firmware storage space of the target device firmware and the upgrade requirement duration; a verification module, used to perform verification processing on the target upgrade package using the upgrade information to obtain a first verification result, wherein the first verification result is used to represent the integrity verification result corresponding to the target upgrade package; a decompression module, used to decompress the target upgrade package in response to the first verification result that the target upgrade package passes the integrity verification, and obtain image fragment data corresponding to the target upgrade package; an upgrade module, used to upgrade the target device firmware based on the image fragment data corresponding to the plurality of upgrade packages in response to completing the decompression processing on the plurality of upgrade packages, and obtain the target firmware upgrade result.
[0012] Optionally, the upgrade information includes: second verification information, and the verification module is further used to: obtain first verification information corresponding to the target upgrade package, wherein the first verification information is used to represent the integrity verification information of the target upgrade package calculated in the target device firmware; use the first verification information and the second verification information to perform integrity verification on the target upgrade package to obtain a first verification result, wherein the second verification information is used to represent the integrity verification information of the target upgrade package calculated in the server; if the first verification information matches the second verification information, the first verification result is that the target upgrade package passes the integrity verification; if the first verification information does not match the second verification information, the first verification result is that the target upgrade package fails the integrity verification.
[0013] Optionally, the above-mentioned firmware upgrade device also includes: a determination module, used to determine the starting offset and ending offset corresponding to the target upgrade package, wherein the starting offset is the starting data position of the starting content corresponding to the target upgrade package in the upgrade image file, and the ending offset is the ending data position of the ending content corresponding to the target upgrade package in the upgrade image file; a storage module, used to store the image fragment data corresponding to the target upgrade package to the backup storage area in the target device firmware based on the starting offset and the ending offset; and a deletion module, used to delete the target upgrade package in response to storing the image fragment data corresponding to the target upgrade package to the backup storage area in the target device firmware.
[0014] Optionally, the upgrade information includes: third verification information, and the upgrade module is also used to: combine and process the image fragment data corresponding to multiple upgrade packages to obtain firmware upgrade data; obtain fourth verification information corresponding to the firmware upgrade data, wherein the fourth verification information is the integrity verification information calculated by the firmware upgrade data in the target device firmware; use the third verification information and the fourth verification information to perform integrity verification on the firmware upgrade data to obtain a second verification result, wherein the third verification information is the integrity verification information calculated by the upgrade image file in the server, and the second verification result is used to determine whether the firmware upgrade data passes the integrity verification; in response to determining that the firmware upgrade data passes the integrity verification according to the second verification result, the target device firmware is upgraded based on the firmware upgrade data to obtain a target firmware upgrade result.
[0015] Optionally, the upgrade module is further used to: in response to a match between the third verification information and the fourth verification information, determine that the firmware upgrade data passes the integrity check; in response to a mismatch between the third verification information and the fourth verification information, determine that the firmware upgrade data fails the integrity check.
[0016] Optionally, the firmware upgrade apparatus further comprises: a switching module for switching the backup storage area in the target device to the current storage area; and a restart module for restarting the target device in response to completion of the switching of the backup storage area.
[0017] According to another aspect of an embodiment of the present disclosure, an electronic device is further provided, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the firmware upgrade method in the embodiment of the present disclosure.
[0018] According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium is further provided. The computer-readable storage medium includes a stored executable program, wherein when the executable program runs, the device where the storage medium is located is controlled to execute the firmware upgrade method in the embodiment of the present disclosure.
[0019] According to another aspect of the embodiments of the present disclosure, a computer program product is further provided. The computer program product includes computer instructions. When the computer instructions are executed by a processor, the firmware upgrade method in the embodiments of the present disclosure is implemented.
[0020] In the embodiment of the present disclosure, by obtaining the target upgrade package and upgrade information, and using the upgrade information to verify the target upgrade package, and then after the target upgrade package passes the verification, the target upgrade package is decompressed to obtain the mirror fragment data corresponding to the target upgrade package, and finally based on the mirror fragment data corresponding to multiple upgrade packages, the target device firmware is upgraded to obtain the target firmware upgrade result, thereby achieving the purpose of optimizing storage resource management and reducing the space occupied during the firmware upgrade process, thereby realizing the technical effect of improving the space utilization during the firmware upgrade process, and thus solving the technical problem of low space utilization in the firmware upgrade method provided in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of this application. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the drawings:
[0022] Figure 1 is a flowchart of a firmware upgrade method according to one embodiment of the present disclosure;
[0023] Figure 2 is a schematic diagram of a firmware upgrade method according to one embodiment of the present disclosure;
[0024] Figure 3 is a schematic diagram of another firmware upgrade method according to one embodiment of the present disclosure;
[0025] Figure 4 It is a structural block diagram of a firmware upgrade device according to one embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] During the upgrade process, the firmware upgrade method in the related art needs to download the complete upgrade image file, which is then decompressed and stored in the backup storage area. However, since the size of the upgrade image file is often the same as the backup storage area, plus the additional space required to download and store the upgrade package, the entire upgrade process actually consumes 2 to 3 times the storage resources of the current storage area. This configuration of redundant storage space not only increases the manufacturing cost of the equipment, but also causes a large amount of storage space to be idle during the non-upgrade phase, resulting in a waste of resources. At the same time, since some products require a software version rollback function, the backup storage area continues to store the last used software before triggering the next upgrade, resulting in the backup storage area being unable to be reused before the next upgrade, further limiting the spatial flexibility of the backup storage area. Therefore, the firmware upgrade method in the related art has a technical problem of low space utilization.
[0029] Furthermore, downloading and decompressing large upgrade image files requires a significant amount of storage space, which can cause other applications or features to run slowly or fail to launch properly during the upgrade process due to insufficient storage space. Furthermore, frequently downloading and decompressing complete image files not only consumes storage space but can also accelerate the aging of storage media, shortening the device's lifespan.
[0030] The method embodiment can be executed in an electronic device or similar computing device including a memory and a processor. Taking running on a computer terminal as an example, the computer terminal may include one or more processors (processors may include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microcontroller unit (MCU), a programmable logic device (Field Programmable Gate Array, FPGA), a neural network processor (NPU), a tensor processing unit (TPU), an artificial intelligence (AI) type processor, etc.) and a memory for storing data. Optionally, the above-mentioned computer terminal may also include a transmission device, an input and output device, and a display device for communication functions. It will be understood by those skilled in the art that the above-mentioned structural description is only illustrative and does not limit the structure of the above-mentioned computer terminal. For example, the computer terminal may also include more or fewer components than the above-mentioned structural description, or have a configuration different from the above-mentioned structural description.
[0031] The memory can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the firmware upgrade method in the embodiment of the present disclosure. The processor executes various functional applications and data processing by running the computer program stored in the memory, that is, realizing the above-mentioned firmware upgrade method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely located relative to the processor, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0032] The transmission device is used to receive or send data via a network. Specific examples of the aforementioned network may include a wireless network provided by the mobile terminal's communications provider. In one embodiment, the transmission device includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In one embodiment, the transmission device may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0033] The display device can be, for example, a touch-screen liquid crystal display (LCD) and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display can enable the user to interact with the user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), and the user can interact with the GUI by finger contacts and / or gestures on the touch-sensitive surface. The human-computer interaction functions here optionally include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music and / or web browsing, etc. The executable instructions for performing the above-mentioned human-computer interaction functions are configured / stored in a computer program product or readable storage medium executable by one or more processors.
[0034] According to an embodiment of the present disclosure, a method embodiment of a firmware upgrade method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0035] Figure 1 is a flowchart of a firmware upgrade method according to one embodiment of the present disclosure, such as Figure 1 As shown, the method includes the following steps:
[0036] Step S11, obtaining a target upgrade package and upgrade information, wherein the target upgrade package is any one of a plurality of upgrade packages obtained by segmenting an upgrade image file, and the upgrade information is used to perform integrity verification on the target upgrade package. The number of upgrade package segments corresponding to the upgrade image file is determined based on the firmware storage space of the target device firmware and the required upgrade duration;
[0037] The target upgrade package is any one of multiple upgrade packages transmitted from the server to the target device during the firmware upgrade process. These multiple upgrade packages are generated by segmenting the upgrade image file. Each upgrade package corresponds to a subset of the upgrade image file and contains a portion of the upgrade data.
[0038] The upgrade information described above is metadata and control instructions that guide the target device through the firmware upgrade. Specifically, the upgrade information includes, but is not limited to, segmentation information and verification information corresponding to the upgrade image file. The verification information is used to decompress and verify the target upgrade package. In the disclosed embodiments, the storage space required for the upgrade process is the space for the upgrade information, the size of a single upgrade package, and the space for a single image fragment. The upgrade information is small, typically less than 10KB.
[0039] The above-mentioned upgrade image file includes but is not limited to the operating system kernel and related system library files, device drivers, application code, configuration parameters, system resource files, update scripts and instructions required for the target device to start and run.
[0040] For example, the target devices may include, but are not limited to, embedded devices, industrial automation controllers, Internet of Things (IoT) sensors and actuators, etc. It should be noted that the firmware upgrade process in the embodiments of the present disclosure is described using an embedded device as an example, but this does not constitute a specific limitation on the target device type.
[0041] The target device firmware is the control software running on the target device, including all software components required for the device to start up and operate. Upgrading the target device firmware can fix known bugs, add new features, or improve the target device's performance.
[0042] For example, the upgrade package corresponding to the upgrade image file can be determined based on the firmware storage space and the upgrade duration. For example, the server can determine the number of upgrade packages to split the upgrade image file into based on the remaining storage space on the target device and the expected upgrade time. This dynamic adjustment mechanism ensures that firmware upgrades can be completed efficiently even with limited storage resources, while minimizing waiting time during the upgrade process.
[0043] Step S12: Verify the target upgrade package using the upgrade information to obtain a first verification result, where the first verification result is used to represent the integrity verification result corresponding to the target upgrade package;
[0044] For example, commonly used verification algorithms include, but are not limited to, Message-Digest Algorithm 5 (MD5), Secure Hash Algorithm 1 (SHA-1), Secure Hash Algorithm 1 (SHA-256), and Cyclic Redundancy Check (CRC). MD5 is a hash function that converts data of any length into a fixed-length (128-bit) hash value for rapid data integrity verification. The SHA-1 algorithm can generate a 160-bit hash value, which is more secure than MD5 and reduces the risk of data collisions. SHA-256 can generate a 256-bit hash value and is suitable for scenarios with stricter requirements for data security and anti-tampering. The CRC algorithm performs a specific polynomial division operation on the data to generate a fixed-length (16-bit or 32-bit) checksum to verify whether errors occur during data transmission. It is suitable for scenarios such as network transmission and storage systems.
[0045] Step S13: In response to the first verification result indicating that the target upgrade package passes the integrity check, the target upgrade package is decompressed to obtain image fragment data corresponding to the target upgrade package.
[0046] The image fragment data is the data obtained by decompressing the target upgrade package after it passes the integrity check. Specifically, the image fragment data is part of the original upgrade image file. That is, when the upgrade image file is split into multiple upgrade packages, the file data restored after decompression of each upgrade package is the image fragment data.
[0047] For example, assuming that the target upgrade package fails to pass the integrity check, it means that there are unexpected conditions such as network instability and hardware failure during the data transmission process, which causes the data integrity of the target upgrade package to be damaged. At this time, the target device will discard the current target upgrade package, that is, completely remove the target upgrade package from its temporary storage area to avoid using the damaged or incomplete upgrade package for subsequent operations, thereby avoiding the potential risk of firmware upgrade failure and the device dysfunction that may be caused by it. At the same time, the target device will record the verification failure event and automatically activate the retransmission mechanism, sending a retransmission request to the server to ensure that it can receive a complete and undamaged target upgrade package, thereby completing the firmware upgrade process. On the contrary, assuming that the target upgrade package passes the integrity check, that is, the target device is intact during the data transmission process, the target device will decompress the current target upgrade package based on the upgrade information to obtain the mirror fragment data corresponding to the current target upgrade package.
[0048] Step S14 , in response to the decompression processing of the multiple upgrade packages, the target device firmware is upgraded based on the image fragment data corresponding to the multiple upgrade packages to obtain a target firmware upgrade result.
[0049] Exemplarily, after receiving an upgrade request, the server first splits the upgrade image file into multiple upgrade packages and transmits any one of these packages to the target device as the target upgrade package. Furthermore, after receiving the target upgrade package and upgrade information from the server, the target device uses the upgrade information to verify the target upgrade package. Once the target upgrade package passes the integrity check, the target upgrade package is decompressed into its corresponding image fragment data. After the multiple upgrade packages are decompressed, the target device firmware is upgraded based on the corresponding image fragment data, resulting in the target firmware upgrade result.
[0050] Based on the above steps S11 to S14, by obtaining the target upgrade package and upgrade information, and using the upgrade information to verify the target upgrade package, and then after the target upgrade package passes the verification, the target upgrade package is decompressed to obtain the mirror fragment data corresponding to the target upgrade package, and finally the target device firmware is upgraded based on the mirror fragment data corresponding to multiple upgrade packages to obtain the target firmware upgrade result, thereby achieving the purpose of optimizing storage resource management and reducing space occupation during the firmware upgrade process, thereby achieving the technical effect of improving space utilization during the firmware upgrade process, and thus solving the technical problem of low space utilization in the firmware upgrade method provided in the related art.
[0051] Optionally, the upgrade information includes second verification information. In step S12, the target upgrade package is verified using the upgrade information to obtain a first verification result, including:
[0052] Step S121: Obtain first verification information corresponding to the target upgrade package, where the first verification information is used to represent integrity verification information of the target upgrade package calculated in the target device firmware;
[0053] Step S122: Use the first verification information and the second verification information to perform integrity verification on the target upgrade package to obtain a first verification result, wherein the second verification information is used to represent the integrity verification information of the target upgrade package calculated in the server; if the first verification information matches the second verification information, the first verification result is that the target upgrade package passes the integrity verification; if the first verification information does not match the second verification information, the first verification result is that the target upgrade package fails the integrity verification.
[0054] The above integrity check information is a hash value or check code used to verify the integrity and consistency of the target upgrade package data during the firmware upgrade process.
[0055] For example, after the upgrade image file is divided into multiple upgrade packages, a CRC algorithm can be used to verify each upgrade package to obtain second verification information, i.e., the original integrity verification information corresponding to the target upgrade package. During the firmware upgrade process, after the target device receives the target upgrade package and the second verification information, it can use the first verification information and the second verification information to decompress and verify the target upgrade package to obtain a first verification result. Furthermore, when the first verification information matches the second verification information, it can be determined that the target upgrade package has passed the integrity check; conversely, if the first verification information does not match the second verification information, the target upgrade package has failed the integrity check.
[0056] For example, assuming that the upgrade image file is divided into 5 upgrade packages: U1, U2, U3, U4, and U5, a CRC algorithm can be used to perform verification processing for each upgrade package to obtain corresponding second verification information: CRC1, CRC2, CRC3, CRC4, and CRC5. Assuming that the target upgrade package is U1, its corresponding second verification information is CRC1. After receiving U1 and CRC1 from the server, the target device can use the CRC algorithm to perform integrity verification on U1, and obtain its first verification information as CRC-U1. Furthermore, a first verification result can be generated based on the matching status between CRC-U1 and CRC1.
[0057] For example, suppose that after the CRC algorithm verifies the data, the first checksum is 0xBEEFCAFE and the second checksum is 0xBEEFCAFE. If the first checksum matches the second checksum, it can be determined that the target upgrade package was not damaged during transmission. With the integrity check, the target device can safely decompress the target upgrade package and flash it to the designated location. Conversely, if the first checksum does not match the second checksum, the target upgrade package has failed the security check. The target device will report an error to the server and re-request the target upgrade package until the received target upgrade package passes the verification.
[0058] Based on the above steps S121 to S122, a real-time verification information comparison mechanism can ensure the data integrity and consistency of the upgrade package during transmission and reception, thereby reducing the upgrade failure rate due to data errors and avoiding failures or security vulnerabilities of the target device caused by the use of damaged firmware.
[0059] Optionally, the firmware upgrade method further includes:
[0060] Step S131, determining the starting offset and ending offset corresponding to the target upgrade package, wherein the starting offset is the starting data position of the starting content corresponding to the target upgrade package in the upgrade image file, and the ending offset is the ending data position of the ending content corresponding to the target upgrade package in the upgrade image file;
[0061] Step S132: storing the image fragment data corresponding to the target upgrade package in a backup storage area in the target device firmware based on the start offset and the end offset;
[0062] Step S133 , in response to storing the image fragment data corresponding to the target upgrade package in the backup storage area in the target device firmware, the target upgrade package is deleted.
[0063] The backup storage area is a specific area reserved on the target device for receiving and storing the image fragments extracted from multiple upgrade packages during the firmware upgrade process. This area is typically independent of the target device's current storage area, ensuring that the firmware upgrade process does not affect existing system operations and providing physical space for smooth firmware transitions and version rollbacks.
[0064] For example, assuming that the size of the upgrade image file is 1GB, based on the preset segmentation rules, it is determined that the total number of segmented segments is 8, namely: U1, U2, U3, U4, U5, U6, U7, and U8, and the segmented segment size is 128MB. Based on the segmented segment size, the starting offset and ending offset corresponding to the target upgrade package can be determined. Assuming that the target upgrade package is U1, its corresponding starting offset is 0MB, and the ending offset is 127MB; assuming that the target upgrade package is U5, its corresponding starting offset is 512MB, and the ending offset is 640MB. Furthermore, based on the starting offset and ending offset, the target upgrade package can be decompressed to the backup storage area in the target device to obtain the image segment data corresponding to the target upgrade package. Furthermore, when the image segment data corresponding to the target upgrade package is successfully stored in the backup storage area in the target device firmware, the target device will immediately delete the target upgrade package, thereby completing the release of storage space, thereby improving storage space utilization.
[0065] Based on the above steps S1321 to S1322, by controlling the decompression location of the target upgrade package in the backup storage area, it is possible to ensure that each image fragment data can be accurately decompressed in its corresponding storage location, thereby constructing a complete upgrade image file. This not only optimizes the utilization of storage space during the firmware upgrade process, but also reduces the risk of upgrade failure due to insufficient storage space.
[0066] Optionally, the upgrade information includes: third verification information. In step S14, the target device firmware is upgraded based on the image fragment data corresponding to the multiple upgrade packages to obtain a target firmware upgrade result, including:
[0067] Step S141, combining the image fragment data corresponding to the multiple upgrade packages to obtain firmware upgrade data;
[0068] Step S142: Acquire fourth verification information corresponding to the firmware upgrade data, wherein the fourth verification information is integrity verification information calculated for the firmware upgrade data in the target device firmware;
[0069] Step S143: Performing an integrity check on the firmware upgrade data using the third verification information and the fourth verification information to obtain a second verification result, wherein the third verification information is integrity verification information calculated on the server for the upgrade image file, and the second verification result is used to determine whether the firmware upgrade data passes the integrity check;
[0070] Step S144 , in response to determining that the firmware upgrade data passes the integrity check according to the second check result, the target device firmware is upgraded based on the firmware upgrade data to obtain a target firmware upgrade result.
[0071] For example, after multiple upgrade packages have been decompressed, the target device will combine the mirror fragment data corresponding to the multiple upgrade packages based on the starting offset and ending offset corresponding to each upgrade package to generate a firmware upgrade data that integrates all necessary upgrade content. To further ensure the accuracy of the firmware upgrade data, the SHA-256 algorithm can be used to calculate the fourth verification information corresponding to the firmware upgrade data. Furthermore, if the third verification information matches the fourth verification information, that is, the second verification result confirms that the verification process of the firmware upgrade data has passed successfully, the target device can now safely use the firmware upgrade data to update the target device firmware, complete the firmware upgrade process, and thus obtain the target firmware upgrade result.
[0072] For example, to further optimize the firmware upgrade process and enhance its security, the target device can simultaneously record the write timestamp and write location of each mirror segment data when combining and processing the mirror segment data corresponding to multiple upgrade packages to form an upgrade log file. Based on the upgrade log file, the target device can monitor the writing progress and status of the firmware upgrade data in real time. Once a write failure or data integrity damage is detected, it can quickly locate the specific mirror segment data and re-request and write the affected mirror segment data based on the write timestamp and write location saved in the upgrade log file, thereby avoiding unnecessary retransmission of the full data and improving the reliability and success rate of the firmware upgrade.
[0073] Based on the above steps S141 to S144, by comparing the third verification information transmitted by the server with the fourth verification information generated in the target device, the integrity and consistency of the entire firmware upgrade data during the reorganization process can be ensured, thereby reducing the storage space occupied while improving the success rate and security of the firmware upgrade.
[0074] Optionally, in step S143, the firmware upgrade data is verified using the third verification information and the fourth verification information to obtain a second verification result, including:
[0075] Step S1431, in response to the third verification information matching the fourth verification information, determining that the firmware upgrade data passes the integrity check;
[0076] Step S1432: In response to the mismatch between the third verification information and the fourth verification information, it is determined that the firmware upgrade data fails the integrity check.
[0077] For example, assuming the third verification information calculated using the SHA-256 algorithm matches the fourth verification information, that is, the 256-bit hash values of the third and fourth verification information are identical, it can be determined that the firmware upgrade data has passed the integrity check. Conversely, if the third and fourth verification information do not match, the firmware upgrade has failed the integrity check. The target device will record the verification failure, indicating a firmware upgrade anomaly and awaiting further manual intervention or troubleshooting.
[0078] Based on the above steps S1431 to S1432, through verification processing, the integrity and consistency between the firmware upgrade data and the upgrade image file can be ensured, and upgrade failures caused by data transmission errors, storage failures or malicious attacks can be prevented, thereby improving the security and reliability of the firmware upgrade process.
[0079] Optionally, the firmware upgrade method further includes:
[0080] Step S21, switching the backup storage area in the target device to the current storage area;
[0081] Step S22: In response to the completion of the switch to the backup storage area, the target device is restarted.
[0082] For example, when the backup storage area in the target device successfully receives and stores the firmware upgrade data, and the firmware upgrade data passes verification, the firmware upgrade system dynamically adjusts the target device's storage area allocation, updating the backup storage area's identifier to the current storage area. Simultaneously, it relabels the original current storage area as the backup storage area, retaining the original firmware version. After the switch is complete, the firmware upgrade system reboots the target device, initializing its hardware environment and ensuring that the upgraded firmware upgrade data located in the current storage area is loaded and executed during the reboot process.
[0083] Based on the above steps S21 to S22, the backup storage area in the target device is switched to the current storage area, and the target device is restarted after the switch is completed. This can ensure that the target device can immediately use the new version of the firmware to run after the upgrade, avoiding the instability risk or function loss caused by the firmware version transition period, and achieving the immediate effectiveness and continuity of the firmware upgrade.
[0084] Figure 2 is a schematic diagram of a firmware upgrade method according to one embodiment of the present disclosure, such as Figure 2 As shown, during the firmware upgrade process, the server first segments the upgrade image file based on the segmentation information to obtain multiple image fragment data, and then compresses the multiple image fragment data to obtain multiple upgrade packages corresponding to the multiple image fragment data. Furthermore, a verification algorithm is used to calculate the second verification information and third verification information corresponding to each upgrade package and upgrade image file, and the upgrade information containing the segmentation information, the second verification information, and the third verification information, as well as any upgrade package, is transmitted to the target device. When the target device receives the target upgrade package and upgrade information from the server, it will perform an integrity check on the target upgrade package based on the second verification information in the upgrade information. When the target upgrade package passes the integrity check, the target upgrade package is decompressed into image fragment data, and the image fragment data obtained after decompression is written to the corresponding location in the backup storage area.
[0085] For example, after the flashing process for multiple upgrade packages is complete, that is, after all the segmented image fragments have been written to the backup storage area according to the specified segmentation offsets, the target device's firmware update program or corresponding software module will call a read function to read the entire image file from the backup storage area. Furthermore, the MD5 algorithm can be used to verify the entire image file.
[0086] Figure 3 is a schematic diagram of another firmware upgrade method according to one embodiment of the present disclosure, such as Figure 3As shown, for an upgrade file consisting of multiple small files, the small files can be grouped into n upgrade packages that can be decompressed separately, transmitted to the device one by one, decompressed to the backup storage area in the target device, and then deleted before receiving the next upgrade package to save the space required for the upgrade.
[0087] For example, after decompressing multiple upgrade packages, the file fragments corresponding to the multiple upgrade packages can be spliced together based on the segmentation offsets to generate a spliced file. After the splicing is complete, the spliced file is stored in the backup storage area of the target device. Furthermore, the MD5 algorithm can be used to calculate verification information for the spliced file and compare it with the second verification information in the upgrade information.
[0088] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present disclosure.
[0089] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0090] In the embodiments of the present disclosure, a firmware upgrade device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments. The details that have been described will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
[0091] Figure 4 is a structural block diagram of a firmware upgrade device according to one embodiment of the present disclosure, such as Figure 4 As shown, the device includes:
[0092] Acquisition module 401 is configured to acquire a target upgrade package and upgrade information, wherein the target upgrade package is any one of multiple upgrade packages obtained by segmenting an upgrade image file. The upgrade information is used to perform integrity verification on the target upgrade package. The number of upgrade package segments corresponding to the upgrade image file is determined based on the firmware storage space of the target device firmware and the required upgrade duration.
[0093] Verification module 402, configured to verify the target upgrade package using the upgrade information to obtain a first verification result, wherein the first verification result is used to represent an integrity verification result corresponding to the target upgrade package;
[0094] A decompression module 403 is configured to, in response to the first verification result indicating that the target upgrade package passes the integrity check, decompress the target upgrade package to obtain image fragment data corresponding to the target upgrade package;
[0095] The upgrade module 404 is configured to, in response to the decompression of the multiple upgrade packages, upgrade the target device firmware based on the image fragment data corresponding to the multiple upgrade packages to obtain a target firmware upgrade result.
[0096] Optionally, the upgrade information includes: second verification information, and the verification module 402 is also used to: obtain first verification information corresponding to the target upgrade package, wherein the first verification information is used to represent the integrity verification information of the target upgrade package calculated in the target device firmware; use the first verification information and the second verification information to perform integrity verification on the target upgrade package to obtain a first verification result, wherein the second verification information is used to represent the integrity verification information of the target upgrade package calculated in the server; if the first verification information matches the second verification information, the first verification result is that the target upgrade package passes the integrity verification; if the first verification information does not match the second verification information, the first verification result is that the target upgrade package fails the integrity verification.
[0097] Optionally, the firmware upgrade device further includes:
[0098] Determining module 405, for determining the starting offset and ending offset corresponding to the target upgrade package, wherein the starting offset is the starting data position of the starting content corresponding to the target upgrade package in the upgrade image file, and the ending offset is the ending data position of the ending content corresponding to the target upgrade package in the upgrade image file;
[0099] A storage module 406 is configured to store the image fragment data corresponding to the target upgrade package in a backup storage area in the target device firmware based on the start offset and the end offset;
[0100] The deleting module 407 is configured to delete the target upgrade package in response to storing the image fragment data corresponding to the target upgrade package in the backup storage area in the target device firmware.
[0101] Optionally, the upgrade information includes: third verification information, and the upgrade module 404 is also used to: combine and process the image fragment data corresponding to multiple upgrade packages to obtain firmware upgrade data; obtain fourth verification information corresponding to the firmware upgrade data, wherein the fourth verification information is the integrity verification information of the firmware upgrade data calculated in the target device firmware; use the third verification information and the fourth verification information to perform integrity verification on the firmware upgrade data to obtain a second verification result, wherein the third verification information is the integrity verification information calculated in the server for the upgrade image file, and the second verification result is used to determine whether the firmware upgrade data passes the integrity verification; in response to determining that the firmware upgrade data passes the integrity verification based on the second verification result, the target device firmware is upgraded based on the firmware upgrade data to obtain a target firmware upgrade result.
[0102] Optionally, the upgrade module 404 is further used to: in response to the third verification information matching the fourth verification information, determine that the firmware upgrade data passes the integrity check; in response to the third verification information not matching the fourth verification information, determine that the firmware upgrade data fails the integrity check.
[0103] Optionally, the firmware upgrade apparatus further includes: a switching module 408 for switching the backup storage area in the target device to the current storage area; and a restart module 409 for restarting the target device in response to completion of the switching of the backup storage area.
[0104] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0105] According to another aspect of an embodiment of the present disclosure, an electronic device is further provided, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the firmware upgrade method in the embodiment of the present disclosure.
[0106] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:
[0107] S1. Obtain a target upgrade package and upgrade information, wherein the target upgrade package is any one of multiple upgrade packages, the multiple upgrade packages being obtained by segmenting an upgrade image file, and the upgrade information being used to perform integrity verification on the target upgrade package. The number of upgrade package segments corresponding to the upgrade image file is determined based on the firmware storage space of the target device firmware and the required upgrade duration;
[0108] S2, verifying the target upgrade package using the upgrade information to obtain a first verification result, where the first verification result is used to represent an integrity verification result corresponding to the target upgrade package;
[0109] S3, in response to the first verification result indicating that the target upgrade package passes the integrity check, decompressing the target upgrade package to obtain image fragment data corresponding to the target upgrade package;
[0110] S4, in response to the decompression processing of the multiple upgrade packages, the target device firmware is upgraded based on the image fragment data corresponding to the multiple upgrade packages to obtain a target firmware upgrade result.
[0111] According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium is further provided. The computer-readable storage medium includes a stored executable program, wherein when the executable program runs, the device where the storage medium is located is controlled to execute the firmware upgrade method in the embodiment of the present disclosure.
[0112] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0113] S1. Obtain a target upgrade package and upgrade information, wherein the target upgrade package is any one of multiple upgrade packages, the multiple upgrade packages being obtained by segmenting an upgrade image file, and the upgrade information being used to perform integrity verification on the target upgrade package. The number of upgrade package segments corresponding to the upgrade image file is determined based on the firmware storage space of the target device firmware and the required upgrade duration;
[0114] S2, verifying the target upgrade package using the upgrade information to obtain a first verification result, where the first verification result is used to represent an integrity verification result corresponding to the target upgrade package;
[0115] S3, in response to the first verification result indicating that the target upgrade package passes the integrity check, decompressing the target upgrade package to obtain image fragment data corresponding to the target upgrade package;
[0116] S4, in response to the decompression processing of the multiple upgrade packages, the target device firmware is upgraded based on the image fragment data corresponding to the multiple upgrade packages to obtain a target firmware upgrade result.
[0117] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0118] According to another aspect of the embodiments of the present disclosure, a computer program product is further provided. The computer program product includes computer instructions. When the computer instructions are executed by a processor, the firmware upgrade method in the embodiments of the present disclosure is implemented.
[0119] Optionally, in this embodiment, the computer program product may be configured as a computer program for executing the following steps:
[0120] S1. Obtain a target upgrade package and upgrade information, wherein the target upgrade package is any one of multiple upgrade packages, the multiple upgrade packages being obtained by segmenting an upgrade image file, and the upgrade information being used to perform integrity verification on the target upgrade package. The number of upgrade package segments corresponding to the upgrade image file is determined based on the firmware storage space of the target device firmware and the required upgrade duration;
[0121] S2, verifying the target upgrade package using the upgrade information to obtain a first verification result, where the first verification result is used to represent an integrity verification result corresponding to the target upgrade package;
[0122] S3, in response to the first verification result indicating that the target upgrade package passes the integrity check, decompressing the target upgrade package to obtain image fragment data corresponding to the target upgrade package;
[0123] S4, in response to the decompression processing of the multiple upgrade packages, the target device firmware is upgraded based on the image fragment data corresponding to the multiple upgrade packages to obtain a target firmware upgrade result.
[0124] The serial numbers of the above-mentioned embodiments of the present disclosure are for description only and do not represent the advantages or disadvantages of the embodiments.
[0125] In the above embodiments of the present disclosure, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0126] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0127] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected to achieve the purpose of the present embodiment according to actual needs.
[0128] In addition, the functional units in the various embodiments of the present disclosure may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0129] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0130] The above is only a preferred embodiment of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present disclosure. These improvements and modifications should also be regarded as within the scope of protection of the present disclosure.
Claims
1. A firmware upgrade method, characterized in that: include: Obtaining a target upgrade package and upgrade information, wherein the target upgrade package is any one of a plurality of upgrade packages obtained by segmenting an upgrade image file, the upgrade information being used to perform integrity verification on the target upgrade package, and the number of upgrade package segments corresponding to the upgrade image file being determined based on firmware storage space of the target device firmware and the required upgrade duration; Verifying the target upgrade package using the upgrade information to obtain a first verification result, wherein the first verification result is used to represent an integrity verification result corresponding to the target upgrade package; In response to the first verification result indicating that the target upgrade package passes the integrity check, decompressing the target upgrade package to obtain image fragment data corresponding to the target upgrade package; In response to the decompression processing of the multiple upgrade packages, the target device firmware is upgraded based on the image fragment data corresponding to the multiple upgrade packages to obtain a target firmware upgrade result.
2. The firmware upgrade method according to claim 1, wherein: The upgrade information includes: second verification information, and the verification processing of the target upgrade package using the upgrade information to obtain the first verification result includes: Obtaining first verification information corresponding to the target upgrade package, wherein the first verification information is used to represent integrity verification information of the target upgrade package calculated in the target device firmware; The target upgrade package is integrity checked using the first verification information and the second verification information to obtain the first verification result, wherein the second verification information is used to represent integrity verification information of the target upgrade package calculated in the server; if the first verification information matches the second verification information, the first verification result is that the target upgrade package passes the integrity check; if the first verification information does not match the second verification information, the first verification result is that the target upgrade package fails the integrity check.
3. The firmware upgrade method according to claim 1, wherein: The method further comprises: Determine a start offset and an end offset corresponding to the target upgrade package, wherein the start offset is the starting data position of the start content corresponding to the target upgrade package in the upgrade image file, and the end offset is the end data position of the end content corresponding to the target upgrade package in the upgrade image file; Storing the image fragment data corresponding to the target upgrade package in a backup storage area in the target device firmware based on the start offset and the end offset; In response to storing the image fragment data corresponding to the target upgrade package in the backup storage area in the target device firmware, the target upgrade package is deleted.
4. The firmware upgrade method according to claim 1, wherein: The upgrade information includes: third verification information, and the upgrade process of the target device firmware based on the image fragment data corresponding to the multiple upgrade packages to obtain the target firmware upgrade result includes: Combining and processing the image fragment data corresponding to the multiple upgrade packages to obtain firmware upgrade data; Obtaining fourth verification information corresponding to the firmware upgrade data, wherein the fourth verification information is integrity verification information of the firmware upgrade data calculated in the firmware of the target device; performing an integrity check on the firmware upgrade data using the third verification information and the fourth verification information to obtain a second verification result, wherein the third verification information is integrity verification information of the upgrade image file calculated on the server, and the second verification result is used to determine whether the firmware upgrade data passes the integrity check; In response to determining that the firmware upgrade data passes the integrity check according to the second verification result, the target device firmware is upgraded based on the firmware upgrade data to obtain the target firmware upgrade result.
5. The firmware upgrade method according to claim 4, wherein: The verifying the firmware upgrade data using the third verification information and the fourth verification information to obtain a second verification result includes: In response to a match between the third verification information and the fourth verification information, determining that the firmware upgrade data passes the integrity check; In response to the mismatch between the third verification information and the fourth verification information, it is determined that the firmware upgrade data fails the integrity check.
6. The firmware upgrade method according to claim 3, wherein: The method further comprises: Switching the backup storage area in the target device to the current storage area; In response to completing the switching of the backup storage area, the target device is restarted.
7. A firmware upgrade device, characterized in that: include: an acquisition module, configured to acquire a target upgrade package and upgrade information, wherein the target upgrade package is any one of a plurality of upgrade packages obtained by segmenting an upgrade image file; the upgrade information is used to perform integrity verification on the target upgrade package; and the number of upgrade package segments corresponding to the upgrade image file is determined based on the firmware storage space of the target device firmware and the required upgrade duration; a verification module, configured to verify the target upgrade package using the upgrade information to obtain a first verification result, wherein the first verification result is used to represent an integrity verification result corresponding to the target upgrade package; a decompression module, configured to, in response to the first verification result indicating that the target upgrade package passes the integrity check, decompress the target upgrade package to obtain image fragment data corresponding to the target upgrade package; The upgrade module is configured to, in response to completing the decompression processing of the multiple upgrade packages, upgrade the target device firmware based on the image fragment data corresponding to the multiple upgrade packages to obtain a target firmware upgrade result.
8. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the firmware upgrade method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored executable program, wherein when the executable program is run, the device where the storage medium is located is controlled to execute the firmware upgrade method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The computer program product includes computer instructions, which, when executed by a processor, implement the firmware upgrade method described in any one of claims 1 to 6.