Component configuration method and device, storage medium and program product
By using the target configuration tool to obtain the function option collection and automatically detect the historical configuration during the configuration of BIOS, the problem that BIOS configuration method in the existing technology requires a lot of development resources, realizing the configuration unity and automation, and improving the stability and maintenance efficiency of the system.
Patent Information
- Application Number
- CN202412000086.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2044-12-30
AI Technical Summary
The configuration method of BIOS in the prior art requires independent development of configuration tools in different scenarios, resulting in a large amount of development resources.
Get the target function option collection through the target configuration tool, and get the historical function option collection when receiving the server restart instruction, automatically detect and configure consistency to ensure the unification and automation of configuration.
It realizes unified configuration logic, reduces the complexity of code development and maintenance, improves configuration consistency and reliability, and simplifies the maintenance and upgrade process of equipment.
Smart Images

Figure CN119917159A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computers, and more specifically, to a component configuration method and device, a storage medium, and a program product. Background Art
[0002] In current computer systems, the Basic Input / Output System (BIOS), a firmware component, serves as a bridge between hardware and software, and is responsible for key tasks such as hardware initialization, self-test, and loading the operating system. As the functions of servers and computing devices become increasingly complex, the number of BIOS configuration options has grown exponentially. Although this change has given users more ability to customize hardware behavior, it has also brought configuration challenges. Users often need to have a deep understanding of the function of each option in order to correctly adjust it to meet the needs of specific application scenarios.
[0003] At present, in order to simplify user operations, the commonly used configuration method is to independently provide option linkage in different scenarios, such as the BIOS setup interface (BIOS Setup), in-band tools, and out-of-band tools, that is, when one option is modified, other options related to it are automatically adjusted. However, the configuration method of BIOS provided in the prior art has the technical problem of consuming more development resources because all the processing logic codes in the configuration tools in different scenarios need to be independently developed when using the configuration tools in different scenarios.
[0004] Therefore, there are technical problems in the prior art that consume a lot of development resources. Summary of the invention
[0005] The embodiments of the present application provide a component configuration method and device, a storage medium, and a program product to at least solve the technical problem that the component configuration method provided in the related art consumes a lot of development resources.
[0006] According to one embodiment of the present application, a component configuration method is provided, comprising: obtaining a target function option set through a target configuration tool, wherein the target configuration tool is a first configuration tool running based on a target firmware program, or a second configuration tool running based on a target operating system, or a third configuration tool running based on a target out-of-band management controller, and the target function option set is a function option set selected by a target account for a target component through the target configuration tool, and the target component is a basic input / output system; upon receiving a restart instruction to a target server, obtaining a historical function option set corresponding to the target component, wherein the target server is used to run the target component; and in a case where a first function option identified by a target option identifier in the target function option set is inconsistent with a second function option identified by the target option identifier in the historical function option set, configuring a target function in the target component that matches the target option identifier according to the option value of the first function option.
[0007] According to another embodiment of the present application, a configuration device for a component is provided, including: a first acquisition unit, used to acquire a target function option set through a target configuration tool, wherein the target configuration tool is a first configuration tool running based on a target firmware program, or a second configuration tool running based on a target operating system, or a third configuration tool running based on a target out-of-band management controller, and the target function option set is a function option set selected by a target account for a target component through the target configuration tool, and the target component is a basic input / output system; a second acquisition unit, used to acquire a historical function option set corresponding to the target component when a restart instruction to a target server is received, wherein the target server is used to run the target component; a configuration unit, used to configure a target function in the target component that matches the target option identifier according to the option value of the first function option when a first function option identified by a target option identifier in the target function option set is inconsistent with a second function option identified by the target option identifier in the historical function option set.
[0008] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
[0009] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0010] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.
[0011] In an embodiment of the present application, a target function option set is obtained through a target configuration tool, wherein the target configuration tool is a first configuration tool based on a target firmware program, or a second configuration tool based on a target operating system, or a third configuration tool based on a target out-of-band management controller, and the target function option set is a function option set selected by the target account for the target component through the target configuration tool, and the target component is a basic input / output system. Then, in the case of receiving a restart instruction to the target server, a historical function option set corresponding to the target component is obtained, wherein the target server is used to run the target component. Then, in the case where the first function option identified by the target option identifier in the target function option set is inconsistent with the second function option identified by the target option identifier in the historical function option set, the target function matching the target option identifier in the target component is configured according to the option value of the first function option. In other words, using the embodiment of the present application, on the one hand, by providing that whether it is a BIOS Setup running based on a firmware program, an in-band tool running based on an operating system, or an out-of-band tool running based on an out-of-band management controller, the same set of configuration logic can be shared. In other words, developers only need to implement logic in one place to cover all configuration scenarios, which significantly reduces the complexity of code development and maintenance and reduces the consumption of development resources. On the other hand, the target function option set is obtained through the target configuration tool, and the consistency with the historical function option set is automatically checked after the server is restarted, ensuring the consistency and reliability of the configuration. When a configuration difference is detected, the system can automatically configure according to the user's latest selection, avoiding configuration confusion caused by scene switching, and improving the stability and security of the server in different usage scenarios. On the other hand, by unifying the configuration logic and automatically detecting configuration differences, the maintenance and upgrade process of the equipment is also simplified. System administrators can quickly identify and correct configuration problems, shorten maintenance time, reduce maintenance costs, and also reduce potential service interruption time caused by configuration errors. In summary, the embodiments of the present application are adopted to achieve the technical effects of unified configuration logic, enhanced configuration consistency and reliability, enhanced system adaptability, and improved maintenance and upgrade efficiency, thereby solving the technical problem of high consumption of development resources in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 is a flowchart of a configuration method of a component according to an embodiment of the present application;
[0013] Figure 2is a schematic diagram of a configuration method of a component according to an embodiment of the present application;
[0014] Figure 3 is a flowchart of a method for configuring a component according to an embodiment of the present application;
[0015] Figure 4 It is a structural block diagram of a configuration device of a component according to an embodiment of the present application. DETAILED DESCRIPTION
[0016] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0017] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0018] As an optional solution, the configuration method of the above components, the specific steps are as follows Figure 1 Shown include:
[0019] S102, obtaining a target function option set through a target configuration tool, wherein the target configuration tool is a first configuration tool running based on a target firmware program, or a second configuration tool running based on a target operating system, or a third configuration tool running based on a target out-of-band management controller, and the target function option set is a function option set selected by the target account for a target component through the target configuration tool, and the target component is a basic input / output system.
[0020] Optionally, the configuration method of the above components may be applied to, but not limited to, a configuration scenario of a server Basic Input / Output System (BIOS) function.
[0021] It should be noted that the target configuration tool is used to represent a tool for configuring a target component (BIOS), which may be a first configuration tool running based on the BIOS, a second configuration tool running based on a target operating system, or a third configuration tool running based on a target out-of-band management controller. These tools allow users to configure the BIOS of the server from different operating environments.
[0022] Furthermore, the above-mentioned first configuration tool can be but is not limited to being used to indicate the BIOS setup interface tool (BIOS Setup) provided by BIOS; the above-mentioned second configuration tool can be but is not limited to being used to indicate in-band tools, such as System Configuration Engine (System Configuration Engine, referred to as SCE); the above-mentioned third configuration tool can be but is not limited to being used to indicate out-of-band tools, such as Postman tool (Postman).
[0023] Optionally, the target firmware program is a firmware program of the target server, the target operating system is an operating system of the target server, and the target out-of-band management controller is an out-of-band management controller of the target server.
[0024] It should be noted that the above target function option set is a set of function options selected by the target account (such as an IT administrator or automated configuration software) through the target configuration tool, which is intended to configure the target component (BIOS). These options may include boot order, security settings, processor speed, etc.
[0025] S104, upon receiving a restart instruction for a target server, obtaining a set of historical function options corresponding to a target component, wherein the target server is used to run the target component.
[0026] It should be noted that the above restart instruction may be, but is not limited to, a command automatically triggered by a user or a system to require the target server to restart. After the restart, the system will re-read and apply the BIOS configuration.
[0027] Optionally, the above historical function option set can be a function option set recorded in the target component (BIOS) during the last boot or configuration of the target server. This set is used to compare with the target function option set after the server is restarted to detect whether a configuration change has occurred.
[0028] S106: When the first function option identified by the target option identifier in the target function option set is inconsistent with the second function option identified by the target option identifier in the historical function option set, configure the target function matching the target option identifier in the target component according to the option value of the first function option.
[0029] It should be noted that the target option identifier is used to uniquely identify the target function option. The target option identifier can be the name, GUID or other unique identifier of the configuration option to ensure that the system can accurately identify and track the status of the configuration option.
[0030] Optionally, as an optional example, the above steps may be explained by, but not limited to, the following examples:
[0031] S1, user Admin123 selects the secure boot function in BIOS Setup and sets the CPU performance mode to high performance, then saves the configuration and restarts the server.
[0032] S2, after the server is restarted, the BIOS reads the currently set function option set F1 during the startup phase and records its CRC value. At the same time, the BIOS reads the historical function option set F0 stored in the non-volatile storage space and compares the CRC values of the two.
[0033] S3, it is detected that the CRC values of the secure boot and CPU performance mode options are inconsistent, indicating that these options are modified, and the B1OS enables the secure boot and high performance mode configuration according to the newly set values.
[0034] Optionally, as another optional example, the above steps may also be explained by, but not limited to, the following examples:
[0035] S1, in the operating system, Admin123 uses the SCE software to update the BIOS to the latest version and enable the network wake-up function, save the configuration and restart the server.
[0036] S2, after the server is restarted, the BIOS reads the currently set function option set F2 and compares the CRC value with the historical function option set.
[0037] S3: The CRC values of the BIOS version and the network wake-up function option are detected to be inconsistent. The BIOS automatically applies the new BIOS version and enables the network wake-up function.
[0038] Optionally, as another optional example, the above steps may also be explained by, but not limited to, the following examples:
[0039] S1, through the BMC management controller, Admin123 uses the Redfish API to remotely reset the server and adjust the fan speed, then save the configuration and restart the server.
[0040] S2, after the server is restarted, the BIOS reads the currently set function option set F3, and compares its CRC value with the historical function option set.
[0041] S3: The CRC values of the fan speed and BMC firmware version options are detected to be inconsistent. The BIOS allows the BMC to adjust the fan speed and update the BMC firmware version.
[0042] It should be noted that the above examples are optional examples provided to facilitate explanation of the configuration method of the above components, and there is no limitation on the specific implementation of the configuration method of the above components.
[0043] In an embodiment of the present application, a target function option set is obtained through a target configuration tool, wherein the target configuration tool is a first configuration tool based on a target firmware program, or a second configuration tool based on a target operating system, or a third configuration tool based on a target out-of-band management controller, and the target function option set is a function option set selected by the target account for the target component through the target configuration tool, and the target component is a basic input / output system. Then, in the case of receiving a restart instruction to the target server, a historical function option set corresponding to the target component is obtained, wherein the target server is used to run the target component. Then, in the case where the first function option identified by the target option identifier in the target function option set is inconsistent with the second function option identified by the target option identifier in the historical function option set, the target function matching the target option identifier in the target component is configured according to the option value of the first function option. In other words, using the embodiment of the present application, on the one hand, by providing that whether it is a BIOS Setup running based on a firmware program, an in-band tool running based on an operating system, or an out-of-band tool running based on an out-of-band management controller, the same set of configuration logic can be shared. In other words, developers only need to implement logic in one place to cover all configuration scenarios, which significantly reduces the complexity of code development and maintenance and reduces the consumption of development resources. On the other hand, the target function option set is obtained through the target configuration tool, and the consistency with the historical function option set is automatically checked after the server is restarted, ensuring the consistency and reliability of the configuration. When a configuration difference is detected, the system can automatically configure according to the user's latest selection, avoiding configuration confusion caused by scene switching, and improving the stability and security of the server in different usage scenarios. On the other hand, by unifying the configuration logic and automatically detecting configuration differences, the maintenance and upgrade process of the equipment is also simplified. System administrators can quickly identify and correct configuration problems, shorten maintenance time, reduce maintenance costs, and also reduce potential service interruption time caused by configuration errors. In summary, the embodiments of the present application are adopted to achieve the technical effects of unified configuration logic, enhanced configuration consistency and reliability, enhanced system adaptability, and improved maintenance and upgrade efficiency, thereby solving the technical problem of high consumption of development resources in the prior art.
[0044] As an optional solution, after obtaining the historical function option set corresponding to the target component, it also includes:
[0045] The i-th subset in the historical function option set is determined as the current historical subset, and the i-th subset in the target function option set is determined as the current target subset, and the following steps are performed:
[0046] When the j-th target function option in the current target subset and the j-th historical function option in the current historical subset are inconsistent, the j-th target function option is determined as the first function option, and the j-th historical function option is determined as the second function option, wherein the option identifier corresponding to the j-th historical function option is the same as the option identifier corresponding to the j-th target function option.
[0047] Optionally, in this embodiment, the historical function option set and the target function option set can be divided into N subsets, each of which contains a group of related function options. Grouping the options in this way helps to manage and compare configuration options more efficiently. For example, in server BIOS configuration, the historical function option set may contain subsets related to security, startup, processor, network, etc., and each subset contains multiple function options related to the subject.
[0048] It should be noted that in this embodiment, if it is found during the comparison process that the values of the j-th target function option and the j-th historical function option are inconsistent, then these two options will be respectively determined as the first function option (i.e., the target function option) and the second function option (i.e., the historical function option), indicating that the configuration has changed.
[0049] Among them, the historical function option set includes N subsets, the target function option set includes N subsets, the current historical subset includes M function options, the current target subset includes M function options, N is a positive integer, M is a positive integer, i is less than or equal to N and is a positive integer, j is less than or equal to M and is a positive integer.
[0050] Optionally, as an optional example, the above steps may be explained by, but not limited to, the following examples:
[0051] Assume that when the server was started in the last round, the BIOS was configured as four subsets: security, boot, processor, and network. Each subset contains multiple options. For example, the security subset may contain 10 options such as password protection and secure boot. When the server is restarted, the target function option set will be read. Assume that the target option identifier (such as the option name) is the same as the historical option identifier, but the option value has changed. For example, secure boot was disabled in the last round, but is set to enabled in this round. Then, it is determined that the option has changed. Specifically, the following steps are included:
[0052] S1, determining the safe sub-set in the historical function option set as the current historical sub-set (i=1).
[0053] S2, determining the safe sub-set in the target function option set as the current target sub-set (i=1).
[0054] S3, comparing the security boot option (j=2) in the current target subset with the security boot option at the same position in the current history subset.
[0055] S4, finding that the security boot option value is inconsistent, determining that the security boot option is the first functional option in the target functional option set, and the corresponding option in the previous round of configuration is the second functional option.
[0056] S5, updating the secure boot function in the BIOS according to the option value of the first function option (ie, in the target function option set), ie, enabling.
[0057] It should be noted that the above examples are optional examples provided to facilitate explanation of the configuration method of the above components, and there is no limitation on the specific implementation of the configuration method of the above components.
[0058] The embodiment of the present application improves the efficiency of configuration processing by dividing the function option set into multiple subsets, allowing for parallel processing or phased processing of configuration differences between these subsets. This significantly reduces the time required for configuration comparison and processing, shortens the waiting time after the server restarts, and improves user experience and overall system performance.
[0059] As an optional solution, before determining the j-th target function option as the first function option and determining the j-th historical function option as the second function option, the method further includes:
[0060] S1, compare the target check code of the j-th target function option with the historical check code of the j-th historical function option.
[0061] It should be noted that the above-mentioned target check code is a code calculated for each target function option (ie, the configuration item selected by the user in the target configuration tool) for verifying data integrity, and is usually generated using a cyclic redundancy check (CRC) algorithm or other check algorithms.
[0062] Optionally, the above historical check code corresponds to the target check code, which is a check code calculated for each historical function option (ie, a configuration item saved in the previous round of startup or configuration on the server) when it is stored, and is used to verify whether the configuration has not been modified after restart.
[0063] S2: When the target check code and the historical check code are inconsistent, determine that the j-th target function option and the j-th historical function option are inconsistent.
[0064] In other words, after the server restarts and reads the target function option set, it will compare the target checksum of each target function option with the historical checksum of the corresponding historical function option. If the two are inconsistent, it means that the option or its related configuration may have been modified.
[0065] By using the embodiments of the present application, the comparison of the verification code can more accurately determine the actual changes of the configuration options, reducing the risk of system instability or performance degradation caused by misoperation or unexpected configuration changes.
[0066] As an optional solution, before determining the i-th subset in the historical function option set as the current historical subset and determining the i-th subset in the target function option set as the current target subset, the method further includes:
[0067] S1, according to the function information of the w target function options in the target function option set, classify the w target function options to obtain N target subsets.
[0068] Optionally, w represents the total number of target function options, which is a positive integer representing the number of all function options obtained through the target configuration tool. These options may come from BIOS Setup, tools in the operating system, or an out-of-band management controller.
[0069] Furthermore, the above-mentioned functional information is data describing the specific role and function of the target functional option, such as the description of the option, the default value, the range of optional values, etc., which is used to guide the classification of the options. For example, the functional information may include details such as the name, description, and whether it is a security-related option for each option. For example, the description of the secure boot option is to enable or disable the secure boot function to ensure the security of the system when booting.
[0070] S2, generating a check code for each target function option in a qth subset of the N target subsets to obtain a qth target check code set, where q is less than or equal to N and q is a positive integer.
[0071] It should be noted that, in this embodiment, each option has a unique variable name and variable GUID. During classification processing, it can be classified according to the variable name and variable GUID to avoid confusion of configuration data.
[0072] By adopting the embodiment of the present application, the target function options are classified based on the function information to form N target subsets, which helps to organize a large number of configuration options into logically related groups, which is convenient for management and subsequent change detection. This classification mechanism makes configuration management more orderly, thereby improving the configuration efficiency and accuracy of components.
[0073] As an optional solution, before obtaining the target function option set through the target configuration tool, the following is also included:
[0074] S1, obtain P historical function options corresponding to the target component.
[0075] It should be noted that the above P refers to the total number of historical function options stored in the BIOS, which is a positive integer. The above P historical function options are a record of the last BIOS configuration process, which is used for configuration comparison when the server is restarted. For example, when the server was started last time, the BIOS was configured with P = 200 function options through BIOS Setup, tools in the operating system, or an out-of-band management controller, including secure boot, processor performance mode, etc.
[0076] S2, classifying the P historical function options according to the function information corresponding to each of the P historical function options to obtain N historical subsets, wherein the function information is used to indicate that the historical function options are used for the represented functions.
[0077] Optionally, the above functional information is used to describe the role and characteristics of each historical functional option, including but not limited to the type of option, functional description, default value and current value, etc., to guide the classification of historical functional options. For example, the functional information may include details such as the type of secure boot option (security setting class), functional description (ensuring security when the system is booted), default value (disabled), current value (enabled), etc.
[0078] In other words, according to the function information of each historical function option, the P historical function options are classified and processed to obtain N historical subsets. Each historical subset contains a group of function options with similar functions or related functions, which helps the system to manage and compare historical configuration information more efficiently.
[0079] S3, generating a check code for each historical function option in the qth subset of the N historical subsets to obtain a qth check code set, where q is less than or equal to N and q is a positive integer.
[0080] It should be noted that the above historical check code set generates check codes for each historical function option in the qth subset of N historical subsets (q is a positive integer, less than or equal to N). These check codes are used to quickly detect whether the configuration options have changed when the server is restarted.
[0081] S4, storing the N historical verification code sets corresponding to the N historical subsets into the non-volatile space of the target component.
[0082] Optionally, the non-volatile space is a storage area inside the BIOS that can keep data from being lost even when the power is off, and is used to store information that needs to remain valid after the server is restarted, such as historical function option values and checksum sets.
[0083] By using the embodiments of the present application, a historical check code set is generated and stored, which can significantly optimize the configuration change detection process. Each time the target configuration tool is restarted or used, the system can directly compare the stored historical check code set with the check code of the newly generated target function option set to quickly determine whether the configuration has changed without having to read and compare each historical configuration option one by one. This optimization reduces the amount of calculation in the detection process and improves the configuration efficiency of the component.
[0084] As an optional solution, before configuring the target function matching the target option identifier in the target component according to the option value of the first function option, the method further includes:
[0085] S1. When a first linkage function option that is in a linkage relationship with a first function option is determined, the linkage relationship between the first function option and the first linkage function option is prompted through a target prompt interface, and a removal control for removing the first linkage function option, an addition control for adding a second linkage function option to the first function option, and a modification control for modifying the first linkage function option are displayed in the prompt interface, wherein the option value of the function option that is in a linkage relationship with the first function option will be automatically adjusted to an option value that matches the option value of the first function option.
[0086] It should be noted that the first linkage function option is a function option that is linked to the first function option (i.e., the option directly modified by the user), which means that its option value will be automatically adjusted according to the modification of the first function option to ensure the coordination and functionality of the configuration. For example, if the first function option is the activation of the secure boot function, the first linkage function option may be UEFI boot and digital signature verification, etc., because these options usually need to be used in conjunction with the secure boot function.
[0087] Optionally, the target prompt interface is an interface displayed after a configuration change is detected, which is used to prompt the user of the linkage relationship between options and provide user-operable controls to facilitate the user to adjust the linkage options according to actual needs. For example, the prompt interface can be displayed as: "You have enabled the secure boot function. This will automatically enable UEFI boot and digital signature verification. If you do not want these features to be enabled, please use the controls at the bottom of the interface to make adjustments."
[0088] Furthermore, the above-mentioned remove control, add control and modify control are used to remove, add and modify the function options that have a linkage relationship with the first function option. Users can use these controls to fine-tune the linkage options. For example, in the target prompt interface, the user can click the button to remove UEFI boot to cancel its linkage with secure boot; click the add protection button to create a linkage between protection and secure boot; or adjust the value of the digital signature verification option to adapt to specific application scenarios.
[0089] For example, the prompt interface may be, but is not limited to, Figure 2 As shown, the prompt interface displays a prompt message 202 for prompting the user to modify the linkage option after starting the safe boot function, and also displays a remove control 204 for removing the linkage option, an add control 206 for adding other linkage options to the safe boot function, and a modify control 208 for modifying the option value of the linkage option.
[0090] It should be noted that the above examples are optional examples provided to facilitate explanation of the configuration method of the above components, and there is no limitation on the specific implementation of the configuration method of the above components.
[0091] S2-1, when receiving an option removal instruction triggered by removing a control, restoring the option value of the first linkage option to a historical option value.
[0092] S2-2, when receiving an option adding instruction triggered by adding a control, adding a linkage relationship between the first function option and the second linkage function option.
[0093] S2-3, when receiving an option modification instruction triggered by modifying the control, modifying the option value of the first linkage function option to a target value carried in the option modification instruction.
[0094] It should be noted that the option removal command, option addition command and option modification command are commands triggered by the user by clicking on the remove control, add control or modify control in the target prompt interface, and are used to adjust the linkage relationship. For example, if the user clicks on the remove control, triggering the option removal command, the system will cancel the linkage relationship between UEFI boot and secure boot; if the user clicks on the add control, triggering the option addition command, the system will create a linkage between secure boot and security protection; if the user clicks on the modify control, triggering the option modification command, the system will adjust the option value of digital signature verification.
[0095] S4, when the countdown information prompted in the target prompt interface reaches the target threshold and no option removal instruction, option addition instruction, or option modification instruction is received, stop displaying the target prompt interface.
[0096] Optionally, in the target prompt interface, the system will display a countdown to limit the time for user operations. If the user does not perform any operation before the countdown ends (i.e., reaches the target threshold), the system defaults to configuring according to the option value of the first function option and closes the target prompt interface.
[0097] Optionally, as an optional example, the above steps may be explained by, but not limited to, the following examples:
[0098] S1, when the administrator changes the secure boot function option to on in the BIOS Setup interface or through tools such as SCE, the BIOS detects the linkage relationship with password protection and network access control, and pops up a prompt box in the interface to display the linkage relationship between secure boot and password protection and network access control, as well as to remove, add and modify controls.
[0099] S2, after observing the linkage relationship between password protection and secure boot in the prompt box, the administrator decides to remove the linkage of password protection and clicks the remove linkage control. The B1OS receives the option removal instruction, restores the option value of password protection to the historical value (for example, the closed state at the last configuration), and cancels its linkage relationship with secure boot.
[0100] S3, next, the administrator decides to add hard disk encryption as a linkage function option for secure boot. By clicking the Add other linkage option control, select the hard disk encryption function, and set its linkage relationship with secure boot. The system automatically adds the hard disk encryption function option to the linkage list of secure boot.
[0101] S4, the administrator also decides to modify the default option value of the network access control, by clicking the modify default password control, and inputting a new network access password. The B1OS receives the option modification instruction and adjusts the default password value of the network access control to the newly input password value.
[0102] During the whole process, if the user does not trigger any of the above controls, the prompt box can be kept displayed and a 5-second countdown can be started. If the administrator does not perform any operation before the countdown ends, after the countdown ends, the BlOS automatically closes the prompt box and continues to configure to ensure that "Secure Boot" is enabled and adjusts the option values of hard disk encryption and network access control according to the modified linkage relationship. If the administrator performs any of the above operations, the countdown stops until the administrator manually closes the prompt box to confirm that the operation is completed.
[0103] It should be noted that the above examples are optional examples provided to facilitate explanation of the configuration method of the above components, and there is no limitation on the specific implementation of the configuration method of the above components.
[0104] By adopting the embodiment of the present application, on the one hand, through the target prompt interface, the correlation between the first function option and the first linkage function option with a linkage relationship is intuitively displayed to the user, so that the user can see at a glance which options will be automatically adjusted. This visual display method reduces the difficulty of users understanding complex configuration linkage relationships and improves user experience. On the other hand, the user is allowed to actively control the linkage relationship of the configuration by removing controls, adding controls and modifying controls in the prompt interface. In other words, the user can dynamically adjust the relationship between configuration items according to the needs of the actual application scenario, enhance the flexibility of the configuration, and adapt to diverse business needs. On the other hand, a countdown mechanism is introduced, that is, when the countdown information reaches the target threshold and the user does not intervene within the countdown, the system automatically stops displaying the prompt interface and continues the configuration process. Avoid unnecessary user waiting time and improve the configuration efficiency of components. On the other hand, by allowing the user to modify the linkage relationship in the prompt interface, configuration errors and conflicts can be reduced. The user can adjust the linkage configuration that is not suitable for the current scene in time to avoid system performance degradation or functional abnormality caused by improper configuration.
[0105] As an optional solution, after configuring the target function matching the target option identifier in the target component according to the option value of the first function option, the method further includes:
[0106] S1, obtain the difference information between the current configuration state and the historical configuration state of the target component;
[0107] S2, generating a configuration change log based on the difference information, wherein the configuration change log includes but is not limited to the name of the changed function option, the option value before and after the change, the change time, and the changed user identification information;
[0108] S3, stores the configuration change log in the non-volatile storage area of the target component or the system log of the target server to facilitate subsequent troubleshooting and system maintenance.
[0109] In this embodiment, after the server B10S configuration is changed, the system will further process the configuration change information to generate and store a configuration change log. The specific steps are as follows:
[0110] S1, obtaining difference information: after the target function option set is applied, the current configuration state of the target component (BlOS) is automatically compared with the historical configuration state, and the difference information of all changed function options is collected, including option name, option value before and after change, change time, etc. For example: record that the secure boot function changes from disabled to enabled, the change time is 10:30 on a certain month and year, and the change user is admin.
[0111] S2, generate configuration change log: based on the collected difference information, generate a detailed configuration change log, which contains the name of the changed function option, the option value before and after the change, the change time, and the change user identification information. For example, a record in the configuration change log may be: "at 10:30:00 on a certain month of a certain year, the admin user modified the secure boot function from disabled to enabled".
[0112] S3, storage log: stores the configuration change log to the non-volatile storage area of the target component (BIOS) or the system log of the target server to ensure that the log information can still be accessed even after power failure or restart.
[0113] By adopting the embodiment of the present application, on the one hand, when a server fails or is abnormal, maintenance personnel can view the configuration change log to understand the recent B1OS configuration changes and quickly locate the possible root cause of the problem, thereby improving the efficiency of troubleshooting and repair. On the other hand, the stored configuration change log provides a basis for configuration management for IT administrators, which can help them understand the evolution of configuration, optimize configuration strategies, and avoid problems caused by configuration conflicts or unreasonable configurations.
[0114] As an optional solution, the configuration method of the above components also includes:
[0115] S1, based on machine learning models, intelligently analyzes the target function option set to predict the system performance impact that may be caused by configuration changes;
[0116] S2, displaying a predicted performance impact report of the configuration change and a recommended optimization configuration suggestion in the prompt interface.
[0117] For example, the above steps may be implemented by, but not limited to, the following implementations:
[0118] S1, after obtaining the target function option set, uses the machine learning model to perform intelligent analysis on the configuration changes. The specific steps are as follows:
[0119] Model training: Through a large amount of historical configuration data and corresponding system performance indicators, a machine learning model is trained to predict system performance based on configuration options. For example, the model training is based on data from the past 1,000 configuration changes, including configuration options, system response time before and after the change, CPU usage, and other performance indicators.
[0120] Configuration analysis: After the target feature option set is obtained, the trained machine learning model is used to analyze the impact that the configuration change may have on system performance, such as increasing or decreasing response speed, increasing or decreasing CPU usage, etc. For example, if the target feature option set includes switching the CPU performance mode from balanced to high performance, it is predicted that this will result in a 10% increase in CPU usage.
[0121] Display analysis results: Display the predicted performance impact report of the configuration change on the prompt interface or other relevant user-oriented interfaces, as well as the optimization configuration recommendations generated based on the predicted results. For example, the interface may display "It is detected that you have set the CPU performance mode to high performance, which will increase the CPU usage by 10%. It is recommended that you also increase the cooling solution to avoid overheating."
[0122] By using the embodiments of the present application, through the analysis of the machine learning model, users can understand the possible performance impact before changing the configuration, which helps to make more reasonable configuration decisions. The system provides optimized configuration suggestions based on the prediction results, guiding users on how to balance configuration requirements with system performance, and avoiding performance degradation or resource waste caused by improper configuration. The intelligent analysis of machine learning reduces users' guesswork about configuration consequences, improves configuration efficiency and accuracy, and avoids repeated adjustments and testing.
[0123] Optionally, but not limited to, Figure 3 The following example shows an overall explanation of the configuration method of the above components:
[0124] S302, initializing historical configuration: obtaining P historical function options of the target BIOS component, classifying them into N historical subsets according to function information, calculating the CRC checksum of each subset, and storing them in the BIOS non-volatile memory (NVRAM).
[0125] S304, target configuration acquisition: obtain a target function option set through a target configuration tool (such as BIOS Setup, SCE, BMC's Redfish API), classify w options, and generate N target subsets and CRC check code sets.
[0126] S306, restart and history reading: read the history function option set when the server restarts.
[0127] S308, classification comparison: compare the historical subset with the target subset in order, and compare the option value with the CRC check code for all options (M) in the i-th subset.
[0128] S310, configuration change detection: when it is detected that the target value of the j-th option is inconsistent with the historical value, the configuration update is confirmed.
[0129] S312, linkage prompt and management: for the detected configuration changes, check whether there is a linkage relationship, prompt linkage options through a graphical interface, provide removal, addition, and modification functions, and automatically apply the configuration without operation at the end of the countdown.
[0130] S314, configure application: update the B1OS function according to the target value, and record the change log to complete the configuration process.
[0131] In this embodiment, a configuration device of a component is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0132] Figure 4 is a structural block diagram of a configuration device of a component according to an embodiment of the present application, such as Figure 4 As shown, the device comprises:
[0133] A first acquisition unit 402 is configured to acquire a target function option set through a target configuration tool, wherein the target configuration tool is a first configuration tool running based on a target firmware program, or a second configuration tool running based on a target operating system, or a third configuration tool running based on a target out-of-band management controller, and the target function option set is a function option set selected by a target account for a target component through the target configuration tool, and the target component is a basic input / output system;
[0134] A second acquisition unit 404 is configured to acquire a set of historical function options corresponding to a target component when a restart instruction to a target server is received, wherein the target server is used to run the target component;
[0135] The configuration unit 406 is used to configure the target function matching the target option identifier in the target component according to the option value of the first function option when the first function option identified by the target option identifier in the target function option set is inconsistent with the second function option identified by the target option identifier in the historical function option set. As an optional solution,
[0136] Optionally, in this embodiment, the above-mentioned device also includes: a first determination unit, used to determine the i-th subset in the historical function option set as the current historical subset, and determine the i-th subset in the target function option set as the current target subset, and perform the following steps: when the j-th target function option in the current target subset and the j-th historical function option in the current historical subset are inconsistent, determine the j-th target function option as the first function option, and determine the j-th historical function option as the second function option, wherein the option identifier corresponding to the j-th historical function option and the option identifier corresponding to the j-th target function option are the same; wherein the historical function option set includes N subsets, the target function option set includes N subsets, the current historical subset includes M function options, the current target subset includes M function options, N is a positive integer, M is a positive integer, i is less than or equal to N and i is a positive integer, j is less than or equal to M and j is a positive integer.
[0137] Optionally, in this embodiment, the above-mentioned device also includes: a comparison unit, used to compare the target verification code of the j-th target function option and the historical verification code of the j-th historical function option; a second determination unit, used to determine that the j-th target function option and the j-th historical function option are inconsistent when the target verification code and the historical verification code are inconsistent.
[0138] Optionally, in this embodiment, the above-mentioned device also includes: a first classification unit, used to classify the w target function options in the target function option set according to the function information of the w target function options in the target function option set to obtain N target subsets; a first generation unit, used to generate a check code for each target function option in the qth subset of the N target subsets, to obtain the qth target check code set, where q is less than or equal to N and q is a positive integer.
[0139] Optionally, in this embodiment, the above-mentioned device also includes: a third acquisition unit, used to acquire P historical function options corresponding to the target component; a second classification unit, used to classify the P historical function options according to the function information corresponding to each of the P historical function options, and obtain N historical subsets, wherein the function information is used to indicate that the historical function options are used for the represented function; a second generation unit, used to generate a check code for each historical function option in the qth subset of the N historical subsets, and obtain the qth check code set, wherein q is less than or equal to N and q is a positive integer; a storage unit, used to store the N historical check code sets corresponding to the N historical subsets in the non-volatile space of the target component.
[0140] Optionally, in the present embodiment, the apparatus further comprises: a prompting unit for, when determining that a first linkage function option has a linkage relationship with the first function option, prompting the linkage relationship between the first function option and the first linkage function option through a target prompting interface, and displaying a removal control for removing the first linkage function option, an adding control for adding a second linkage function option to the first function option, and a modifying control for modifying the first linkage function option in the prompting interface, wherein the option value of the function option having a linkage relationship with the first function option will be automatically adjusted to an option value matching the option value of the first function option; a removing unit for, upon receiving a prompt received through the removal In the case of an option removal instruction triggered by an addition control, the option value of the first linkage option is restored to the historical option value; an adding unit is used to add a linkage relationship between the first function option and the second linkage function option when an option addition instruction triggered by adding a control is received; a modifying unit is used to modify the option value of the first linkage function option to the target value carried in the option modification instruction when an option modification instruction triggered by modifying the control is received; a display unit is used to stop displaying the target prompt interface when the countdown information prompted in the target prompt interface reaches the target threshold and no option removal instruction, option addition instruction and option modification instruction are received.
[0141] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0142] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0143] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0144] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0145] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0146] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0147] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0148] An embodiment of the present application further provides a computer program product, comprising a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program product, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.
[0149] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0150] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0151] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for configuring a component, characterized in that: include: Acquiring a target function option set through a target configuration tool, wherein the target configuration tool is a first configuration tool running based on a target firmware program, or a second configuration tool running based on a target operating system, or a third configuration tool running based on a target out-of-band management controller, and the target function option set is a function option set selected by the target account for a target component through the target configuration tool, and the target component is a basic input / output system; Upon receiving a restart instruction for a target server, obtaining a set of historical function options corresponding to the target component, wherein the target server is used to run the target component; When the first function option identified by the target option identifier in the target function option set is inconsistent with the second function option identified by the target option identifier in the historical function option set, the target function in the target component that matches the target option identifier is configured according to the option value of the first function option.
2. The method for configuring a component according to claim 1, characterized in that: After obtaining the historical function option set corresponding to the target component, the method further includes: The i-th subset in the historical function option set is determined as the current historical subset, and the i-th subset in the target function option set is determined as the current target subset, and the following steps are performed: In the case that the j-th target function option in the current target subset is inconsistent with the j-th historical function option in the current historical subset, the j-th target function option is determined as the first function option, and the j-th historical function option is determined as the second function option, wherein the option identifier corresponding to the j-th historical function option is the same as the option identifier corresponding to the j-th target function option; Among them, the historical function option set includes N subsets, the target function option set includes N subsets, the current historical subset includes M function options, the current target subset includes M function options, N is a positive integer, M is a positive integer, i is less than or equal to N and is a positive integer, j is less than or equal to M and is a positive integer.
3. The method for configuring a component according to claim 2, characterized in that: Before determining the j-th target function option as the first function option and determining the j-th historical function option as the second function option, the method further includes: Compare the target verification code of the j-th target function option with the historical verification code of the j-th historical function option; if the target verification code and the historical verification code are inconsistent, determine that the j-th target function option and the j-th historical function option are inconsistent.
4. The method for configuring a component according to claim 2, characterized in that: Before determining the i-th subset in the historical function option set as the current historical subset and determining the i-th subset in the target function option set as the current target subset, the method further includes: According to the function information of the w target function options in the target function option set, classify the w target function options to obtain N target subsets; Generate a check code for each target function option in a qth subset of the N target subsets to obtain a qth target check code set, where q is less than or equal to N and q is a positive integer.
5. The method for configuring a component according to any one of claims 1 to 4, characterized in that: Before obtaining the target function option set through the target configuration tool, the method further includes: Obtain P historical function options corresponding to the target component; Classify the P historical function options according to the function information corresponding to each of the P historical function options to obtain N historical subsets, wherein the function information is used to indicate that the historical function option is used for the represented function; Generate a check code for each historical function option in a qth subset of the N historical subsets to obtain a qth check code set, where q is less than or equal to N and q is a positive integer; The N historical verification code sets corresponding to the N historical subsets are stored in the non-volatile space of the target component.
6. The method for configuring a component according to any one of claims 1 to 4, characterized in that: Before configuring the target function matching the target option identifier in the target component according to the option value of the first function option, the method further includes: In the case of determining that a first linkage function option is in a linkage relationship with the first function option, the linkage relationship between the first function option and the first linkage function option is prompted through a target prompt interface, and a removal control for removing the first linkage function option, an addition control for adding a second linkage function option to the first function option, and a modification control for modifying the first linkage function option are displayed in the prompt interface, wherein the option value of the function option in a linkage relationship with the first function option is automatically adjusted to an option value matching the option value of the first function option; When receiving an option removal instruction triggered by the removal control, restoring the option value of the first linkage option to a historical option value; When receiving an option adding instruction triggered by the adding control, adding a linkage relationship between the first function option and the second linkage function option; When receiving an option modification instruction triggered by the modification control, modifying the option value of the first linkage function option to a target value carried in the option modification instruction; When the countdown information prompted in the target prompt interface reaches the target threshold and the option removal instruction, the option addition instruction and the option modification instruction are not received, the target prompt interface stops being displayed.
7. A component configuration device, characterized in that: include: A first acquisition unit is configured to acquire a target function option set through a target configuration tool, wherein the target configuration tool is a first configuration tool running based on a target firmware program, or a second configuration tool running based on a target operating system, or a third configuration tool running based on a target out-of-band management controller, and the target function option set is a function option set selected by a target account for a target component through the target configuration tool, and the target component is a basic input / output system; A second acquisition unit is configured to acquire a set of historical function options corresponding to the target component when a restart instruction to a target server is received, wherein the target server is used to run the target component; A configuration unit is used to configure the target function matching the target option identifier in the target component according to the option value of the first function option when the first function option identified by the target option identifier in the target function option set is inconsistent with the second function option identified by the target option identifier in the historical function option set.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method according to any one of claims 1 to 6 when executed by a processor.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Basic input / output system (BIOS) option modification effective method and device and storage medium
CN115495161A
BIOS option adjusting method and device, storage medium and electronic device
CN116088949A
System option menu configuration method and system, terminal and storage medium
CN116954801A
System BIOS function configuration method and device, equipment and storage medium
CN117667226A
BIOS (Basic Input / Output System) configuration item association configuration modification method and device, equipment and medium
CN118567727A