CN116938711A - Firmware upgrading method and device, electronic equipment and storage medium - Google Patents
Firmware upgrading method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN116938711A CN116938711A CN202210368773.XA CN202210368773A CN116938711A CN 116938711 A CN116938711 A CN 116938711A CN 202210368773 A CN202210368773 A CN 202210368773A CN 116938711 A CN116938711 A CN 116938711A
- Authority
- CN
- China
- Prior art keywords
- firmware
- target
- upgrade
- version number
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 95
- 238000003860 storage Methods 0.000 title claims abstract description 25
- 230000008569 process Effects 0.000 claims description 37
- 238000012545 processing Methods 0.000 claims description 32
- 238000003062 neural network model Methods 0.000 claims description 29
- 238000001514 detection method Methods 0.000 claims description 27
- 238000012549 training Methods 0.000 claims description 17
- 230000005540 biological transmission Effects 0.000 claims description 14
- 238000013515 script Methods 0.000 claims description 14
- 230000004044 response Effects 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 10
- 238000007726 management method Methods 0.000 description 43
- 230000006870 function Effects 0.000 description 25
- 238000010586 diagram Methods 0.000 description 22
- 230000000977 initiatory effect Effects 0.000 description 10
- 238000002372 labelling Methods 0.000 description 8
- 238000013528 artificial neural network Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 6
- 230000002452 interceptive effect Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 230000007246 mechanism Effects 0.000 description 3
- 230000001960 triggered effect Effects 0.000 description 3
- 238000012795 verification Methods 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 238000009434 installation Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 238000005481 NMR spectroscopy Methods 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000004140 cleaning Methods 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
- 230000002441 reversible effect Effects 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
- H04L41/082—Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses a firmware upgrading method, a device, electronic equipment and a storage medium, comprising the following steps: acquiring a firmware upgrading request; obtaining firmware configuration information of each target firmware, wherein the firmware configuration information comprises upgrade mode configuration information; classifying the firmware identifications of a plurality of target firmware according to the upgrade mode configuration information of each target firmware, determining a first firmware identification set corresponding to the in-band upgrade mode and determining a second firmware identification set corresponding to the out-of-band upgrade mode; determining a first upgrade file according to the first firmware identification set, and determining a second upgrade file according to the second firmware identification set; transmitting the first upgrade file to the target device through the in-band channel, and transmitting the second upgrade file to the target device through the out-of-band channel, so that the target device upgrades a plurality of target firmware according to the first upgrade file and the second upgrade file; according to the scheme, a plurality of firmware can be upgraded at one time, and firmware upgrading efficiency is improved.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a firmware upgrade method, apparatus, electronic device, and storage medium.
Background
The server includes a plurality of hardware, in which firmware is written to afford the most basic, bottom-most work in the hardware. In a scene of a server operation scene, the occupation of firmware commonality problems is high, and the firmware commonality problems can cause a series of unexpected situations of hardware to seriously influence the stable operation of the server. In practice, firmware needs to be upgraded in order to repair bugs or add functional features. In the related art, an upgrade process is generally initiated for one firmware at a time, so that one firmware is upgraded at a time, and under the condition of operating a mass server, more firmware to be upgraded may exist, so that the time required for upgrading a plurality of firmware is longer and the upgrade efficiency of the firmware is lower due to the initiation of the upgrade process of one firmware at a time.
Disclosure of Invention
In view of the above, embodiments of the present application provide a firmware upgrade method, apparatus, electronic device, and storage medium, so as to improve the above problem.
According to an aspect of an embodiment of the present application, there is provided a firmware upgrade method, including: acquiring a firmware upgrading request, wherein the firmware upgrading request comprises firmware identifiers of a plurality of target firmware to be upgraded in target equipment and target version numbers corresponding to the target firmware; the method comprises the steps that firmware configuration information of each target firmware is obtained, the firmware configuration information comprises upgrade mode configuration information, the upgrade mode configuration information is used for indicating an upgrade mode of the corresponding firmware, and the upgrade modes comprise an in-band upgrade mode and an out-of-band upgrade mode; classifying the firmware identifications of the plurality of target firmware according to the upgrade mode configuration information of each target firmware, determining a first firmware identification set corresponding to an in-band upgrade mode and determining a second firmware identification set corresponding to an out-of-band upgrade mode; determining a first upgrade file according to the first firmware identification set, and determining a second upgrade file according to the second firmware identification set; the first upgrade file comprises a firmware upgrade package of each firmware identifier in the first firmware identifier set under a corresponding target version number; the second upgrade file comprises a firmware upgrade package of each firmware identifier in the second firmware identifier set under a corresponding target upgrade version; transmitting the first upgrade file to the target device through an in-band channel, and transmitting the second upgrade file to the target device through an out-of-band channel, so that the target device can upgrade the plurality of target firmware in parallel according to the first upgrade file and the second upgrade file.
According to an aspect of an embodiment of the present application, there is provided a firmware upgrade apparatus including: the first obtaining module is used for obtaining a firmware upgrading request, wherein the firmware upgrading request comprises firmware identifiers of a plurality of target firmware to be upgraded in target equipment and target version numbers corresponding to the target firmware; the second obtaining module is used for obtaining firmware configuration information of each target firmware, wherein the firmware configuration information comprises upgrade mode configuration information, the upgrade mode configuration information is used for indicating an upgrade mode of the corresponding firmware, and the upgrade modes comprise an in-band upgrade mode and an out-of-band upgrade mode; the classification module is used for classifying the firmware identifications of the plurality of target firmware according to the upgrade mode configuration information of each target firmware, determining a first firmware identification set corresponding to an in-band upgrade mode and determining a second firmware identification set corresponding to an out-of-band upgrade mode; the upgrade file determining module is used for determining a first upgrade file according to the first firmware identification set and determining a second upgrade file according to the second firmware identification set; the first upgrade file comprises a firmware upgrade package of each firmware identifier in the first firmware identifier set under a corresponding target version number; the second upgrade file comprises a firmware upgrade package of each firmware identifier in the second firmware identifier set under a corresponding target upgrade version; and the transmission module is used for transmitting the first upgrading file to the target equipment through an in-band channel and transmitting the second upgrading file to the target equipment through an out-of-band channel, so that the target equipment can upgrade the plurality of target firmware in parallel according to the first upgrading file and the second upgrading file.
In some embodiments, the firmware upgrade apparatus further comprises: a third acquisition module, configured to acquire alarm configuration information of the target device; the alarm configuration information indicates an alarm strategy corresponding to firmware in the target equipment; a fourth obtaining module, configured to obtain alarm policies corresponding to the plurality of target firmware from the alarm configuration information; the first sending module is used for sending the alarm strategies corresponding to the plurality of target firmware to the target equipment so that the target equipment shields alarm information according to the alarm strategies in the process of upgrading the plurality of target firmware; and the alarm release module is used for sending an alarm release instruction to the target equipment after the plurality of target firmware upgrades are successful, so that the target equipment responds to the alarm release instruction to release the alarm shielding.
In some embodiments, the firmware upgrade apparatus further comprises: the second sending module is used for sending a pre-detection instruction to the target equipment; the receiving module is used for receiving equipment state information returned by the target equipment in response to the pre-detection instruction, wherein the equipment state information comprises equipment running state information; and the restoration module is used for controlling the target equipment to perform state restoration according to the equipment operation state information after the plurality of target firmware in the target equipment are successfully upgraded.
In some embodiments, the device state information further includes first firmware version information for each of the target firmware; the first firmware version information indicates a first version number of the corresponding target firmware; firmware upgrading device, still include: the first determining module is used for determining first target firmware in the plurality of target firmware according to the first version number corresponding to each target firmware and the corresponding target version number, wherein the first target firmware refers to target firmware with the same corresponding first version number as the corresponding target version number; a removal module for removing the firmware identification of the first target firmware from the first set of firmware identifications and the second set of firmware identifications.
In some embodiments, the determining the first upgrade file according to the first set of firmware identifications includes: for each firmware identifier in the first firmware identifier set, according to the firmware identifier, a first version number corresponding to the firmware identifier and a target version number corresponding to the firmware identifier, inquiring a target differential upgrade package corresponding to the firmware identifier in a first database, wherein the target differential upgrade package is a differential upgrade package of the total upgrade package of the corresponding target firmware under the target version number relative to the total upgrade package of the first version number; if the target differential upgrade package corresponding to the firmware identification is queried, taking the queried target differential upgrade package as a firmware upgrade package of the target firmware indicated by the firmware identification; if the target differential upgrade package corresponding to the firmware identification is not queried, acquiring a full upgrade package of the target firmware indicated by the firmware identification under the target version number in a second database, and taking the acquired full upgrade package as a firmware upgrade package of the corresponding target firmware; and merging the firmware upgrade packages corresponding to all the firmware identifications in the first firmware identification set to obtain the first upgrade file.
In some embodiments, the firmware upgrade apparatus further comprises: the acquisition module is used for acquiring second firmware version information of each target firmware after the plurality of target firmware is updated according to the update progress indication of the plurality of target firmware; and the upgrade success determining module is used for determining that the plurality of target firmware upgrades are successful if the firmware version numbers indicated by the second firmware version information are the same as the target firmware version numbers of the corresponding target firmware.
In some embodiments, the firmware configuration information further includes restart configuration information, where the restart configuration information is used to indicate whether a restart is required after the corresponding firmware is upgraded; the restart configuration information corresponding to at least one target firmware in the plurality of target firmware indicates that the firmware needs to be restarted after being updated; firmware upgrading device, still include: the restarting control module is used for controlling the target equipment to restart; the acquisition module is further configured to: after the target equipment is restarted successfully, an information acquisition instruction is sent to the target equipment; and receiving second firmware version information of each target firmware returned by the target equipment in response to the information acquisition instruction.
In some embodiments, the target version number corresponding to the target firmware is specified by a user in a version number list corresponding to the target firmware. The firmware upgrade apparatus further includes: a fifth obtaining module, configured to obtain running state information of a component where the target firmware is located under each version number; the portrait generation module is used for generating a firmware operation portrait of the target firmware under each version number according to the operation state information of the component of the target firmware under each version number; the first prediction module is used for predicting the performance level of the target firmware according to the firmware running portraits of the target firmware under each version number by the target neural network model and outputting the performance level of the target firmware under each version number; and the arrangement order determining module is used for determining the arrangement order of the plurality of version numbers in the version number list corresponding to the target firmware according to the performance grades respectively corresponding to the target firmware under the plurality of version numbers.
In some embodiments, the firmware upgrade apparatus further comprises: a sixth obtaining module, configured to obtain a plurality of training samples, where the training samples include firmware running portraits of firmware under a plurality of version numbers, and labeling performance levels of firmware under each version number; the second prediction module is used for predicting the performance level of the firmware according to the firmware running portraits of the firmware under each version number by the target neural network model to obtain the predicted performance level of the firmware under each version number; the model loss calculation module is used for calculating to obtain model loss according to the predicted performance grade of the firmware under each version number and the marked performance grade of the firmware under the corresponding version number; and the adjusting module is used for reversely adjusting the parameters of the target neural network model according to the model loss until reaching the training ending condition.
In some embodiments, the first upgrade file or the second upgrade file further comprises a fault detection script; in this embodiment, the firmware upgrade apparatus further includes: the fault information receiving module is used for receiving fault information returned by the target equipment, and performing fault detection in the target equipment through the fault detection script in the process of upgrading the plurality of target firmware to obtain the fault information; the second determining module is used for determining a target fault processing strategy corresponding to the fault indicated by the fault information; a fault processing module for processing the fault indicated by the fault information according to the target fault processing strategy
According to an aspect of an embodiment of the present application, there is provided an electronic apparatus including: a processor; and a memory having stored thereon computer readable instructions which, when executed by the processor, implement a firmware upgrade method as described above.
According to an aspect of an embodiment of the present application, there is provided a computer-readable storage medium having stored thereon computer-readable instructions which, when executed by a processor, implement a firmware upgrade method as described above.
According to an aspect of an embodiment of the present application, there is provided a computer program product comprising computer instructions which, when executed by a processor, implement a firmware upgrade method as described above.
In the application, a firmware upgrading request can be initiated for a plurality of firmware, a plurality of target firmware of the same target device in the firmware upgrading request are integrated according to upgrading mode configuration information corresponding to the target firmware, and a first firmware identification set corresponding to an in-band upgrading mode and a second firmware identification set corresponding to an out-of-band upgrading mode are obtained; because the transmission channels in different upgrading modes are different, the firmware upgrading packages corresponding to the firmware in the same upgrading mode are integrated to obtain a first upgrading file and a second upgrading file, the first upgrading file is sent to the target equipment through the in-band channel corresponding to the out-of-band upgrading mode, and the second upgrading file is sent to the target equipment through the out-of-band channel corresponding to the in-band upgrading mode, so that the target equipment can upgrade a plurality of target firmware in parallel according to the first upgrading file and the second upgrading file. Therefore, the method and the device realize that the upgrading process is initiated for a plurality of firmware at one time, and the firmware upgrading packages of the plurality of firmware are transmitted in parallel, so that the plurality of firmware in the same equipment can be upgraded in parallel, and the time required by upgrading the firmware can be greatly shortened and the firmware upgrading efficiency is improved under the scene of maintaining mass firmware.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application. It is evident that the drawings in the following description are only some embodiments of the present application and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is a schematic diagram of a firmware upgrade management system according to an embodiment of the present application.
FIG. 2 is a flow chart illustrating a method of firmware upgrade according to an embodiment of the present application.
FIG. 3A is a schematic diagram of a firmware configuration page, according to an embodiment of the application.
FIG. 3B is a diagram illustrating a firmware query page according to one embodiment of the application.
FIG. 3C is a schematic diagram of an upgrade initiation page, according to one embodiment of the present application.
Fig. 4 is a schematic diagram of a firmware information configuration page according to an embodiment of the present application.
FIG. 5 is a flowchart illustrating steps subsequent to step 210, according to one embodiment of the application.
FIG. 6 is a flow chart illustrating a firmware upgrade according to an embodiment of the present application.
FIG. 7 is a flow chart illustrating a firmware upgrade according to another specific embodiment of the present application.
FIG. 8 is a flow chart illustrating determining a first upgrade file from the first set of firmware identifications according to an embodiment of the present application.
FIG. 9 is a schematic diagram of a fault configuration page, according to one embodiment of the application.
Fig. 10 is a flowchart illustrating a firmware upgrade method according to another embodiment of the present application.
Fig. 11 is a block diagram illustrating a firmware upgrade apparatus according to an embodiment of the present application.
Fig. 12 shows a schematic diagram of a computer system suitable for use in implementing an embodiment of the application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
It should be noted that: references herein to "a plurality" means two or more. "and/or" describes an association relationship of an association object, meaning that there may be three relationships, e.g., a and/or B may represent: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Before the detailed description, the terms related to the present application are explained as follows:
firmware (firmware, FM): program code written in flash memory or EROM (Eraseable Read Only Memory, erasable read-only memory), EPROM (Erasable Programmable Read Only Memory, programmable read-only memory) in an asic or a plc, i.e. "cured software"; it is the program code that solidifies inside the integrated circuit, responsible for controlling and coordinating the functions of the integrated circuit, functioning as the most basic, bottommost operating software in one device (or component in a device).
Firmware upgrade: also called firmware refreshing, refers to the process of writing new firmware into a chip to replace the original firmware. Some bug is typically repaired or added to the functionality by upgrading the firmware.
Out-of-band channel: refers to a transmission channel in an out-of-band (out-of-band) management mode. In the out-of-band management mode, the management control information of the network and the bearer service information of the user network are transmitted in different logical channels. The out-of-band management mode is a management mode based on hardware, a special hardware module or a special remote management card is used for providing a management interface, remote maintenance and management are carried out on equipment through a special data channel, the out-of-band management mode is completely independent of an operating system of the equipment, and even remote supervision and management can be carried out in an equipment shutdown state; currently, most servers provide an out-of-band management interface, and some network devices also provide an out-of-band management interface.
In-band passage: refers to a transmission channel in an in-band (in-band) management mode. In the in-band management mode, the management control information of the network and the bearing service information of the user network are transmitted through the same logic channel, and the managed equipment can be managed only when being in a starting state and entering the operating system. In-band management is relatively low in cost compared to out-of-band management, but in-band management modes in a computer network cannot contact firmware, cannot reinstall an operating system remotely, and cannot fix the problem of system booting.
PXE (Pre-boot Execution Environment ): it works in Client/Server network mode, supporting workstations to download images from remote servers over the network and thus supporting the booting of operating systems over the network, which provides a mechanism for booting a computer using a network interface. The principle of PXE startup is that when a computer is booted, BIOS calls the PXE Client into memory for execution, and then the PXE Client downloads the remotely placed file to local operation through a network to start the local operating system.
FIG. 1 is a schematic diagram of a firmware upgrade management system according to an embodiment of the present application. As shown in fig. 1, the firmware upgrade management system includes a firmware upgrade platform 110 and first devices 120, the first devices 120 are communicatively connected to the firmware upgrade platform 110 through a wired or wireless network, one or a component (hardware) of the first devices is written with firmware, and the firmware upgrade platform 110 may manage the firmware in each first device 120, for example, automatically upgrade the firmware in the first devices 120, etc.
The first device may be any device that may be written with firmware, such as a server, a vehicle-mounted device, a vehicle, an internet of things device, a smart home device, an experimental device, a terminal device (e.g., a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart interactive terminal, a voice interactive terminal), a medical device (e.g., a nuclear magnetic resonance apparatus), a numerical control processing device, and so on.
The firmware upgrade platform 110 includes an upgrade management terminal 111 and an upgrade management server 112, wherein the upgrade management terminal 111 may be a device that may interact with a user, such as a smart phone, a tablet computer, a notebook computer, and the like. The user may designate firmware to be upgraded in one or more devices through the interactive interface of the upgrade management terminal 111, further designate a target version number to which the firmware is to be upgraded, and generate a firmware upgrade request according to the firmware identifier of the designated firmware and the target version number designated for each firmware. Further, the user may configure basic attribute information of each firmware through the interactive interface of the upgrade management terminal 111, for example, an upgrade mode of the firmware, whether the firmware needs to be restarted after being upgraded, and so on, to obtain firmware configuration information corresponding to the firmware, and send the firmware configuration information to the upgrade management server 112 for storage.
The upgrade management server 112 may integrate firmware upgrade tools of various firmware and obtain latest version information of each firmware, and may store firmware information of each firmware, such as a firmware upgrade package of each firmware under each version number, a model of the firmware, a component type and a component model of a component where the firmware is located, and the like. After receiving the firmware upgrade request sent by the upgrade management terminal 111, the upgrade management server 112 sends a corresponding upgrade file (for example, a first upgrade file, a second upgrade file, etc. hereinafter) to the first device where the firmware is located, so that the first device 120 upgrades the firmware according to the corresponding upgrade file.
The upgrade management server 112 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content delivery networks), basic cloud computing services such as big data and artificial intelligence platforms, and the like. The upgrade management server 112 may be used to perform the method of the present application.
The implementation details of the technical scheme of the embodiment of the application are described in detail below:
fig. 2 is a flowchart illustrating a method of firmware upgrade that may be performed by an electronic device with processing capabilities, such as a server, etc., according to one embodiment of the present application, and is not specifically limited herein. Referring to fig. 2, the method at least includes steps 210 to 240, which are described in detail as follows:
step 210, obtaining a firmware upgrade request, where the firmware upgrade request includes firmware identifiers of a plurality of target firmware to be upgraded in the target device and target version numbers corresponding to the target firmware.
The firmware upgrade request is used for requesting to upgrade the firmware, and in the present application, the firmware upgrade request may be used for requesting to upgrade a plurality of firmware in the same device, or may be used for requesting to upgrade one or more firmware in a plurality of devices. Of course, in other application scenarios, the firmware upgrade request may also be used to request an upgrade to a firmware in a device.
In the present application, the firmware requested to be upgraded by the firmware upgrade request is referred to as target firmware. As described above, firmware is software that assumes the most basic, bottommost work in a device or component. Different devices or functions of different components in the devices are different, so that the components in the different components in the devices are also different, and in practice, firmware classification can be performed according to the component types corresponding to the components (also may be referred to as hardware) where the firmware is located. Component types such as SSD (Solid State Disk), BMC (Baseboard Manager Controller, baseboard management controller), disk (NIC (network interface controller, network interface controller), HBA (Host Bus Adapter), RAID (Redundant Arrays of Independent Disks, disk array), BIOS (Basic Input Output System, basic input and output system), CPLD (Complex Programming logic device, complex programmable logic device), and the like.
It is understood that in the present application, the plurality of target firmware are different firmware. In an actual application scenario, a firmware may run in one or more devices, so, to ensure accuracy of firmware upgrade, a firmware upgrade request indicates a device where the firmware that requests the upgrade is located, i.e., a target device. The firmware upgrade request may include a device identifier of the target device, such as a device serial number, a MAC address of the device, an IP address of the device, etc., which are not specifically limited herein.
The target version number refers to the version number to which the target firmware is requested to be upgraded. It will be appreciated that the target version number for a target firmware corresponds differently for different target firmware. The firmware identifier is used for uniquely identifying the firmware, and the firmware identifier can be a firmware model number, a firmware serial number and the like
In some embodiments, the firmware upgrade request may be initiated by a user through a terminal (e.g., upgrade management terminal 111 in fig. 1), which may display an interactive interface in which an entry for selecting a firmware and an entry for selecting a device are provided, so that the user may select, as needed, a firmware to be upgraded from one or more devices, and the selected firmware is the target firmware.
Fig. 3A is a schematic diagram of a firmware configuration page according to an embodiment of the application, as shown in fig. 3A, where the first display area 301 provides a plurality of configurable content items of firmware, for example, the configurable content items include a server vendor, a vendor model, an internal model, a server version number, a component type, a component model, a subsystem ID (subsystem identification), a device ID (device identification), whether to activate (if yes, configuration content for firmware is currently validated, otherwise, if no, configuration content for firmware is not validated), and so on. The second information display area 302 in fig. 3A is used to display specific information corresponding to each content item set for firmware. After that, if other firmware needs to be configured, the "add" control 303 is triggered, and basic information configuration can be continuously performed on other firmware in a similar manner.
In some embodiments, the number of firmware maintained in the firmware upgrade platform may be greater, so as to facilitate rapid firmware assignment by the user, and a firmware inquiry function may be provided, so that the user may quickly find the information of the firmware to be upgraded in the device. FIG. 3B is a diagram of a firmware query page according to an embodiment of the present application, where a user may perform a firmware query by combining a server payroll option and selecting a component type of a component in which firmware is located, as shown in FIG. 3B. The user may select the component type to which the component in which the firmware belongs from the component type selection list 311. It should be noted that only part of the component types in the server are shown in the component type selection list 311 by way of example, and in other application scenarios, other component types may also be provided for the user to select due to different functions of the device.
As described above, the user may also specify a target version number to which the firmware is to be upgraded according to actual needs. Fig. 3C is a schematic diagram of an upgrade initiation page according to another embodiment of the present application, and as shown in fig. 3C, the upgrade initiation page may display various information of the firmware (such as a component type, a component model number, a component number, a current firmware version number, a bom reference version number (refer to a latest version number currently available for firmware), a suggested target version number, a collection time, etc.) that is specified to be upgraded. When the user needs to customize and specify the version number to be upgraded, a 'please select' control in a column of the target version can be triggered, and then a version number list corresponding to the firmware can be displayed, wherein the version number list comprises version numbers which can be selected by the firmware, so that the purpose of customizing and specifying the target version number to which the firmware needs to be upgraded is achieved. Wherein the proposed version number for each firmware may be determined based on historical operating states of the firmware at a plurality of version numbers.
Step 220, obtaining firmware configuration information of each target firmware, wherein the firmware configuration information comprises upgrade mode configuration information, the upgrade mode configuration information is used for indicating an upgrade mode of the corresponding firmware, and the upgrade modes comprise an in-band upgrade mode and an out-of-band upgrade mode.
The firmware configuration information is obtained by configuring information of the firmware by a user, and the firmware configuration information can include basic attribute information of the firmware, such as upgrade mode configuration information, and the like, and can also include other information.
The user can set the basic attribute information of the firmware in the firmware information configuration page so as to realize the configuration of the firmware information of the firmware and obtain the firmware configuration information. Fig. 4 is a schematic diagram of a firmware information configuration page according to an embodiment of the present application. As shown in fig. 4, the firmware information configuration page may configure information such as an upgrade mode of the firmware, whether the firmware is upgradeable online, whether the firmware must be restarted, an original version, a target version, an upgrade file, whether a PXE environment is needed, a component model of a component where the firmware is located, a component type of a component where the firmware is located, a component model of a component where the firmware is located, device information (e.g., a device identifier) of a device where the firmware is located, and the like. It is worth mentioning that the configurable content items shown in fig. 4 for firmware are merely exemplary examples, and that in other application scenarios more or fewer configurable content items may be provided for different firmware.
After the information configuration of the firmware is completed, the firmware identification of the firmware and the firmware configuration information of the firmware are associated and stored in a firmware configuration information database. Therefore, after receiving the firmware upgrading request, the firmware upgrading request can be queried in the firmware configuration information database according to the firmware identification of the target firmware so as to obtain the firmware configuration information of the target firmware.
Under different upgrading modes, the transmission channels of the firmware upgrading packets of the firmware are different. In an in-band upgrading mode, a firmware upgrading packet of the firmware is transmitted through an in-band channel; and in the out-of-band upgrading mode, transmitting a firmware upgrading packet of the firmware through the out-of-band channel.
As described above, firmware is written into a component, and there is a difference in interfaces provided by different components, a part of the components only provide an out-of-band interface, a part of the components only provide an in-band interface, and firmware in the components providing the out-of-band interface can only be upgraded by an out-of-band upgrade, and firmware in the components providing the in-band interface can only be upgraded by an in-band upgrade. In the scheme, the upgrading mode corresponding to the firmware is preset, so that the firmware identifiers corresponding to the plurality of target firmware to be upgraded are integrated according to the upgrading mode based on the upgrading mode indicated by the upgrading mode configuration information corresponding to the firmware.
Step 230, classifying the firmware identifiers of the plurality of target firmware according to the upgrade mode configuration information of each target firmware, determining a first firmware identifier set corresponding to the in-band upgrade mode and determining a second firmware identifier set corresponding to the out-of-band upgrade mode.
The first firmware identification set refers to a set formed by firmware identifications corresponding to target firmware of which the upgrading mode indicated by the corresponding upgrading mode configuration information is an in-band upgrading mode.
The second firmware identification set refers to a set formed by firmware identifications corresponding to target firmware of which the upgrade mode indicated by the corresponding upgrade mode configuration information is an out-of-band upgrade mode.
Step 240, determining a first upgrade file according to the first firmware identification set, and determining a second upgrade file according to the second firmware identification set; the first upgrade file comprises a firmware upgrade package of each firmware identifier in the first firmware identifier set under the corresponding target version number; the second upgrade file includes a firmware upgrade package for each firmware identifier in the second set of firmware identifiers under the corresponding target upgrade version.
Specifically, according to each firmware identifier and the corresponding target version number in the first firmware identifier set, a firmware upgrade package of the target firmware indicated by each firmware identifier under the corresponding target version number is obtained, and then the firmware upgrade packages of all the firmware identifiers in the first firmware identifier combination under the corresponding target version number are combined to obtain a first upgrade file.
And similarly, according to each firmware identifier and the corresponding target version number in the second firmware identifier set, obtaining a firmware upgrade package of the target firmware indicated by each firmware identifier under the corresponding target version number, and then merging the firmware upgrade packages of all the firmware identifiers in the second firmware identifier combination under the corresponding target version number to obtain a second upgrade file.
The firmware upgrade package is used for providing program codes of the target firmware under the target version number. In a specific embodiment, the firmware upgrade package may be a full upgrade package of the target firmware in the target version number, or may be a differential upgrade package of the target firmware in the target version number relative to the target firmware in the target device under the current version number.
In some embodiments, the first upgrade file and the second upgrade file further include an upgrade script, where a command for upgrading the corresponding firmware may be written in the upgrade script, and of course, if the firmware is different, the upgrade commands of the corresponding firmware also have a difference. Furthermore, the upgrade script can also be used for carrying out upgrade progress feedback, upgrade result feedback, cleaning temporary files of the upgrade files and the like.
Step 250, transmitting the first upgrade file to the target device through the in-band channel, and transmitting the second upgrade file to the target device through the out-of-band channel, so that the target device upgrades the plurality of target firmware in parallel according to the first upgrade file and the second upgrade file.
Specifically, the first upgrade file and the second upgrade file may be transmitted in parallel, and the transmission time of the first upgrade file and the second upgrade file may be shortened due to the transmission of different transmission channels.
In some implementations, after receiving the first upgrade file and the second upgrade file, the target device determines program codes of each target firmware under the corresponding target version numbers according to firmware upgrade packages in the first upgrade file and the second upgrade file, and then, executes upgrade scripts in the first upgrade file and the second upgrade file to call corresponding upgrade commands to refresh the target firmware.
In some implementations, after receiving the first upgrade file and the second upgrade file, the target device may upgrade the plurality of target firmware in parallel, thereby shortening a duration of upgrading the plurality of target firmware and improving firmware upgrade efficiency.
In the application, a firmware upgrading request can be initiated for a plurality of firmware, a plurality of target firmware of the same target device in the firmware upgrading request are integrated according to upgrading mode configuration information corresponding to the target firmware, and a first firmware identification set corresponding to an in-band upgrading mode and a second firmware identification set corresponding to an out-of-band upgrading mode are obtained; because the transmission channels in different upgrading modes are different, the firmware upgrading packages corresponding to the firmware in the same upgrading mode are integrated to obtain a first upgrading file and a second upgrading file, the first upgrading file is sent to the target equipment through the in-band channel corresponding to the out-of-band upgrading mode, and the second upgrading file is sent to the target equipment through the out-of-band channel corresponding to the in-band upgrading mode, so that the target equipment can upgrade a plurality of target firmware in parallel according to the first upgrading file and the second upgrading file. Therefore, the method and the device realize that the upgrading process is initiated for a plurality of firmware at one time, and the firmware upgrading packages of the plurality of firmware are transmitted in parallel, so that the plurality of firmware in the same equipment can be upgraded in parallel, and the time required by upgrading the firmware can be greatly shortened and the firmware upgrading efficiency is improved under the scene of maintaining mass firmware.
In some embodiments, as shown in fig. 5, after step 210, the method further comprises:
step 510, obtaining alarm configuration information of a target device; the alarm configuration information indicates an alarm policy corresponding to firmware in the target device.
The alert policy may be used to indicate alert information that each firmware in the target device needs to mask during the upgrade process. The alarm information indicated by the alarm policy to be masked may be the same or different for different firmware. Because of the differences in functions and purposes of the devices, the alarm policies corresponding to the same firmware in different devices may also be different.
In some embodiments, a user may obtain alarm configuration information of the device by customizing an alarm policy corresponding to firmware in the device, and store the alarm configuration information in association with a device identifier of the device. Thus, in step 510, alert configuration information for the target device may be queried based on the device identification of the target device.
Step 520, obtaining alarm policies corresponding to the plurality of target firmware from the alarm configuration information.
In the alarm configuration information of a device, an alarm policy is associated with a firmware identifier corresponding to firmware. Therefore, according to the firmware identification corresponding to the target firmware, the alarm strategy corresponding to the target firmware is obtained from the alarm configuration information. The alarm policies corresponding to different target firmware may be the same or different.
And step 530, sending the alarm policies corresponding to the plurality of target firmware to the target device, so that the target device shields the alarm information according to the alarm policies in the process of upgrading the plurality of target firmware.
After receiving the alarm policies respectively corresponding to the plurality of target firmware, the target equipment shields the alarm information according to the alarm policies, namely if the alarm information indicated in the alarm policies is generated in the target equipment, the reporting of the alarm information is not performed.
Step 540, after the plurality of target firmware upgrades are successful, an alarm release instruction is sent to the target device, so that the target device responds to the alarm release instruction to release the alarm shielding.
After receiving the alarm release instruction, the target device can delete the alarm strategy received before and release the alarm shielding, so that the alarm information can be reported normally.
In the process of upgrading firmware, the hardware in the trigger device is involved to operate, the alarm mechanism in the device may be triggered in the process to generate alarm information, and the hardware operation in the trigger device is a normal phenomenon in the upgrading process, that is, the alarm information generated by triggering the alarm mechanism is not because the device is abnormal at present, if the alarm information is reported at the moment, the alarm information may be caused to be unprocessed. Therefore, the alarm information is shielded according to the corresponding alarm strategy in the firmware upgrading process, so that unnecessary alarm information is prevented from being reported in the firmware upgrading process. After the firmware upgrades in the target equipment are successful, an alarm release instruction is sent to the target equipment, so that the target equipment can report alarm information normally after the alarm shielding is released.
In some embodiments, prior to step 250, the method further comprises: sending a pre-detection instruction to target equipment; receiving equipment state information returned by the target equipment in response to the pre-detection instruction, wherein the equipment state information comprises equipment running state information; and after the plurality of target firmware in the target equipment is successfully upgraded, controlling the target equipment to perform state restoration according to the equipment operation state information.
The device state information is used for describing the current state of the target device. The device operation state information is used to describe the current operation state of the target device, such as the network on state of the target device, the processes started in the target device, whether ping is possible, etc.
Before upgrading the target firmware in the target equipment, pre-checking the target equipment, and after determining that a plurality of target firmware in the target equipment is successfully upgraded, restoring the running state of the target equipment according to the equipment running state information of the target equipment obtained by the pre-checking, thereby ensuring that the running state of the target equipment is consistent before and after the upgrading of the target firmware is completed; and the user is not required to manually restore the running state of the target equipment after the user finishes upgrading again.
In some embodiments, after sending the pre-detection instruction to the target device, the target device may further be instructed to cache the obtained device running state information locally in the target device, so that after the plurality of firmware in the target device are upgraded successfully, the target device is controlled to restore the running state according to the device running state information in the cache.
In some embodiments, the device state information further includes first firmware version information for each target firmware; the first firmware version information indicates a first version number of the corresponding target firmware; prior to step 250, the method further comprises: determining a first target firmware in a plurality of target firmware according to the first version number corresponding to each target firmware and the corresponding target version number, wherein the first target firmware refers to target firmware with the same corresponding first version number as the corresponding target version number; the firmware identification of the first target firmware is removed from the first set of firmware identifications and the second set of firmware identifications.
That is, the target device responds to the pre-detection instruction and further collects the current firmware version information of the firmware in the target device. In the present application, for convenience of distinction, firmware version information of firmware collected by a target device in response to a pre-detection instruction is referred to as first firmware version information, and a version number indicated by the first firmware version information is referred to as a first version number, and it can be understood that the first version number is a version number of a corresponding target firmware before upgrading.
In some embodiments, the target device may be a device that gathers the current first firmware version information of all firmware in the target device. In other embodiments, the pre-detection instruction may include firmware identifiers of a plurality of target firmware, so that only first firmware version information of a plurality of target firmware to be upgraded is acquired in a targeted manner in the process of acquiring firmware information, and firmware version information of other firmware is not required to be acquired, so that acquisition time is shortened.
In this embodiment, before upgrading the target firmware in the target device, the latest first firmware version information of each target firmware is collected, if the first version number indicated by the first firmware version information of a target firmware is the same as the target version number corresponding to the target firmware, it indicates that the target firmware does not need to be repeatedly upgraded to the corresponding target version number, and the firmware identifier of the target firmware is removed from the first firmware identifier set and the second firmware identifier set, so that the firmware upgrade package corresponding to the first target firmware is not included in the first upgrade file and the second upgrade file that are generated subsequently, thereby avoiding invalid transmission of the firmware upgrade package and avoiding repeated upgrade of the first target firmware.
In some embodiments, before controlling the target device to perform state restoration according to the device operation state information, the method further includes: if the upgrading progress of the plurality of target firmware is indicated to be finished, acquiring second firmware version information of each target firmware; and if the firmware version numbers indicated by the second firmware version information are the same as the target firmware version numbers of the corresponding target firmware, determining that the plurality of target firmware upgrades are successful.
In the application, the first upgrade file and the second upgrade file also comprise a first script for feeding back the upgrade progress of the firmware, and the first script real-time firmware upgrade platform running in the target firmware feeds back the upgrade progress of each target firmware in the process of upgrading the target firmware by the target equipment so as to determine whether each target firmware is upgraded according to the upgrade progress of each target firmware. After the plurality of target firmware is upgraded, if the firmware version numbers indicated by the second firmware version information corresponding to all the target firmware in the target device are the same as the corresponding target firmware version numbers, the method indicates that all the target firmware in the target device is upgraded successfully.
Otherwise, if the target firmware with the firmware version number indicated by the corresponding second firmware version information and the corresponding target firmware version number different from each other exists in the target device, it indicates that there is a target firmware with upgrade failure, and further processing needs to be performed on the target firmware with upgrade failure, for example, upgrade again, and the like, and upgrade failure prompt is performed on the target firmware with upgrade failure.
In some embodiments, the firmware configuration information further includes restart configuration information, where the restart configuration information is used to indicate whether the corresponding firmware needs to be restarted after being upgraded; the restart configuration information corresponding to at least one target firmware in the plurality of target firmware indicates that the firmware needs to be restarted after being upgraded; before collecting the second firmware version information of each target firmware, the method further comprises: the target equipment is controlled to restart; in this embodiment, collecting second firmware version information of each target firmware includes: after the target equipment is restarted successfully, an information acquisition instruction is sent to the target equipment; and receiving second firmware version information of each target firmware returned by the target equipment in response to the information acquisition instruction.
Because some firmware needs to be restarted and then takes effect, if at least one piece of restart configuration information corresponding to the target firmware exists in the plurality of target firmware to indicate that the firmware needs to be restarted after being upgraded, the target equipment is controlled to restart before the second firmware version information of the target firmware is acquired, and the second firmware version information of each piece of target firmware in the target equipment is acquired after the target equipment is restarted, so that the situation that the acquired second firmware version information cannot accurately reflect the version number of the target firmware after being upgraded due to the fact that the target equipment is not restarted is avoided, and the upgrading result of the target firmware is misjudged.
FIG. 6 is a flow chart of a firmware upgrade method that may be applied to the firmware upgrade platform of FIG. 1, according to an embodiment of the present application. As shown in fig. 6, includes:
step 610, a firmware upgrade request is initiated. The firmware upgrade request may be initiated by the user through the upgrade management terminal 111 or by an application call in another device. The firmware upgrade request indicates a plurality of target firmware to be upgraded in the target device, such as firmware A1, a2.
Step 620, pre-inspection. That is, the upgrade management server 112 in the firmware upgrade platform sends a pre-check instruction to the target device to which the firmware upgrade request refers, where the content of the pre-check includes current device state information of the target device (e.g., device running state, current first version number of each target firmware in the target device, etc.).
Step 630, channel selection. In this step, the upgrade management server 112 acquires firmware configuration information of each target firmware indicated by the firmware upgrade request, and divides the firmware identifications of the plurality of target firmware to be upgraded indicated by the firmware upgrade request into a first firmware identification set corresponding to the in-band upgrade mode and a second firmware identification set determined to correspond to the out-of-band upgrade mode according to the upgrade mode configuration information in the firmware configuration information.
Step 641, send over in-band channel. The upgrade management server 112 combines the firmware upgrade packages of all the firmware identifiers in the first firmware identifier set under the target version number to obtain a first upgrade file, and sends the first upgrade file to the target device through the in-band channel.
Step 642, send via an out-of-band channel. The upgrade management server 112 combines the firmware upgrade packages of all the firmware identifiers in the second firmware identifier set under the target version number to obtain a second upgrade file, and sends the second upgrade file to the target device through the out-of-band channel. Wherein, step 641 and step 642 may be performed in parallel to synchronously transmit the first upgrade file and the second upgrade file.
Step 650, firmware upgrade. And after receiving the first upgrading file and the second upgrading file, the target device upgrades the corresponding target firmware.
Step 660, reboot the target device. And restarting the effective firmware after the plurality of target firmware is required to be upgraded, and controlling the target equipment to restart after the plurality of target firmware is successfully upgraded.
At step 670, the state is restored. In the step, the operation state of the target equipment is restored by pre-checking the obtained operation state of the target equipment, so that the target equipment is restored to the operation state before upgrading.
FIG. 7 is a flow chart of a firmware upgrade method according to another embodiment of the present application, in which the target device responds to the pre-detection instruction to further detect network connectivity with the target device, such as in-band channel, out-of-band channel connectivity, in comparison to the embodiment of FIG. 6; if network connectivity between the upgrade management server 112 and the target device is determined, the target device may be requested to mask alarms according to the SSH (Secure Shell) protocol.
Further, if it is determined that there is at least one target firmware that needs a PXE environment in the upgrade process according to the firmware configuration information of the target firmware, step 620 is followed by step 710, where the PXE environment is constructed. The PXE environment is an in-band environment that is started up to a temporary OS (Operating System) through a network card, and configures temporary IP, so that file uploading/execution can be satisfied. Specifically, step 710 includes: the PXE-client sends a request, which may be a broadcasted DHCP Discover packet; the DHCP (Dynamic Host Configuration Protocol ) server responds to the request and assigns an IP address for the PXE-client; the PXE-client requests a TFTP (Trivial File Transfer Protocol, simple file transfer protocol) server to download a required startup system installation file based on an IP address distributed by a DHCP server; after the PXE-client receives a file sent by the TFTP server, a specified automatic response file ks.cfg is read from the received file, then a mirror image is requested to be downloaded to a file sharing server according to the position of the automatic response file, and then an operating system in an installation target device is controlled according to the mirror image file, so that the construction of the PXE environment is realized.
In some embodiments, if it is determined at the time of the pre-check that the login password of the operating system is included in the device information of the target device maintained by the upgrade management server 112, the operating system is already installed in the target device and is in network communication with the target device, and the operating system of the target device can be logged in according to the login password of the operating system, without building the PXE according to the above procedure, so that the time for entering the PXE can be saved.
With continued reference to fig. 7, after step 720, step 730 is performed to identify the request initiation mode. If the request initiation is self-service initiation, then step 742 is performed; if the request is initiated in other ways than self-service initiation, then step 741 is performed.
And 741, comparing according to the BOM reference version number. As described above, the firmware upgrade request may be initiated by other application calls, in which case it is generally indicated to upgrade the target firmware to the current latest version number, which is the current latest version number of the target firmware. In this case, the upgrade management server 112 compares the first version number of each target firmware obtained by the pre-detection with the BOM reference version number corresponding to the target firmware, so as to determine the target firmware that needs to be upgraded actually, and if the first version number of a target firmware is the same as the BOM reference version number of the target firmware, it is determined that the target firmware does not need to be upgraded.
Step 742, compare against the target version number. When the firmware upgrade request is initiated in a self-service manner, as shown in fig. 3C, the user may specify a target version number in the upgrade initiation page, so in this case, the version number specified by the user in the upgrade page is taken as the target version number, then the first version number of each target firmware is compared with the target version number corresponding to the target firmware, if the first version number and the target version number are different, it is determined that the target firmware actually needs to be upgraded, otherwise, if the first version number and the target version number are the same, it is determined that the target firmware does not need to be upgraded.
With continued reference to fig. 7, after step 660, step 750 is performed to perform the version number comparison again. In the step, comparing the second version number of each target firmware acquired after the upgrading is completed with the target version number of the corresponding firmware to determine whether the upgrading of the target firmware is successful, and if the second version number and the target version number are the same, indicating that the upgrading is successful; otherwise, if the two are different, the upgrade is not successful.
Further, in the embodiment corresponding to fig. 7, after the state of the target device is restored, step 760 is performed to unmask, i.e. unmask the alarm of the target device, so that the target device reports the alarm normally.
In the scheme of the application, the synchronous upgrading of a plurality of target firmware is realized, thus, the firmware upgrading is not required to be realized according to pre-detection, shielding alarm, channel selection, upgrading, restarting, state restoration and unmasking respectively for each firmware, and part of nodes can be shared in the process of upgrading a plurality of firmware, compared with the process of upgrading the firmware one by one in the related art, the time for upgrading a plurality of firmware can be greatly shortened, and the firmware upgrading efficiency is improved.
By adopting the scheme of the application to upgrade a plurality of firmware, analysis shows that the time consumption of firmware upgrade can be greatly shortened and the efficiency of firmware upgrade can be greatly improved in three aspects of reducing out-of-band restarting, reducing the time consumption of accessing PXE and optimizing the firmware upgrade as shown in the following table 1. In table 1, estimated time after optimization = average time before modification-modification point optimization time. Through analysis, the adoption of the scheme can save at least 60% of refreshing time.
TABLE 1
In some embodiments, the task of the node for upgrading the firmware may be further subdivided, for example, divided into three subtasks, such as file uploading, file checking, and file refreshing, and the execution time periods of the three subtasks are preset. Table 2 illustrates the execution duration of the three subtasks, i.e., file upload for firmware of both the BIOS and BMC types (the subtask is used to upload an upgrade file to a storage unit of the component where the target firmware is located), file verification (the subtask is mainly to detect whether the upgrade file is damaged or missing according to the MD5 value of the upgrade file, and ensure that the first upgrade file or the second upgrade file received by the target device is accurate), and firmware refresh.
TABLE 2
In the process of upgrading the firmware by the target equipment, controlling the firmware to be upgraded according to the execution time length designated for each subtask, and feeding back the execution state (whether the subtask is completed) of the subtask to the upgrade management server, so that the transparency of the upgrading process can be realized, and the unnecessary waiting time length between the tasks is reduced.
In some embodiments, as shown in fig. 8, determining the first upgrade file from the first set of firmware identifications includes:
step 810, for each firmware identifier in the first firmware identifier set, according to the firmware identifier, the first version number corresponding to the firmware identifier, and the target version number corresponding to the firmware identifier, querying a target differential upgrade package corresponding to the firmware identifier in the first database, where the target differential upgrade package is a differential upgrade package of a total upgrade package of the corresponding target firmware under the target version number relative to the total upgrade package of the first version number.
Step 820, if the target differential upgrade package corresponding to the firmware identifier is queried, taking the queried target differential upgrade package as the firmware upgrade package of the target firmware indicated by the firmware identifier.
In step 830, if the target differential upgrade package corresponding to the firmware identifier is not queried, a full upgrade package of the firmware indicated by the firmware identifier under the target version number is obtained in the second database, and the obtained full upgrade package is used as the firmware upgrade package of the corresponding target firmware.
Step 840, merging the firmware upgrade packages corresponding to all the firmware identifications in the first firmware identification set to obtain a first upgrade file.
In this embodiment, for the firmware managed by the firmware upgrade platform, a differential upgrade package of the firmware between different version numbers and a full upgrade package of the firmware under each version number are maintained. The full upgrade package of the firmware under each version number is stored in the second database, specifically, the firmware identifier corresponding to the firmware and the corresponding version number can be used as index information of the corresponding full upgrade package, so that the corresponding full upgrade package can be queried and obtained in the second database according to the firmware identifier of the designated firmware and the version number of the firmware.
The differential upgrade package of the firmware between different version numbers is stored in the first database. Specifically, the firmware identifier, the version number as the reference, and the version number of the opposite party to the reference may be stored in the second database in association with the differential upgrade package as index information of the differential upgrade package. In the application, the version number of the target firmware serving as the reference is the first version number of the firmware, and the version number of the opposite party with the reference is the target version number of the firmware. The differential upgrade package is used to indicate a difference portion of the full-size upgrade package under the version number of the firmware and the reference counterpart with respect to the full-size upgrade package of the version number as the reference. It can be understood that the differential upgrade package of the firmware has smaller data size relative to the total upgrade package, and occupies less network bandwidth in the transmission process, so that the transmission efficiency of the first upgrade file can be improved.
In this embodiment, since the target device is pre-checked before upgrading the target firmware in the target device, the current version number (i.e., the first version number) of each target firmware in the target device is obtained, and it can be understood that, at this time, the target device includes a total upgrade packet corresponding to the target firmware in the first version number, after sending a differential upgrade packet of the target version number of the target firmware relative to the first version number to the target device, the target device can perform upgrade packet synthesis on the total upgrade packet of the target firmware in the first version number and the differential upgrade packet of the target version number relative to the first version number, so as to obtain the total upgrade packet of the target firmware in the target version number, thereby upgrading the target firmware to the target version number based on the total upgrade packet of the target firmware in the target version number.
In some embodiments, since there may be a case where a part of the firmware upgrade package is a differential upgrade package and a part of the firmware upgrade package is a full-scale upgrade package in the first upgrade file, in order to facilitate the target device to accurately identify the firmware upgrade package as the differential upgrade package or the full-scale upgrade package after receiving the first upgrade file, the differential upgrade package and the full-scale upgrade package are respectively marked in the first upgrade file, so that the target device identifies the differential upgrade package and the full-scale upgrade package based on the marks.
In some embodiments, the first upgrade file may further include verification information of a firmware upgrade packet corresponding to each target firmware, so that after receiving the first upgrade file, the target device verifies whether the received firmware upgrade packet is accurate based on the verification information of each firmware upgrade packet.
Similarly, for each firmware identifier in the second firmware identifier set, according to the firmware identifier, the first version number corresponding to the firmware identifier and the target version number corresponding to the firmware identifier, inquiring a target differential upgrade package corresponding to the firmware identifier in the first database, wherein the target differential upgrade package is a differential upgrade package of the total upgrade package of the corresponding target firmware under the target version number relative to the total upgrade package of the first version number; if the target differential upgrade package corresponding to the firmware identification is queried, taking the queried target differential upgrade package as a firmware upgrade package of the target firmware indicated by the firmware identification; if the target differential upgrade package corresponding to the firmware identification is not queried, acquiring a full upgrade package of the target firmware indicated by the firmware identification under the target version number in a second database, and taking the acquired full upgrade package as a firmware upgrade package of the corresponding target firmware; and combining the firmware upgrade packages corresponding to all the firmware identifications in the second firmware identification set to obtain a second upgrade file.
In some embodiments, the first upgrade file or the second upgrade file further comprises a fault detection script; the method further comprises the steps of: receiving fault information returned by the target equipment, and performing fault detection in the target equipment through a fault detection script in the process of upgrading a plurality of target firmware to obtain the fault information; determining a target fault processing strategy corresponding to the fault indicated by the fault information; and processing the faults indicated by the fault information according to the target fault processing strategy.
The fault information is used for indicating faults of the corresponding target firmware in the upgrading process. In this embodiment, various fault handling policies corresponding to faults may be preset, and the fault handling policies are used to indicate a process to be performed next to the fault, or if the corresponding next process is a process requiring participation of a technician, a processor corresponding to the next process may be specified, so that in this case, the specified processor may be transferred to a node where the specified processor is located.
FIG. 9 is a schematic diagram of a fault configuration page, according to one embodiment of the application. As shown in fig. 9, the user may configure in the sub-page corresponding to the base configuration, the group item configuration, the statement item configuration, and the policy configuration.
Wherein, under the basic configuration, the content items such as exception handler/level, exception handling timeliness, statement policy (retry current task or jump to the next node in the flow) and the like can be set. Fig. 9 illustrates configurable content items in a sub-page in a pie item configuration. As shown in fig. 9, content items such as an exception ID, an exception item name, an exception item type, an exception handling manner, an exception level, and the like may be set in the genre item configuration.
Under the policy configuration, an abnormal feature code corresponding to the fault can be set, a corresponding fault processing policy is specified, and the automation rate is improved, for example, when a 'power operation failure' keyword is detected, the on-site processing is required, and a name of a dispatch is 'power operation failure-please assist in PXE'. Based on the configured fault related content, faults can be accurately identified and fault processing nodes can be assigned to corresponding processors or flow nodes.
In this embodiment, by presetting various fault processing strategies corresponding to faults, after receiving the fault information, the target fault processing strategy corresponding to the fault indicated by the fault information is automatically queried, and the fault indicated by the fault information is processed according to the target fault processing strategy, so that the automatic processing of the fault is realized, and the success rate of firmware upgrading can be greatly improved. Compared with the manual fault identification and manual fault processing, the automatic starting of the corresponding processing measures through the fault information can greatly improve the efficiency, for example, if hardware fault prompts are directly sent to the site to replace hardware, the file uploading fails, the retry can be attempted, the task is executed again after the task is overtime, so that the fault processing efficiency can be improved, the correct events are carried out at the correct time from the overall result, and the automatic success rate of the task can also be greatly improved.
In some embodiments, the target version number for the target firmware is specified by the user in the version number list for the target firmware. In this embodiment, as shown in fig. 10, the method further includes:
step 1010, obtaining the running state information of the component where the target firmware is located under each version number.
The target firmware takes on the most basic and bottom layer of the component, so after the target firmware of a version number is written in the component, the running state of the component can reflect the performance of the target firmware of the version number written in the component.
The operation state information of the component is used to describe the operation state of the component, such as the operation processing rate, the read-write speed, the temperature, the clock frequency, the number of threads, whether or not the component is currently faulty, and the like.
In some embodiments, the target device may be requested to report the running state of the component where each firmware is located according to the set period interval during the working process of the target device. Thus, the operation state of the component at each time Tina in the set duration is used as the operation state information of the component where the firmware is located.
And 1020, generating a firmware running portrait of the target firmware under each version number according to the running state information of the component of the target firmware under each version number.
The firmware running portrayal can be an abstract model of the target firmware under a version number generated by labeling the firmware characteristic information of the target firmware according to the label class of the firmware. The firmware running portrayal may reflect features in multiple dimensions of the target firmware for a version number. In some embodiments, feature extraction may be performed on the running state information of the component where the target firmware is located under each version number, so as to obtain feature information that may reflect the correlation of firmware performance.
In some embodiments, the basic attribute information of the target firmware under each version number may be further combined with the running state information of the component where the target firmware is located under each version number to generate a firmware running portrait under each version number. Basic attribute information of the target firmware under a version number such as the model of the target firmware, the model of the component to which the target firmware is compatible, the component type of the component to which the target firmware is compatible, and the like. Thereby implementing the construction of the firmware running portraits in combination with the static data of the firmware and the dynamic data of the firmware.
And 1030, predicting the performance level of the target firmware according to the firmware running portraits of the target firmware under each version number by the target neural network model, and outputting the performance level of the target firmware under each version number.
The target neural network model may be constructed from one or more neural networks, such as convolutional neural networks, fully-connected neural networks, cyclic neural networks, long and short memory neural networks (bi-directional, unidirectional), transducer (transducer) neural networks, and the like, without specific limitation.
In some embodiments, since there is a difference between functions of different components, there is a difference between functions of firmware required on the components, so in order to ensure suitability between the target neural network and the firmware on the components of different component types, a neural network model for predicting the performance level of the firmware may be trained separately for each component type, and for convenience of description, the neural network model for predicting the performance level of the firmware is referred to as a performance level prediction model. The firmware type is as exemplified above as SSD, BMC, DISK, NIC, HBA, RAID, BIOS, CPLD, etc. In this case, before step 1030, the performance level prediction model corresponding to the firmware type to which the firmware of the target firmware belongs is determined, that is, the target neural network model, according to the firmware type to which the firmware of the target firmware belongs.
Step 1040, determining the arrangement sequence of the version numbers in the version number list corresponding to the target firmware according to the performance levels of the target firmware corresponding to the version numbers.
The performance level of the target firmware under a version number can reflect the overall performance of the target firmware under the version number, and the higher the performance level is, the better the overall performance of the target firmware under the version number is. In some embodiments, the plurality of version numbers corresponding to the target firmware may be ordered in order of performance level from high to low, and the order of the version numbers in the obtained order is used as the order of the version numbers in the version number list.
In some embodiments, the arrangement order of the version numbers in the version number sequence can be comprehensively determined by combining the performance level of the target firmware under each version number and the level of the version number. Specifically, the version numbers with the performance level higher than the set level threshold may be displayed in the version number list in the order from high to low in performance level, and the other version numbers in the version number list are displayed behind the version numbers with the performance level higher than the set level threshold in the order from high to low in version number.
In some embodiments, one or more version numbers with highest performance levels may also be used as recommended version numbers according to the predicted performance levels, and the recommended version numbers of the target firmware may be displayed in the upgrade initiation page. For example, the proposed target version number in fig. 3C may be the highest performance level version number for a firmware.
In this embodiment, the performance level corresponding to each version number of the target firmware is predicted and obtained through the trained target neural network, and the display sequence in the version number list of the firmware is determined according to the level of the performance level, so that the version number with the higher performance level can be displayed at the front position in the version number list, and a user can conveniently and quickly know which version numbers have better comprehensive performance of the target firmware.
To ensure accuracy of the performance level predicted by the target neural network model, the target neural network model needs to be trained prior to step 1030. The specific training process comprises the following steps: acquiring a plurality of training samples, wherein the training samples comprise firmware running portraits of the firmware under a plurality of version numbers and marking performance grades of the firmware under each version number; predicting the performance level of the firmware according to the firmware running portraits of the firmware under each version number by the target neural network model to obtain the predicted performance level of the firmware under each version number; calculating to obtain model loss according to the predicted performance level of the firmware under each version number and the marked performance level of the firmware under the corresponding version number; and reversely adjusting parameters of the target neural network model according to the model loss until reaching the training ending condition.
The labeled performance level is a performance level labeled for the firmware under a version number that corresponds to the actual performance level of the firmware under that version number. In some embodiments, feedback information for the firmware under each version number and test data for the firmware under each version number may be collected by a user to determine a performance level of the firmware, and the determined performance level may be used as a labeling performance level of the firmware under the version number.
The predicted performance level refers to the performance level predicted by the target neural network model for a version number of firmware during the training phase.
In a specific embodiment, a loss function of the target neural network model is preset, and then a function value of the loss function is calculated according to a predicted performance level of the firmware under a version number and a labeling performance level of the firmware under the version number, wherein the calculated function value of the loss function is model loss. The set loss function may be one of a cross entropy loss function, a mean square error loss function and an absolute value loss function, or a linear combination of the two functions, which is not particularly limited herein.
The calculated model loss reflects the difference between the predicted performance level of the firmware under a version number and the corresponding labeling performance level, if the calculated model loss indicates that the difference between the predicted performance level and the corresponding labeling performance level is large, the parameters of the target neural network model are reversely adjusted, and then the performance level of the predicted firmware under the version number is carried out again through the target neural network model after the parameters are adjusted until the obtained model loss is smaller than a set loss threshold value. The training end condition may be that the number of iterations of the target neural network model reaches a threshold, or that the prediction accuracy of the target neural network model is higher than a set threshold, which is not particularly limited herein.
In some embodiments, if the target neural network model for each component type is built per component type, the training samples of the target neural network model for a component type (e.g., component type T1) are the firmware running images and corresponding labeling performance levels of the firmware under version numbers applied to the component of component type T1.
Through the training process, the target neural network model can learn the relation between the firmware operation portrait and the performance level, so that the target neural network model has the capability of accurately predicting the performance level of the firmware under a version number based on the firmware operation portrait of the firmware under the version number, the performance level is accurately predicted, and the accuracy of the predicted performance level is ensured.
The following describes embodiments of the apparatus of the present application that may be used to perform the methods of the above-described embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the above-described method embodiments of the present application.
FIG. 11 is a block diagram of a firmware upgrade apparatus according to an embodiment of the present application, as shown in FIG. 9, the firmware upgrade apparatus comprising: a first obtaining module 1110, configured to obtain a firmware upgrade request, where the firmware upgrade request includes firmware identifiers of a plurality of target firmware to be upgraded in the target device and target version numbers corresponding to the target firmware; the second obtaining module 1120 is configured to obtain firmware configuration information of each target firmware, where the firmware configuration information includes upgrade mode configuration information, and the upgrade mode configuration information is used to indicate an upgrade mode of the corresponding firmware, and the upgrade mode includes an in-band upgrade mode and an out-of-band upgrade mode; the classification module 1130 is configured to classify the firmware identifiers of the plurality of target firmware according to the upgrade mode configuration information of each target firmware, determine a first firmware identifier set corresponding to the in-band upgrade mode, and determine a second firmware identifier set corresponding to the out-of-band upgrade mode; an upgrade file determination module 1140, configured to determine a first upgrade file according to the first firmware identification set, and determine a second upgrade file according to the second firmware identification set; the first upgrade file comprises a firmware upgrade package of each firmware identifier in the first firmware identifier set under the corresponding target version number; the second upgrade file comprises a firmware upgrade package of each firmware identifier in the second firmware identifier set under the corresponding target upgrade version; and the transmission module 1150 is configured to transmit the first upgrade file to the target device through the in-band channel, and transmit the second upgrade file to the target device through the out-of-band channel, so that the target device performs parallel upgrade on the plurality of target firmware according to the first upgrade file and the second upgrade file.
In some embodiments, the firmware upgrade apparatus further comprises: the third acquisition module is used for acquiring alarm configuration information of the target equipment; the alarm configuration information indicates an alarm strategy corresponding to firmware in the target equipment; a fourth obtaining module, configured to obtain alarm policies corresponding to the plurality of target firmware from the alarm configuration information; the first sending module is used for sending the alarm strategies corresponding to the plurality of target firmware to the target equipment so that the target equipment shields the alarm information according to the alarm strategies in the process of upgrading the plurality of target firmware; and the alarm release module is used for sending an alarm release instruction to the target equipment after the plurality of target firmware upgrades are successful, so that the target equipment responds to the alarm release instruction to release the alarm shielding.
In some embodiments, the firmware upgrade apparatus further comprises: the second sending module is used for sending a pre-detection instruction to the target equipment; the receiving module is used for receiving equipment state information returned by the target equipment in response to the pre-detection instruction, wherein the equipment state information comprises equipment running state information; and the restoration module is used for controlling the target equipment to perform state restoration according to the equipment operation state information after the plurality of target firmware in the target equipment are successfully upgraded.
In some embodiments, the device state information further includes first firmware version information for each target firmware; the first firmware version information indicates a first version number of the corresponding target firmware; firmware upgrading device, still include: the first determining module is used for determining first target firmware in the plurality of target firmware according to the first version number corresponding to each target firmware and the corresponding target version number, wherein the first target firmware refers to target firmware with the same corresponding first version number as the corresponding target version number; and the removing module is used for removing the firmware identification of the first target firmware from the first firmware identification set and the second firmware identification set.
In some embodiments, determining the first upgrade file from the first set of firmware identifications comprises: for each firmware identifier in the first firmware identifier set, inquiring a target differential upgrade package corresponding to the firmware identifier in a first database according to the firmware identifier, a first version number corresponding to the firmware identifier and a target version number corresponding to the firmware identifier, wherein the target differential upgrade package is a differential upgrade package of the total upgrade package of the corresponding target firmware under the target version number relative to the total upgrade package of the first version number; if the target differential upgrade package corresponding to the firmware identification is queried, taking the queried target differential upgrade package as a firmware upgrade package of the target firmware indicated by the firmware identification; if the target differential upgrade package corresponding to the firmware identification is not queried, acquiring a full upgrade package of the target firmware indicated by the firmware identification under the target version number in a second database, and taking the acquired full upgrade package as a firmware upgrade package of the corresponding target firmware; and combining the firmware upgrade packages corresponding to all the firmware identifications in the first firmware identification set to obtain a first upgrade file.
In some embodiments, the firmware upgrade apparatus further comprises: the acquisition module is used for acquiring second firmware version information of each target firmware after the plurality of target firmware is updated according to the updating progress indication of the plurality of target firmware; and the upgrade success determining module is used for determining that the plurality of target firmware upgrades are successful if the firmware version numbers indicated by the second firmware version information are the same as the target firmware version numbers of the corresponding target firmware.
In some embodiments, the firmware configuration information further includes restart configuration information, where the restart configuration information is used to indicate whether the corresponding firmware needs to be restarted after being upgraded; the restart configuration information corresponding to at least one target firmware in the plurality of target firmware indicates that the firmware needs to be restarted after being upgraded; firmware upgrading device, still include: the restarting control module is used for controlling the target equipment to restart; the acquisition module is further configured to: after the target equipment is restarted successfully, an information acquisition instruction is sent to the target equipment; and receiving second firmware version information of each target firmware returned by the target equipment in response to the information acquisition instruction.
In some embodiments, the target version number for the target firmware is specified by the user in the version number list for the target firmware. The firmware upgrade apparatus further includes: a fifth acquisition module, configured to acquire running state information of a component where the target firmware is located under each version number; the portrait generation module is used for generating a firmware operation portrait of the target firmware under each version number according to the operation state information of the component of the target firmware under each version number; the first prediction module is used for predicting the performance level of the target neural network model according to the firmware running portraits of the target firmware under each version number and outputting the performance level of the target firmware under each version number; and the arrangement order determining module is used for determining the arrangement order of the version numbers in the version number list corresponding to the target firmware according to the performance grades respectively corresponding to the target firmware under the version numbers.
In some embodiments, the firmware upgrade apparatus further comprises: the sixth acquisition module is used for acquiring a plurality of training samples, wherein the training samples comprise firmware running portraits of the firmware under a plurality of version numbers and marking performance grades of the firmware under each version number; the second prediction module is used for predicting the performance level of the firmware according to the firmware running portraits of the firmware under each version number by the target neural network model to obtain the predicted performance level of the firmware under each version number; the model loss calculation module is used for calculating to obtain model loss according to the predicted performance level of the firmware under each version number and the labeling performance level of the firmware under the corresponding version number; and the adjusting module is used for reversely adjusting the parameters of the target neural network model according to the model loss until the training ending condition is reached.
In some embodiments, the first upgrade file or the second upgrade file further comprises a fault detection script; in this embodiment, the firmware upgrade apparatus further includes: the fault information receiving module is used for receiving fault information returned by the target equipment, and performing fault detection in the target equipment through a fault detection script in the process of upgrading a plurality of target firmware to obtain the fault information; the second determining module is used for determining a target fault processing strategy corresponding to the fault indicated by the fault information; and the fault processing module is used for processing the faults indicated by the fault information according to the target fault processing strategy.
Fig. 12 shows a schematic diagram of a computer system suitable for use in implementing an embodiment of the application. It should be noted that, the computer system 1200 of the electronic device shown in fig. 12 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 12, the computer system 1200 includes a central processing unit (Central Processing Unit, CPU) 1201 which can perform various appropriate actions and processes, such as performing the methods in the above-described embodiments, according to a program stored in a Read-Only Memory (ROM) 1202 or a program loaded from a storage section 1208 into a random access Memory (Random Access Memory, RAM) 1203. In the RAM 1203, various programs and data required for the system operation are also stored. The CPU1201, ROM1202, and RAM 1203 are connected to each other through a bus 1204. An Input/Output (I/O) interface 1205 is also connected to bus 1204.
The following components are connected to the I/O interface 1205: an input section 1206 including a keyboard, a mouse, and the like; an output portion 1207 including a Cathode Ray Tube (CRT), a liquid crystal display (Liquid Crystal Display, LCD), and a speaker, etc.; a storage section 1208 including a hard disk or the like; and a communication section 1209 including a network interface card such as a LAN (Local Area Network ) card, a modem, or the like. The communication section 1209 performs communication processing via a network such as the internet. The drive 1210 is also connected to the I/O interface 1205 as needed. A removable medium 1211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on the drive 1210 so that a computer program read out therefrom is installed into the storage section 1208 as needed.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 1209, and/or installed from the removable media 1211. When executed by a Central Processing Unit (CPU) 1201, performs the various functions defined in the system of the present application.
It should be noted that, the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (Erasable Programmable Read Only Memory, EPROM), flash Memory, an optical fiber, a portable compact disc read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Where each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be provided in a processor. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
As another aspect, the present application also provides a computer-readable storage medium that may be contained in the electronic device described in the above embodiment; or may exist alone without being incorporated into the electronic device. The computer readable storage medium carries computer readable instructions which, when executed by a processor, implement the method of any of the above embodiments.
According to an aspect of the present application, there is also provided an electronic apparatus including: a processor; a memory having stored thereon computer readable instructions which, when executed by a processor, implement the method of any of the embodiments described above.
According to an aspect of embodiments of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method of any of the embodiments described above.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a touch terminal, or a network device, etc.) to perform the method according to the embodiments of the present application.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be made without departing from the scope thereof; the scope of the application is limited only by the appended claims.
Claims (14)
1. A firmware upgrade method, comprising:
acquiring a firmware upgrading request, wherein the firmware upgrading request comprises firmware identifiers of a plurality of target firmware to be upgraded in target equipment and target version numbers corresponding to the target firmware;
the method comprises the steps that firmware configuration information of each target firmware is obtained, the firmware configuration information comprises upgrade mode configuration information, the upgrade mode configuration information is used for indicating an upgrade mode of the corresponding firmware, and the upgrade modes comprise an in-band upgrade mode and an out-of-band upgrade mode;
Classifying the firmware identifications of the plurality of target firmware according to the upgrade mode configuration information of each target firmware, determining a first firmware identification set corresponding to an in-band upgrade mode and determining a second firmware identification set corresponding to an out-of-band upgrade mode;
determining a first upgrade file according to the first firmware identification set, and determining a second upgrade file according to the second firmware identification set; the first upgrade file comprises a firmware upgrade package of each firmware identifier in the first firmware identifier set under a corresponding target version number; the second upgrade file comprises a firmware upgrade package of each firmware identifier in the second firmware identifier set under a corresponding target upgrade version;
transmitting the first upgrade file to the target device through an in-band channel, and transmitting the second upgrade file to the target device through an out-of-band channel, so that the target device can upgrade the plurality of target firmware in parallel according to the first upgrade file and the second upgrade file.
2. The method of claim 1, wherein after the obtaining the firmware upgrade request, the method further comprises:
Acquiring alarm configuration information of the target equipment; the alarm configuration information indicates an alarm strategy corresponding to firmware in the target equipment;
acquiring alarm strategies corresponding to the plurality of target firmware from the alarm configuration information;
sending alarm strategies corresponding to the plurality of target firmware to the target equipment so that the target equipment shields alarm information according to the alarm strategies in the process of upgrading the plurality of target firmware;
and after the plurality of target firmware upgrades are successful, sending an alarm release instruction to the target equipment so that the target equipment responds to the alarm release instruction to release the alarm shielding.
3. The method of claim 1, wherein the transmitting the first upgrade file to the target device over an in-band channel and the transmitting the second upgrade file to the target device over an out-of-band channel are preceded by:
sending a pre-detection instruction to the target equipment;
receiving equipment state information returned by the target equipment in response to the pre-detection instruction, wherein the equipment state information comprises equipment running state information;
and after the target devices are successfully upgraded, controlling the target devices to perform state restoration according to the device running state information.
4. The method of claim 3, wherein the device state information further includes first firmware version information for each of the target firmware; the first firmware version information indicates a first version number of the corresponding target firmware;
before the first upgrade file is determined according to the first firmware identification set and the second upgrade file is determined according to the second firmware identification set, the method further includes:
determining a first target firmware in the plurality of target firmware according to the first version number corresponding to each target firmware and the corresponding target version number, wherein the first target firmware refers to target firmware with the same corresponding first version number as the corresponding target version number;
the firmware identification of the first target firmware is removed from the first set of firmware identifications and the second set of firmware identifications.
5. The method of claim 4, wherein the determining a first upgrade file from the first set of firmware identifications comprises:
for each firmware identifier in the first firmware identifier set, according to the firmware identifier, a first version number corresponding to the firmware identifier and a target version number corresponding to the firmware identifier, inquiring a target differential upgrade package corresponding to the firmware identifier in a first database, wherein the target differential upgrade package is a differential upgrade package of the total upgrade package of the corresponding target firmware under the target version number relative to the total upgrade package of the first version number;
If the target differential upgrade package corresponding to the firmware identification is queried, taking the queried target differential upgrade package as a firmware upgrade package of the target firmware indicated by the firmware identification;
if the target differential upgrade package corresponding to the firmware identification is not queried, acquiring a full upgrade package of the target firmware indicated by the firmware identification under the target version number in a second database, and taking the acquired full upgrade package as a firmware upgrade package of the corresponding target firmware;
and merging the firmware upgrade packages corresponding to all the firmware identifications in the first firmware identification set to obtain the first upgrade file.
6. A method according to claim 3, wherein prior to said controlling said target device for state restoration in accordance with said device operational state information, said method further comprises:
if the upgrading progress of the plurality of target firmware is indicated to be finished, acquiring second firmware version information of each target firmware;
and if the firmware version numbers indicated by the second firmware version information are the same as the target firmware version numbers of the corresponding target firmware, determining that the plurality of target firmware upgrades are successful.
7. The method of claim 6, wherein the firmware configuration information further includes restart configuration information, the restart configuration information being used to indicate whether a restart is required after the corresponding firmware is upgraded; the restart configuration information corresponding to at least one target firmware in the plurality of target firmware indicates that the firmware needs to be restarted after being updated;
before the second firmware version information of each target firmware is collected, the method further includes:
controlling the target equipment to restart;
the collecting the second firmware version information of each target firmware includes:
after the target equipment is restarted successfully, an information acquisition instruction is sent to the target equipment;
and receiving second firmware version information of each target firmware returned by the target equipment in response to the information acquisition instruction.
8. The method of claim 1, wherein the target version number for the target firmware is specified by a user in a version number list for the target firmware; the method further comprises the steps of:
acquiring running state information of a component where the target firmware is located under each version number;
generating a firmware operation portrait of the target firmware under each version number according to the operation state information of the component of the target firmware under each version number;
Performing performance level prediction by a target neural network model according to the firmware running portraits of the target firmware under each version number, and outputting the performance level of the target firmware under each version number;
and determining the arrangement sequence of the version numbers in a version number list corresponding to the target firmware according to the performance grades respectively corresponding to the target firmware under the version numbers.
9. The method of claim 8, wherein the predicting, by the target neural network model, a performance level from the firmware running representation of the target firmware under each version number, and outputting the performance level of the target firmware under each version number, the method further comprising:
obtaining a plurality of training samples, wherein the training samples comprise firmware running portraits of the firmware under a plurality of version numbers and marking performance grades of the firmware under each version number;
performing performance level prediction by the target neural network model according to the firmware running portraits of the firmware under each version number to obtain the predicted performance level of the firmware under each version number;
calculating to obtain model loss according to the predicted performance level of the firmware under each version number and the marked performance level of the firmware under the corresponding version number;
And reversely adjusting parameters of the target neural network model according to the model loss until reaching the training ending condition.
10. The method of claim 1, wherein the first upgrade file or the second upgrade file further comprises a fault detection script;
the method further comprises the steps of:
receiving fault information returned by the target equipment, and performing fault detection in the target equipment through the fault detection script in the process of upgrading the plurality of target firmware to obtain the fault information;
determining a target fault processing strategy corresponding to the fault indicated by the fault information;
and processing the faults indicated by the fault information according to the target fault processing strategy.
11. A firmware upgrade apparatus, comprising:
the first obtaining module is used for obtaining a firmware upgrading request, wherein the firmware upgrading request comprises firmware identifiers of a plurality of target firmware to be upgraded in target equipment and target version numbers corresponding to the target firmware;
the second obtaining module is used for obtaining firmware configuration information of each target firmware, wherein the firmware configuration information comprises upgrade mode configuration information, the upgrade mode configuration information is used for indicating an upgrade mode of the corresponding firmware, and the upgrade modes comprise an in-band upgrade mode and an out-of-band upgrade mode;
The classification module is used for classifying the firmware identifications of the plurality of target firmware according to the upgrade mode configuration information of each target firmware, determining a first firmware identification set corresponding to an in-band upgrade mode and determining a second firmware identification set corresponding to an out-of-band upgrade mode;
the upgrade file determining module is used for determining a first upgrade file according to the first firmware identification set and determining a second upgrade file according to the second firmware identification set; the first upgrade file comprises a firmware upgrade package of each firmware identifier in the first firmware identifier set under a corresponding target version number; the second upgrade file comprises a firmware upgrade package of each firmware identifier in the second firmware identifier set under a corresponding target upgrade version;
and the transmission module is used for transmitting the first upgrading file to the target equipment through an in-band channel and transmitting the second upgrading file to the target equipment through an out-of-band channel, so that the target equipment can upgrade the plurality of target firmware in parallel according to the first upgrading file and the second upgrading file.
12. An electronic device, comprising:
A processor;
a memory having stored thereon computer readable instructions which, when executed by the processor, implement the method of any of claims 1-10.
13. A computer readable storage medium having stored thereon computer readable instructions which, when executed by a processor, implement the method of any of claims 1-10.
14. A computer program product comprising computer instructions which, when executed by a processor, implement the method of any one of claims 1-10.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210368773.XA CN116938711A (en) | 2022-04-08 | 2022-04-08 | Firmware upgrading method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210368773.XA CN116938711A (en) | 2022-04-08 | 2022-04-08 | Firmware upgrading method and device, electronic equipment and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN116938711A true CN116938711A (en) | 2023-10-24 |
Family
ID=88374414
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210368773.XA Pending CN116938711A (en) | 2022-04-08 | 2022-04-08 | Firmware upgrading method and device, electronic equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116938711A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118138453A (en) * | 2024-03-05 | 2024-06-04 | 中科驭数(北京)科技有限公司 | Device configuration method and device, storage medium and electronic device |
| CN119690228A (en) * | 2024-11-29 | 2025-03-25 | 超聚变数字技术有限公司 | Power module upgrading method, main board and server |
| CN121166173A (en) * | 2025-11-19 | 2025-12-19 | 杭州新中大科技股份有限公司 | Multi-version upgrading method, device, equipment and medium based on distributed type |
-
2022
- 2022-04-08 CN CN202210368773.XA patent/CN116938711A/en active Pending
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118138453A (en) * | 2024-03-05 | 2024-06-04 | 中科驭数(北京)科技有限公司 | Device configuration method and device, storage medium and electronic device |
| CN119690228A (en) * | 2024-11-29 | 2025-03-25 | 超聚变数字技术有限公司 | Power module upgrading method, main board and server |
| CN121166173A (en) * | 2025-11-19 | 2025-12-19 | 杭州新中大科技股份有限公司 | Multi-version upgrading method, device, equipment and medium based on distributed type |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10797952B1 (en) | Intelligent rollback analysis of configuration changes | |
| CN106201552A (en) | A kind of method for upgrading software, client, server and system | |
| CN116938711A (en) | Firmware upgrading method and device, electronic equipment and storage medium | |
| US12105586B2 (en) | System and methods for diagnosing and repairing a smart mobile device by disabling components | |
| US11960873B2 (en) | System and method for managing a model for solving issues using a set of actions performed on the client environment | |
| CN104360952B (en) | A kind of software testing system and method | |
| CN112099825A (en) | Method, device and equipment for upgrading component and storage medium | |
| CN103973470A (en) | Cluster management method and equipment for shared-nothing cluster | |
| US10754753B1 (en) | Performance of virtual machine instances using machine recognition of screenshot images | |
| CN117170701A (en) | Upgrading method, device and medium for baseboard management controller | |
| CN114816481B (en) | A method, device, equipment and storage medium for batch upgrading of firmware | |
| CN111698558A (en) | Television software upgrading method, television terminal and computer readable storage medium | |
| US7860919B1 (en) | Methods and apparatus assigning operations to agents based on versions | |
| CN117170916B (en) | Fault analysis method, device, equipment and storage medium | |
| CN108595292B (en) | System optimization method, mobile terminal and computer storage medium | |
| CN119341899A (en) | Fault detection method, device, storage medium and electronic device | |
| CN114996055B (en) | Dual-machine hot standby system control method, device, and medium | |
| CN117149350A (en) | Deployment method of k8s cluster, generation method and equipment of cluster snapshot | |
| CN116483566A (en) | Resource processing method and device for server, electronic equipment and storage medium | |
| CN109684134B (en) | Method and server for rapidly deploying firmware settings among multiple devices | |
| CN113656378A (en) | A server management method, device and medium | |
| CN120821632B (en) | Methods, devices, equipment, media, and products for indicator monitoring | |
| CN119045918B (en) | Sensor data management method, device, computer equipment and storage medium | |
| US20240338194A1 (en) | Computer network and method of automatic updating firmware to peripheral device using unified extensible firmware interface | |
| CN118963968A (en) | Function management method, device, computer equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |