Firmware upgrading method, electronic equipment and storage medium

Through the firmware upgrade method of receiving and determining the target power state, the problem of low firmware upgrade efficiency in the prior art is solved, and efficient firmware upgrades to multiple devices are achieved, reducing costs.

CN120508307AActive Publication Date: 2025-08-19INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510998993.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-18
Publication Date
2025-08-19
Estimated Expiration
2045-07-18

AI Technical Summary

Technical Problem

In the prior art, the substrate management controller (BMC) has low efficiency in firmware upgrades to devices in the server, and different firmware upgrade methods need to be developed for different devices.

Method used

By receiving firmware upgrade requests, determining the target power state, and firmware upgrade of the device according to the device identification and target power state, a standardized method is provided for multiple devices, including a receiving module, a determination module and an upgrade module.

Benefits of technology

This achieves improved firmware upgrade efficiency for multiple devices, reduces firmware upgrade costs, and eliminates the need to develop different upgrade methods for different devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508307A_ABST
    Figure CN120508307A_ABST
Patent Text Reader

Abstract

The invention discloses a firmware upgrading method, electronic equipment and a storage medium, and relates to the technical field of servers, the method comprises the steps that a firmware upgrading request is received, the firmware upgrading request comprises a device identifier and firmware, and the firmware upgrading request is used for requesting firmware upgrading of a device corresponding to the device identifier according to the firmware; according to the device identifier, a target power state is determined, the target power state is a power state of an operating system in the firmware upgrading process, and the target power state is an on state or an off state; and performing firmware upgrading on the device according to the firmware upgrading request and the target power supply state. The method is suitable for performing firmware upgrading on a plurality of devices. In this way, the purpose of conducting firmware upgrading on multiple devices through a standardized method can be achieved, and the firmware upgrading efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of server technology, and in particular to a firmware upgrade method, electronic device, and storage medium. Background Art

[0002] The Baseboard Management Controller (BMC) manages server components and updates their firmware. For example, these components can be sensors, complex programmable logic devices (CPLDs), or hard disk controllers.

[0003] Currently, the BMC can upgrade the firmware of corresponding devices through the firmware upgrade methods corresponding to different devices. Among the above methods, the firmware upgrade efficiency is relatively low. Summary of the Invention

[0004] The present application provides a firmware upgrade method, an electronic device, and a storage medium to at least solve the problem of low firmware upgrade efficiency in related technologies.

[0005] In a first aspect, the present application provides a firmware upgrade method, applied to an electronic device, the method comprising:

[0006] receiving a firmware upgrade request, the firmware upgrade request including a device identifier and firmware, the firmware upgrade request being used to request a firmware upgrade for a device corresponding to the device identifier according to the firmware;

[0007] Determine a target power state according to the device identifier, where the target power state is the power state of the operating system during the firmware upgrade process, and the target power state is either on or off.

[0008] The device firmware is upgraded according to the firmware upgrade request and the target power state.

[0009] In a second aspect, the present application provides a firmware upgrade device, which is applied to an electronic device. The firmware upgrade device includes a receiving module, a determining module, and an upgrading module, wherein:

[0010] The receiving module is used to receive a firmware upgrade request, the firmware upgrade request includes a device identifier and firmware, and the firmware upgrade request is used to request a firmware upgrade for the device corresponding to the device identifier according to the firmware;

[0011] The determination module is used to determine a target power state according to the device identification, where the target power state is the power state of the operating system during the firmware upgrade process, and the target power state is either an on state or an off state;

[0012] The upgrade module is used to upgrade the firmware of the device according to the firmware upgrade request and the target power state.

[0013] In a third aspect, the present application further provides an electronic device, comprising:

[0014] memory for storing computer programs;

[0015] A processor is used to implement the steps of the firmware upgrade method provided in any one of the first aspects above when executing a computer program.

[0016] In a fourth aspect, the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the firmware upgrade method provided in any one of the above-mentioned first aspects are implemented.

