CN115525450A - BIOS option information processing method and device, electronic equipment and storage medium - Google Patents

BIOS option information processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115525450A
CN115525450A CN202211214527.5A CN202211214527A CN115525450A CN 115525450 A CN115525450 A CN 115525450A CN 202211214527 A CN202211214527 A CN 202211214527A CN 115525450 A CN115525450 A CN 115525450A
Authority
CN
China
Prior art keywords
option
information
bios
variable
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211214527.5A
Other languages
Chinese (zh)
Inventor
刁庆瑜
杨霖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202211214527.5A priority Critical patent/CN115525450A/en
Publication of CN115525450A publication Critical patent/CN115525450A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping

Abstract

The embodiment of the invention provides a BIOS option information processing method and device, electronic equipment and a storage medium. The method comprises the following steps: when basic input/output system BIOS option information needs to be displayed, a variable file, a text coding file and a BIOS header file are obtained; capturing out-of-band option names from the BIOS header file; capturing a help information variable name from the variable file according to the out-of-band option name; searching the text code file for a character string matched with the variable name of the help information; combining the out-of-band option name, the help information variable name and the character string to generate target BIOS option information; and sending the target BIOS option information to a preset shared memory so that an external control acquires the target BIOS option information through the preset shared memory and displays the target BIOS option information. The embodiment of the invention can conveniently search and manage the BIOS option information by capturing the comprehensive BIOS option information from a plurality of different files.

Description

BIOS option information processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a BIOS option information processing method, a BIOS option information processing apparatus, an electronic device, and a storage medium.
Background
The BIOS (Basic Input Output System) is used as a manager for most direct hardware setting and control at the bottom layer of a server mainboard, and can provide more simple and easy-to-use functions for a server. The BIOS is a set of programs fixed on a ROM (Read-Only Memory) chip on a motherboard, and stores the most important basic input/output programs, system setting information, a power-on self-test program, and a system self-start program of a computer, and has a main function of providing the lowest-layer and most direct hardware setting and control for the computer. The BMC (Baseboard Management Controller) is a chip on a server motherboard, and a server operation and maintenance person can remotely control and maintain the server through the BMC.
With the rapid development of server technology, usability, performance and functions are continuously enhanced. Particularly, the system is efficient and easy to use, and can enable server operation and maintenance personnel to easily manage and work efficiently. With the development of server technology, operation and maintenance personnel remotely manage a server through a BMC, and under some application scenarios, the BMC needs to acquire BIOS option information such as in-band option names, out-of-band option names, default values, help information, all options of options and the like of BIOS options.
In the prior art, only the in-band option information is processed, and the out-of-band option information cannot be processed. Therefore, the complete BIOS option information cannot be obtained, and the efficiency of searching and managing the BIOS option information is reduced.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a BIOS option information processing method, a BIOS option information processing apparatus, an electronic device, and a storage medium that overcome or at least partially solve the above problems.
In a first aspect of the present invention, an embodiment of the present invention discloses a BIOS option information processing method, including:
when basic input output system BIOS option information needs to be displayed, acquiring a variable file, a text coding file and a BIOS header file;
capturing out-of-band option names from the BIOS header file;
capturing a help information variable name from the variable file according to the out-of-band option name;
searching the text code file for a character string matched with the variable name of the help information;
combining the out-of-band option name, the help information variable name and the character string to generate target BIOS option information;
and sending the target BIOS option information to a preset shared memory so that an external control acquires the target BIOS option information through the preset shared memory and displays the target BIOS option information.
Optionally, the method further comprises:
and capturing the option default value and the option information of the BIOS option information to generate a text document file.
Optionally, the method further comprises:
capturing the text document file by adopting a preset script file to obtain the option default value and the option information;
and combining the out-of-band option name, the help information variable name, the character string, the option default value and the option information to generate the target BIOS option information.
Optionally, the step of capturing the option default value and the selectable option information of the BIOS option information and generating a text document file includes:
capturing the option default value and the selectable item information in the BIOS option information by adopting a data table backup tool;
and recording the option default value and the option information to generate a text document file.
Optionally, before the step of sending the target BIOS option information to a preset shared memory, the method further includes:
compressing the target BIOS option information.
Optionally, the variable file includes a plurality of variable options, the variable options correspond to the help information variable names, and the step of fetching the help information variable names from the variable file according to the out-of-band option names includes:
in the variable file, polling to judge whether the variable options are matched with the out-of-band option names;
and when the variable option is matched with the out-of-band option name, capturing the help information variable name corresponding to the variable option.
Optionally, the step of combining the out-of-band option name, the help information variable name, and the character string to generate target BIOS option information includes:
combining the out-of-band option name, the help information variable name and the character string to generate a json file;
converting the json file into a character string array;
and determining the character string array as the target BIOS option information.
In a second aspect of the present invention, an embodiment of the present invention discloses a BIOS option information processing apparatus, including:
the acquisition module is used for acquiring a variable file, a text coding file and a BIOS header file when BIOS option information of the basic input output system needs to be displayed;
the first grabbing module is used for grabbing out-of-band option names from the BIOS header file;
the second grabbing module is used for grabbing the variable names of the help information from the variable files according to the out-of-band option names;
the search module is used for searching the character strings matched with the variable names of the help information in the text code files;
the first combination module is used for combining the out-of-band option name, the help information variable name and the character string to generate target BIOS option information;
and the sending module is used for sending the target BIOS option information to a preset shared memory so that an external control acquires the target BIOS option information through the preset shared memory and displays the target BIOS option information.
In a third aspect of the present invention, an embodiment of the present invention discloses an electronic device, which includes a processor, a memory, and a computer program stored on the memory and capable of running on the processor, and when the computer program is executed by the processor, the steps of the BIOS option information processing method described above are implemented.
In a fourth aspect of the present invention, an embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the BIOS option information processing method as described above.
The embodiment of the invention has the following advantages:
the embodiment of the invention acquires the variable file, the text coding file and the BIOS header file when the BIOS option information of the basic input/output system needs to be displayed; capturing out-of-band option names from the BIOS header file; capturing a help information variable name from the variable file according to the out-of-band option name; searching the text code file for a character string matched with the variable name of the help information; combining the out-of-band option name, the help information variable name and the character string to generate target BIOS option information; and sending the target BIOS option information to a preset shared memory so that an external control acquires the target BIOS option information through the preset shared memory and displays the target BIOS option information. Acquiring one item of information in the BIOS option information from a variable file, a text coding file and a BIOS header file respectively, and combining the acquired information into target BIOS option information to enable the target BIOS option information to have information with complete BIOS options, so that the target BIOS option information has integrity; and the target BIOS option information is sent to the shared memory, and external components such as BMC can directly read the shared memory to obtain the target BIOS option information, so that operation and maintenance personnel of the server can conveniently search and manage the BIOS option information, and the working efficiency is improved.
Drawings
FIG. 1 is a flow chart of steps in a method of processing BIOS option information in accordance with an embodiment of the present invention;
FIG. 2 is a flow chart illustrating steps of a method for processing BIOS option information according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating exemplary steps of a method for processing BIOS option information in accordance with the present invention;
FIG. 4 is a block diagram of an embodiment of a BIOS option information processing apparatus according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention more comprehensible, the present invention is described in detail with reference to the accompanying drawings and the detailed description thereof.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a BIOS option information processing method according to the present invention is shown, where the BIOS option information processing method may specifically include the following steps:
step 101, when basic input/output system BIOS option information needs to be displayed, a variable file, a text coding file and a BIOS header file are obtained;
the embodiment of the invention can be applied to the application scene that the server operation and maintenance personnel need to inquire or manage the BIOS option information. The server operation and maintenance personnel can input a specific instruction or perform a specific operation to trigger an application scenario for querying or managing the BIOS option information. In an application scenario of querying or managing the BIOS option information, it may be determined that the BIOS option information needs to be displayed. At this time, the variable file, the text encoding file and the BIOS header file can be acquired from a specific storage space.
The variable file is a compiled file in which variables are recorded in the BIOS code, such as a file with hfr suffix, a file with sd suffix, or a file with vfr suffix. Each variable in the variable file corresponds to one resource in the BIOS option information. The text code file is a text code file corresponding to the text in the BIOS option, such as a. Uni file. An uni file is a Unicode encoded text file. The uni extension only points to the Unicode code of the text, which can be opened, viewed, edited, and saved with any text editor on any platform that supports Unicode. The BIOS header file is a function library file in the BIOS library that will be referenced by the BIOS. Such as inpurfirmwareconfigure.h in BIOS code.
It should be noted that the specific storage space for acquiring the variable file, the text coding file and the BIOS header file may specifically be three different storage spaces, that is, the variable file may be stored in the first storage space, the text coding file may be stored in the second storage space, and the BIOS header file may be stored in the third storage space; the storage addresses (intervals) corresponding to the first storage space, the second storage space and the third storage space are different. In addition, the first storage space, the second storage space, and the third storage space may be storage spaces of the server itself, or may also be a third storage space connected to the server, which is not limited in the embodiment of the present invention.
Step 102, capturing out-of-band option names from the BIOS header file;
after the BIOS header file is obtained, the BIOS header file comprises an out-of-band option name of the BIOS option managed out of band in the server. The out-of-band option name for each BIOS option may be captured in a BIOS header file. It should be noted that, the server out-of-band management mode manages the server through an out-of-band management controller such as MBC, and the out-of-band management does not need to log in an operating system and a configuration interface of the managed device, and does not affect the work and security of the server, which is an important means for improving the management efficiency of the computer. Therefore, the out-of-band option name is an option name used by the BIOS option in the out-of-band management controller such as MBC when the BIOS option is called internally.
Specifically, a script program for identifying the out-of-band option name may be adopted, and the script program is run to identify the out-of-band option name from the BIOS header file, so as to select the out-of-band option name. The script program may be JavaScript, VBScript, perl, or the like, and a person skilled in the art may determine other script programs according to an actual situation, which is not limited in the embodiment of the present invention.
103, capturing a help information variable name from the variable file according to the out-of-band option name;
in the variable file, various help information variable names of BIOS options are recorded. The help information variable name in the BIOS option has uniqueness, i.e., the help information variable name has one and only one corresponding variable.
And acquiring a variable file, and after capturing the out-of-band option name, searching the help information variable name matched with the out-of-band option name in the variable file by using the out-of-band option name as a pairing basis, wherein the help information variable name is the help information variable name required to be captured. The out-of-band option name and the corresponding help information variable name in the BIOS option may be snapped at this point.
104, searching a character string matched with the help information variable name in the text code file;
in the embodiment of the invention, the resource in the text coding file can be searched, and the character string matched with the help information variable name is inquired, so that the character string corresponding to the resource in the BIOS option is determined, and thus, the out-of-band option name, the corresponding help information variable name and the character string in the BIOS option are determined.
Step 104 and step 102/step 103 may be performed synchronously or asynchronously. In addition, the step execution sequence in the embodiment of the present invention is only for description and sequencing, and in actual application, the step execution sequence is not limited by the sequence in the embodiment of the present invention. That is, in practical application, in addition to the execution sequence described in the embodiment of the present invention, step 104 and step 102 may be executed synchronously, and step 103 may be executed after step 102 is executed; or after the step 102 is executed, the step 104 and the step 103 are executed synchronously, or the step 104, the step 102 and the step 103 are executed in sequence. The determination can be made by those skilled in the art according to the actual situation, and is not limited herein.
105, combining the out-of-band option name, the help information variable name and the character string to generate target BIOS option information;
after the out-of-band option name, the variable name of the help information, and the character string of the help information are obtained, the out-of-band option name, the variable name of the help information, and the character string of the help information can be respectively determined as an attribute in the BIOS option information, and the out-of-band option name, the variable name of the help information, and the character string of the help information are combined as attribute information to generate a piece of BIOS option information, that is, target BIOS option information.
When a plurality of groups of out-of-band option names, variable names of help information and character strings exist, one group of out-of-band option names, variable names of help information and character strings generate target BIOS option information, and therefore a plurality of target BIOS option information are generated, and BIOS option information corresponding to a plurality of options of BIOS can be displayed in the follow-up process.
And 106, sending the target BIOS option information to a preset shared memory so that an external control acquires the target BIOS option information through the preset shared memory and displays the target BIOS option information.
The predetermined shared memory may be a memory address (range) that can be read by both the BIOS and the external control in the server. The address of the preset shared memory is determined according to the types of the BIOS and the external control, which is not limited in the embodiments of the present invention. For example, when the external control is BMC, the preset shared memory is the shared memory address of the BIOS and BMC in the server.
After the target BIOS option information is generated, the target BIOS option information may be sent to the preset shared memory, that is, the target BIOS option information is stored in the preset shared memory. And if the external control such as the BMC and the like can read the data in the preset shared memory, so that the target BIOS option information is obtained, and the target BIOS option information can be displayed after being subjected to visual processing, so that the server operation and maintenance personnel can check the target BIOS option information.
When the external control reads the target BIOS option information, the preset shared memory can read the target BIOS option information at the same time, and the target BIOS option information is displayed. The multiple pieces of target BIOS option information may be displayed one by one, or multiple pieces of target BIOS option information may be displayed on one page, and the multiple pieces of target BIOS option information are referred to through different pages, which is not particularly limited.
The embodiment of the invention acquires the variable file, the text coding file and the BIOS header file when the BIOS option information of the basic input output system needs to be displayed; capturing out-of-band option names from the BIOS header file; capturing a help information variable name from the variable file according to the out-of-band option name; searching the text code file for a character string matched with the variable name of the help information; combining the out-of-band option name, the help information variable name and the character string to generate target BIOS option information; and sending the target BIOS option information to a preset shared memory so that an external control acquires the target BIOS option information through the preset shared memory and displays the target BIOS option information. Acquiring one item of information in the BIOS option information from a variable file, a text coding file and a BIOS header file respectively, and combining the acquired information into target BIOS option information to enable the target BIOS option information to have information with complete BIOS options, so that the target BIOS option information has integrity; and the target BIOS option information is sent to the shared memory, and external components such as BMC can directly read the shared memory to obtain the target BIOS option information, so that the server operation and maintenance personnel can conveniently search and manage the BIOS option information, and the working efficiency is improved.
Referring to fig. 2, a flowchart of steps of another embodiment of the BIOS option information processing method according to the present invention is shown, and the BIOS option information processing method according to the embodiment of the present invention may be applied to a server.
The BIOS option information processing method may specifically include the steps of:
step 201, when BIOS option information of a basic input output system needs to be displayed, acquiring a variable file, a text coding file and a BIOS header file;
when detecting that a server operation and maintenance worker enters a server control page or needs to set the BIOS and the like, determining that the BIOS option information needs to be displayed. At this time, the variable file, the text encoding file and the BIOS header file may be acquired from the storage address of the BIOS code, respectively. Specifically, a file with a suffix of.hfr, or.sd, or.vfr may be determined in the BIOS code as a variant file. The file with the suffix of.uni is determined to be a text encoding file in the BIOS encoding. The insturrmerconfigure.h file is determined in the BIOS code to be a BIOS header file.
Furthermore, variable files such as hfr, sd and vfr and text coding files of uni can be captured and arranged in a specified directory, so that related files can be captured from the specified directory during subsequent processing, and processing efficiency is improved. Wherein, a specific directory address of the specified directory may be set by a person skilled in the art according to an actual situation, and the embodiment of the present invention is not limited.
Step 202, capturing option default values and option information of the BIOS option information to generate a text document file;
in the BIOS system of the server, because there is initialized BIOS option information, selectable item information that can be processed by the server operation and maintenance personnel in the BIOS system of the server and an option default value of each BIOS option are recorded in the BIOS option information. The selectable information may include all selectable items of the BIOS system of the server, or only selectable items of the BIOS system of the server.
When the BIOS option information needs to be displayed, the option default value and the option information of the BIOS option information can be captured, and a text document file is generated. The Text document file is a file, such as a TXT (Text) file, that records the option default value and the corresponding Text information of the option information.
Specifically, the step of grabbing the option default value and the selectable option information of the BIOS option information and generating the text document file may include the following sub-steps:
substep S2021, capturing the option default value and the option information in the BIOS option information by using a data sheet backup tool;
in practical application, the data sheet backup tool may be operated, a code file where the BIOS option information is located is opened in the data sheet backup tool, the capture content is selected in the data sheet backup tool, and the data sheet backup tool captures an option default value and option information from the BIOS option information.
And a substep S2022 of recording the option default value and the option information and generating a text document file.
When the data sheet backup tool captures the option default values and the selectable item information, the captured option default values and the selectable item information may be recorded in a text form, and after all the option default values and the selectable item information are recorded, a text document may be generated based on the recording in the text form.
For example, the data table backup may be AMI (American megatrees inc., company name) tool BCP (backup tool), specifically amibpwin 64.Exe. When capturing option default values and selectable item information, an AMIBCPWin64.Exe executable program can be firstly operated, after the AMIBCPWin64.Exe is operated, a BIOS file is opened on an operation interface of the AMIBCPWin64.Exe, captured contents are determined based on the information of the BIOS file after the BIOS file is opened, the AMIBCPWin64.Exe captures option default values and selectable item information from the BIOS option information, records the option default values and the selectable item information, and generates a TXT file after the whole BIOS file is captured.
Step 203, capturing out-of-band option names from the BIOS header file;
in the embodiment of the invention, the out-of-band option name can be captured from the BIOS header file by adopting a preset script program. Specifically, a script program may be run to capture the input/output related items in the BIOS header file, and determine the out-of-band option name.
Step 204, capturing a help information variable name from the variable file according to the out-of-band option name;
after the out-of-band option name is determined, the script program can be adopted to capture the information in the variable file, and the help information variable name matched with the out-of-band option name is captured from the information in the variable file. The script program for capturing the information of the variable file and the script program for capturing the information of the BIOS header file may be the same script program or may be two independent script programs.
When the script program for capturing the information of the variable file and the script program for capturing the information of the BIOS header file are the same script program, the BIOS header file and the variable file can be opened in the script program when the script program runs, and the script program directly captures the help information variable name in the variable file after the BIOS header file captures the out-of-band option name.
When the script program for capturing the information aiming at the variable file and the script program for capturing the information aiming at the BIOS header file are two independent script programs, the script program for capturing the information aiming at the BIOS header file is operated, the BIOS header file is opened in the script program, the out-of-band option name is captured by the information, and the out-of-band option name is stored. And then operating a script program for capturing information aiming at the variable file, opening the variable file in the script program, inputting an out-of-band option name, and capturing the help information variable name matched with the out-of-band option name from the information in the variable file.
Specifically, the variable file includes a plurality of variable options, the variable options correspond to the help information variable names, and the step of fetching the help information variable names from the variable file according to the out-of-band option names may specifically include the following sub-steps:
substep S2041, in the variable file, polling to determine whether the variable option matches the out-of-band option name;
in the embodiment of the present invention, the variable file includes a plurality of variable options, and the variable options may be variable options where the input variable is located, or variable options where the output variable is located. The variable options correspond to help information variable names, i.e., one variable option will have an associated help information variable name.
When the variable names of the help information are captured from the variable files, the variable options can be judged one by one in the variable files, and whether the variable options are matched with the out-of-band option names is judged one by one in a polling judgment mode.
And a substep S2042, when the variable option is matched with the out-of-band option name, capturing the help information variable name corresponding to the variable option.
When the variable options and the out-of-band option names are judged one by one, and when the variable options are matched with the out-of-band option names, the help information variable names corresponding to the out-of-band option names and the variable options can be determined, and the help information variable names are Attributes (attribute) information of the same BIOS option. At this time, the help information variable name corresponding to the variable option is captured.
And when the variable option is not matched with the out-of-band option name, continuously taking the out-of-band option name as a pairing reference, and judging whether the next variable option is the out-of-band option name or not until the variable option matched with the out-of-band option name is determined.
Step 205, searching a character string matched with the help information variable name in the text encoding file;
the source of the BIOS option is recorded in the form of characters in the text encoding file. After the help information variable name is determined, the resource for recording the BIOS option in the text code file in the form of characters is searched based on the help information variable name, and a character string matched with the help information variable name in the text code file is searched out.
Step 206, capturing the text document file by adopting a preset script file to obtain the option default value and the selectable item information;
in the embodiment of the invention, the text document file records each option default value and option information of the BIOS, but the text document file cannot be directly fused with other information because the text document file is loaded in a text form. Therefore, the option default value and the optional item information in the text document file can be captured by adopting the preset script file to obtain the option default value and the optional item information so as to facilitate subsequent information fusion.
Step 207, combining the out-of-band option name, the help information variable name, the character string, the option default value and the option information to generate the target BIOS option information;
the out-of-band option name, the help information variable name, the string, the option default value, and the option information may be attribute information of the BIOS option. After the out-of-band option name, the help information variable name, the character string, the option default value and the option information are obtained, the out-of-band option name, the help information variable name, the character string, the option default value and the option information can be respectively used as one attribute information in the BIOS option information to be combined, namely, the out-of-band option name is used as the name attribute information of the BIOS option information, the help information variable name is used as the auxiliary information attribute of the BIOS option information, the character string is used as the data attribute of the BIOS option information, the option default value is used as the initial attribute of the BIOS option information, and the option information is used as the basic attribute of the BIOS option information to generate the target BIOS option information.
Specifically, the out-of-band option name, the help information variable name, and the character string may be combined to generate a json file; converting the json file into a character string array; and determining the character string array as the target BIOS option information.
In practical applications, in order to ensure data interoperability, when combining an out-of-band option name, a help information variable name, a character string, an option default value, and optional item information, the out-of-band option name, the help information variable name, and the character string may be combined into a json (JavaScript Object Notation) file, and in addition, the option default value and the optional item information may also be combined into the json file. Since the json file is a lightweight data exchange format, the data is stored and represented in a text format that is completely independent of the programming language. The compact and clear hierarchy makes json files an ideal data exchange language. The json file is easy to read and write subsequently, is easy to analyze and generate by a machine, and effectively improves the network transmission efficiency. Furthermore, because the generated json file has tailorability, only partial information in the out-of-band option name, the help information variable name, the character string, the option default value and the option information can be generated to be used as the attribute information of the BIOS option, and the excessive and complicated BIOS option information is avoided.
Since the json file is information representing a JS (JavaScript, scripting language) object using text, the json file is essentially a character string. All data described in the json file may be converted into a string array for transmission in C (Combined, C language) code. For the method of converting the json file into the character string array, corresponding plug-ins can be adopted for conversion, and a format conversion tool can be adopted for converting the json file into the character string array. For a plurality of ways of converting a json file into a character string array, details are not described herein, and a person skilled in the art may determine an appropriate conversion way to convert the json file into the character string array according to actual needs, which is not limited in the embodiment of the present invention.
After the character string array is obtained, the data in the character string array can be determined to be the target BIOS option information; therefore, the character string array can be determined as the target BIOS option information.
Step 208, compressing the target BIOS option information;
after the target BIOS option information is obtained, the target BIOS option information can be compressed, so that the storage space occupied by the target BIOS option information is reduced, the data processing amount is reduced, and the processing efficiency is improved. The target BIOS option information can be compressed in a lossless mode, the data are compressed by means of statistical redundancy, original data can be completely recovered without any distortion, and therefore content in the target BIOS option information is not lost. For the lossless compression method, one of Shannon-Fano (Shannon fanno) coding, huffman (Huffman) coding, run-length (Run-length) coding, LZW (Lempel-Ziv-Welch, word string table) coding and arithmetic coding can be adopted to compress the target BIOS option information.
Step 209, sending the target BIOS option information to a preset shared memory, so that an external control obtains the target BIOS option information through the preset shared memory and displays the target BIOS option information.
In actual application, since the hardware configuration is determined when the external control and the BIOS system share, the type of the external control and the shared memory of the BIOS system may be determined based on the type of the external control, that is, the preset shared memory.
After the target BIOS option information is compressed, the compressed target BIOS option information may be directly sent to a preset shared memory, and the target BIOS option information is subjected to data storage through the preset shared memory. The external control may obtain the target BIOS option information from the preset shared memory by reading data stored in the preset shared memory. The external control performs visualization processing on the target BIOS option information, and displays the target BIOS option information on a specific page for the server operation and maintenance personnel to view, so that the server operation and maintenance personnel can see the complete target BIOS option information on one page.
The embodiment of the invention acquires the variable file, the text coding file and the BIOS header file when the BIOS option information of the basic input/output system needs to be displayed; capturing option default values and option information of the BIOS option information to generate a text document file; capturing out-of-band option names from the BIOS header file; capturing a help information variable name from the variable file according to the out-of-band option name; searching the text code file for a character string matched with the variable name of the help information; capturing the text document file by adopting a preset script file to obtain the option default value and the option information; combining the out-of-band option name, the help information variable name, the string, the option default value, and the option information to generate the target BIOS option information; compressing the target BIOS option information; and sending the target BIOS option information to a preset shared memory so that an external control acquires the target BIOS option information through the preset shared memory and displays the target BIOS option information. At least one item of information in the BIOS option information is respectively obtained from a variable file, a text coding file, a BIOS header file and a text document file, and the obtained information is combined into target BIOS option information, so that the target BIOS option information has the full information of BIOS options, and the target BIOS option information has integrity; and the target BIOS option information is compressed and then sent to the shared memory, so that the occupied space of the shared memory can be reduced, more target BIOS option information can be stored in the shared memory, external components such as BMC (baseboard management controller) and the like can directly read the shared memory to obtain more target BIOS option information, the server operation and maintenance personnel can conveniently search and manage the BIOS option information, and the working efficiency is improved.
In order that those skilled in the art may better understand the embodiments of the present invention, the following description is given by way of example only:
referring to FIG. 3, a flow chart illustrating steps of an example of a BIOS option information processing method of the present invention is shown. The BIOS option information processing method specifically comprises the following steps:
1. when the server operation and maintenance personnel click a specific page to trigger the operation of displaying the BIOS option information, the BIOS option information processing method is started to be executed. The hfr (or sd/. Vfr) file (variable file) and the uni file (text encoding file) of the BIOS option are captured to the specified directory from the memory space where the BIOS code is located. The specified directory is determined by a custom manner, which is not limited herein.
2. Capturing a default value and optional item information of the BIOS option information by using an AMI tool BCP to generate a TXT file, and acquiring the default value and the optional item information of options in the TXT file by using a script;
3. and grabbing out-of-band option names of the options from the corresponding files. In particular, the out-of-band option names are grabbed from the BIOS code inpurfirmwareconfigure.
4. The For circularly polls the out-of-band option name, and particularly polls whether the variable option is matched with the out-of-band option name or not in the hfr file.
5. It is determined whether the hfr file matches the variant option.
6. If not, continue to match in the hfr file.
7. If the information variable names are matched with the aid information variable names, searching character strings matched with the aid information variable names in the uni file; and respectively taking all the captured information as an attribute in the json file to generate the json file.
8. Converting the data in the json file format into a character string array form for sending and using in the C code;
9. and compressing the data in the character string array and sending the data to the shared memory.
10. And (6) ending.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 4, a block diagram of a BIOS option information processing apparatus according to an embodiment of the present invention is shown, where the BIOS option information processing apparatus may specifically include the following modules:
an obtaining module 401, configured to obtain a variable file, a text coding file, and a BIOS header file when BIOS option information of a basic input output system needs to be displayed;
a first fetching module 402, configured to fetch an out-of-band option name from the BIOS header file;
a second fetching module 403, configured to fetch a help information variable name from the variable file according to the out-of-band option name;
a searching module 404, configured to search the text encoding file for a character string matching the help information variable name;
a first combining module 405, configured to combine the out-of-band option name, the help information variable name, and the character string to generate target BIOS option information;
a sending module 406, configured to send the target BIOS option information to a preset shared memory, so that an external control obtains the target BIOS option information through the preset shared memory and displays the target BIOS option information.
In an optional embodiment of the invention, the apparatus further comprises:
and the third grabbing module is used for grabbing the option default value and the option information of the BIOS option information to generate a text document file.
In an optional embodiment of the invention, the apparatus further comprises:
a fourth capture module, configured to capture the text document file by using a preset script file, to obtain the option default value and the option information;
and the second combination module is used for combining the out-of-band option name, the help information variable name, the character string, the option default value and the option information to generate the target BIOS option information.
In an optional embodiment of the present invention, the third capture module comprises:
the first grabbing submodule is used for grabbing the option default value and the selectable item information in the BIOS option information by adopting a data sheet backup tool;
and the recording sub-module is used for recording the option default value and the option information and generating a text document file.
In an optional embodiment of the invention, the apparatus further comprises:
and the compression module is used for compressing the target BIOS option information.
In an optional embodiment of the present invention, the variable file includes a plurality of variable options, the variable options correspond to the variable names of the help information, and the second crawling module 403 includes:
the judgment sub-module is used for polling and judging whether the variable options are matched with the out-of-band option names in the variable files;
and the second grabbing submodule is used for grabbing the help information variable name corresponding to the variable option when the variable option is matched with the out-of-band option name.
In an optional embodiment of the present invention, the first assembling module 405 includes:
the combining submodule is used for combining the out-of-band option name, the help information variable name and the character string to generate a json file;
the conversion submodule is used for converting the json file into a character string array;
and the determining submodule is used for determining the character string array as the target BIOS option information.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
An embodiment of the present invention further provides an electronic device, including:
the BIOS option information processing device comprises a processor and a storage medium, wherein the storage medium stores a computer program executable by the processor, and when an electronic device runs, the processor executes the computer program to execute the BIOS option information processing method according to any one of the embodiments of the invention. The specific implementation manner and technical effects are partially similar to those of the method embodiment, and are not described herein again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, the computer program executes the BIOS option information processing method according to any one of the embodiments of the present invention. The specific implementation manner and technical effects are similar to those of the method embodiment, and are not described herein again.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "include", "including" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or terminal device including a series of elements includes not only those elements but also other elements not explicitly listed or inherent to such process, method, article, or terminal device. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or terminal device that comprises the element.
The BIOS option information processing method, device, electronic device and storage medium provided by the present invention are introduced in detail, and a specific example is applied in the present document to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A BIOS option information processing method is characterized by comprising the following steps:
when basic input output system BIOS option information needs to be displayed, acquiring a variable file, a text coding file and a BIOS header file;
capturing out-of-band option names from the BIOS header file;
capturing a help information variable name from the variable file according to the out-of-band option name;
searching the text code file for a character string matched with the variable name of the help information;
combining the out-of-band option name, the help information variable name and the character string to generate target BIOS option information;
and sending the target BIOS option information to a preset shared memory so that an external control acquires the target BIOS option information through the preset shared memory and displays the target BIOS option information.
2. The method of claim 1, further comprising:
and capturing the option default value and the selectable item information of the BIOS option information to generate a text document file.
3. The method of claim 2, further comprising:
capturing the text document file by adopting a preset script file to obtain the option default value and the selectable item information;
and combining the out-of-band option name, the help information variable name, the character string, the option default value and the option information to generate the target BIOS option information.
4. The method of claim 2, wherein the step of capturing the option default value and the selectable option information of the BIOS option information and generating the text document file comprises:
adopting a data table backup tool to capture the option default value and the selectable item information in the BIOS option information;
and recording the option default value and the option information to generate a text document file.
5. The method according to any of claims 1 to 4, wherein before the step of sending the target BIOS option information to a predetermined shared memory, the method further comprises:
compressing the target BIOS option information.
6. The method of claim 1, wherein the variable file includes a plurality of variable options, the variable options corresponding to the help information variable names, and wherein the step of crawling help information variable names from the variable file according to the out-of-band option names comprises:
in the variable file, polling to judge whether the variable options are matched with the out-of-band option names;
and when the variable option is matched with the out-of-band option name, capturing the help information variable name corresponding to the variable option.
7. The method of claim 1, wherein the step of combining the out-of-band option name, the help information variable name, and the string to generate target BIOS option information comprises:
combining the out-of-band option name, the help information variable name and the character string to generate a json file;
converting the json file into a character string array;
and determining the character string array as the target BIOS option information.
8. A BIOS option information processing apparatus, comprising:
the acquisition module is used for acquiring a variable file, a text coding file and a BIOS header file when BIOS option information of the basic input output system needs to be displayed;
the first grabbing module is used for grabbing out-of-band option names from the BIOS header file;
the second grabbing module is used for grabbing the variable names of the help information from the variable files according to the out-of-band option names;
the search module is used for searching the character strings matched with the variable names of the help information in the text code files;
the first combination module is used for combining the out-of-band option name, the help information variable name and the character string to generate target BIOS option information;
and the sending module is used for sending the target BIOS option information to a preset shared memory so that an external control acquires the target BIOS option information through the preset shared memory and displays the target BIOS option information.
9. An electronic device comprising a processor, a memory, and a computer program stored on the memory and capable of running on the processor, the computer program, when executed by the processor, implementing the steps of the BIOS option information processing method of any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the BIOS option information processing method according to any one of claims 1 to 7.
CN202211214527.5A 2022-09-30 2022-09-30 BIOS option information processing method and device, electronic equipment and storage medium Pending CN115525450A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211214527.5A CN115525450A (en) 2022-09-30 2022-09-30 BIOS option information processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211214527.5A CN115525450A (en) 2022-09-30 2022-09-30 BIOS option information processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115525450A true CN115525450A (en) 2022-12-27

