Configuration option synchronization method and electronic device

By constructing a data structure for BIOS configuration options using nested loops, the problem of inaccurate synchronization between the BIOS and BMC was solved, enabling clear display and quick location on the BMC interface, and improving the accuracy and efficiency of configuration option synchronization.

CN120743382BActive Publication Date: 2025-11-25INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511223457.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2025-11-25
Estimated Expiration
2045-08-29

AI Technical Summary

Technical Problem

In the existing technology, the remote synchronization method between BIOS configuration options and BMC has problems such as inaccurate synchronization and low operation efficiency, which makes it difficult to quickly locate specific function-related options on the BMC interface and easily leads to misoperation.

Method used

By traversing the pages and controls in the BIOS configuration options through nested loops, a first object and a second object are constructed to build the data structure of the configuration options, thereby synchronizing the configuration options and ensuring that the options displayed on the BMC interface are structured and hierarchical, thus improving the accuracy and reliability of synchronization.

Benefits of technology

It enables clear display and quick location of BIOS configuration options on the BMC interface, improves the accuracy and efficiency of configuration option synchronization, reduces the possibility of misoperation, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120743382B_ABST
    Figure CN120743382B_ABST
Patent Text Reader

Abstract

The application discloses a configuration option synchronization method and electronic equipment, and relates to the technical field of basic input output system configuration options, and comprises the following steps: extracting each page in a configuration option and controls in each page based on nested loops; determining a first control that can be modified; constructing a first object of the first control based on the option name, the optional value and the current value of the first control; extracting a target directory name of the page where the corresponding control is located based on the parent page of the page where each control is located, and constructing a second object of each control based on the target directory name of each control; and constructing a data structure of the configuration option based on the second object and the first object. According to the method, each page and control in the configuration option is traversed through nested loops, so that the controls of the configuration option are avoided to be missed, the first object indicates the option data of the control that can be modified, and the second object can present the directory hierarchical structure of each control. Therefore, the accuracy and reliability of the configuration option synchronization are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of basic input output system configuration option, and particularly relates to a configuration option synchronization method and electronic equipment. BACKGROUND

[0002] In order to meet different application scenarios, different configuration options can be selected for a basic input output system (BIOS), and a baseboard management controller (BMC) can remotely set the configuration options of the BIOS. However, the prerequisite for the BMC to remotely configure the configuration options of the BIOS is that the configuration options of the BIOS and the BMC are highly synchronized.

[0003] Therefore, how to realize the synchronization between the configuration options of the BIOS and the BMC is a problem to be solved. SUMMARY

[0004] The present application provides a configuration option synchronization method and electronic equipment, which can realize the synchronization of configuration options.

[0005] The present application provides a configuration option synchronization method, which comprises the following steps.

[0006] Based on an outer loop of a nested loop, each page in a configuration option of a system is extracted, and based on an inner loop of the nested loop, a control in each page is extracted; based on a page state of a page where each extracted control is located and a control state of the corresponding control, a first control that can be modified is determined; based on an option name, a selectable value and a current value of the first control, a first object of the first control is constructed; based on a parent page of a page where each control is located, a target directory name of a page where the corresponding control is located is extracted, and based on the target directory name of each control, a second object of each control is constructed; based on the second object of each control and the first object of the first control, a data structure of the configuration option is constructed, and based on the data structure of the configuration option, the synchronization of the configuration option is realized.

[0007] The application further provides a configuration option synchronization device, comprising: a traversal module configured to extract each page in a configuration option of a system based on an outer loop of a nested loop and extract a control in each page based on an inner loop of the nested loop; a first control determination module configured to determine a first control that can be modified based on a page state of a page in which each extracted control is located and a control state of the corresponding control; a first object determination module configured to construct a first object of the first control based on an option name, a selectable value, and a current value of the first control; a second object determination module configured to extract a target directory name of a page in which each control is located based on a parent page of each page in which each control is located and construct a second object of each control based on the target directory name of each control; and a synchronization data acquisition module configured to construct a data structure of the configuration option based on the second object of each control and the first object of the first control and implement synchronization of the configuration option based on the data structure of the configuration option.

[0008] The application further provides an electronic device, comprising: a memory configured to store a computer program; and a processor configured to implement the steps of any of the configuration option synchronization methods described above when executing the computer program.

[0009] The application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of any of the configuration option synchronization methods described above.

[0010] The application further provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement the steps of any of the configuration option synchronization methods described above.

[0011] According to the application, each page and control in a configuration option is traversed through a nested loop, and the configuration option is prevented from being missed. In addition, an option name, a selectable value, and a current value of a first control that can be modified in the configuration option are extracted, and a first object is constructed. The first object indicates option data of the first control that can be modified. Furthermore, a target directory name of each control is extracted, and a second object is constructed. The second object can present a directory hierarchy of each control. In this way, a data structure of the configuration option constructed based on the first object and the second object can accurately describe option information of the first control and the hierarchy of each control in the configuration option. In this way, the configuration option can be synchronized based on the data structure of the configuration option, and the accuracy and reliability of the configuration option synchronization are improved. BRIEF DESCRIPTION OF DRAWINGS

[0012] In order to more clearly illustrate the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, the drawings described below only illustrate some of the embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.

[0013] Figure 1 An implementation scenario provided for the embodiments of the present application;

[0014] Figure 2 A flowchart of the configuration option synchronization method provided for the embodiments of the present application Figure 1 ;

[0015] Figure 3 A flowchart of the configuration option synchronization method provided for the embodiments of the present application Figure 2 ;

[0016] Figure 4 A flowchart of the configuration option synchronization method provided for the embodiments of the present application Figure 3 ;

[0017] Figure 5 A structural diagram of the configuration option synchronization device subject provided for the embodiments of the present application;

[0018] Figure 6 A structural diagram of the electronic device provided for the embodiments of the present application. DETAILED DESCRIPTION

[0019] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, other embodiments obtained by those skilled in the art without any creative effort under the premise of no creative effort, all belong to the protection scope of the present application.

[0020] It should be noted that in the description of the present application, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. The terms "first", "second" and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence.

[0021] The server is the core infrastructure of data processing and storage, and through flexible configuration of its functions, it can meet the needs of various application scenarios. And adjusting the BIOS configuration options in the server is a common and key operation to realize the customization of server functions.

[0022] Some BIOS configuration options are set mainly by entering the BIOS Setup interface or by means of OS (operating system) tools. However, this method requires the operator to physically touch the server, which is extremely inconvenient for large data centers with a large number of servers deployed centrally or for scenarios where the server is located in a remote area. Not only does it increase the labor and time costs, but it also may cause hardware damage due to frequent physical operations. In addition, this method is relatively cumbersome, and it is difficult for non-professionals to understand and operate the complex options in the BIOS Setup interface, which may easily lead to misoperation and affect the normal operation of the server.

[0023] Some BIOS configuration options are set through the remote management interface of the BMC. As an important component of server management, the BMC provides a convenient remote management platform, and without physical contact with the server, the configuration and monitoring of BIOS configuration options can be completed remotely on the BMC platform, significantly improving the convenience of operation, greatly saving time and labor costs, and reducing the risk of hardware damage caused by physical contact with the server.

[0024] However, the core of implementing efficient remote BIOS configuration options configuration by the BMC lies in the structured synchronization of BIOS configuration option data. BIOS needs to accurately synchronize the complete data of the configuration options to the BMC. Some synchronization methods of the BMC and the BIOS configuration options can only provide a flat list of BIOS configuration options on the BMC, which results in that when these configuration options are displayed on the control interface of the BMC, the options in the configuration options are indistinguishably listed together. When a worker is looking for options related to a specific function, it is difficult to find the corresponding options, which is extremely inefficient, and misselection is likely to occur, affecting the accuracy of server configuration.

[0025] In order to enable the skilled person in the technical field to better understand the present application scheme, the present application will be further described in detail below in combination with the drawings and specific embodiments.

[0026] In combination with the specific application environment architecture or specific hardware architecture on which the configuration option synchronization method is dependent, the specific application environment architecture or specific hardware architecture is described here. Reference Figure 1 , Figure 1 An implementation scenario provided by the embodiments of the present application is shown in the following figure.

[0027] As Figure 1 shown, the implementation scenario includes a client 10 and a server 11, and the client 10 and the server 11 are connected through network communication.

[0028] In this embodiment, the client 10 is an electronic device on the user side, which can be a wired terminal with a visual structure or a wireless terminal. In other embodiments, the terminal can be an electronic device with a visual structure, such as a mobile phone, computer, tablet, or vehicle-mounted device.

[0029] Server 11 can be used in edge and cloud environments, such as physical servers, server clusters, and cloud servers; no specific restrictions are imposed here.

[0030] The server 11 is equipped with a BIOS system, which provides the ability to extract configuration options from the BIOS, obtain the data structure of the configuration options, and then transmit the data structure of the configuration options to the BMC to achieve synchronization of the configuration options between the BMC and the BIOS.

[0031] The execution subject of the method in this embodiment is server 11. Client 10 can receive a request for configuration option synchronization. Client 10 sends the request for configuration option synchronization to server 11 through the network. Server 11 performs configuration option synchronization, obtains the data structure of configuration options, and can feed back the data structure of configuration options to client 10 through the network. Client 10 has a graphical user interface, in which the data structure of configuration options can be displayed.

[0032] In some embodiments, server 11 extracts each page in the configuration options based on the outer loop of the nested loop, and extracts the controls in each page based on the inner loop of the nested loop; based on the page state of the page where each control is located and the control state of the corresponding control, it determines the first control that can be modified; based on the option name, available value and current value of the first control, it constructs the first object of the first control; based on the parent page of the page where each control is located, it extracts the target directory name of the page where the corresponding control is located, and constructs the second object of each control based on the target directory name of each control; based on the second object of each control and the first object of the first control, it constructs the data structure of the configuration options, and the data structure of the configuration options is used to realize the synchronization of the configuration options.

[0033] Understandably, the configuration option for synchronizing the device can be set to... Figure 1 In server 11, but as shown in this embodiment... Figure 1 The implementation environment shown is merely exemplary. In other embodiments, the configuration option synchronization determination method can also be applied to other implementation environments, and the configuration option synchronization device can also be set in other structures in other implementation environments. No specific limitations are made here.

[0034] Figure 2 A flowchart illustrating the configuration option synchronization method provided in this application embodiment. Figure 1 ,like Figure 2As shown, the embodiments of the present application provide a configuration option synchronization method, which is described in detail as follows:

[0035] S201, based on the outer loop of the nested loop, extract each page in the configuration options of the system, and based on the inner loop of the nested loop, extract the controls in each page.

[0036] In some embodiments, the configuration options of the system are the configuration options of the BIOS.

[0037] The configuration options of the BIOS are configuration items used to determine the behaviors of hardware initialization, startup process, security policy, power consumption and performance before the operating system is loaded.

[0038] The controls are interactive elements on the interface of the BIOS, used to receive user input, display information or trigger certain operations.

[0039] In some embodiments, the configuration options of the BIOS include multiple pages, and each page is provided with multiple controls. When the BMC is synchronized with the BIOS, the BMC needs to synchronize each control in the configuration options of the BIOS, the page where the control is located, and the directory relationship between the pages, so that the configuration options of the BIOS can be synchronized in the BMC, and the arrangement of each page and the controls in each page in the synchronized configuration options of the BMC is the same as that in the BIOS, which facilitates the configuration of the configuration options of the BIOS through the BMC.

[0040] In some embodiments, a loop structure is used to poll each page in the configuration options and each control under each page.

[0041] In some embodiments, in order to ensure complete traversal of the pages in the configuration options and the controls in each page, a nested loop is used, the outer loop traverses the pages of the configuration options, and the inner loop traverses each control under the current page traversed by the outer loop, so that each control in each page can be traversed.

[0042] Using the nested loop to sequentially traverse all pages and controls under each page can ensure comprehensive access to all elements of the configuration options and avoid missing any controls.

[0043] In some embodiments, when the pages and controls are extracted by the loop, a data structure can be set to store the page and control information, for example, a list stores the pages, and each page element contains a sub-list to store the controls thereunder, to support the loop traversal operation.

[0044] S202: Based on the page state of each page where the extracted controls are located and the control state of the corresponding controls, determine the first control that can be modified.

[0045] In some embodiments, when the control is extracted, it is determined whether the control is a modifiable control, i.e., whether the control is in a modifiable state.

[0046] In some embodiments, when a control is traversed, it is determined whether the control is a first modifiable control according to the state of the page where the control is located and the control state of the control.

[0047] In some embodiments, if a control is a modifiable control, the control has data such as option name and selectable value, and in order to achieve complete synchronization of the configuration options, the data corresponding to the first control needs to be extracted subsequently.

[0048] In some embodiments, a second control is determined to be in an unhidden state of the page where the second control is located, and it is determined whether the control state of the second control is a target state; the target state includes at least one of a gray display state and a disabled state; in a case where the state of the second control is not the target state, the second control is determined to be the first control; in a case where the state of the second control is the target state, the second control is determined not to be the first control.

[0049] S203, constructing a first object of the first control based on the option name, the selectable value and the current value of the first control.

[0050] In some embodiments, the first control is a modifiable control, so that the option name, the selectable value and the current value of the first control can be extracted, and a first object of the first control can be constructed based on the option name, the selectable value and the current value of the first control.

[0051] In some embodiments, for different first controls, there are corresponding first objects, and the first objects contain the option name, the selectable value and the current value of the corresponding first controls.

[0052] S204, extracting a target directory name of the page where each control is located based on the parent page of the page where each control is located, and constructing a second object of each control based on the target directory name of each control.

[0053] In some embodiments, for each extracted control, the target directory name of the page where the corresponding control is located is extracted according to the parent page of the page where the control is located.

[0054] In some embodiments, different controls correspond to target directory names, and the target directory names include the directory name of the page where the control is located and the directory name of the outer page of the page where the control is located, i.e., the target directory name indicates the directory level of the page where the corresponding control is located.

[0055] According to the target directory name, a second object of each control can be constructed.

[0056] Therefore, the second object corresponding to each control exists, and for the first control, the first object of the first control also exists.

[0057] That is, the first control has the first object and the second object, and the second object exists for the control other than the first control in the configuration option.

[0058] S205, constructing a data structure of the configuration option based on the second object of each control and the first object of the first control, and realizing synchronization of the configuration option based on the data structure of the configuration option.

[0059] Therefore, the data structure of the configuration option can be constructed according to the second object of each control and the first object of the first control. The first object of the first control is included in the data structure, that is, the option name, the selectable value and the current value of the first control in the configuration option are included, and the second object of each control is also included, that is, the directory level of each control in the configuration option is included. Therefore, the data structure of the configuration option can clearly reflect the organization structure of each control in the configuration option and the data of the first control that can be modified in the BMC, thereby improving the efficiency and accuracy of the configuration option synchronization.

[0060] In the embodiment of the application, the configuration option is traversed by nested loop to avoid missing the controls of the configuration option. At the same time, the option name, the selectable value and the current value of the first control that can be modified in the configuration option are extracted to construct the first object, which indicates the option data of the first control. The target directory name of each control is extracted to construct the second object, which can reflect the directory level structure of each control. Therefore, the data structure of the configuration option constructed by the first object and the second object can accurately describe the option information of the first control and the level structure of each control in the configuration option. Therefore, the structured data of the configuration option can be synchronized by the data structure of the configuration option, thereby improving the accuracy and reliability of the configuration option synchronization.

[0061] The data structure of the configuration option is applied to the BMC, and the BMC can display the structured data of the configuration option. Therefore, when the user controls the BIOS through the BMC, the target option in the configuration option can be quickly and clearly located.

[0062] Figure 3 The flowchart of the configuration option synchronization method provided by the embodiment of the application Figure 2 As shown in Figure 3 The embodiment of the application provides a determination method of the first control, which is described in detail as follows.

[0063] S301, determining the second control whose page state of the page is in the unhidden state, and determining whether the control state of the second control is in the target state; the target state includes at least one of the gray display state and the disabled state.

[0064] In some embodiments, when retrieving a page of configuration options through an outer loop, a page in an unhidden state can be identified, and the controls in the unhidden page can be second controls.

[0065] In some embodiments, the state of a page can be determined by its tags, whether the page is hidden or not.

[0066] In some embodiments, for the second control, it is determined whether the control state of the second control is the target state.

[0067] In some embodiments, the target state includes at least one of grayed-out state and disabled state.

[0068] In some embodiments, controls that are grayed out may be visible on the page but cannot be operated, such as being unable to be selected or modified.

[0069] In some embodiments, controls that are disabled will not be active in the configuration options.

[0070] S302. If the control state of the second control is not the target state, determine the second control as the first control.

[0071] In some embodiments, if the state of the second control is not the target state, then the second control can be operated or is in the start state, thereby the second control can be modified and can be regarded as the first control.

[0072] S303. If the control state of the second control is the target state, determine that the second control is not the first control.

[0073] In some embodiments, if the control state of the second control is the target state, then the second control is inoperable or ineffective, and the second control cannot be modified. Thus, the second control can be regarded as not being the first control.

[0074] In this embodiment, the first control that can be modified is accurately selected by the page state and control state of the control. In this way, the subsequent process can obtain detailed information such as option name, optional value and current value only for the first control, avoiding the steps of obtaining option name, optional value and current value for unmodifiable controls, thus improving the efficiency of data acquisition in configuration options.

[0075] In some embodiments, after determining the first control, the option name, optional value, and current value of the first control are obtained. The option name of the first control is used as the key, and the optional value and current value of the first control are used as the value to construct a key-value pair of the first control. An initial first object of the first control is constructed, and the key-value pair of the first control is added to the initial first object to obtain the first object.

[0076] In some embodiments, each first control has a corresponding key-value pair, and the option name, the selectable value and the current value of the first control are added in the initial first object in the format of the key-value pair, to obtain the first object.

[0077] In some embodiments, the option information of the first control is stored in the first object in the form of the key-value pair, to facilitate subsequent processing and transmission of the option information of the first control.

[0078] In some embodiments, for the first control, the option name, the selectable value and the current value of the corresponding first control can be extracted through the control handle of the first control.

[0079] In some embodiments, the control handle of the first control is obtained, and based on the control handle of the first control, an extraction function is constructed; and the option name, the selectable value and the current value of the first control are extracted based on the extraction function.

[0080] In some embodiments, the control handle is an identifier of the control in the configuration option.

[0081] In some embodiments, the extraction function can be an HiiGetString function, which is a function in UEFI / HII (Human Interface Infrastructure) and is used to obtain the text content of the control handle in the current language according to the control handle and the language, to obtain the option name, the selectable value and the current value of the first control corresponding to the control handle.

[0082] In some embodiments, the server can automatically obtain the control handle of the first control, and the server stores the extraction function template, and the control handle of the first control is substituted into the extraction function template to obtain the extraction function.

[0083] In other embodiments, the control handle of the first control can also be obtained manually, and the extraction function is constructed manually based on the control handle of the first control, and the extraction function is input into the server manually, and the server extracts the option name, the selectable value and the current value of the first control in response to the received extraction function.

[0084] It can be understood that the control handle of the first control is included in the extraction function, so that the first control whose option name, selectable value and current value need to be extracted can be accurately located through the control handle in the extraction function.

[0085] Figure 4 Flowchart of the configuration option synchronization method provided by the embodiments of the present application Figure 3 As shown in Figure 4 The embodiments of the present application provide a method for determining a target directory name, which is described in detail as follows:

[0086] S401, extract the parent page of the page where each control is located, and determine whether the page where the corresponding control is located is a root page based on the page identifier of the parent page of the page where the control is located.

[0087] In some embodiments, in the configuration option, there is a hierarchical relationship between each page.

[0088] In some embodiments, for the page where a control is located, the parent page of the page where the control is located is extracted, and whether the page where the corresponding control is located is a root page is determined based on the page identifier of the parent page of the page where the control is located.

[0089] If the page identifier (pageparentid) of the parent page of the page where the control is located is 0, it indicates that the page where the control is located does not have a parent page, i.e., the page where the control is located is the outermost page of the hierarchical relationship between each page in the configuration option, i.e., the page where the control is located is a root page.

[0090] S402, if the page where the corresponding control is located is a root page, the directory name of the page where the corresponding control is located is determined as the target directory name.

[0091] If the page where the corresponding control is located is a root page, i.e., the page where the control is located does not have a page at the previous level, the directory name of the page where the control is located is determined as the target directory name.

[0092] S403, if the page where the corresponding control is located is not a root page, the parent page of the page where the corresponding control is located is traversed upwards until the root page of the page where the corresponding control is located is obtained, and the directory names of the pages contained between the page where the corresponding control is located and the root page of the page where the corresponding control is located are determined as the target directory name.

[0093] If the page where the corresponding control is located is not a root page, it indicates that the page where the control is located has a page at the previous level, the parent page of the page where the corresponding control is located is traversed upwards until the root page of the page where the corresponding control is located is obtained, and the root page of the page where the control is located is the outermost page, then the root page of the page where the control is located and the page where the control is located can be separated by N pages, N is an integer greater than or equal to 0.

[0094] The directory names of the pages contained between the page where the control is located and the root page of the page where the control is located are determined as the target directory name, then the target directory name includes the directory name of the page where the control is located, the directory name of the N pages that can be separated between the root page of the page where the control is located and the page where the control is located, and the directory name of the root page of the page where the control is located.

[0095] In some embodiments, a determination manner of a root page of a page where a control is located is proposed: a parent page of the page where the control is located is determined as a first page, and whether the first page is a root page is determined based on a page identifier of the parent page of the first page; if the first page is a root page, the first page is determined as the root page of the page where the control is located; if the first page is not a root page, the step of determining the parent page of the first page as a new first page and determining whether the first page is a root page based on a page identifier of the parent page of the first page is executed circularly until the first page is a root page.

[0096] In some embodiments, if the page where the control is located is not a root page, a parent page of the page where the control is located is determined as a first page, and whether the first page is a root page is determined based on a page identifier of the parent page of the first page.

[0097] If the page identifier of the parent page of the first page is 0, the parent page of the first page is a root page, and the first page can be determined as the root page of the page where the control is located.

[0098] If the page identifier of the parent page of the first page is not 0, the parent page of the first page is not a root page, the step of determining the parent page of the first page as a new first page and determining whether the first page is a root page is executed circularly until the first page is a root page, and the first page which is a root page is determined as the root page of the page where the control is located.