[0017] In a fifth aspect, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the firmware upgrade method provided in any one of the first aspects above.

[0018] Through the technical solution provided by the embodiment of the present application, an electronic device can receive a firmware upgrade request, the firmware upgrade request includes a device identifier and firmware, and the firmware upgrade request is used to request a firmware upgrade for the device corresponding to the device identifier according to the firmware; the target power state can be determined according to the device identifier, and the target power state is the power state of the operating system during the firmware upgrade process; and the device can be firmware upgraded according to the firmware upgrade request and the target power state. Through the above method, an electronic device can perform a firmware upgrade on any device in the electronic device. In other words, the above method is applicable to firmware upgrades for multiple devices. In this way, the purpose of performing firmware upgrades on multiple devices through a standardized method can be achieved, thereby improving the efficiency of firmware upgrades. In addition, in the above method, there is no need to develop different firmware upgrade methods for different devices, which makes the cost of firmware upgrades lower. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0020] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application;

[0021] Figure 2 Schematic diagram of the firmware upgrade process provided in this embodiment of the application Figure 1 ;

[0022] Figure 3 Schematic diagram of the firmware upgrade process provided in this embodiment of the application Figure 2 ;

[0023] Figure 4 Schematic diagram of the firmware upgrade process provided in this embodiment of the application Figure 3 ;

[0024] Figure 5 Schematic diagram of the firmware upgrade process provided in this embodiment of the application Figure 4 ;

[0025] Figure 6 A schematic diagram of the structure of a firmware upgrade device provided in an embodiment of the present application;

[0026] Figure 7 This is a schematic diagram of the structure of the electronic device provided in this application. DETAILED DESCRIPTION

[0027] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0028] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0029] For ease of understanding, the following Figure 1 , exemplarily illustrating the application scenarios involved in the embodiments of the present application.

[0030] Figure 1 This is a schematic diagram of an application scenario provided by the embodiment of this application. Figure 1 , the server may include BMC, Basic Input / Output System (BIOS), CPLD, and Network Interface Card (NIC), etc. It should be noted that the server may also include more or fewer devices, Figure 1This is merely an illustrative description and does not constitute a limitation on the technical solutions provided in the embodiments of the present application.

[0031] BMC can manage devices such as BIOS, CPLD, and NIC, and can upgrade the firmware of these devices.

[0032] It should be noted that different devices have different firmware upgrade requirements. For example, some manufacturers' BIOS require the operating system (OS) to be powered on for firmware upgrades, while others require the OS to be powered off for firmware upgrades.

[0033] In the related art, different firmware upgrade methods need to be developed for different devices in a server, resulting in low firmware upgrade efficiency.

[0034] In view of this, an embodiment of the present application provides a firmware upgrade method to solve the technical problem of low firmware upgrade efficiency.

[0035] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0036] Figure 2 Schematic diagram of the firmware upgrade process provided in this embodiment of the application Figure 1 .like Figure 2 As shown, an embodiment of the present application provides a firmware upgrade method. The execution subject of the method can be an electronic device or a controller in the electronic device. For example, the electronic device can be a server and the controller can be a BMC. For ease of understanding, the following description is based on an example of an electronic device as the execution subject. The method may include:

[0037] S201: Receive a firmware upgrade request, where the firmware upgrade request includes a device identifier and firmware.

[0038] A device identifier can be used to uniquely identify a device in an electronic device. For example, the device can be a BIOS, a CPLD, or a BMC.

[0039] The firmware upgrade request is used to request a firmware upgrade for the device corresponding to the device identifier based on the firmware. It should be noted that after the firmware upgrade for the device corresponding to the device identifier is completed, the firmware included in the firmware upgrade request may be all of the firmware running on the device, or the firmware included in the firmware upgrade request may be part of the firmware running on the device. This is not limited in the present embodiments.

[0040] In this embodiment, the electronic device may receive a firmware upgrade request sent by another electronic device, for example, the other electronic device may be a computer, etc. Alternatively, the electronic device may receive a firmware upgrade request input by a user through an input operation, for example, the input operation may be a button click operation, etc.

[0041] S202: Determine the target power state according to the device identification.

[0042] The target power state is the power state of the operating system during the firmware upgrade process, and the target power state is either on or off. In other words, the device corresponding to the device identifier needs to be upgraded when the operating system power state is the target power state.

[0043] In this embodiment, the electronic device may store a correspondence between a device and a power state. The correspondence between the device and the power state may include multiple device identifiers and the power state corresponding to each device identifier. The power state corresponding to the device identifier may be the power state of the operating system during a firmware upgrade of the device corresponding to the device identifier.

[0044] During a specific implementation, the electronic device may determine the power state corresponding to the device identifier in the corresponding relationship between the device and the power state as the target power state.

[0045] S203: Perform firmware upgrade on the device according to the firmware upgrade request and the target power state.

[0046] In this embodiment, the electronic device can upgrade the firmware of the device when the power state of the operating system is the target power state.

[0047] Specifically, the electronic device may determine that the power state of the operating system is the target power state, and may upgrade the firmware of the device according to the firmware included in the firmware upgrade request when the power state of the operating system is the target power state.

[0048] In the firmware upgrade method provided in this embodiment, the electronic device can receive a firmware upgrade request, the firmware upgrade request includes a device identifier and firmware, and the firmware upgrade request is used to request a firmware upgrade for the device corresponding to the device identifier according to the firmware; the target power state can be determined according to the device identifier, and the target power state is the power state of the operating system during the firmware upgrade process; and the device can be firmware upgraded according to the firmware upgrade request and the target power state. Through the above method, the electronic device can perform a firmware upgrade on any device in the electronic device. In other words, the above method is applicable to firmware upgrades for multiple devices. In this way, the purpose of performing firmware upgrades on multiple devices through a standardized method can be achieved, thereby improving the efficiency of firmware upgrades. In addition, in the above method, there is no need to develop different firmware upgrade methods for different devices, which makes the cost of firmware upgrades lower.

[0049] Based on any of the above embodiments, Figure 3 , further illustrates the firmware upgrade method provided in the embodiment of the present application.

[0050] Figure 3 Schematic diagram of the firmware upgrade process provided in this embodiment of the application Figure 2 .like Figure 3 As shown, an embodiment of the present application provides a firmware upgrade method. The execution subject of the method can be an electronic device or a controller in the electronic device. For example, the electronic device can be a server and the controller can be a BMC. For ease of understanding, the following description is based on an example of an electronic device as the execution subject. The method may include:

[0051] S301: Receive a firmware upgrade request, where the firmware upgrade request includes a device identifier and firmware.

[0052] S302: Determine the target power state according to the device identification.

[0053] It should be noted that the specific implementation of S301-S302 can be found in S201-S202 and will not be repeated here.

[0054] S303: Store the firmware into the storage space.

[0055] The storage space may be a memory or a hard disk in the electronic device, etc. Optionally, the storage space may be a random access memory (RAM) in the electronic device.

[0056] In this embodiment, before performing a firmware upgrade, the electronic device may store the firmware in the firmware upgrade request into a storage space to avoid firmware loss, thereby increasing the reliability of the firmware and further increasing the reliability of the firmware upgrade.

[0057] It should be noted that S302 may be executed before S303, or S302 may be executed after S303, or S303 may be executed simultaneously with S302, which is not limited in this embodiment.

[0058] S304: Create an upgrade task, where the upgrade task includes a device identifier, a target power state, a storage address of the firmware, and a first state of the upgrade task.

[0059] The first state is used to indicate that the upgrade task is to be executed.

[0060] In this embodiment, the electronic device may create an upgrade task in a storage space, and the upgrade task may exist in the form of a JavaScript Object Notation (JSON) file.

[0061] For example, assuming that the firmware upgrade request is for requesting a BIOS firmware upgrade and the target power state is on, the upgrade task may be as follows:

[0062] {

[0063] "upgrade_target": "bios",

[0064] "firmware_path": " / ram / firmware / hard_drive_controller_fw.bin",

[0065] "power_condition": "system_on",

[0066] "upgrade_task_status": "initial",

[0067] "timestamp": "2025-02-25T08:30:00Z"

[0068] }

[0069] S305: Upgrade the firmware of the device according to the upgrade task.

[0070] Specifically, if the current power state of the operating system is the target power state, the electronic device can obtain the firmware according to the storage address of the firmware in the upgrade task and perform the firmware upgrade on the device according to the firmware. If the current power state of the operating system is not the target power state, the electronic device can obtain the firmware according to the storage address of the firmware in the upgrade task when the power state of the operating system is adjusted to the target power state and perform the firmware upgrade on the device according to the firmware.

[0071] It should be noted that in the technical solution provided by the embodiment of the present application, if the electronic device receives multiple firmware upgrade requests, the electronic device can create multiple upgrade tasks in the storage space. In this way, the electronic device can execute multiple upgrade tasks in series, further improving the efficiency of the firmware upgrade.

[0072] In the firmware upgrade method provided in this embodiment, an electronic device can receive a firmware upgrade request, the firmware upgrade request including a device identifier and firmware; can determine a target power state based on the device identifier; can store the firmware in a storage space; can create an upgrade task, the upgrade task including the device identifier, the target power state, the storage address of the firmware, and a first state of the upgrade task; and can perform a firmware upgrade on the device based on the upgrade task. The above method can be a standardized firmware upgrade method, and the above method can be used to upgrade the firmware of multiple devices in an electronic device without developing different firmware upgrade methods for different devices, making the firmware upgrade process in the server relatively simple and improving the efficiency of firmware upgrades.

[0073] Based on any of the above embodiments, Figure 4 , a detailed description of the method for upgrading the firmware of the device according to the upgrade task.

[0074] Figure 4 Schematic diagram of the firmware upgrade process provided in this embodiment of the application Figure 3 .like Figure 4 As shown, an embodiment of the present application provides a firmware upgrade method. The execution subject of the method can be an electronic device or a controller in the electronic device. For example, the electronic device can be a server and the controller can be a BMC. For ease of understanding, the following description is based on an example of an electronic device as the execution subject. The method may include:

[0075] S401: Determine whether the power state of the operating system is a target power state according to the upgrade task.

[0076] Specifically, the electronic device may determine whether the current power state of the operating system is the target power state. For example, if the target power state is on, the electronic device may determine whether the current power state of the operating system is on.

[0077] If the power state of the operating system is the target power state, execute S402;

[0078] If the power state of the operating system is not the target power state, execute S403.

[0079] S402: Update the first state in the upgrade task to the second state, and perform firmware upgrade on the device according to the updated upgrade task.

[0080] The second state is used to indicate that the power state of the operating system meets the device firmware upgrade conditions. For example, if the target power state is on and the current power state of the operating system is also on, the electronic device can update the first state in the upgrade task to the second state.

[0081] In this embodiment, when upgrading the firmware of a device according to the updated upgrade task, the electronic device can obtain the firmware from the storage space according to the storage address of the firmware and upgrade the firmware of the device according to the firmware. It should be noted that the specific process of upgrading the firmware of a device according to the firmware can be found in the relevant art and will not be described in detail here.

[0082] S403: Wait for a power operation request, where the power operation request is used to request that the power state of the operating system be updated to a requested power state.

[0083] In this embodiment, the requested power state may be the same as the target power state, or the requested power state may be different from the target power state, which is not limited in this embodiment of the present application.

[0084] In this embodiment, the user may input a power operation request to the electronic device through an input operation, or the user may input a power operation request to the electronic device through another electronic device.

[0085] S404: After receiving the power operation request, perform firmware upgrade on the device according to the power operation request.

[0086] In this embodiment, the electronic device may determine whether the requested power state is the same as the target power state.

[0087] If the requested power state is the same as the target power state, execute S405;

[0088] If the requested power state is different from the target power state, execute S406.

[0089] S405: Update the first state in the upgrade task to the second state, and perform firmware upgrade on the device according to the updated upgrade task.

[0090] It should be noted that the specific implementation of S405 can be found in S402 and will not be repeated here.

[0091] S406: Upgrade the firmware of the device according to the requested power state and the upgrade task.

[0092] In this embodiment, the electronic device can update the power state of the operating system to the target power state; a state update task can be created, and the state update task is used to indicate that the power state is updated to the requested power state; the first state in the upgrade task can be updated to the second state, and the firmware of the device can be upgraded according to the updated upgrade task.

[0093] Specifically, when the requested power state is different from the target power state, the electronic device can first update the power state of the operating system to the target power state and create a state update task, which is used to indicate that the power state of the operating system is updated to the requested power state.

[0094] For example, assuming the target power state is off, the current power state is on, and the requested power state is a restart state, the restart state may involve first adjusting the power state to off and then to on. The electronic device may first update the operating system's power state to off and then create a state update task, which instructs the operating system to update its power state to on.

[0095] In this embodiment, the electronic device may create a status update task in the storage space, and the status update task may also exist in the form of a JSON file.

[0096] For example, assuming that the state update task is used to instruct to update the power state of the operating system to the off state, the state update task may be as follows:

[0097] {

[0098] "target_status": "shutdown",

[0099] "timestamp": "2025-02-25T10:30:00Z"

[0100] }

[0101] In addition, after the electronic device updates the power state of the operating system to the target power state, it can update the first state in the upgrade task to the second state and perform a firmware upgrade on the device according to the updated upgrade task. It should be noted that the specific instructions for performing a firmware upgrade on the device according to the updated upgrade task can be found in S402 and will not be repeated here.

[0102] In this embodiment, after the electronic device upgrades the firmware of the device, it can update the power state to the requested power state according to the state update task, so as to achieve the purpose of updating the power state of the operating system to the requested power state according to the power operation request.

[0103] Optionally, before performing a firmware upgrade on a device according to the firmware, the electronic device may also update the second state in the upgrade task to a third state, where the third state is used to indicate the start of the firmware upgrade for the device; after performing a firmware upgrade on the device according to the firmware, the electronic device may also update the third state in the upgrade task to a fourth state, where the fourth state is used to indicate that the firmware upgrade for the device has been completed. In this way, the electronic device may determine whether the firmware upgrade task for the device is completed based on the state in the upgrade task, and may execute the state update task if it is determined that the firmware upgrade task for the device has been completed. The above method can avoid changing the power state of the operating system during the firmware upgrade process, thereby increasing the reliability of the firmware upgrade.

[0104] In the firmware upgrade method provided in this embodiment, an electronic device can upgrade the firmware of a device based on an upgrade task and a power operation request. This method is applicable to multiple devices in a server, eliminating the need to develop separate firmware upgrade methods for different devices. This improves firmware upgrade efficiency and reduces the cost of firmware upgrades.

[0105] On the basis of any of the above embodiments, a firmware upgrade request processing module, a power control module, a firmware upgrade module, and a storage module can be set in the electronic device. Specifically, a firmware upgrade request processing module, a power control module, a firmware upgrade module, and a storage module can be set on the controller of the electronic device. Figure 5 , through specific examples, the firmware upgrade methods executed by the above modules are explained.

[0106] Figure 5 Schematic diagram of the firmware upgrade process provided in this embodiment of the application Figure 4 See Figure 5 , the method may include:

[0107] S501: The firmware upgrade request processing module receives a firmware upgrade request.

[0108] The firmware upgrade request includes a device identifier and firmware.

[0109] S502: The firmware upgrade request processing module determines the target power state according to the device identification.

[0110] S503: The firmware upgrade request processing module stores the firmware in the storage module.

[0111] S504: The firmware upgrade request processing module creates an upgrade task in the storage module.

[0112] The upgrade task includes a device identification, a target power state, a storage address of the firmware, and a first state of the upgrade task.

[0113] S505: The power control module detects an upgrade task in the storage module.

[0114] In this embodiment, the power control module can detect in real time whether there is a new upgrade task in the storage module.

[0115] S506: The power control module determines whether the power state of the operating system is the target power state according to the upgrade task.

[0116] If the power state of the operating system is the target power state, execute S507;

[0117] If the power state of the operating system is not the target power state, execute S512.

[0118] S507: The power control module updates the first state in the upgrade task to the second state.

[0119] The second state is used to indicate that the power state of the operating system meets the firmware upgrade condition of the device.

[0120] S508: The firmware upgrade module detects the second state in the upgrade task.

[0121] In this embodiment, the firmware upgrade module can detect the status of the upgrade task in real time, wherein the status of the upgrade task can include a first state, a second state, a third state, and a fourth state.

[0122] S509: The firmware upgrade module updates the second state in the upgrade task to a third state.

[0123] The third state is used to indicate the start of firmware upgrade for the device.

[0124] S510: The firmware upgrade module upgrades the firmware of the device according to the upgrade task.

[0125] S511: The firmware upgrade module updates the third state in the upgrade task to the fourth state.

[0126] The fourth state is used to indicate that the firmware upgrade of the device has been completed.

[0127] S512: The power control module receives a power operation request, where the power operation request includes a requested power state.

[0128] S513: The power control module determines whether the requested power state is the same as the target power state.

[0129] If the requested power state is the same as the target power state, execute S507-S511;

[0130] If the requested power state is different from the target power state, execute S514.

[0131] S514: The power control module updates the power state of the operating system to the target power state.

[0132] S515: The power control module creates a status update task in the storage module, where the status update task is used to instruct to update the power status to the requested power status.

[0133] S516: The power control module updates the first state in the upgrade task to the second state.

[0134] S517: The firmware upgrade module detects the second state in the upgrade task.

[0135] S518: The firmware upgrade module updates the second state in the upgrade task to a third state.

[0136] S519: The firmware upgrade module upgrades the firmware of the device according to the upgrade task.

[0137] S520: The firmware upgrade module updates the third state in the upgrade task to a fourth state.

[0138] S521: The power control module detects the fourth state in the upgrade task.

[0139] In this embodiment, the power control module can detect the status of the upgrade task in real time, wherein the status of the upgrade task can include a first state, a second state, a third state, and a fourth state.

[0140] S522: The power control module updates the power state of the operating system to the requested power state according to the state update task.

[0141] In the firmware upgrade method provided in this embodiment, an electronic device can use the above method to upgrade the firmware of any device in the electronic device. In other words, the above method is applicable to upgrading the firmware of multiple devices. This achieves the goal of upgrading the firmware of multiple devices using a standardized method, improving the efficiency of firmware upgrades. In addition, the above method eliminates the need to develop different firmware upgrade methods for different devices, reducing the cost of firmware upgrades.

[0142] 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.

[0143] Figure 6 The firmware upgrade device is applied to electronic devices, such as Figure 6As shown, the firmware upgrade device 10 includes a receiving module 11, a determining module 12, and an upgrading module 13. The receiving module 11 can be Figure 5 The firmware upgrade request processing module shown in the embodiment is implemented, and the determination module 12 can also be implemented by Figure 5 The firmware upgrade request processing module shown in the embodiment is implemented, and the upgrade module 13 can be Figure 5 The power control module, storage module, and firmware upgrade module shown in the embodiment are implemented.

[0144] The receiving module 11 is used to receive a firmware upgrade request, the firmware upgrade request including a device identifier and firmware, and the firmware upgrade request is used to request a firmware upgrade for a device corresponding to the device identifier according to the firmware;

