Method and device for generating bios option variable table, electronic equipment and medium

By automating the generation of BIOS option variable tables, the problems of time-consuming, labor-intensive, and high error rates in existing technologies are solved. This achieves an efficient and accurate method for generating option variable tables for BIOS configuration management, thereby reducing operation and maintenance costs.

CN119886088BActive Publication Date: 2025-12-19INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing methods for updating BIOS option variable tables are time-consuming, labor-intensive, and have a high error rate, making it difficult to ensure the accuracy and consistency of BIOS configurations, especially in multi-CPU servers where option variable management is complex.

Method used

By obtaining hardware configuration data sent by the BIOS, the requirements for generating the option variable table are determined. Key information is extracted from the hardware configuration data using a parsing function, and the data is traversed based on the hierarchical relationship of the option variables to fill the preset variable table template, thereby achieving automated generation of the option variable table.

Benefits of technology

It improves the efficiency and accuracy of BIOS option variable generation, reduces the complexity and error rate of manual operation, ensures configuration consistency and system stability after BIOS upgrade, and reduces operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119886088B_ABST
    Figure CN119886088B_ABST
Patent Text Reader

Abstract

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

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a BIOS option variable table generation method and device, electronic equipment and medium. BACKGROUND

[0002] With the increasing complexity of computer systems, the management of option variables becomes increasingly complex. For example, in a multi-CPU (Central Processing Unit) server, each CPU can 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 I / O System) needs to be upgraded or the system configuration needs to be changed, how to ensure the accuracy and consistency of these option variables becomes particularly important.

[0003] In related technologies, multiple variables corresponding to BIOS configuration options are often manually created and updated, and technicians need 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 laborious, but also has a high error rate. How to quickly and accurately generate an option variable table containing all BIOS options has become a problem to be solved. SUMMARY

[0004] The present application provides a BIOS option variable table generation method, device, electronic equipment and medium to solve the problems of time-consuming and laborious, high error rate and the like of the existing BIOS option variable table updating method, and significantly improves the efficiency and accuracy of BIOS configuration management.

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

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

[0007] Determining the option variable table generation requirement of each BIOS, and determining at least one BIOS option of each BIOS according to the option variable table generation requirement of each BIOS, and extracting the 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 of each BIOS;

[0008] According to the key information of the corresponding BIOS traversed by at least one BIOS option of each BIOS, the traversal result of each BIOS is obtained, 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] According to the above technical means, according to the generation requirement of the option variable table, the key information is extracted from the collected hardware configuration data and traversed, the key information specific to the BIOS same-name option can be automatically perceived, the traversal result is filled into the template, and the option variable table of the BIOS is automatically generated, thereby effectively improving the efficiency and accuracy of the BIOS option variable generation, and ensuring the complete implementation of the one-key configuration reservation BIOS upgrade function.

[0010] According to an embodiment of the present application, the traversal result of each BIOS is obtained according to the key information of the corresponding BIOS traversed by at least one BIOS option of each BIOS, comprising:

[0011] According to at least one BIOS option of each BIOS, the option variable hierarchical relationship corresponding to each BIOS option of each BIOS is determined;

[0012] Based on the option variable hierarchical relationship corresponding to each BIOS option of each BIOS, the key information of the corresponding BIOS is traversed in turn to obtain the traversal result of each option variable level corresponding to each BIOS option of each BIOS;

[0013] According to the traversal result of each option variable level corresponding to each BIOS option of each BIOS, the traversal result of each BIOS is enumerated.

[0014] According to the above technical means, by using the hierarchical traversal method, all BIOS options with the same name corresponding to all same-name option variables can be enumerated, blind creation of numerous option variables is avoided, configuration efficiency is effectively improved, manual operation complexity and error rate are reduced, system running problems caused by configuration omissions or errors are reduced, in addition, the cost and time of manual intervention are reduced, and the operation and maintenance cost is reduced.

[0015] According to an embodiment of the present application, according to the generation requirement of the option variable table of each BIOS, the key information of each BIOS is extracted from the hardware configuration data, comprising:

[0016] According to the generation requirement of the option variable table of each BIOS, the option variable of each BIOS option of each BIOS is determined;

[0017] extracting key information of each BIOS from the hardware configuration data based on the option variable of each BIOS option of each BIOS.

[0018] By the above technical means, the option variable corresponding to the BIOS option is generated according to each BIOS option and variable table, and the key information is extracted from the hardware configuration data based on the option variable, which not only improves the accuracy of information extraction, but also significantly enhances the understanding and processing capability of the system for the hardware configuration data.

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

[0020] determining whether the current BIOS receives an upgrade instruction;

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

[0022] If the current BIOS completes the upgrade, the option variable table of the current BIOS is obtained from the basic management controller corresponding to the current BIOS through the current BIOS.

[0023] By the above technical means, after the BIOS receives the upgrade instruction, the option variable table is saved to the corresponding basic management controller through the BIOS, and after the upgrade is completed, the BIOS recovers the option variable table from the controller, which can realize that the BIOS setting after the upgrade is consistent with that before the upgrade, and reduce the risk of system crash or unable to start caused by 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, it further includes:

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

[0026] Based on the storage format, the option variable table of the current BIOS is format-converted.

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

[0028] According to one embodiment of the present application, after the key information of each BIOS is extracted from the hardware configuration data, further comprising:

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

[0030] Through the above technical means, the data structure is preset, and the related configuration information of the BIOS can be effectively stored and managed, ensuring that the organization of the BIOS configuration information is orderly and easy to access, thereby providing convenience for subsequent configuration and management.

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

[0032] According to the generation method of the BIOS option variable table proposed in the embodiments of the present application, by generating the requirement according to the option variable table of each BIOS, extracting the key information from the collected hardware configuration data and traversing, the key information specific to the same-name option of the BIOS can be automatically perceived, the traversal result is filled into the preset variable table template, and thus the option variable table of the BIOS is automatically generated. Therefore, the problems of time-consuming, labor-intensive, high error rate and the like of the existing BIOS option variable table updating method are solved, and the efficiency and accuracy of the BIOS configuration management are significantly improved.

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

[0034] The obtaining module is configured to obtain the hardware configuration data sent by at least one BIOS.

[0035] The extraction module is configured to determine the option variable table generation requirement of each BIOS, determine at least one BIOS option of each BIOS according to the option variable table generation requirement of each BIOS, and extract the 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 of each BIOS.

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

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

[0038] According to at least one BIOS option of each BIOS, a corresponding option variable hierarchical relationship of each BIOS option of each BIOS is determined;

[0039] Based on the corresponding option variable hierarchical relationship of each BIOS option of each BIOS, key information of the corresponding BIOS is sequentially traversed to obtain a traversal result of each option variable hierarchical level corresponding to each BIOS option of each BIOS;

[0040] According to the traversal result of each option variable hierarchical level corresponding to each BIOS option of each BIOS, a traversal result of each BIOS is obtained by enumeration.

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

[0042] According to at least one BIOS option of each BIOS and a requirement of generating an option variable table of each BIOS, an option variable of each BIOS option of each BIOS is determined.

[0043] Based on the option variable 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 the option variable table of each BIOS is obtained, the obtaining module further includes:

[0045] A judging unit is configured to judge whether a current BIOS receives an upgrade instruction;

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

[0047] An acquisition unit is configured to, when the current BIOS completes the upgrade, acquire, by the current BIOS, the option variable table of the current BIOS from the basic management controller corresponding to the current BIOS.

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

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

[0050] Based on the storage format, the option variable table of the current BIOS is format-converted.

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

[0052] filling 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 the name, data type, value range and option variable of the BIOS option.

[0054] The BIOS option variable table generation device according to the embodiments of the present application can automatically perceive the key information specific to the BIOS same-name option by generating a requirement according to the option variable table of each BIOS, extracting the key information from the collected hardware configuration data and traversing, filling the traversal result into a preset variable table template, and thus automatically generating the option variable table of the BIOS. Therefore, the problems of time-consuming, labor-intensive, high error rate and the like of the existing BIOS option variable table updating method are solved, and the efficiency and accuracy of BIOS configuration management are significantly improved.