Family

ID=84702337

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211214527.5A Pending CN115525450A (en) 2022-09-30 2022-09-30 BIOS option information processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115525450A (en)

Similar Documents

Publication Publication Date Title
US7664783B2 (en) File management program, data structure, and file management device
US7870115B2 (en) Variable length file header apparatus and system
CN109062780B (en) Development method of automatic test case and terminal equipment
JP2002529849A (en) Data compression method for intermediate object code program executable in embedded system supplied with data processing resources, and embedded system corresponding to this method and having multiple applications
CN111818123A (en) Network front-end remote playback method, device, equipment and storage medium
CN111008230A (en) Data storage method and device, computer equipment and storage medium
CN113448817A (en) Page screen recording method and device and storage medium
CN112597020A (en) Interface testing method and device, computer equipment and storage medium
CN111475324A (en) Log information analysis method and device, computer equipment and storage medium
CN110995273A (en) Data compression method, device, equipment and medium for power database
CN110851409A (en) Log compression and decompression method, device and storage medium
US9135323B2 (en) System and method for classifying data dump data
CN105094857B (en) Method and system for application load
CN108153896B (en) Processing method and device for input data and output data
CN110716739A (en) Code change information statistical method, system and readable storage medium
CN115525450A (en) BIOS option information processing method and device, electronic equipment and storage medium
CN111078529B (en) Client writing module testing method and device and electronic equipment
CN112948247A (en) Processing method, system, device and medium for operation playback of application program
CN110263223B (en) Data type conversion method, device, equipment and medium
CN116594958A (en) Graph dataset loading method, system, electronic device and medium
CN111078753B (en) Time sequence data storage method and device based on HBase database
CN114371866A (en) Version reconfiguration test method, device and equipment of service system
CN109992293B (en) Method and device for assembling Android system component version information
KR100938277B1 (en) Method and apparatus for file compression and restoration of compression format
CN111444155A (en) Log text processing method and device, electronic equipment and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination