BIOS option variable table generation method and device, electronic equipment and medium

By automatically generating BIOS option variable tables, the problem of time-consuming and laborious update of BIOS option variable tables in the existing technology is solved, and efficient and accurate BIOS configuration management is achieved.

CN119886088AActive Publication Date: 2025-04-25INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202510081553.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-04-25
Estimated Expiration
2045-01-17

AI Technical Summary

Technical Problem

The existing BIOS option variable table update method is time-consuming and labor-intensive, with high error rate, making it difficult to ensure the accuracy and consistency of option variables.

Method used

By obtaining the hardware configuration data sent by the BIOS, determine the requirements for the generation of the option variable table, extract key information, and traverse the requirements for the generation of the option variable table, populate it into the preset variable table template, and automatically generate the BIOS option variable table.

Benefits of technology

It realizes the rapid and accurate generation of option variable tables containing all BIOS options, significantly improving the efficiency and accuracy of BIOS configuration management, and reducing the complexity and error rate of manual operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119886088A_ABST
    Figure CN119886088A_ABST
Patent Text Reader

Abstract

The invention relates to a BIOS option variable table generation method and device, electronic equipment and a medium. The method comprises the steps of obtaining hardware configuration data sent by at least one BIOS, determining an option variable table generation demand of each BIOS, determining at least one BIOS option of each BIOS according to the option variable table generation demand of each BIOS, and extracting key information of each BIOS from the hardware configuration data in combination with the corresponding option variable table generation demand; and traversing the key information of the corresponding BIOS according to the at least one BIOS option to obtain a traversing result of each BIOS, and filling a preset variable table template with the traversing result of each BIOS to obtain an option variable table of each BIOS. Therefore, by automatically generating the option variable table, the problems that an existing BIOS option variable table updating method is time-consuming, labor-consuming, high in error rate and the like are solved, and the efficiency and accuracy of BIOS configuration management are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and medium for generating a BIOS option variable table. Background Art

[0002] As the complexity of computer systems continues to increase, the management of option variables becomes increasingly complex. For example, in a server with multiple CPUs (Central Processing Units), each CPU may be equipped with multiple PCIe (Peripheral Component Interconnect Express) controllers (a high-speed serial computer expansion bus standard), and each PCIe controller is connected to multiple ports. When the BIOS (Basic Input Output System) needs to be upgraded or the system configuration needs to be changed, it becomes particularly important to ensure the accuracy and consistency of these option variables.

[0003] In the related art, multiple variables corresponding to BIOS configuration options are often manually created and updated, and technicians are required to have certain professional knowledge and experience to ensure that each variable is correctly set and adjusted. However, this method is not only time-consuming and labor-intensive, but also has a high error rate. How to quickly and accurately generate an option variable table containing all BIOS options has become an urgent problem to be solved. Summary of the invention

[0004] The present application provides a method, device, electronic device and medium for generating a BIOS option variable table to solve the problems of the existing BIOS option variable table updating method being time-consuming, labor-intensive and having a high error rate, and significantly improve the efficiency and accuracy of BIOS configuration management.

[0005] To achieve the above-mentioned purpose, the first embodiment of the present application proposes a method for generating a BIOS option variable table, comprising the following steps:

[0006] Obtaining hardware configuration data sent by at least one BIOS;

[0007] Determine an option variable table generation requirement for each BIOS, and determine at least one BIOS option of each BIOS according to the option variable table generation requirement for each BIOS, and extract key information of each BIOS from the hardware configuration data according to the at least one BIOS option of each BIOS and the option variable table generation requirement for each BIOS;

[0008] According to at least one BIOS option of each BIOS, key information of the corresponding BIOS is traversed to obtain a traversal result of each BIOS, and the traversal result of each BIOS is filled into a preset variable table template to obtain an option variable table of each BIOS.

[0009] Through the above-mentioned technical means, according to the requirements of option variable table generation, key information is extracted from the collected hardware configuration data and traversed, so as to realize automatic perception of key information unique to BIOS options with the same name, fill the traversal results into the template, and automatically generate the option variable table of BIOS, thereby effectively improving the efficiency and accuracy of BIOS option variable generation, and ensuring the complete realization of BIOS function of one-click configuration retention and upgrade.

[0010] According to an embodiment of the present application, traversing the key information of the corresponding BIOS according to at least one BIOS option of each BIOS to obtain the traversal result of each BIOS includes:

[0011] Determine, according to at least one BIOS option of each BIOS, a hierarchical relationship of option variables corresponding to each BIOS option of each BIOS;

[0012] Based on the hierarchical relationship of option variables corresponding to each BIOS option of each BIOS, traverse the key information of the corresponding BIOS in sequence to obtain the traversal result of each option variable hierarchy corresponding to each BIOS option of each BIOS;

[0013] The traversal result of each BIOS is obtained by enumerating the traversal result of each option variable level corresponding to each BIOS option of each BIOS.

[0014] Through the above-mentioned technical means, using the hierarchical traversal method, all option variables with the same name corresponding to all BIOS options with the same name can be enumerated, avoiding the blind creation of numerous option variables, effectively improving configuration efficiency, and reducing the complexity and error rate of manual operations, reducing system operation problems caused by configuration omissions or errors, and in addition, reducing the cost and time of manual intervention and reducing operation and maintenance costs.

[0015] According to an embodiment of the present application, generating a requirement based on at least one BIOS option of each BIOS and an option variable table of each BIOS, extracting key information of each BIOS from the hardware configuration data includes:

[0016] Determine an option variable for each BIOS option of each BIOS according to at least one BIOS option of each BIOS and an option variable table generation requirement of each BIOS;

[0017] Based on the option variables of each BIOS option of each BIOS, key information of each BIOS is extracted from the hardware configuration data.

[0018] Through the above technical means, the option variables corresponding to the BIOS options are determined according to the requirements of each BIOS option and variable table generation, and key information is extracted from the hardware configuration data based on the selection variables. This not only improves the accuracy of information extraction, but also significantly enhances the system's understanding and processing capabilities of hardware configuration data.

[0019] According to an embodiment of the present application, after obtaining the option variable table of each BIOS, the method further includes:

[0020] Determine whether the current BIOS has received an upgrade instruction;

[0021] If the current BIOS receives the upgrade instruction, the option variable table of the current BIOS is stored in a basic management controller corresponding to the current BIOS through the current BIOS;

[0022] If the current BIOS has completed upgrading, the option variable table of the current BIOS is obtained from a basic management controller corresponding to the current BIOS through the current BIOS.

[0023] Through the above technical means, after the BIOS receives the upgrade instruction, the BIOS saves the option variable table to the corresponding basic management controller, and after the upgrade is completed, the BIOS restores the option variable table from the controller, so that the upgraded BIOS settings can be consistent with those before the upgrade, reducing the risk of system crash or failure to start due to BIOS upgrade failure.

[0024] According to an embodiment of the present application, before storing the option variable table of the current BIOS to the basic management controller corresponding to the current BIOS through the current BIOS, the method further includes:

[0025] Determine a storage format of a basic management controller corresponding to the current BIOS;

[0026] Based on the storage format, the option variable table of the current BIOS performs format conversion.

[0027] Through the above technical means, an option variable table transfer mechanism based on the storage format is established between the BIOS and the corresponding basic management controller, which realizes convenient management and efficient operation and maintenance of the BIOS configuration, while improving the security and stability of the BIOS upgrade.

[0028] According to one embodiment of the present application, after extracting the key information of each BIOS from the hardware configuration data, the method further includes:

[0029] Fill the key information of each BIOS into a preset data structure.

[0030] By using the above technical means and pre-setting the data structure, the relevant configuration information of BIOS can be effectively stored and managed, ensuring that the organization of BIOS configuration information is both orderly and easy to access, thereby facilitating subsequent configuration and management.

[0031] According to one embodiment of the present application, the preset data structure includes at least one of a name, a data type, a value range, and an option variable of a BIOS option.

[0032] According to the method for generating the BIOS option variable table proposed in the embodiment of the present application, by extracting key information from the collected hardware configuration data and traversing it according to the requirements for generating the option variable table of each BIOS, it is possible to automatically sense the key information specific to the BIOS options with the same name, and fill the traversal results into the preset variable table template, thereby automatically generating the BIOS option variable table. Thus, the problems of the existing BIOS option variable table update method being time-consuming and labor-intensive, and having a high error rate are solved, and the efficiency and accuracy of BIOS configuration management are significantly improved.

[0033] To achieve the above-mentioned purpose, a second embodiment of the present application proposes a device for generating a BIOS option variable table, comprising:

[0034] An acquisition module, used for acquiring hardware configuration data sent by at least one BIOS;

[0035] an extraction module, configured to determine an option variable table generation requirement for each BIOS, determine at least one BIOS option of each BIOS according to the option variable table generation requirement for each BIOS, and extract key information of each BIOS from the hardware configuration data according to the at least one BIOS option of each BIOS and the option variable table generation requirement for each BIOS;

[0036] An acquisition module is used to traverse the key information of the corresponding BIOS according to at least one BIOS option of each BIOS to obtain the traversal result of each BIOS, and fill the traversal result of each BIOS into a preset variable table template to obtain the option variable table of each BIOS.

[0037] According to one embodiment of the present application, the obtaining module is specifically used to:

[0038] Determine, according to at least one BIOS option of each BIOS, a hierarchical relationship of option variables corresponding to each BIOS option of each BIOS;

[0039] Based on the hierarchical relationship of option variables corresponding to each BIOS option of each BIOS, traverse the key information of the corresponding BIOS in sequence to obtain the traversal result of each option variable hierarchy corresponding to each BIOS option of each BIOS;

[0040] The traversal result of each BIOS is obtained by enumerating the traversal result of each option variable level corresponding to each BIOS option of each BIOS.

[0041] According to one embodiment of the present application, the extraction module is specifically used to:

[0042] Determine an option variable for each BIOS option of each BIOS according to at least one BIOS option of each BIOS and an option variable table generation requirement of each BIOS;

[0043] Based on the option variables of each BIOS option of each BIOS, key information of each BIOS is extracted from the hardware configuration data.

[0044] According to an embodiment of the present application, after obtaining the option variable table of each BIOS, the obtaining module further includes:

[0045] A judging unit, used to judge whether the current BIOS has received an upgrade instruction;

[0046] a storage unit, configured to store the option variable table of the current BIOS to a basic management controller corresponding to the current BIOS through the current BIOS when the current BIOS receives the upgrade instruction;

[0047] The acquisition unit is used to acquire the option variable table of the current BIOS from the basic management controller corresponding to the current BIOS through the current BIOS when the current BIOS completes the upgrade.

[0048] According to an embodiment of the present application, before storing the option variable table of the current BIOS to the basic management controller corresponding to the current BIOS through the current BIOS, the storage unit is further used to:

[0049] Determine a storage format of a basic management controller corresponding to the current BIOS;

[0050] Based on the storage format, the option variable table of the current BIOS performs format conversion.

[0051] According to an embodiment of the present application, after extracting the key information of each BIOS from the hardware configuration data, the extraction module is further used to:

[0052] Fill the key information of each BIOS into a preset data structure.

[0053] According to one embodiment of the present application, the preset data structure includes at least one of a name, a data type, a value range, and an option variable of a BIOS option.

[0054] According to the BIOS option variable table generation device proposed in the embodiment of the present application, by generating requirements for the option variable table of each BIOS, extracting key information from the collected hardware configuration data and traversing it, it is possible to automatically sense the key information specific to the BIOS options with the same name, and fill the traversal results into the preset variable table template, thereby automatically generating the BIOS option variable table. Thus, the problems of the existing BIOS option variable table update method being time-consuming and labor-intensive, and having a high error rate are solved, and the efficiency and accuracy of BIOS configuration management are significantly improved.

[0055] To achieve the above-mentioned objectives, the third aspect embodiment of the present application proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for generating a BIOS option variable table as described in the above embodiment.

[0056] To achieve the above-mentioned purpose, the fourth aspect of the present application proposes a computer-readable storage medium on which a computer program is stored. The program is executed by a processor to implement the method for generating a BIOS option variable table as described in the above-mentioned embodiment.

[0057] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0059] Figure 1 A flowchart of a method for generating a BIOS option variable table according to an embodiment of the present application;

[0060] Figure 2 A flowchart of another method for generating a BIOS option variable table according to an embodiment of the present application;

[0061] Figure 3A flowchart of a one-key retention configuration upgrade BIOS according to an embodiment of the present application;

[0062] Figure 4 A block diagram of a device for generating a BIOS option variable table according to an embodiment of the present application;

[0063] Figure 5 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0064] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0065] The following describes a method, device, electronic device, and medium for generating a BIOS option variable table according to an embodiment of the present application with reference to the accompanying drawings.

[0066] Figure 1 It is a flowchart of a method for generating a BIOS option variable table according to an embodiment of the present application.

[0067] For example, Figure 1 As shown, the method for generating the BIOS option variable table includes the following steps:

[0068] In step S101, at least one hardware configuration data sent by a BIOS is obtained.

[0069] Among them, BIOS is the first executed program during the computer startup process. It is used to check whether hardware components such as CPU, memory, hard disk drive, etc. are working properly and allow users to configure these components.

[0070] Specifically, the embodiments of the present application can obtain the hardware configuration data of the BIOS of at least one hardware platform through relevant technical means (such as viewing through the BIOS setting interface, using hardware detection software, etc.), and these hardware platforms may include different models of servers, motherboards, and other types of computer hardware.

[0071] In step S102, the option variable table generation requirement of each BIOS is determined, and at least one BIOS option of each BIOS is determined based on the option variable table generation requirement of each BIOS, and based on the at least one BIOS option of each BIOS and the option variable table generation requirement of each BIOS, key information of each BIOS is extracted from the hardware configuration data.

[0072] Among them, the requirement for generating the option variable table of each BIOS is the selection variable content that the corresponding BIOS setting needs to pay attention to. Different users (administrators) or hardware platforms may have different requirements, that is, the requirement for generating the option variable table can be determined according to the characteristics of the hardware device or the actual needs of the user. BIOS options usually involve a series of configuration settings, which can be Boolean values ​​(i.e., logically true or false), numerical values ​​(such as specific numbers), strings (i.e., text characters), etc. These options define the basic parameters and behaviors of the hardware device and are essential for the startup and operation of the computer. A specific BIOS option may contain multiple attributes, such as socket (slot type for processors or other hardware components), PCIe (a high-speed computer expansion bus standard for connecting motherboards and various peripheral devices), IOAT (Intel Input / Output Acceleration Technology), port (ports used for input and output in computer systems), etc. These attributes together constitute the key information of the BIOS, allowing users or system administrators to adjust and optimize the performance and functions of the computer as needed.

[0073] That is to say, after obtaining the hardware configuration data sent by at least one BIOS, the option variable table generation requirements of each BIOS can be further determined. The option variable table is a data structure used to define various adjustable parameters in the BIOS configuration. Each BIOS may have different parameter setting requirements. After clarifying these requirements, at least one option included in each BIOS can be determined based on these requirements. Next, in combination with at least one option of each BIOS and the determined option variable table generation requirements of each BIOS, key information of each BIOS can be extracted from the hardware configuration data obtained in step S101.

[0074] Next, it is described in detail how to generate requirements based on at least one BIOS option of each BIOS and an option variable table of each BIOS, and extract key information of each BIOS from hardware configuration data.

[0075] As a possible implementation method, in some embodiments, requirements are generated based on at least one BIOS option of each BIOS and an option variable table of each BIOS, and key information of each BIOS is extracted from the hardware configuration data, including: determining option variables for each BIOS option of each BIOS according to at least one BIOS option of each BIOS and an option variable table of each BIOS; extracting key information of each BIOS from the hardware configuration data based on the option variables of each BIOS option of each BIOS.

[0076] It is understandable that the option variable of the BIOS option refers to all the attributes of the same name contained in the BIOS option. For example, in a server system with 8 CPUs, each CPU is connected to 6 PCIe, each PCIe contains 8 ports, and each port corresponds to a specific BIOS setting option, called PcieAspm (Peripheral Component Interconnect Express Active State Power Management) option, then the option variable PcieAspm of the server system is 384 (8 (CPU) × 6 (PCIe) × 8 (port)).

[0077] Specifically, when faced with a large-scale option variable setting, the embodiment of the present application can realize the automatic generation process of the BIOS option variable table based on a programming environment (such as Python). Taking Python programming as an example, a parsing function can be created using the Python programming language. After the Python script is embedded in the BIOS code, the parsing function can be used to extract the key information corresponding to each BIOS from the hardware configuration data of at least one BIOS. That is, by using the parsing function to analyze at least one BIOS option included in each BIOS and the generation requirements of the option variable table of each BIOS, the option variables of all BIOS options corresponding to each BIOS can be clarified, and the key information corresponding to each BIOS can be further extracted from the hardware configuration data based on the option variables of all BIOS options corresponding to each BIOS. Among them, the parsing function is a program function whose function is to analyze and process input data, and is usually used to extract specific information or convert data formats. In the embodiment of the present application, the parsing function is used to read and understand the hardware configuration data in the BIOS.

[0078] By generating requirements based on each BIOS option and variable table, the option variables corresponding to the BIOS options are determined, and key information is extracted from the hardware configuration data based on the selection variables. This not only improves the accuracy of information extraction, but also significantly enhances the system's understanding and processing capabilities of hardware configuration data.

[0079] It should be noted that before using the Python programming language to create a Python script for parsing functions, you can also import some specific libraries to help users handle various tasks. For example, importing the os library can help users perform operating system-related operations, such as file and directory management; the json library allows users to process data in JSON format; the requests library is a powerful HTTP library for network communication, such as obtaining web page content or interacting with APIs. These libraries can provide rich functions, making Python programming more efficient and convenient.

[0080] In step S103, key information of the corresponding BIOS is traversed according to at least one BIOS option of each BIOS to obtain a traversal result of each BIOS, and the traversal result of each BIOS is filled into a preset variable table template to obtain an option variable table of each BIOS.

[0081] It can be understood that the preset variable table template can be understood as a standardized document or table for guiding the user to record and adjust various option variables in the BIOS according to a certain format and sequence.

[0082] That is to say, according to at least one BIOS option contained in each BIOS, the key information of the corresponding BIOS obtained in step S102 can be traversed, thereby understanding the configuration of each BIOS. After the traversal is completed, the traversal result of each BIOS (i.e., the option variables of all BIOS options corresponding to each BIOS) can be obtained. Then, the traversal result of each BIOS is filled into the preset variable table template and summarized into a formatted BIOS option variable table, thereby effectively improving the efficiency and accuracy of the generation of BIOS option variables, and providing valuable data support for future BIOS upgrades or system restarts and maintenance.