[0145] The determination module 12 is used to determine a target power state according to the device identification, where the target power state is the power state of the operating system during the firmware upgrade process, and the target power state is either an on state or an off state;

[0146] The upgrade module 13 is configured to upgrade the firmware of the device according to the firmware upgrade request and the target power state.

[0147] The firmware upgrade device provided in this embodiment can execute the method shown in any of the above method embodiments. Its implementation principles and technical effects are similar, and are not described in detail in this embodiment.

[0148] In a possible implementation, the upgrade module 13 is specifically configured to:

[0149] Store the firmware to the storage space;

[0150] Creating an upgrade task, where the upgrade task includes a device identifier, a target power state, a storage address of the firmware, and a first state of the upgrade task, where the first state is used to indicate that the upgrade task is to be executed;

[0151] Upgrade the device firmware according to the upgrade task.

[0152] In a possible implementation, the upgrade module 13 is specifically configured to:

[0153] determining, according to the upgrade task, whether the power state of the operating system is a target power state;

[0154] If the power state of the operating system is the target power state, updating the first state in the upgrade task to a second state, and performing a firmware upgrade on the device according to the updated upgrade task, wherein the second state is used to indicate that the power state of the operating system meets the firmware upgrade condition of the device;

[0155] If the power state of the operating system is not the target power state, wait for a power operation request, and after receiving the power operation request, upgrade the device firmware according to the power operation request. The power operation request is used to request to update the power state of the operating system to the requested power state.

[0156] In a possible implementation, the upgrade module 13 is specifically configured to:

[0157] determining whether the requested power state is the same as the target power state;

[0158] If the requested power state is the same as the target power state, updating the first state in the upgrade task to the second state, and performing a firmware upgrade on the device according to the updated upgrade task;

[0159] If the requested power state is different from the target power state, the firmware of the device is upgraded according to the requested power state and the upgrade task.

[0160] In a possible implementation, the upgrade module 13 is specifically configured to:

[0161] Update the power state of the operating system to the target power state;

[0162] Create a status update task, where the status update task is used to instruct to update the power state to the requested power state;

[0163] The first state in the upgrade task is updated to the second state, and the firmware of the device is upgraded according to the updated upgrade task.

[0164] In a possible implementation, the upgrade module 13 is specifically configured to:

[0165] Obtain the firmware from the storage space according to the storage address of the firmware;

[0166] Perform firmware upgrades on the device according to the firmware.

[0167] In a possible implementation, the upgrade module 13 is specifically configured to:

[0168] Before performing a firmware upgrade on the device according to the firmware, the method further includes:

[0169] Updating the second state in the upgrade task to a third state, where the third state is used to indicate the start of firmware upgrade for the device;

[0170] After performing a firmware upgrade on the device according to the firmware, the method further includes:

[0171] The third state in the upgrade task is updated to a fourth state, where the fourth state is used to indicate that the firmware upgrade of the device has been completed.

[0172] In a possible implementation, the upgrade module 13 is specifically configured to:

[0173] After the device firmware is upgraded, the power state is updated to the requested power state according to the state update task.

[0174] The firmware upgrade device provided in this embodiment can execute the method shown in any of the above method embodiments. Its implementation principles and technical effects are similar, and are not described in detail in this embodiment.

[0175] Figure 7 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 7 As shown, the electronic device 20 provided in this embodiment includes: at least one processor 201 and a memory 202. Optionally, the electronic device 20 further includes a communication component 203. The processor 201, the memory 202 and the communication component 203 are connected via a bus.

[0176] During the specific implementation process, at least one processor 201 executes the computer-executable instructions stored in the memory 202, so that at least one processor 201 executes the firmware upgrade method shown in any of the above method embodiments.

[0177] The specific implementation process of the processor 201 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.

[0178] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the application may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.

[0179] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage.