[0099] As in some embodiments, for a control A, the page where the control A is located is not a root page, a parent page of the page where the control A is located is determined as a first page, a page identifier of the parent page of the page where the control A is located is set as a, whether the first page a is a root page is determined, if the first page a is a root page, the first page a is the root page of the page where the control A is located, if the first page a is not a root page, a parent page of the first page a is determined as a first page, a page identifier of the parent page of the first page a is set as b, whether the first page b is a root page is determined based on a page identifier of a parent page of the first page b, if the first page b is a root page, the first page b is the root page of the page where the control A is located, if the first page b is not a root page, a parent page of the first page b is determined as a first page, and so on, the step of determining the parent page of the first page as a new first page is executed circularly until the first page is a root page, and the first page which is a root page is determined as the root page of the page where the control A is located.

[0100] The root page of the page where the control is located is an outermost page.

[0101] In this manner, a target directory name of the control is extracted, the target directory name includes a directory name of each layer page between the page where the control is located and the root page of the page where the control is located, and a basis is provided for accurately displaying a directory level of a configuration option on a BMC interface subsequently.

[0102] In some embodiments, in order to make the target directory name of each control better reflect the hierarchy of the page where the control is located, the directory names of each page are recorded in sequence according to the order of the page where the control is located in the traversal of each page involved in the root page of the page where the control is located, to obtain the target directory name of the control, so that the hierarchical relationship between each page between the page where the control is located and the root page of the page where the control is located can be clearly reflected in the target directory name of the control.

[0103] In some embodiments, based on the order of each page where the control is located to the root page of the page where the control is located, the directory names of the pages contained between each page where the control is located and the root page of the corresponding page where the control is located are recorded in sequence to obtain the target directory name corresponding to each control.

[0104] As for the above-mentioned control A, when traversing the root page of the page where the control A is located, the directory name of the page where the control A is located is recorded, and the directory names of each first page in the traversal are recorded in sequence until the root page of the control A page is recorded. The directory names recorded in sequence ultimately obtain the target directory name. Also, for control A, the first page b is the root page, and the first page b is the root page of the page where the control A is located. The target directory name of the control A is the directory name of the page where the control A is located, the directory name of the first page a, and the directory name of the first page b recorded in sequence.

[0105] In some embodiments, the first object and the second object of the first control, and the second object of the third control are added to the linked list according to the hierarchical structure to obtain the data structure of the configuration option; wherein the third control is a control other than the first control.

[0106] In some embodiments, the linked list is a JSON (JavaScript Object Notation) linked list.

[0107] The first object and the second object of the first control, and the second object of the third control are added to the JSON linked list according to the hierarchical structure to obtain the data structure of the configuration option.

[0108] In some embodiments, the JSON linked list can be represented using a list, and each element represents the information of one level.

[0109] In some embodiments, after obtaining the data structure of the configuration option, the data in the data structure of the configuration option is sent to the BMC through a redfish (an open standard management interface for data center servers and management hardware) specific uniform resource locator (URL), and the BMC displays the directory hierarchy of the configuration option according to the data structure on the interface of the BMC.

[0110] The data in the data structure of the configuration option is sent to the BMC through a Redfish specific URL, efficient interaction of the data between the system and the BMC is realized, the BMC can display the directory hierarchy of the control according to the second object on the BMC interface intuitively, and the user can view and operate conveniently.

[0111] After the BMC parses the data structure file of the configuration option, a tree directory structure consistent with the native BIOS Setup is dynamically constructed on the management interface, the user can navigate step by step through the familiar classification path, and the target option can be positioned clearly and quickly.

[0112] Finally, the user can view all configurable items of the configuration option according to the logical grouping in the BMC interface, the accuracy and efficiency of the configuration option synchronization are realized, the ease of use and operation experience of the configuration option management are improved, and the configuration of the configuration option can be performed through the BMC.

[0113] In the embodiment of the application, the data structure of the configuration option includes option information (including option name, current value, and optional value range) of a modifiable control and directory hierarchy relationship (target directory name) in the BIOS Setup interface, after the BMC parses the data structure of the configuration option, a tree directory structure consistent with the native BIOS Setup is dynamically constructed on the management interface, the required option in the configuration option can be quickly positioned through the intuitive directory structure, the operation efficiency of the BMC control BIOS is greatly improved, the possibility of misoperation is reduced, and a more convenient, efficient and accurate BIOS configuration experience is provided for the user.

[0114] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and a necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment.

[0115] Figure 5 The configuration option synchronization device provided in the embodiment of the application is shown in the structural schematic diagram of the subject. As shown in the figure, the embodiment of the application also provides a configuration option synchronization device, which comprises: Figure 5

[0116] The traversal module 510 is configured to extract each page in the configuration option of the system based on an outer loop of a nested loop, and extract the control in each page based on an inner loop of the nested loop.

