Mirror image file upgrading method and device of substrate management controller, equipment and medium

By dividing and analyzing the image files of the substrate management controller, only the modified parts are upgraded, which solves the problem of inefficient upgrades in the existing technology, and achieves resource conservation and efficiency improvement.

CN119829081APending Publication Date: 2025-04-15INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411783692.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

In the prior art, the image file upgrade efficiency of the substrate management controller (BMC) is low, especially for small code modifications, which requires downloading the entire image file, resulting in waste of resources and inefficiency.

Method used

By dividing the image files of the substrate management controller, only the modified image files are obtained during upgrades, and the security and correctness of the upgraded data are ensured through parsing and verification mechanisms.

Benefits of technology

It reduces the amount of data transmission, saves network and storage resources, improves the efficiency of image file upgrades, and realizes seamless upgrade of business containers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829081A_ABST
    Figure CN119829081A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of servers, and discloses a method, a device and equipment for upgrading a mirror image file of a substrate management controller and a medium, and the method comprises the following steps: obtaining a mirror image file upgrading instruction; a to-be-upgraded mirror image file is extracted according to the mirror image file upgrading instruction, and the to-be-upgraded mirror image file is a modified mirror image file in mirror image files of the substrate management controller; analyzing the to-be-upgraded mirror image file to obtain an object type of an operation object corresponding to the to-be-upgraded mirror image file, an upgrading data packet corresponding to the operation object and first verification information; acquiring locally stored second verification information; executing a first verification operation according to the first verification information, the second verification information, the object type and the upgrade data packet, and determining a result of the first verification operation; and when the result of the first verification operation is passing, executing the upgrading operation according to the object type and the upgrading data packet. According to the invention, the upgrading efficiency of the mirror image file of the substrate management controller can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of servers, and in particular to a method, device, equipment and medium for upgrading an image file of a baseboard management controller. Background Art

[0002] In the field of server technology, a baseboard management controller (BMC) is mainly used to monitor and manage servers. The image file of the BMC is generally stored in a non-volatile memory such as a flash memory. In this way, after each startup, the BMC can read the image file from the indicated storage location of the flash memory and run it.

[0003] In order to solve the defects of BMC or add new functions, it is necessary to upgrade the image file of BMC. Generally, when upgrading the image file of BMC, the entire image file of BMC is downloaded and stored in flash memory, and then the BMC is restarted to complete the upgrade operation.

[0004] In this way, even very small code modifications require downloading the entire image file, which results in low upgrade efficiency. Summary of the invention

[0005] In view of this, the present invention provides a method, apparatus, computer equipment, storage medium and program product for upgrading an image file of a baseboard management controller to solve the problem of low efficiency of upgrading an image file.

[0006] In a first aspect, the present invention provides a method for upgrading an image file of a baseboard management controller, the method comprising:

[0007] Get the image file upgrade instruction;

[0008] Extracting the image file to be upgraded according to the image file upgrade instruction, wherein the image file to be upgraded is an image file that has been modified in the image file of the baseboard management controller;

[0009] Parsing the image file to be upgraded to obtain an object type of an operation object corresponding to the image file to be upgraded, an upgrade data packet corresponding to the operation object, and first verification information;

[0010] Obtaining the second verification information stored locally;

[0011] Performing a first verification operation according to the first verification information, the second verification information, the object type, and the upgrade data packet, and determining a result of the first verification operation;

[0012] When the result of the first verification operation is passed, an upgrade operation is performed according to the object type and the upgrade data package.

[0013] The image file upgrade method of a baseboard management controller provided by the present invention has the following advantages:

[0014] By dividing the image file of the baseboard management controller as a whole, during the upgrade, only the modified image file can be obtained instead of the entire image file, which can reduce the amount of data transmission and save network resources and storage resources. After obtaining the image file to be upgraded, the baseboard management controller can parse the image file to be upgraded to obtain the object type of the operation object, the upgrade data including the first verification information. Then, according to the first verification information and the second verification information, a verification operation is performed to ensure that the received image file to be upgraded is safe and correct. Finally, the baseboard management controller performs corresponding operations on the upgrade data packet according to the different object types to complete the upgrade operation. In this way, during the upgrade process, the content of the upgrade is greatly reduced, and only the modified image file needs to be upgraded, which can improve the efficiency of the image file upgrade.

[0015] In an optional implementation, when the object type is a business container type, the upgrade data packet includes at least one update container file and identification information corresponding to each update container file;

[0016] When the result of the first verification operation is passed, performing an upgrade operation according to the object type and the upgrade data packet includes:

[0017] storing each of the at least one update container file included in the upgrade data package in a first storage area in the first memory;

[0018] Creating a target update service container according to the target update container file in the first storage area, wherein the target update container file is any one of the at least one update container file in the upgrade data package;

[0019] After configuring resources for the target update service container, executing a running operation on the target update service container;

[0020] Determining, according to the target identification information corresponding to the target update container file, whether there is an original service container corresponding to the target identification information in at least one original service container running in the baseboard management controller;

[0021] When it is monitored within a preset time period that the target update service container runs successfully, and there is an original service container corresponding to the target identification information in at least one original service container run by the baseboard management controller, switching the service data flow of the original service container corresponding to the target identification information to the target update service container;

[0022] Copy the target update container file in the first storage area to the second storage area of ​​the first memory, wherein the first storage area is a storage area with time validity and the second storage area is a permanent storage area;

[0023] The operation data of the original business container corresponding to the target identification information is deleted, and the original container file of the original business container corresponding to the target identification information in the second storage area is deleted to complete the upgrade operation corresponding to the target update container file.

[0024] Specifically, the baseboard management controller executes the codes of different services into different container files, and the baseboard management controller creates a business container according to the container file. In this way, when upgrading, it is only necessary to create a business container according to the updated container file, without restarting the baseboard management controller. In addition, for the business container that needs to be performed, there is no need to interrupt the business, only the business data stream needs to be switched, and the seamless upgrade (SeamlessUpdate) of the business container can be achieved. Since business updates are very frequent, by dividing the business container, there is no need to download the entire image file every time, which can reduce resource waste.

[0025] In an optional implementation, when the object type is a boot loader and / or an operating system of the baseboard management controller, when the result of the first verification operation is passed, performing an upgrade operation according to the object type and the upgrade data packet includes:

[0026] storing the upgrade data package in the third storage area of ​​the first memory;

[0027] The baseboard management controller is restarted so that the baseboard management controller reads and runs the upgrade data packet from the third storage area during the restart process to complete the upgrade operation corresponding to the upgrade data packet, wherein the third storage area is a permanent storage area.

[0028] Specifically, for underlying codes such as operating systems and boot loaders, by writing upgrade data packets to a specific storage area at one time and then applying the update through restart, the upgrade process can be simplified and the upgrade efficiency can be improved.

[0029] In an optional implementation, the image file upgrade instruction includes a storage address corresponding to the image file to be upgraded;

[0030] The extracting the image file to be upgraded according to the image file upgrade instruction includes:

[0031] The image file to be upgraded is downloaded from the storage address to the first storage area of ​​the first memory for subsequent parsing operation on the image file to be upgraded.

[0032] Specifically, by pre-downloading the image file to be upgraded to the local storage, it can be quickly accessed when the upgrade is actually performed, thereby improving the speed of the entire upgrade process.

[0033] In an optional embodiment, the method further includes:

[0034] When the target update service container is not monitored to run successfully within the preset time period, the target update container file in the first storage area is deleted.

[0035] Specifically, for a business container that fails to run, its container file is deleted in time, so that storage resources can be released in time, so that the baseboard management controller can use these storage resources to complete other related operations in time.

[0036] In an optional implementation, before obtaining the image file upgrade instruction, the method further includes:

[0037] Acquire at least one original container file stored in the second storage area of ​​the first memory, and verification information corresponding to each of the original container files;

[0038] performing a second verification operation on each of the original container files according to the verification information corresponding to each of the original container files;

[0039] When it is determined that the result of the second verification operation of the target original container file is passed, creating a target original service container corresponding to the target original container file according to the target original container file, wherein the target original container file is any one of the at least one original container file stored in the second storage area;

[0040] Resources are configured for the target original service container, and an operation is performed on the target original service container.

[0041] Specifically, before creating a business container, a verification operation is performed to ensure the security of business operation.

[0042] In an optional implementation, when it is monitored within the preset time period that the target update service container runs successfully, and there is no original service container corresponding to the target identification information in at least one original service container run by the baseboard management controller, the method further includes:

[0043] The target update container file in the first storage area is directly copied to the second storage area of ​​the first memory to complete the upgrade operation corresponding to the target update container file.

[0044] Specifically, if the updated business container runs successfully and a new business container is added, after completing the relevant operations, the corresponding updated container file is promptly moved to the second storage area, so that after the baseboard management controller is restarted or powered off, the updated container file can still be used to create a new business container.

[0045] In a second aspect, the present invention provides an image file upgrade device for a baseboard management controller, the device comprising:

[0046] The acquisition module is used to obtain the image file upgrade instruction;

[0047] An extraction module, used for extracting the image file to be upgraded according to the image file upgrade instruction, wherein the image file to be upgraded is an image file that has been modified in the image file of the baseboard management controller;

[0048] A parsing module, used for parsing the image file to be upgraded, obtaining an object type of an operation object corresponding to the image file to be upgraded, an upgrade data packet corresponding to the operation object, and first verification information;

[0049] The acquisition module is further used to acquire the second verification information stored locally;

[0050] An execution module is used to perform a first verification operation according to the first verification information, the second verification information, the object type, and the upgrade data packet, and determine a result of the first verification operation; when the result of the first verification operation is passed, perform an upgrade operation according to the object type and the upgrade data packet.

[0051] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the image file upgrade method of the baseboard management controller of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0052] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the image file upgrade method of a baseboard management controller of the first aspect or any corresponding embodiment thereof.

[0053] In a fifth aspect, the present invention provides a computer program product, including computer instructions, which are used to enable a computer to execute the image file upgrade method of a baseboard management controller according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0055] Figure 1 is a schematic diagram of a system architecture according to an embodiment of the present invention;

[0056] Figure 2 is a flow chart of an image file upgrade method of a baseboard management controller according to an embodiment of the present invention;

[0057] Figure 3 is a schematic diagram of the structure of an image file to be upgraded according to an embodiment of the present invention;

[0058] Figure 4 is a schematic diagram of a process of generating first verification information according to an embodiment of the present invention;

[0059] Figure 5 is a schematic diagram of a flow chart of performing a verification operation according to an embodiment of the present invention;

[0060] Figure 6 is a schematic diagram of a code structure of a baseboard management controller according to an embodiment of the present invention;

[0061] Figure 7 is a flow chart of another method for upgrading an image file of a baseboard management controller according to an embodiment of the present invention;

[0062] Figure 8 is a schematic diagram of data flow during an upgrade operation according to an embodiment of the present invention;

[0063] Fig. 9 is a structural block diagram of an image file upgrade device of a baseboard management controller according to an embodiment of the present invention;

[0064] Fig.10It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0065] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0066] The present invention can be implemented by a system consisting of a baseboard management controller (BMC) and a client. The system can be implemented as follows: Figure 1 As shown. Among them, the baseboard management controller may include a first memory and a second memory. Among them, the first memory may be a non-volatile memory, for example, a flash memory (Flash), for storing image files. The first memory may include a storage area with timeliness (first storage area) and a permanent storage area, and the permanent storage area includes a second storage area and a third storage area. The first storage area is used as a temporary folder to temporarily store the image file to be upgraded, and will be deleted after the corresponding upgrade operation is completed. The second storage area and the third storage area are used to store the permanent storage image file to be upgraded, and will not be deleted until it is upgraded again. The second memory may be a memory.

[0067] An embodiment of the present invention provides a method for upgrading an image file of a baseboard management controller. By dividing the image file of the baseboard management controller into levels, only the modified part of the file is upgraded during the upgrade, rather than upgrading the entire image file of the baseboard management controller, thereby improving the image file upgrade efficiency of the baseboard management controller.

[0068] According to an embodiment of the present invention, an embodiment of an image file upgrade method of a baseboard management controller is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0069] In this embodiment, a method for upgrading an image file of a baseboard management controller is provided, which can be executed by the baseboard management controller. Figure 2 is a flow chart of an image file upgrade method of a baseboard management controller according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0070] Step S201, obtaining an image file upgrade instruction.

[0071] Specifically, when it is necessary to upgrade some image files of the baseboard management controller, the user can select the identification information of the corresponding baseboard management controller in the display interface of the client and click the upgrade control. The client can obtain the corresponding communication information according to the identification information of the baseboard management controller selected by the user detected. For example, the communication information may include the communication address of the baseboard management controller and the storage address of the image file to be upgraded. The client can generate an image file upgrade instruction according to the storage address of the image file to be upgraded, and then send the image file upgrade instruction to the baseboard management controller according to the communication address. In this way, the baseboard management controller can obtain the image file upgrade instruction. Among them, the image file to be upgraded is an image file that has been modified in the image file of the baseboard management controller. The storage address can be used to indicate the interface information of the website or storage device. For example, the storage device can be a Universal Serial Bus (USB) device.

[0072] Alternatively, the user may upload the image file to be upgraded to the storage address corresponding to the baseboard management controller on the client, so that when the client recognizes the user's operation, it may automatically generate an image file upgrade instruction according to the storage address.

[0073] Step S202: extracting the image file to be upgraded according to the image file upgrade instruction.

[0074] Specifically, after receiving the image file upgrade instruction sent by the client, the baseboard management controller can parse the image file upgrade instruction to obtain the storage address corresponding to the image file to be upgraded. The baseboard management controller can download the image file to be upgraded from the storage address to the first storage area of ​​the first memory for subsequent parsing operations on the image file to be upgraded.

[0075] Step S203: parsing the image file to be upgraded to obtain the object type of the operation object corresponding to the image file to be upgraded, the upgrade data package corresponding to the operation object, and the first verification information.

[0076] The structure of the image file to be upgraded can be as follows: Figure 3 As shown, it includes the object type of the operation object (which may be stored in the image file to be upgraded in the form of HPM Header), the upgrade data packet and the first verification information.

[0077] Specifically, the baseboard management controller can parse the image file to be upgraded to obtain the object type, the upgrade data package and the first verification information. For example, the first verification information may include a public key and a signature key. The public key and the signature key may be pre-generated by the client, and the generation process may be as follows: Figure 4 As shown, the following steps are included:

[0078] Generate a public key and a private key according to a pre-built asymmetric encryption algorithm, then calculate the first hash value of the upgrade data package and the object type according to the pre-built hash algorithm (Hash), and then calculate the signature key according to the private key and the first hash value. After calculating the first hash value, the client can send the first hash value to the baseboard management controller for local storage. Among them, the asymmetric encryption algorithm can be the Rivest-Shamir-Adleman (RSA) algorithm or the elliptic curve (Elliptic Curve Cryptography, ECC).

[0079] Step S204, obtaining the second verification information stored locally.

[0080] The second verification information may be the first hash value mentioned above.

[0081] Step S205, performing a first verification operation according to the first verification information, the second verification information, the object type, and the upgrade data packet, and determining a result of the first verification operation.

[0082] Specifically, Figure 5 As shown, the baseboard management controller can calculate the second hash value of the public key obtained by parsing. Then, the second hash value is compared with the first hash value. If the two are inconsistent, it is determined that the result of the first verification operation is not passed. If the two are consistent, the corresponding private key is calculated using the public key, and then the corresponding private key is used to decrypt the signature key to obtain a third hash value, and the fourth hash value is calculated according to the object type obtained by parsing and the upgrade data packet, and it is determined whether the third hash value is consistent with the fourth hash value. If the two are consistent, it is determined that the result of the first verification operation is passed. If the two are inconsistent, it is determined that the result of the first verification operation is not passed. When it is determined that the result of the first verification operation is not passed, the baseboard management controller can generate a first alarm message according to the result of the first verification operation, and send it to the client to notify the user to deal with the problem in time to avoid delaying the image file upgrade operation task.

[0083] Step S206: When the result of the first verification operation is passed, an upgrade operation is performed according to the object type and the upgrade data package.

[0084] The object type may be a service container type, or an operating system and / or a boot loader type.

[0085] In case 1, when the object type is a business container type, the upgrade data packet may include at least one update container file and identification information corresponding to each update container file. Accordingly, the specific steps for upgrading the image file of the baseboard management controller may be as follows:

[0086] Step 1: storing each update container file in at least one update container file included in the upgrade data package into a first storage area in the first memory.

[0087] Step 2: Create a target update service container according to the target update container file in the first storage area.

[0088] The target update container file is any update container file in at least one update container file of the upgrade data package.

[0089] Step 3: After configuring resources for the target update service container, execute the operation on the target update service container.

[0090] Step 4: According to the target identification information corresponding to the target update container file, it is determined whether there is an original service container corresponding to the target identification information in at least one original service container running in the baseboard management controller.

[0091] The baseboard management controller can perform subsequent processing according to the operation result of the above-mentioned target update service container and the judgment result of whether there is a corresponding original service container, which can specifically include the following three situations:

[0092] First, when the target update service container is not monitored to run successfully within a preset time period, the target update container file in the first storage area is deleted.

[0093] Second, when it is monitored within a preset time period that the target update business container runs successfully, and there is an original business container corresponding to the target identification information in at least one original business container run by the baseboard management controller, the business data stream of the original business container corresponding to the target identification information is switched to the target update business container. The target update container file in the first storage area is copied to the second storage area of ​​the first memory. The operation data of the original business container corresponding to the target identification information is deleted (the operation data may be in the memory), and the original container file of the original business container corresponding to the target identification information in the second storage area is deleted to complete the upgrade operation corresponding to the target update container file.

[0094] Third, when it is monitored that the target update business container runs successfully within a preset time period, and there is no original business container corresponding to the target identification information in at least one original business container run by the baseboard management controller, the target update container file in the first storage area is directly copied to the second storage area of ​​the first memory to complete the upgrade operation corresponding to the target update container file.

[0095] Specifically, the baseboard management controller can store the upgrade data package in the first storage area, and traverse each update container file in the upgrade data package. Each time an update container file is traversed, an update service container can be created according to the update container file, resources can be configured for the update service container, and the operation can be started. The following takes the target update service container as an example for a specific description of the subsequent operations.

[0096] When the baseboard management controller starts to create the target update service container, it can start timing. When the timing duration reaches the preset timing duration, if the indication information that the target update service container is successfully executed is still not obtained, it is determined that the target update service container is not successfully executed. When the indication information that the target update service container is successfully executed is obtained during the timing process, it is determined that the target update service container is successfully executed.

[0097] In addition, the baseboard management controller also needs to determine whether the target update service container is a container corresponding to a new service or an upgraded container corresponding to an existing service. Generally, the baseboard management controller can determine the corresponding service identifier based on the target identifier information of the target update container file, and then determine whether the original service container currently running includes the original service container corresponding to the service identifier based on the service identifier. If yes, it is determined that the current operation is an upgrade operation for the existing service, and if not, it is determined that the current operation is an upgrade operation for the new service.

[0098] In this way, when the baseboard management controller determines that the target update business container has not run successfully, regardless of whether the corresponding original business container exists, the target update container file in the first storage area can be deleted (and the data generated in the memory related to the creation of the target update container can be deleted). When the baseboard management controller determines that the target update business container runs successfully, if there is no corresponding original business container, the target update container file in the first storage area can be directly copied to the second storage area of ​​the first memory, so that the update container file can be used to create an update business container after the baseboard management controller is restarted. When the baseboard management controller determines that the target update business container runs successfully, if there is a corresponding original business container, the business data flow switching operation can be performed first, and then all data corresponding to the original business container (including the running data in the memory and the original container file in the second storage area) can be deleted.

[0099] After completing the processing of the target update container file, the baseboard management controller may traverse the next update container file in the first storage area until all update container files in the first storage area are traversed, thereby completing the upgrade operation corresponding to the upgrade data packet.

[0100] In some optional implementations, when the baseboard management controller determines that the target update business container has not run successfully, it can record the identification information of the target update container file. In this way, after traversing all update container files, the baseboard management controller can generate a second alarm message based on the recorded identification information of the update container file that has not run successfully, and send it to the client so that the user can check it in time and find the cause of the error.

[0101] In some optional implementations, the baseboard management controller may also count the number of identification information of update container files that have not been successfully executed. When the number is greater than a preset number threshold, all upgrade data packets in the first storage area are deleted, and the image file to be upgraded is downloaded from the storage address again for processing. In this case, the solution is automatically executed to complete the upgrade task as soon as possible.

[0102] In some optional implementations, the upgrade data package corresponding to the operation object may also include the file size and service level corresponding to each update container file. Accordingly, before creating the update service container, the baseboard management controller may also perform the following operations:

[0103] Step 1: Determine the upgrade urgency index value corresponding to each update container file according to the file size and service level corresponding to each update container file.

[0104] Step 2: Determine the ranking corresponding to each update container file according to the upgrade urgency index value corresponding to each update container file.

[0105] Step three, in the processing of the current round, according to the ranking of at least one update container file for which the upgrade operation has not been completed, a first update container file ranked first is selected from at least one update container file for which the upgrade operation has not been completed as the update container file corresponding to the current round, so as to perform the upgrade operation corresponding to the first update container file in the current round.

[0106] Among them, step one can use the following expression:

[0107] L=Y×C1+D / C2

[0108] Wherein, L is the upgrade urgency index value, Y is the service level, C1 is the first preset weight value, D is the file size, and C2 is the second preset weight value. For example, C1 can be 2, and D can be inversely proportional to the order of magnitude of the file size.

[0109] In this way, by introducing the business level as one of the factors, it can be ensured that the update of key businesses is given higher priority, ensuring that these important businesses can get the latest improvements or fixes as soon as possible. Taking the file size into consideration at the same time can plan the update process more effectively. By adjusting the two preset weight values ​​of C1 and C2, the influence ratio of business level and file size on the final urgency index value can be flexibly changed according to specific needs, which is more flexible.

[0110] In case 2, when the object type is a boot loader and / or an operating system of a baseboard management controller, the baseboard management controller may perform the following specific steps:

[0111] Step 1: storing an upgrade data package corresponding to the operation object in the third storage area of ​​the first memory.

[0112] Step 2: restart the baseboard management controller so that the baseboard management controller reads and runs the upgrade data package from the third storage area during the restart process to complete the upgrade operation corresponding to the upgrade data package.

[0113] In some optional implementations, the Basic Input / Output System (BIOS) firmware may also be upgraded in the above manner. Specifically, the BIOS firmware may be divided into multiple modules according to the types of functions implemented by the BIOS firmware. During the upgrade, only the modified modules need to be updated.

[0114] The image file upgrade method of the baseboard management controller provided in this embodiment divides the image file of the baseboard management controller as a whole. When upgrading, only the modified image file can be obtained, rather than the overall image file, which can reduce the amount of data transmission and save network resources and storage resources. After obtaining the image file to be upgraded, the baseboard management controller can parse the image file to be upgraded to obtain the object type of the operation object, the upgrade data including the first verification information. Then, according to the first verification information and the second verification information, a verification operation is performed to ensure that the received image file to be upgraded is safe and correct. Finally, the baseboard management controller performs corresponding operations on the upgrade data packet according to the different object types to complete the upgrade operation. In this way, during the upgrade process, the content of the upgrade is greatly reduced, and only the modified image file needs to be upgraded, which can improve the efficiency of the image file upgrade.

[0115] The code hierarchy of the baseboard management controller can be divided as follows Figure 6 As shown, it includes hardware driver code, a boot loader (Universal Boot, U-Boot), an operating system, a container engine and multiple service containers. The target service container in the multiple service containers is used to execute services related to the upgrade operation. The operating system includes a kernel and a container manager.

[0116] Accordingly, the process of starting the baseboard management controller can be as follows:

[0117] After the baseboard management controller is powered on, the baseboard management controller performs a third verification operation on the boot loader. When the result of the third verification operation is passed, the boot loader performs a fourth verification operation on the kernel of the operating system. When the result of the fourth verification operation is passed, the kernel performs a fifth verification operation on the container manager in the operating system. When the result of the fifth verification operation is passed, the kernel starts the main process to enable the operating system to run normally. The container manager is started, and the container manager performs a sixth verification operation on the container engine. When the result of the sixth verification operation is passed, at least one original container file stored in the second storage area of ​​the first memory and verification information corresponding to each original container file are obtained. According to the verification information corresponding to each original container file, a second verification operation is performed on each original container file respectively. When it is determined that the result of the second verification operation of the target original container file is passed, a target original business container corresponding to the target original container file is created according to the target original container file. Among them, the target original container file is any original container file in the at least one original container file stored in the second storage area. Resource configuration is performed on the target original business container, and a running operation is performed on the target original business container.

[0118] After completing the above process, you can execute Figure 7 The upgrade process shown is as follows:

[0119] After the target business container obtains the image file upgrade instruction, the image file to be upgraded can be downloaded from the storage address in the image file upgrade instruction to the second storage area in the flash memory through the container manager according to the image file upgrade instruction. In addition, the target business container can parse the image file to be upgraded to obtain the object type of the operation object, the upgrade data packet corresponding to the operation object, and the first verification information. Then, the target business container can perform the first verification operation according to the first verification information and the second verification information stored locally. When the result of the first verification operation is passed, the corresponding upgrade method is determined according to the object type. Specifically, it can be: when the object type is an operating system and / or a boot loader, the upgrade data packet can be copied to the third storage area and a restart operation is performed. When the object type is a business container type, the container manager can be notified, and the container manager updates the container file from each upgrade data packet stored in the second storage area and sends it to the container engine, and the container engine creates an update business container, and performs resource configuration operations, operation operations, etc. The container engine can monitor whether the update business container runs successfully. When the update business container runs successfully, the data stream corresponding to the original business container is switched to the update business container, and the operation of the corresponding original business container is stopped. In addition, the container engine needs to notify the container manager of the indication information that the updated service container is running successfully, so that the container manager can delete the operation data related to the original service container in the memory and copy the updated container file in the first storage area to the second storage area. The data flow diagram during the upgrade operation can be as follows: Figure 8 shown.

[0120] In this embodiment, a device for upgrading the image file of a baseboard management controller is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0121] This embodiment provides an image file upgrade device for a baseboard management controller, such as Fig. 9 As shown, including:

[0122] The acquisition module 901 is used to acquire the image file upgrade instruction;

[0123] An extraction module 902 is used to extract the image file to be upgraded according to the image file upgrade instruction, wherein the image file to be upgraded is an image file that has been modified in the image file of the baseboard management controller;

[0124] A parsing module 903 is used to parse the image file to be upgraded, and obtain the object type of the operation object corresponding to the image file to be upgraded, the upgrade data package corresponding to the operation object, and the first verification information;

[0125] The acquisition module 901 is also used to acquire the second verification information stored locally;

[0126] Execution module 904 is used to perform a first verification operation according to the first verification information, the second verification information, the object type, and the upgrade data packet, and determine the result of the first verification operation; when the result of the first verification operation is passed, perform an upgrade operation according to the object type and the upgrade data packet.

[0127] In some optional implementations, when the object type is a business container type, the upgrade data package includes at least one update container file and identification information corresponding to each update container file;

[0128] The execution module 904 is specifically used for:

[0129] storing each update container file of at least one update container file included in the upgrade data packet in a first storage area in the first memory;

[0130] Creating a target update service container according to the target update container file in the first storage area, wherein the target update container file is any update container file in at least one update container file of the upgrade data package;

[0131] After configuring resources for the target update service container, execute the operation on the target update service container;

[0132] Determining, according to the target identification information corresponding to the target update container file, whether there is an original service container corresponding to the target identification information in at least one original service container running in the baseboard management controller;

[0133] When it is monitored within a preset time period that the target update service container runs successfully, and there is an original service container corresponding to the target identification information in at least one original service container run by the baseboard management controller, the service data flow of the original service container corresponding to the target identification information is switched to the target update service container;

[0134] Copying the target update container file in the first storage area to the second storage area of ​​the first memory, wherein the first storage area is a storage area with time validity and the second storage area is a permanent storage area;

[0135] The operation data of the original service container corresponding to the target identification information is deleted, and the original container file of the original service container corresponding to the target identification information in the second storage area is deleted to complete the upgrade operation corresponding to the target update container file.

[0136] In an optional implementation, when the object type is a boot loader and / or an operating system of a baseboard management controller, the execution module 904 is specifically configured to:

[0137] storing the upgrade data package in the third storage area of ​​the first memory;

[0138] The baseboard management controller is restarted so that the baseboard management controller reads and runs the upgrade data package from the third storage area during the restart process to complete the upgrade operation corresponding to the upgrade data package, wherein the third storage area is a permanent storage area.

[0139] In an optional implementation, the image file upgrade instruction includes a storage address corresponding to the image file to be upgraded;

[0140] The extraction module 902 is specifically used for:

[0141] The image file to be upgraded is downloaded from the storage address to the first storage area of ​​the first memory for subsequent parsing operation of the image file to be upgraded.

[0142] In an optional implementation, the execution module 904 is further configured to:

[0143] When the target update service container is not monitored to run successfully within the preset time period, the target update container file in the first storage area is deleted.

[0144] In an optional implementation, the execution module 904 is further configured to:

[0145] Acquire at least one original container file stored in the second storage area of ​​the first memory, and verification information corresponding to each original container file;

[0146] performing a second verification operation on each original container file according to the verification information corresponding to each original container file;

[0147] When it is determined that the result of the second verification operation of the target original container file is passed, creating a target original service container corresponding to the target original container file according to the target original container file, wherein the target original container file is any one of the at least one original container file stored in the second storage area;

[0148] Resources are configured for the target original business container, and operation operations are performed on the target original business container.

[0149] In an optional implementation, the execution module 904 is further configured to:

[0150] When it is monitored within a preset time period that the target update business container runs successfully, and there is no original business container corresponding to the target identification information in at least one original business container run by the baseboard management controller, the target update container file in the first storage area is directly copied to the second storage area of ​​the first memory to complete the upgrade operation corresponding to the target update container file.

[0151] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0152] The image file upgrade device of the baseboard management controller in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0153] The embodiment of the present invention also provides a computer device having the above Fig. 9 The image file upgrade device of the baseboard management controller is shown.

[0154] See also Fig.10 , Fig.10 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig.10 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.10 A processor 10 is taken as an example.

[0155] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware integrated circuit. The hardware integrated circuit may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.

[0156] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0157] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0158] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0159] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0160] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0161] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0162] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for upgrading an image file of a baseboard management controller, characterized in that: The method comprises: Get the image file upgrade instruction; Extracting the image file to be upgraded according to the image file upgrade instruction, wherein the image file to be upgraded is an image file that has been modified in the image file of the baseboard management controller; Parsing the image file to be upgraded to obtain an object type of an operation object corresponding to the image file to be upgraded, an upgrade data packet corresponding to the operation object, and first verification information; Obtaining the second verification information stored locally; Performing a first verification operation according to the first verification information, the second verification information, the object type, and the upgrade data packet, and determining a result of the first verification operation; When the result of the first verification operation is passed, an upgrade operation is performed according to the object type and the upgrade data package.

2. The method according to claim 1, characterized in that When the object type is a business container type, the upgrade data packet includes at least one update container file and identification information corresponding to each update container file; When the result of the first verification operation is passed, performing an upgrade operation according to the object type and the upgrade data packet includes: storing each of the at least one update container file included in the upgrade data package in a first storage area in the first memory; Creating a target update service container according to the target update container file in the first storage area, wherein the target update container file is any one of the at least one update container file in the upgrade data package; After configuring resources for the target update service container, executing a running operation on the target update service container; Determining, according to the target identification information corresponding to the target update container file, whether there is an original service container corresponding to the target identification information in at least one original service container running in the baseboard management controller; When it is monitored within a preset time period that the target update service container runs successfully, and there is an original service container corresponding to the target identification information in at least one original service container run by the baseboard management controller, switching the service data flow of the original service container corresponding to the target identification information to the target update service container; Copy the target update container file in the first storage area to the second storage area of ​​the first memory, wherein the first storage area is a storage area with time validity and the second storage area is a permanent storage area; The operation data of the original business container corresponding to the target identification information is deleted, and the original container file of the original business container corresponding to the target identification information in the second storage area is deleted to complete the upgrade operation corresponding to the target update container file.

3. The method according to claim 1, characterized in that When the object type is a boot loader and / or an operating system of the baseboard management controller, when the result of the first verification operation is passed, performing an upgrade operation according to the object type and the upgrade data packet, including: storing the upgrade data package in the third storage area of ​​the first memory; The baseboard management controller is restarted so that the baseboard management controller reads and runs the upgrade data packet from the third storage area during the restart process to complete the upgrade operation corresponding to the upgrade data packet, wherein the third storage area is a permanent storage area.

4. The method according to claim 2 or 3, characterized in that: The image file upgrade instruction includes a storage address corresponding to the image file to be upgraded; The extracting the image file to be upgraded according to the image file upgrade instruction includes: The image file to be upgraded is downloaded from the storage address to the first storage area of ​​the first memory for subsequent parsing operation on the image file to be upgraded.

5. The method according to claim 2, characterized in that: The method further comprises: When the target update service container is not monitored to run successfully within the preset time period, the target update container file in the first storage area is deleted.

6. The method according to claim 2, characterized in that Before obtaining the image file upgrade instruction, the method further includes: Acquire at least one original container file stored in the second storage area of ​​the first memory, and verification information corresponding to each of the original container files; performing a second verification operation on each of the original container files according to the verification information corresponding to each of the original container files; When it is determined that the result of the second verification operation of the target original container file is passed, creating a target original service container corresponding to the target original container file according to the target original container file, wherein the target original container file is any one of the at least one original container file stored in the second storage area; Resources are configured for the target original service container, and an operation is performed on the target original service container.

7. The method according to claim 2, characterized in that When it is monitored within the preset time period that the target update service container runs successfully, and there is no original service container corresponding to the target identification information in at least one original service container run by the baseboard management controller, the method further includes: The target update container file in the first storage area is directly copied to the second storage area of ​​the first memory to complete the upgrade operation corresponding to the target update container file.

8. A device for upgrading an image file of a baseboard management controller, characterized in that: The device comprises: The acquisition module is used to obtain the image file upgrade instruction; An extraction module, used for extracting the image file to be upgraded according to the image file upgrade instruction, wherein the image file to be upgraded is an image file that has been modified in the image file of the baseboard management controller; A parsing module, used for parsing the image file to be upgraded, obtaining an object type of an operation object corresponding to the image file to be upgraded, an upgrade data packet corresponding to the operation object, and first verification information; The acquisition module is further used to acquire the second verification information stored locally; An execution module is used to perform a first verification operation according to the first verification information, the second verification information, the object type, and the upgrade data packet, and determine a result of the first verification operation; when the result of the first verification operation is passed, perform an upgrade operation according to the object type and the upgrade data packet.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the image file upgrade method of the baseboard management controller according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the image file upgrade method of the baseboard management controller according to any one of claims 1 to 7.