[0180] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.

[0181] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above-mentioned firmware upgrade method embodiments when running.

[0182] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, 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.

[0183] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned firmware upgrade method embodiments are implemented.

[0184] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned firmware upgrade method embodiments are implemented.

[0185] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0186] The above is a detailed introduction to a firmware upgrade method, electronic device, and storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A firmware upgrade method, characterized in that: Applied to electronic equipment, the method includes: receiving a firmware upgrade request, the firmware upgrade request including a device identifier and firmware, the firmware upgrade request being used to request a firmware upgrade for a device corresponding to the device identifier according to the firmware; Determining a target power state according to the device identifier, the target power state being a power state of the operating system during the firmware upgrade process, and the target power state being an on state or an off state; The firmware of the device is upgraded according to the firmware upgrade request and the target power state.

2. The method according to claim 1, characterized in that The step of performing firmware upgrade on the device according to the firmware upgrade request and the target power state includes: Storing the firmware in a storage space; Creating an upgrade task, the upgrade task including the device identifier, the target power state, the storage address of the firmware, and a first state of the upgrade task, the first state being used to indicate that the upgrade task is to be executed; According to the upgrade task, the firmware of the device is upgraded.

3. The method according to claim 2, characterized in that The step of performing firmware upgrade on the device according to the upgrade task includes: determining, according to the upgrade task, whether the power state of the operating system is the target power state; If the power state of the operating system is the target power state, updating the first state in the upgrade task to a second state, and performing a firmware upgrade on the device according to the updated upgrade task, wherein the second state is used to indicate that the power state of the operating system meets the firmware upgrade condition of the device; If the power state of the operating system is not the target power state, wait for a power operation request, and after receiving the power operation request, upgrade the firmware of the device according to the power operation request, wherein the power operation request is used to request that the power state of the operating system be updated to the requested power state.

4. The method according to claim 3, characterized in that The step of upgrading the firmware of the device according to the power operation request includes: determining whether the requested power state is the same as the target power state; If the requested power state is the same as the target power state, updating the first state in the upgrade task to a second state, and performing a firmware upgrade on the device according to the updated upgrade task; If the requested power state is different from the target power state, the firmware of the device is upgraded according to the requested power state and the upgrade task.

5. The method according to claim 4, characterized in that The performing firmware upgrade on the device according to the requested power state and the upgrade task includes: Updating the power state of the operating system to the target power state; Creating a status update task, wherein the status update task is used to instruct to update the power state to the requested power state; The first state in the upgrade task is updated to a second state, and the firmware of the device is upgraded according to the updated upgrade task.

6. The method according to claim 3, 4 or 5, characterized in that: The performing firmware upgrade on the device according to the updated upgrade task includes: Retrieving the firmware from the storage space according to the storage address of the firmware; The device is upgraded according to the firmware.

7. The method according to claim 6, characterized in that Before performing firmware upgrade on the device according to the firmware, the method further includes: Updating the second state in the upgrade task to a third state, wherein the third state is used to indicate starting to upgrade the firmware of the device; After upgrading the firmware of the device according to the firmware, the method further includes: The third status in the upgrade task is updated to a fourth status, where the fourth status is used to indicate that the firmware upgrade of the device has been completed.

8. The method according to claim 5, characterized in that The method further comprises: After the firmware of the device is upgraded, the power state is updated to the requested power state according to the state update task.

9. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the firmware upgrade method according to any one of claims 1 to 8 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the firmware upgrade method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method for detecting power supply running states during power supply firmware upgrading and related devices

    CN111124095A

  • Power management method and device, firmware updating method and device, equipment, medium and product

    CN112527091A

  • Firmware upgrading method, firmware upgrading system, server and storage medium

    CN116418791A

  • Firmware upgrading method and device, chip, electronic equipment and storage medium

    CN116560689A

  • Firmware upgrading method and device, storage medium, electronic equipment and computer program product

    CN118394388A