[0117] The first control determination module 530 is configured to determine a first control that can be modified based on a page state of a page where each extracted control is located and a control state of the corresponding control.

[0118] ​The first object determining module 550 is configured to construct a first object of the first control based on the option name, the selectable value, and the current value of the first control.

[0119] The second object determining module 570 is configured to extract a target directory name of a page where each control is located based on a parent page of the page, and construct a second object of each control based on the target directory name of the control.

[0120] The synchronization data obtaining module 590 is configured to construct a data structure of the configuration option based on the second object of each control and the first object of the first control, and implement synchronization of the configuration option based on the data structure of the configuration option.

[0121] In some embodiments, the first control determining module 530 includes:

[0122] The page state processing unit is configured to determine a second control whose page state of a page where the second control is located is in an unhidden state, and determine whether a control state of the second control is a target state; the target state includes at least one of a gray display state and a disabled state.

[0123] The first judging unit is configured to determine that the second control is the first control in a case where the control state of the second control is not the target state.

[0124] The second judging unit is configured to determine that the second control is not the first control in a case where the control state of the second control is the target state.

[0125] In some embodiments, the first object determining module 550 includes:

[0126] The information extracting unit is configured to obtain the option name, the selectable value, and the current value of the first control, construct a key-value pair of the first control by taking the option name of the first control as a key and taking the selectable value and the current value of the first control as a value.

[0127] The object constructing unit is configured to construct an initial first object of the first control, add the key-value pair of the first control into the initial first object, and obtain the first object.

[0128] In some embodiments, the information extracting unit includes:

[0129] The function constructing block is configured to obtain a control handle of the first control, and construct an extracting function based on the control handle of the first control.

[0130] The information extracting block is configured to extract the option name, the selectable value, and the current value of the first control based on the extracting function.

[0131] In some embodiments, the information extraction unit comprises: a function processing block, configured to extract the option name, the selectable value and the current value of the first control in response to the received extraction function, the extraction function comprising a control handle of the first control.

[0132] In some embodiments, the second object determination module 570 comprises:

[0133] a root page judgment unit, configured to extract a parent page of the page where each control is located, and determine whether the page where the corresponding control is located is a root page based on a page identifier of the parent page of the page where the control is located.

[0134] a first target directory name determination unit, configured to, if the page where the corresponding control is located is a root page, determine a directory name of the page where the corresponding control is located as a target directory name.

[0135] a second target directory name unit, configured to, if the page where the corresponding control is located is not a root page, traverse upwards based on the parent page of the page where the corresponding control is located until the root page of the page where the corresponding control is located is obtained, and determine the directory names of the pages contained between the page where the corresponding control is located and the root page of the page where the corresponding control is located as the target directory name.

[0136] In some embodiments, the second target directory name unit comprises:

[0137] a judgment block, configured to determine the parent page of the page where the corresponding control is located as a first page, and determine whether the first page is a root page based on a page identifier of the parent page of the first page.

[0138] a root page determination block, configured to, if the first page is a root page, determine that the first page is the root page of the page where the corresponding control is located.

[0139] a loop block, configured to, if the first page is not a root page, cyclically execute the steps of determining the parent page of the first page as a first page, and determining whether the first page is a root page based on a page identifier of the parent page of the first page, until the first page is a root page.

[0140] In some embodiments, the second target directory name unit comprises: a target directory name block, configured to record the directory names of the pages contained between the page where each control is located and the root page of the page where the corresponding control is located in sequence based on the order of the pages, to obtain the target directory name corresponding to each control.

[0141] In some embodiments, the synchronization data acquisition module 590 comprises:

[0142] The synchronous data acquisition unit is used to add the first and second objects of the first control and the second object of the third control to the linked list according to the hierarchical structure to obtain the data structure of the configuration options; wherein, the third control is a control other than the first control.

[0143] For a description of the features in the embodiment corresponding to the configuration option synchronization device, please refer to the relevant description in the embodiment corresponding to the configuration option synchronization method, which will not be repeated here.

[0144] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 6 As shown, the electronic device 60 provided in this embodiment includes at least one processor 601 and a memory 602. Optionally, the electronic device 60 further includes a communication component 603. The processor 601, memory 602, and communication component 603 are connected via a bus.

[0145] In a specific implementation, at least one processor 601 executes a computer program stored in memory 602, causing at least one processor 601 to execute the above-described configuration option synchronization method embodiment.

[0146] The specific implementation process of processor 601 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0147] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0148] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0149] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application does not limit to only one bus or one type of bus.

[0150] Embodiments of the present application also provide a computer readable storage medium, which stores a computer program, wherein the computer program is configured to execute the steps in any of the above configuration option synchronization method embodiments when running.

[0151] In an example embodiment, the above computer readable storage medium can include, but is not limited to, a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.

[0152] Embodiments of the present application also provide a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the steps in any of the above configuration option synchronization method embodiments.

[0153] Embodiments of the present application also provide another computer program product, which includes a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in any of the above configuration option synchronization method embodiments.

[0154] The skilled person can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in the above description in general terms. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0155] The above describes in detail a configuration option synchronization method and an electronic device provided by the present application. The principles and implementation manners of the present application are described by using specific examples, and the above description of the embodiments is only used to help understand the method of the present application and the core idea thereof. It should be pointed out that, for those skilled in the art, some improvements and modifications can be made to the present application without departing from the principles of the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A configuration option synchronization method, characterized by, The method comprises the following steps: extracting each page in a configuration option of a basic input / output system (BIOS) based on an outer loop of a nested loop, and extracting a control in each page based on an inner loop of the nested loop; determining a first control that can be modified based on a page state of a page where each control is located and a control state of the corresponding control; constructing a first object of the first control based on an option name, a selectable value and a current value of the first control; extracting a parent page of a page where each control is located, and determining whether the page where the corresponding control is located is a root page based on a page identifier of the parent page of the page where the control is located; if the page where the corresponding control is located is the root page, determining a directory name of the page where the corresponding control is located as a target directory name; if the page where the corresponding control is located is not the root page, traversing upwards based on the parent page of the page where the corresponding control is located until a root page of the page where the corresponding control is located is obtained, and determining directory names of pages contained between the page where the corresponding control is located and the root page of the page where the corresponding control is located as the target directory name; constructing a second object of each control based on the target directory name of each control; constructing a data structure of the configuration option based on the second object of each control and the first object of the first control, and implementing synchronization of the configuration option in a baseboard management controller (BMC) based on the data structure of the configuration option.

2. The method of claim 1, wherein, The method of determining the first control that can be modified based on the page state of the page where each control is located and the control state of the corresponding control comprises the following steps: determining a second control in a page state of a page where the second control is located is an unhidden state, and determining whether a control state of the second control is a target state; the target state comprises at least one of a gray display state and a disabled state; in a case where the control state of the second control is not the target state, determining that the second control is the first control; in a case where the control state of the second control is the target state, determining that the second control is not the first control.

3. The method according to claim 1 or 2, characterized in that, The method of constructing the first object of the first control based on the option name, the selectable value and the current value of the first control comprises the following steps: obtaining the option name, the selectable value and the current value of the first control, taking the option name of the first control as a key, and taking the selectable value and the current value of the first control as a value to construct a key-value pair of the first control; constructing an initial first object of the first control, adding the key-value pair of the first control into the initial first object to obtain the first object.

4. The method of claim 3, wherein, The method of obtaining the option name, the selectable value and the current value of the first control comprises the following steps: obtaining a control handle of the first control, and constructing an extraction function based on the control handle of the first control; extracting the option name, the selectable value and the current value of the first control based on the extraction function.

5. The method of claim 3, wherein, The method of obtaining the option name, the selectable value and the current value of the first control comprises the following steps: in response to the received extraction function extracting the option name, the selectable value and the current value of the first control, the extraction function comprises a control handle of the first control.

6. The method of claim 1, wherein, The method of traversing upwards based on the parent page of the page where the corresponding control is located until a root page of the page where the corresponding control is located is obtained comprises the following steps: determining a parent page of a page where the control corresponds as a first page, and determining whether the first page is a root page based on a page identifier of the parent page of the first page; if the first page is the root page, determining that the first page is a root page of the page where the control corresponds; if the first page is not the root page, repeatedly performing the steps of taking the parent page of the first page as the first page, and determining whether the first page is the root page based on the page identifier of the parent page of the first page, until the first page is the root page.

7. The method of claim 1, wherein, The directory name of the page contained between the page where the control corresponds and the root page of the page where the control corresponds is determined as a target directory name, including: based on the order of the page where each control corresponds to the root page of the page where each control corresponds, the directory name of the page contained between the page where each control corresponds and the root page of the page where each control corresponds is recorded in turn to obtain the target directory name corresponding to each control.

8. The method of claim 1, wherein, The data structure of the configuration option is constructed based on the second object of each control and the first object of the first control, including: the first object and the second object of the first control, the second object of the third control are added to the linked list according to the hierarchical structure to obtain the data structure of the configuration option; wherein the third control is a control other than the first control.

9. An electronic device, comprising: including: a memory for storing a computer program; a processor for executing the computer program to implement the steps of the method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and device for modifying server configuration file

    CN104298686A

  • Page content display control method, system and equipment and medium

    CN116483360A