[0083] In addition, this method is highly flexible and scalable, and can automatically generate option variable tables according to different hardware platforms and BIOS versions to meet diverse information processing needs.

[0084] The following describes in detail how to obtain the traversal results for each BIOS.

[0085] As a possible implementation method, in some embodiments, the traversal result of each BIOS is obtained by traversing the key information of the corresponding BIOS according to at least one BIOS option of each BIOS, including: determining the option variable hierarchy relationship corresponding to each BIOS option of each BIOS according to at least one BIOS option of each BIOS; traversing the key information of the corresponding BIOS in turn based on the option variable hierarchy relationship corresponding to each BIOS option of each BIOS to obtain the traversal result of each option variable hierarchy corresponding to each BIOS option of each BIOS; and enumerating the traversal result of each BIOS according to the traversal result of each option variable hierarchy corresponding to each BIOS option of each BIOS.

[0086] Specifically, by analyzing the BIOS options of each BIOS, the option variable hierarchical relationship between the option variables corresponding to each BIOS option can be determined (for example, the next level of the option variable socket is the option variable PCIe, and the next level of the option variable PCIe is the option variable port). Based on the option variable hierarchical relationship corresponding to each identified BIOS option, the key information of each BIOS can be traversed in turn. This process includes checking the level of each option variable and recording the detailed information of each level. In this way, the traversal results of each option variable level corresponding to each BIOS option can be obtained. Finally, based on these traversal results, each BIOS option variable can be enumerated in detail to obtain a comprehensive traversal result for each BIOS.

[0087] For example, assuming that the current BIOS options include socket, PCIe, and port attributes, each type of attribute corresponds to multiple option variables, that is, the attribute socket corresponds to multiple option variables socket, the attribute PCIe corresponds to multiple option variables PCIe, and the attribute port corresponds to multiple option variables port. Based on the option variable hierarchical relationship between these three types of attributes, all option variables socket can be traversed in a loop first to obtain the configuration of all option variables socket (i.e., the traversal result of the first option variable level), and then traversed based on each option variable socket to obtain the configuration of all option variables PCIe (i.e., the traversal result of the second option variable level), and finally traversed based on each option variable PCIe to obtain the configuration of all option variables port (i.e., the traversal result of the third option variable level).

[0088] Through this hierarchical traversal method, all option variables with the same name corresponding to all BIOS options with the same name can be enumerated, avoiding the blind creation of numerous option variables, effectively improving configuration efficiency, and reducing the complexity and error rate of manual operations, reducing system operation problems caused by configuration omissions or errors, and reducing the cost and time of manual intervention, thereby reducing operation and maintenance costs.

[0089] To facilitate understanding, the following explanation is given with reference to specific examples.

[0090] Taking the BIOS option variable named DeEmphasis as an example, suppose there are two sockets, numbered 0 and 1 (socket0 and socket1), each socket is connected to 6 PCIe devices, numbered 0 to 5 (PCIe0~PCIe5), each PCIe device is configured with 8 ports, numbered 0 to 7 (port0~port7), and each port corresponds to a specific BIOS option variable named DeEmphasis.

[0091] Therefore, when calculating the total number of these BIOS option variables with the same name, you need to multiply the number of sockets by the number of PCIe devices on each socket and then multiply by the number of ports on each PCIe device, and you can get 96 BIOS option variables with the same name. Define the option variable corresponding to the socket0-PCIe0-port0 combination as DeEmphasis_0_PE0_0, the option variable corresponding to the socket0-PCIe0-port1 combination as DeEmphasis_0_PE0_1, and so on. The 96 BIOS option variables with the same name can be expressed as DeEmphasis_0_PE0_0~DeEmphasis_1_PE5_7, and the option variable table of the current BIOS can be obtained.

[0092] Optionally, in some embodiments, after obtaining the option variable table of each BIOS, it also includes: determining whether the current BIOS has received an upgrade instruction; if the current BIOS has received an upgrade instruction, storing the option variable table of the current BIOS to a basic management controller corresponding to the current BIOS through the current BIOS; if the current BIOS has completed the upgrade, obtaining the option variable table of the current BIOS from the basic management controller corresponding to the current BIOS through the current BIOS.

[0093] Specifically, when the system is about to shut down, if the current BIOS receives an upgrade instruction (i.e., one-click configuration preservation to upgrade the BIOS), the option variable table of the current BIOS can be transferred to the basic management controller BMC corresponding to the current BIOS through H2B (Host to BMC, the host and BMC (Baseboard Manager Controller) share a memory device) for storage, and after the current BIOS upgrade is completed, the current BIOS can automatically obtain the BIOS option variable table from the corresponding BMC to ensure that during the BIOS upgrade process, even if the current BIOS itself is replaced or updated, the option variable table stored in the BMC can remain intact, ensuring that the upgraded BIOS can accurately restore the previous configuration.

[0094] Therefore, after the BIOS receives the upgrade instruction, the BIOS saves the option variable table to the corresponding basic management controller, and after the upgrade is completed, the BIOS restores the option variable table from the controller. The system can automatically initialize after the upgrade, thereby ensuring that the upgraded BIOS settings are consistent with those before the upgrade, effectively improving the security and stability of the BIOS upgrade, and reducing the risk of system crash or failure to boot due to BIOS upgrade failure.

[0095] In addition, using H2B shared memory devices to transfer information between BMC and BIOS can simplify the configuration management process. Users or administrators do not need to configure BIOS and BMC separately, which reduces the risk of configuration errors and improves management convenience.

[0096] Furthermore, in some embodiments, before storing the option variable table of the current BIOS to the basic management controller corresponding to the current BIOS through the current BIOS, it also includes: determining the storage format of the basic management controller corresponding to the current BIOS; and converting the format of the option variable table of the current BIOS based on the storage format.

[0097] That is to say, before the system POST (Power On Self Test) ends, the current BIOS can convert the option variable table of the current BIOS into a corresponding storage format (i.e., JSON format) based on the storage format (e.g., JSON format) of the BMC corresponding to the current BIOS, so as to facilitate the BMS to recognize and process the option variable table.

[0098] Therefore, by establishing a storage format-based option variable table transfer mechanism between the current BIOS and the corresponding BMC, convenient management and efficient operation and maintenance of the BIOS configuration are achieved, while the security and stability of the BIOS upgrade are improved.

[0099] Furthermore, in some embodiments, after extracting the key information of each BIOS from the hardware configuration data, the method further includes: filling the key information of each BIOS into a preset data structure.

[0100] It is understandable that in order to ensure that subsequent operations can effectively store and manage the relevant configuration information of the BIOS (i.e., the option variable table of the BIOS), a data structure for storing the key information of the BIOS can be defined in advance (i.e., a preset data structure. In computer science, a data structure is a way to organize and store data for easy access and modification). The data structure can be in the form of a dictionary or a class. A dictionary is a collection of key-value pairs, where each key corresponds to a value, and is used to store and organize data; a class defines a set of properties and methods that can create objects with the same characteristics. When storing key information of the BIOS, dictionaries or classes can be used to save various parameter settings, such as boot order, time, date, etc.

[0101] By pre-setting the data structure, the relevant configuration information of the BIOS can be effectively stored and managed, thereby ensuring that the organization of the BIOS configuration information is both orderly and easy to access, thereby facilitating subsequent configuration and management.

[0102] Optionally, in some embodiments, the preset data structure includes at least one of a name, a data type, a value range, and an option variable of the BIOS option.

[0103] In other words, the data structure should be designed to accurately display relevant information about BIOS options, including but not limited to the option name, data type, acceptable value range, and the hardware category to which these options belong (such as socket, PCIe, etc.), providing users with a more convenient and efficient BIOS configuration management experience.

[0104] To facilitate those skilled in the art to further understand the method for generating the BIOS option variable table proposed in the embodiment of the present application, the following is a description of the method. Figure 2 and Figure 3 For further elaboration.

[0105] like Figure 2 As shown, the method for generating the BIOS option variable table may further include the following steps:

[0106] Step S201, the computer system starts to boot up (the starting point of the entire operation process).

[0107] Step S202: When the computer system is started, it will automatically detect and obtain BIOS hardware configuration information, and pass this information to the running Python script program.

[0108] Step S203, after receiving the hardware configuration information, the Python script will sense and generate an option variable table based on the information, and the table includes various configuration option variables of the system hardware.

[0109] Step S204, after receiving the option variable table, the BIOS converts it into a JSON format file that can be recognized by the BMC (baseboard management controller).

[0110] Step S205: The converted JSON format file will then be passed to the BMC (so that the BMC can further process the hardware configuration information).

[0111] Step S206, the system completes the power-on self-test (the end of the entire startup and hardware configuration process).

[0112] Furthermore, if Figure 3 As shown, the one-key configuration-retaining BIOS upgrade method may include the following steps:

[0113] Step S301, the user clicks a one-key retention configuration upgrade option.

[0114] In step S302, the computer system starts to perform BIOS upgrade.

[0115] Step S303, after the BIOS upgrade is completed, the computer system is turned on.

[0116] Step S304: BIOS automatically parses the JSON format file in the BMC into an option variable table of the BIOS (to ensure that the upgraded BIOS can be correctly identified and applied).

[0117] Step S305, keeping the corresponding option value of the BIOS unchanged according to the option variable table, and then initializing the computer system.

[0118] According to the method for generating the BIOS option variable table proposed in the embodiment of the present application, by extracting key information from the collected hardware configuration data and traversing it according to the requirements for generating the option variable table of each BIOS, it is possible to automatically sense the key information specific to the BIOS options with the same name (i.e., all the option variables with the same name corresponding to all the BIOS options with the same name of each BIOS), fill the traversal results into the preset variable table template, and thus automatically generate the option variable table of the BIOS. Thus, the problems of the existing BIOS option variable table update method being time-consuming and labor-intensive, and having a high error rate are solved, and the efficiency and accuracy of BIOS configuration management are significantly improved.

[0119] Next, a device for generating a BIOS option variable table according to an embodiment of the present application will be described with reference to the accompanying drawings.

[0120] Figure 4 It is a block diagram of a device for generating a BIOS option variable table according to an embodiment of the present application.

[0121] like Figure 4 As shown, the device 10 for generating the BIOS option variable table includes: an acquisition module 100 , an extraction module 200 and an acquisition module 300 .

[0122] Wherein, the acquisition module 100 is used to acquire at least one hardware configuration data sent by BIOS;

[0123] An extraction module 200, configured to determine an option variable table generation requirement for each BIOS, and determine at least one BIOS option of each BIOS according to the option variable table generation requirement for each BIOS, and extract key information of each BIOS from the hardware configuration data according to the at least one BIOS option of each BIOS and the option variable table generation requirement for each BIOS;

[0124] The acquisition module 300 is used to traverse the key information of the corresponding BIOS according to at least one BIOS option of each BIOS to obtain the traversal result of each BIOS, and fill the traversal result of each BIOS into a preset variable table template to obtain the option variable table of each BIOS.

[0125] Further, in some embodiments, the obtaining module 300 is specifically used to:

[0126] Determine, based on at least one BIOS option of each BIOS, a hierarchical relationship of option variables corresponding to each BIOS option of each BIOS;

[0127] Based on the hierarchical relationship of option variables corresponding to each BIOS option of each BIOS, key information of the corresponding BIOS is traversed in sequence to obtain traversal results of each option variable hierarchy corresponding to each BIOS option of each BIOS;

[0128] The traversal result of each BIOS is obtained by enumerating the traversal result of each option variable level corresponding to each BIOS option of each BIOS.

[0129] Furthermore, in some embodiments, the extraction module 200 is specifically configured to:

[0130] Determining option variables for each BIOS option of each BIOS based on at least one BIOS option of each BIOS and an option variable table generation requirement for each BIOS;

[0131] Based on option variables of each BIOS option of each BIOS, key information of each BIOS is extracted from the hardware configuration data.

[0132] Further, in some embodiments, after obtaining the option variable table of each BIOS, the obtaining module 300 further includes:

[0133] A judging unit, used to judge whether the current BIOS has received an upgrade instruction;

[0134] A storage unit, configured to store the option variable table of the current BIOS to a basic management controller corresponding to the current BIOS through the current BIOS when the current BIOS receives an upgrade instruction;

[0135] The acquisition unit is used to acquire the option variable table of the current BIOS from the basic management controller corresponding to the current BIOS through the current BIOS when the current BIOS completes the upgrade.

[0136] Further, in some embodiments, before storing the option variable table of the current BIOS to the basic management controller corresponding to the current BIOS through the current BIOS, the storage unit is further used to:

[0137] Determine the storage format of the basic management controller corresponding to the current BIOS;

[0138] Based on the storage format, the current BIOS option variable table performs format conversion.

[0139] Furthermore, in some embodiments, after extracting key information of each BIOS from the hardware configuration data, the extraction module 200 is further used to:

[0140] Fill each BIOS key information into the preset data structure.

[0141] Furthermore, in some embodiments, the preset data structure includes at least one of a name, a data type, a value range, and an option variable of the BIOS option.

[0142] It should be noted that the above explanation of the embodiment of the method for generating a BIOS option variable table is also applicable to the device for generating a BIOS option variable table of this embodiment, and will not be repeated here.

[0143] According to the BIOS option variable table generation device proposed in the embodiment of the present application, by generating requirements for the option variable table of each BIOS, extracting key information from the collected hardware configuration data and traversing it, it is possible to automatically sense the key information specific to the BIOS options with the same name, and fill the traversal results into the preset variable table template, thereby automatically generating the BIOS option variable table. Thus, the problems of the existing BIOS option variable table update method being time-consuming and labor-intensive, and having a high error rate are solved, and the efficiency and accuracy of BIOS configuration management are significantly improved.

[0144] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:

[0145] A memory 501 , a processor 502 , and a computer program stored in the memory 501 and executable on the processor 502 .

[0146] When the processor 502 executes the program, the method for generating the BIOS option variable table provided in the above embodiment is implemented.

[0147] Furthermore, the electronic device further comprises:

[0148] The communication interface 503 is used for communication between the memory 501 and the processor 502 .

[0149] The memory 501 is used to store computer programs that can be executed on the processor 502 .

[0150] The memory 501 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.

[0151] If the memory 501, the processor 502 and the communication interface 503 are implemented independently, the communication interface 503, the memory 501 and the processor 502 can be connected to each other through a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0152] Optionally, in a specific implementation, if the memory 501, the processor 502 and the communication interface 503 are integrated on a chip, the memory 501, the processor 502 and the communication interface 503 can communicate with each other through an internal interface.

[0153] The processor 502 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0154] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for generating a BIOS option variable table as described above is implemented.

[0155] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0156] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0157] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for generating a BIOS option variable table, characterized in that: The following steps are involved: Obtaining hardware configuration data sent by at least one BIOS; Determine an option variable table generation requirement for each BIOS, and determine at least one BIOS option of each BIOS according to the option variable table generation requirement for each BIOS, and extract key information of each BIOS from the hardware configuration data according to the at least one BIOS option of each BIOS and the option variable table generation requirement for each BIOS; According to at least one BIOS option of each BIOS, key information of the corresponding BIOS is traversed to obtain a traversal result of each BIOS, and the traversal result of each BIOS is filled into a preset variable table template to obtain an option variable table of each BIOS.

2. The method according to claim 1, characterized in that The traversing the key information of the corresponding BIOS according to at least one BIOS option of each BIOS to obtain the traversal result of each BIOS includes: Determine, according to at least one BIOS option of each BIOS, a hierarchical relationship of option variables corresponding to each BIOS option of each BIOS; Based on the hierarchical relationship of option variables corresponding to each BIOS option of each BIOS, traverse the key information of the corresponding BIOS in sequence to obtain the traversal result of each option variable hierarchy corresponding to each BIOS option of each BIOS; The traversal result of each BIOS is obtained by enumerating the traversal result of each option variable level corresponding to each BIOS option of each BIOS.

3. The method according to claim 1, characterized in that The step of generating a requirement according to at least one BIOS option of each BIOS and an option variable table of each BIOS, extracting key information of each BIOS from the hardware configuration data, comprises: Determine an option variable for each BIOS option of each BIOS according to at least one BIOS option of each BIOS and an option variable table generation requirement of each BIOS; Based on the option variables of each BIOS option of each BIOS, key information of each BIOS is extracted from the hardware configuration data.

4. The method according to claim 1, characterized in that After obtaining the option variable table of each BIOS, the method further includes: Determine whether the current BIOS has received an upgrade instruction; If the current BIOS receives the upgrade instruction, the option variable table of the current BIOS is stored in a basic management controller corresponding to the current BIOS through the current BIOS; If the current BIOS has completed upgrading, the option variable table of the current BIOS is obtained from a basic management controller corresponding to the current BIOS through the current BIOS.

5. The method according to claim 4, characterized in that Before storing the option variable table of the current BIOS in the basic management controller corresponding to the current BIOS through the current BIOS, the method further includes: Determine a storage format of a basic management controller corresponding to the current BIOS; Based on the storage format, the option variable table of the current BIOS performs format conversion.

6. The method according to claim 3, characterized in that After extracting the key information of each BIOS from the hardware configuration data, the method further includes: Fill the key information of each BIOS into a preset data structure.

7. The method according to claim 6, characterized in that The preset data structure includes at least one of a name, a data type, a value range, and an option variable of a BIOS option.

8. A device for generating a BIOS option variable table, characterized in that: include: An acquisition module, used for acquiring hardware configuration data sent by at least one BIOS; an extraction module, configured to determine an option variable table generation requirement for each BIOS, determine at least one BIOS option of each BIOS according to the option variable table generation requirement for each BIOS, and extract key information of each BIOS from the hardware configuration data according to the at least one BIOS option of each BIOS and the option variable table generation requirement for each BIOS; An acquisition module is used to traverse the key information of the corresponding BIOS according to at least one BIOS option of each BIOS to obtain the traversal result of each BIOS, and fill the traversal result of each BIOS into a preset variable table template to obtain the option variable table of each BIOS.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for generating a BIOS option variable table according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the method for generating a BIOS option variable table according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Parameter configuration management method and device based on graphical user interface

    CN107273163A

  • BIOS (Basic Input / Output System) configuration method and device, equipment and medium

    CN115718627A

  • BIOS (Basic Input / Output System) configuration information exporting method and importing method

    CN117785299A

  • Configuration method and device of basic input and output system, electronic equipment and medium

    CN118210573A

Cited By

  • Configuration method and device for customizing BIOS options based on GPIO

    CN120762780A