[0055] To achieve the above object, a third aspect of the present application provides 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 BIOS option variable table generation method according to the above embodiments.

[0056] To achieve the above object, a fourth aspect of the present application provides a computer readable storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement the BIOS option variable table generation method according to the above embodiments.

[0057] Additional aspects and advantages of the present application will be in part apparent and in part pointed out hereinafter. BRIEF DESCRIPTION OF DRAWINGS

[0058] The above and / or additional aspects and advantages of the present application will become apparent and be readily appreciated from the following description, including the appended drawings.

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

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

[0061] Figure 3A flowchart of a process of upgrading a BIOS according to a one-key reservation configuration embodiment of the present application;

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

[0063] Figure 5 A structural schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0064] Embodiments of the present application are described in detail below with reference to the accompanying drawings, in which the same or similar notations used throughout the drawings and the specification denote 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 explain the present application, and cannot be understood as limiting the present application.

[0065] A generating method, apparatus, electronic device and medium of a BIOS option variable table according to an embodiment of the present application are described below with reference to the accompanying drawings.

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

[0067] Exemplarily, as shown in Figure 1 the generating method of the BIOS option variable table includes the following steps:

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

[0069] The BIOS is the first execution program in the computer startup process, and is used to check whether hardware components such as CPU, memory, hard disk drive, etc. work normally, and allows users to configure these components.

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

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

[0072] The option variable table generation requirement of each BIOS is to set the contents of the option variables that need to be concerned for the corresponding BIOS. Different users (administrators) or hardware platforms can have different requirements, that is, the option variable table generation requirement can be determined according to the characteristics of the hardware device or the actual requirements 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, which are crucial for the startup and operation of the computer. A specific BIOS option can contain multiple attributes, such as socket (processor or other hardware component socket type), PCIe (a high-speed computer expansion bus standard used to connect the motherboard and various peripheral devices), IOAT (Intel Input / Output Acceleration Technology), port (computer system input / output port), etc. These attributes together constitute the key information of the BIOS, allowing users or system administrators to adjust and optimize the performance and functionality of the computer as needed.

[0073] That is, after obtaining the hardware configuration data sent by at least one BIOS, the option variable table generation requirement 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, and each BIOS can have different parameter setting requirements. After these requirements are clear, the at least one option included in each BIOS can be determined according to these requirements. Next, in combination with the at least one option of each BIOS and the determined option variable table generation requirement of each BIOS, the key information of each BIOS can be extracted from the hardware configuration data obtained in step S101.

[0074] Next, how to extract the 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 of each BIOS will be described in detail.

[0075] As a possible implementation manner, in some embodiments, extracting the 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 of each BIOS includes: determining the option variable of each BIOS option of each BIOS according to the at least one BIOS option of each BIOS and the option variable table generation requirement of each BIOS; and extracting the key information of each BIOS from the hardware configuration data based on the option variable of each BIOS option of each BIOS.

[0076] It can be understood that the option variable of the BIOS option refers to all the same properties contained in the BIOS option. For example, in a server system with 8 CPUs, each CPU is connected with 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. Therefore, the option variable PcieAspm of the server system is 384 (8 (CPU) x 6 (PCIe) x 8 (port)).

[0077] Specifically, in the case of a large-scale option variable setting, the embodiment of the present application can implement 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 embedding the Python script into 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 analyzing at least one BIOS option included in each BIOS and the option variable table generation requirement of each BIOS using the parsing function, the option variable of all BIOS options corresponding to each BIOS can be determined, and based on the option variable of all BIOS options corresponding to each BIOS, the key information corresponding to each BIOS can be further extracted from the hardware configuration data. The parsing function is a program function that analyzes and processes input data, and is usually used to extract specific information or convert data format. 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 determining the option variable corresponding to the BIOS option according to the option variable table generation requirement of each BIOS option, and extracting the key information from the hardware configuration data based on the option variable, not only the accuracy of information extraction is improved, but also the understanding and processing ability of the system for hardware configuration data is significantly enhanced.

[0079] It should be noted that before creating a Python script for parsing functions using the Python programming language, some specific libraries can be imported to help users perform 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 JSON-formatted data; and the requests library is a powerful HTTP library for network communication, such as fetching web page content or interacting with APIs. These libraries can provide a wealth of functionality, making Python programming more efficient and convenient.

[0080] In step S103, the key information of each 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 used to guide users to record and adjust each option variable in the BIOS according to a certain format and order.

[0082] That is, according to at least one BIOS option included in each BIOS, the key information of the corresponding BIOS obtained in step S102 can be traversed to understand the configuration of each BIOS. After traversal is completed, the traversal result of each BIOS (i.e., the option variable 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 is summarized into a formatted BIOS option variable table, thereby effectively improving the efficiency and accuracy of BIOS option variable generation and providing valuable data support for future BIOS upgrade or system restart and maintenance.

[0083] In addition, the method also has high flexibility and scalability, and can automatically generate an option variable table according to different hardware platforms and BIOS versions to meet diversified information processing needs.

[0084] The following will explain in detail how to obtain the traversal result of each BIOS.

[0085] As a possible implementation manner, in some embodiments, the traversal result of each BIOS is obtained according to the key information of the corresponding BIOS according to at least one BIOS option of each BIOS, including: determining the option variable hierarchical relationship corresponding to each BIOS option of each BIOS according to at least one BIOS option of each BIOS; based on the option variable hierarchical relationship corresponding to each BIOS option of each BIOS, sequentially traversing the key information of the corresponding BIOS to obtain the traversal result of each option variable hierarchical level corresponding to each BIOS option of each BIOS; and enumerating the traversal result of each option variable hierarchical level corresponding to each BIOS option of each BIOS to obtain the traversal result 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 hierarchical level of the option variable socket is the option variable PCIe, and the next hierarchical level of the option variable PCIe is the option variable port). Based on the identified option variable hierarchical relationship corresponding to each BIOS option, the key information of each BIOS can be sequentially traversed. This process includes checking the hierarchical level of each option variable and recording the detailed information of each hierarchical level. In this way, the traversal result of each option variable hierarchical level corresponding to each BIOS option can be obtained. Finally, according to these traversal results, detailed enumeration of each BIOS option variable can be performed to obtain the comprehensive traversal result of 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 the three types of attributes, all option variables socket can be traversed in a loop to obtain the configuration of all option variables socket (i.e., the traversal result of the first option variable hierarchical level), then each option variable socket is traversed to obtain the configuration of all option variables PCIe (i.e., the traversal result of the second option variable hierarchical level), and finally each option variable PCIe is traversed to obtain the configuration of all option variables port (i.e., the traversal result of the third option variable hierarchical level).

[0088] Through the layered traversal method, all same-named option variables corresponding to the BIOS options with the same name can be enumerated, blind creation of numerous option variables is avoided, configuration efficiency is effectively improved, complexity and error rate of manual operation are reduced, system running problems caused by configuration omissions or errors are reduced, in addition, cost and time of manual intervention are reduced, and operation and maintenance cost is reduced.

[0089] For ease of understanding, specific examples are described below.

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

[0091] Therefore, when calculating the total number of these same-named BIOS option variables, the number of sockets needs to be multiplied by the number of PCIe devices on each socket and then multiplied by the number of ports on each PCIe device, that is, 96 same-named BIOS option variables can be obtained. The option variable corresponding to the socket0-PCIe0-port0 combination is represented as DeEmphasis_0_PE0_0, the option variable corresponding to the socket0-PCIe0-port1 combination is represented as DeEmphasis_0_PE0_1, and so on. Then the 96 same-named BIOS option variables can be represented as DeEmphasis_0_PE0_0~DeEmphasis_1_PE5_7, and thus 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, the method further includes: determining whether the current BIOS receives an upgrade instruction; if the current BIOS receives the upgrade instruction, storing, by the current BIOS, the option variable table of the current BIOS to a basic management controller corresponding to the current BIOS; and if the current BIOS completes the upgrade, obtaining, by the current BIOS, the option variable table of the current BIOS from the basic management controller corresponding to the current BIOS.

[0093] Specifically, in the case that the system is preparing to shut down, if the current BIOS receives an upgrade instruction (i.e., one-key reserved configuration upgrade BIOS), the option variable table of the current BIOS can be transmitted to the base management controller BMC corresponding to the current BIOS through H2B (Host to BMC, Host to BMC shared memory device) for storage, and after the current BIOS is upgraded, the current BIOS can automatically obtain the BIOS option variable table from the corresponding BMC, so as 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 unchanged, and the upgraded BIOS can accurately restore the previous configuration.

[0094] Therefore, by saving the option variable table to the corresponding base management controller through the BIOS after the BIOS receives the upgrade instruction, and restoring the option variable table from the controller after the upgrade is completed, the system can automatically initialize after the upgrade, thereby ensuring that the settings of the upgraded BIOS remain unchanged before the upgrade, effectively improving the security and stability of the BIOS upgrade, and reducing the risk of system crash or failure to start due to BIOS upgrade failure.

[0095] In addition, the information transmission between the BMC and the BIOS is realized by using the H2B shared memory device, which can simplify the configuration management process. Users or administrators do not need to separately configure the BIOS and the BMC, reducing the risk of configuration errors and improving the convenience of management.

[0096] Further, in some embodiments, before storing the option variable table of the current BIOS to the base management controller corresponding to the current BIOS through the current BIOS, the method further includes: determining the storage format of the base management controller corresponding to the current BIOS; and based on the storage format, the option variable table of the current BIOS is format-converted.

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

[0098] Therefore, by establishing an option variable table transmission mechanism based on the storage format between the current BIOS and the corresponding BMC, convenient management and efficient operation and maintenance of BIOS configuration are realized, and the security and stability of BIOS upgrade are improved.

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

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

[0101] By pre-setting the data structure, the related configuration information of the BIOS can be effectively stored and managed, so as to ensure that the organization of the BIOS configuration information is orderly and easy to access, thereby providing convenience for subsequent configuration and management.

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

[0103] That is, the design of the data structure should be able to accurately and accurately display the related information of the BIOS option, including but not limited to the name of the option, the data type, the acceptable value range, and the hardware category (such as socket, PCIe, etc.) to which these options belong, to provide users with a more convenient and efficient BIOS configuration management experience.

[0104] In order for those skilled in the art to further understand the method for generating the BIOS option variable table proposed in the embodiments of the present application, the following will be further described in conjunction with Figure 2 and Figure 3 .

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

[0106] Step S201, the computer system starts to start (the starting point of the whole operation process).

[0107] Step S202, the computer system automatically detects and obtains the BIOS hardware configuration information when starting, and transmits the information to the running Python script program.

[0108] Step S203, after the Python script receives the hardware configuration information, it will perceive and generate an option variable table according to the information, which contains various configuration option variables of the system hardware.

[0109] Step S204, after the BIOS receives the option variable table, it will be converted 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] Further, as shown in Figure 3 One-key reserved configuration upgrade BIOS method can include the following steps:

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

[0114] Step S302, the computer system will start the BIOS upgrade work.

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

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

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

[0118] According to the BIOS option variable table generation method proposed in the embodiment of the present application, by generating the requirement according to the option variable table of each BIOS, extracting key information from the collected hardware configuration data and traversing, the key information specific to the same name option of the BIOS (i.e. all the same name option variables corresponding to all the same name BIOS options of each BIOS) can be automatically perceived, and the traversal result can be filled into the preset variable table template, so as to automatically generate the option variable table of the BIOS. Therefore, the problems of time-consuming and laborious, high error rate and the like of the existing BIOS option variable table updating method are solved, and the efficiency and accuracy of BIOS configuration management are significantly improved.

[0119] Second, the generation device of the BIOS option variable table according to the embodiment of the present application is described with reference to the accompanying drawings.

[0120] Figure 4 is a block schematic diagram of a BIOS option variable table generation apparatus of an embodiment of the present application.

[0121] As shown in Figure 4 , the BIOS option variable table generation apparatus 10 comprises an acquisition module 100, an extraction module 200 and an obtaining module 300.

[0122] The acquisition module 100 is configured to acquire hardware configuration data sent by at least one BIOS.

[0123] The extraction module 200 is configured to determine an option variable table generation requirement of each BIOS, determine at least one BIOS option of each BIOS according to the option variable table generation requirement of 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 of each BIOS.

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

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

[0126] determine an option variable hierarchical relationship corresponding to each BIOS option of each BIOS according to the at least one BIOS option of each BIOS;

[0127] traverse the key information of the corresponding BIOS in sequence based on the option variable hierarchical relationship corresponding to each BIOS option of each BIOS to obtain a traversal result of each option variable hierarchical level corresponding to each BIOS option of each BIOS;

[0128] obtain the traversal result of each BIOS by enumerating the traversal result of each option variable hierarchical level corresponding to each BIOS option of each BIOS.

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

[0130] determine an option variable of each BIOS option of each BIOS according to the at least one BIOS option of each BIOS and the option variable table generation requirement of each BIOS;

[0131] extract the key information of each BIOS from the hardware configuration data based on the option variable of each BIOS option of each BIOS.

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

[0133] a judging unit, configured to judge whether the current BIOS receives an upgrade instruction;

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

[0135] an acquiring unit, configured to acquire, by the current BIOS, the option variable table of the current BIOS from the basic management controller corresponding to the current BIOS when the current BIOS completes the upgrade.

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

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

[0138] convert the option variable table of the current BIOS based on the storage format.

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

[0140] fill the key information of each BIOS to a preset data structure.

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

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

[0143] The apparatus for generating the BIOS option variable table according to the embodiments of the present application can automatically perceive the key information specific to the BIOS same-name option by extracting the key information from the collected hardware configuration data and traversing according to the generation requirement of the option variable table of each BIOS, fill the traversal result to the preset variable table template, and automatically generate the option variable table of the BIOS. Thus, the problems of time-consuming, labor-intensive, high error rate and the like of the existing BIOS option variable table updating method are solved, and the efficiency and accuracy of the BIOS configuration management are significantly improved.

[0144] Figure 5 The structure schematic diagram of an electronic device is provided for the embodiments of the present application. The electronic device can include:

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

[0146] The processor 502 implements the generation method of the BIOS option variable table provided in the above embodiments when executing the program.

[0147] Further, the electronic device further includes:

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

[0149] The memory 501 is used for storing the computer program executable on the processor 502.

[0150] The memory 501 can include a high-speed RAM (Random Access Memory) memory, and can 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 independently implemented, the communication interface 503, the memory 501 and the processor 502 can be connected to each other through a bus and complete the communication between 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 the convenience of representation, Figure 5 In the figure, only one thick line is used to represent, but it does not mean that there is only one bus or one type of bus.

[0152] Optionally, in 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 complete the communication between each other through an internal interface.

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

[0154] The embodiments of the present application further provide a computer readable storage medium, which has stored a computer program, and the computer program is executed by a processor to implement the method for generating a BIOS option variable table.

[0155] In addition, the terms "first", "second", "third", etc. are used herein only to describe different instances, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second", etc. can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "a plurality of" is at least two, for example, two, three, etc., unless otherwise explicitly and specifically limited.

[0156] In the description of the present application, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present application, the illustrative description of the above terms is not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the present application 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 limiting the present application, and the person skilled in the art can make changes, modifications, replacements and variations to the above embodiments within the scope of the present application.

Claims

1. A method for generating a BIOS option variable table, the method comprising: receiving a BIOS option variable table; and generating a BIOS option variable table based on the received BIOS option variable table. The method comprises the following steps: obtaining hardware configuration data sent by at least one BIOS; determining an option variable table generation requirement of each BIOS, determining at least one BIOS option of each BIOS according to the option variable table generation requirement of each BIOS, and extracting 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 of each BIOS; obtaining a traversal result of each BIOS by traversing the key information of the corresponding BIOS according to the at least one BIOS option of each BIOS, and filling the traversal result of each BIOS into a preset variable table template to obtain an option variable table of each BIOS; wherein the extracting the 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 of each BIOS comprises: determining an option variable of each BIOS option of each BIOS according to the at least one BIOS option of each BIOS and the option variable table generation requirement of each BIOS, and extracting the key information of each BIOS from the hardware configuration data based on the option variable of each BIOS option of each BIOS, wherein the option variable of the BIOS option is all the same name attributes contained in the BIOS option; the obtaining the traversal result of each BIOS by traversing the key information of the corresponding BIOS according to the at least one BIOS option of each BIOS comprises: determining a corresponding option variable hierarchical relationship of each BIOS option of each BIOS according to the at least one BIOS option of each BIOS, sequentially traversing the key information of the corresponding BIOS based on the corresponding option variable hierarchical relationship of each BIOS option of each BIOS to obtain a traversal result of each option variable hierarchical level corresponding to each BIOS option of each BIOS, and enumerating the traversal result of each option variable hierarchical level corresponding to each BIOS option of each BIOS to obtain the traversal result of each BIOS, wherein each BIOS option comprises multiple types of attributes, and each type of attribute corresponds to multiple option variables.

2. The method of claim 1, wherein, After obtaining the option variable table of each BIOS, the method further comprises: determining whether the current BIOS receives an upgrade instruction; if the current BIOS receives the 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 completes 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.

3. The method of claim 2, wherein, 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 comprises: determining a storage format of a basic management controller corresponding to the current BIOS; based on the storage format, performing format conversion on an option variable table of the current BIOS.

4. The method of claim 1, wherein, after extracting the key information of each BIOS from the hardware configuration data, further comprising: filling the key information of each BIOS into a preset data structure.

5. The method of claim 4, wherein, the preset data structure comprises at least one of the name, data type, value range and option variable of the BIOS option.

6. A device for generating a BIOS option variable table, characterized in that, comprising: an acquisition module configured to acquire hardware configuration data sent by at least one BIOS; an extraction module configured to determine an option variable table generation requirement of each BIOS, determine at least one BIOS option of each BIOS according to the option variable table generation requirement of 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 of each BIOS; an obtaining module configured to obtain traversal results of each BIOS by traversing the key information of the corresponding BIOS according to the at least one BIOS option of each BIOS, and fill the traversal results of each BIOS into a preset variable table template to obtain an option variable table of each BIOS; wherein the extraction module is specifically configured to determine an option variable of each BIOS option of each BIOS according to the at least one BIOS option of each BIOS and the option variable table generation requirement of each BIOS, and extract the key information of each BIOS from the hardware configuration data based on the option variable of each BIOS option of each BIOS, wherein the option variable of the BIOS option is all the same name attributes contained in the BIOS option; the obtaining module is specifically configured to determine a hierarchical relationship of the option variable corresponding to each BIOS option of each BIOS according to the at least one BIOS option of each BIOS, traverse the key information of the corresponding BIOS in sequence based on the hierarchical relationship of the option variable corresponding to each BIOS option of each BIOS, obtain traversal results of each option variable level corresponding to each BIOS option of each BIOS, and obtain the traversal results of each BIOS according to the traversal results of each option variable level corresponding to each BIOS option of each BIOS, wherein each BIOS option comprises multiple types of attributes, and each type of attribute corresponds to multiple option variables.

7. An electronic device, comprising: 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 BIOS option variable table generation method according to any one of claims 1-5.

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

Citation Information

Patent Citations

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

    CN107273163A