Data processing method and device and electronic equipment

By adjusting the configuration item information using the first configuration file and the second configuration file imported from the factory in the UEFI system, the problem of fixing the UEFI firmware configuration item is solved, and flexible configuration item presentation and user experience improvement are achieved.

CN120335915APending Publication Date: 2025-07-18LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510392572.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In the prior art, the configuration item information in the UEFI firmware is fixed after compilation and cannot be flexibly changed. The firmware code needs to be modified to adjust the configuration item name, options to be selected and help text, resulting in slow response to user requirements and increased maintenance resources.

Method used

By writing the first configuration file of the read-only storage medium before the UEFI system leaves the factory and importing the second configuration file after the factory, adjusting and parsing the configuration item information in the first configuration file according to the second configuration file, the target configuration item is dynamically generated to present the configuration interface.

Benefits of technology

It realizes that without modifying the UEFI firmware code, dynamically adjusting the configuration item name, pending options and help text, meeting user needs, reducing waiting time and maintenance resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120335915A_ABST
    Figure CN120335915A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device and electronic equipment, and the method comprises the steps: obtaining an interface presentation request which is used for indicating the presentation of a configuration interface of a UEFI system; in response to the interface presentation request, reading a first configuration file corresponding to the UEFI system from a read-only storage medium; the first configuration file is written into the read-only storage medium before the UEFI system leaves a factory; obtaining at least one target configuration item according to the first configuration file and the second configuration file; the second configuration file is a configuration file imported into an electronic device where the UEFI system is located after the UEFI system leaves a factory; and outputting the configuration interface according to the target configuration item, the configuration interface being used for presenting the target configuration item, and the target configuration item being used for configuring the UEFI system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to a data processing method, apparatus, and electronic device. Background Art

[0002] Currently, in a computer system (such as a server, a personal computer, etc.), the names of configuration items, the help text of the names of candidate options, and information such as whether to present them to a configuration interface in the Unified Extensible Firmware Interface (UEFI) firmware are fixed after compilation. If changes are needed, the code of the UEFI firmware needs to be modified and the firmware needs to be recompiled. Summary of the Invention

[0003] In view of this, this application provides a data processing method, apparatus, and electronic device as follows:

[0004] A data processing method includes:

[0005] Obtaining an interface presentation request for instructing to present a configuration interface of a UEFI system;

[0006] In response to the interface presentation request, reading a first configuration file corresponding to the UEFI system from a read-only storage medium; the first configuration file is written to the read-only storage medium before the UEFI system leaves the factory;

[0007] Obtaining at least one target configuration item according to the first configuration file and a second configuration file; the second configuration file is a configuration file imported into the electronic device where the UEFI system is located after the UEFI system leaves the factory;

[0008] Outputting the configuration interface according to the target configuration item, where the configuration interface is used to present the target configuration item, and the target configuration item is used to configure the UEFI system.

[0009] Preferably, in the above method, obtaining at least one target configuration item according to the first configuration file and the second configuration file includes:

[0010] Parsing the configuration item information in the first configuration file to obtain at least one first configuration item;

[0011] Adjusting the configuration item information of the first configuration item according to the second configuration file to obtain a target configuration item.

[0012] In the above method, preferably, the configuration item information includes: configuration item name, selectable options, current configuration value, initial configuration value, configuration help text, configurable attribute; the current configuration value is one of the selectable options; the configurable attribute indicates whether the configuration item is allowed to be configured.

[0013] In the above method, preferably, according to the second configuration file, the configuration item information of the first configuration item is adjusted to obtain a target configuration item, including:

[0014] Locate the second configuration item to be adjusted in the first configuration item according to the first information in the second configuration file;

[0015] Modify at least one item of configuration item information of the second configuration item according to the second information in the second configuration file to obtain a target configuration item.

[0016] In the above method, preferably, at least one target configuration item is obtained according to the first configuration file and the second configuration file, including:

[0017] Modify the configuration item information in the first configuration file according to the second configuration file to obtain a target configuration file;

[0018] Parse the configuration item information in the target configuration file to obtain at least one target configuration item.

[0019] In the above method, preferably, modifying the configuration item information in the first configuration file according to the second configuration file to obtain a target configuration file includes:

[0020] According to the first information in the second configuration file, the file content corresponding to the third configuration item to be adjusted in the first configuration file;

[0021] Modify the file content corresponding to the third configuration item according to the second information in the second configuration file to obtain a target configuration file.

[0022] In the above method, preferably, there is at least one fourth configuration item in the target configuration item that is marked as not allowed to be configured in the first configuration file, and the fourth configuration item is marked as allowed to be configured in the second configuration file.

[0023] In the above method, preferably, the file format of the second configuration file matches the file format of the first configuration file.

[0024] A data processing device includes:

[0025] A request acquisition unit for acquiring an interface presentation request for indicating to present a configuration interface of a UEFI system;

[0026] A configuration reading unit for, in response to the interface presentation request, reading a first configuration file corresponding to the UEFI system from a read-only storage medium; the first configuration file is written to the read-only storage medium before the UEFI system leaves the factory;

[0027] A configuration item acquisition unit for acquiring at least one target configuration item according to the first configuration file and a second configuration file; the second configuration file is a configuration file imported into the electronic device where the UEFI system is located after the UEFI system leaves the factory;

[0028] An interface output unit for outputting the configuration interface according to the target configuration item, the configuration interface being used to present the target configuration item, and the target configuration item being used to configure the UEFI system.

[0029] An electronic device, comprising:

[0030] A read-only storage medium for storing a first configuration file corresponding to a UEFI system; the first configuration file is written to the read-only storage medium before the UEFI system leaves the factory;

[0031] A processor for acquiring an interface presentation request for indicating to present a configuration interface of the UEFI system; in response to the interface presentation request, reading the first configuration file from the read-only storage medium; acquiring at least one target configuration item according to the first configuration file and a second configuration file; the second configuration file is a configuration file imported into the electronic device where the UEFI system is located after the UEFI system leaves the factory; and outputting the configuration interface according to the target configuration item, the configuration interface being used to present the target configuration item, and the target configuration item being used to configure the UEFI system.

[0032] A computer-readable storage medium having stored thereon computer programs / instructions, which when executed by a processor implement the data processing method described in any one of the above.

[0033] A computer program product comprising computer programs / instructions, which when executed by a processor implement the data processing method described in any one of the above.

[0034] As can be seen from the above technical solution, in a data processing method, apparatus, and electronic device disclosed in this application, after obtaining an interface presentation request instructing to present the configuration interface of the UEFI system, the first configuration file written before factory for the UEFI system is read from the read-only storage medium. Then, at least one target configuration item can be obtained based on the first configuration file and the second configuration file imported after factory. Finally, the configuration interface is output according to the target configuration item to facilitate presenting the target configuration items for configuring the UEFI system. It can be seen that in this application, after the UEFI system leaves the factory, the configuration items of the UEFI system can be presented based on the newly imported configuration file and the configuration file set before factory, no longer limited to the configuration items that can be presented by the configuration file set before factory. In this way, the imported configuration file can meet the user's presentation requirements for configuration items, thereby improving the user experience. Description of the Drawings

[0035] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0036] Figure 1 Flowchart of a data processing method provided by an embodiment of this application;

[0037] Figure 2 Example diagram for setting the configuration interface;

[0038] Figure 3 Partial flowchart of a data processing method provided by an embodiment of this application;

[0039] Figure 4 Another flowchart of a data processing method provided by an embodiment of this application;

[0040] Figure 5 Structural schematic diagram of a data processing apparatus provided by an embodiment of this application;

[0041] Figure 6 Structural schematic diagram of an electronic device provided by an embodiment of this application;

[0042] Figure 7 Frame diagram of presenting the configuration interface in the prior art;

[0043] Figure 8 Frame diagram of presenting the configuration interface using the first method of this application;

[0044] Figure 9The implementation flowchart for presenting the configuration interface using the first method of this application;

[0045] Figure 10 The framework diagram for presenting the configuration interface using the second method of this application;

[0046] Figure 11 The implementation flowchart for presenting the configuration interface using the second method of this application. Detailed implementation manners

[0047] Next, the technical solutions in the embodiments of this application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.

[0048] Refer to Figure 1 As shown, it is the implementation flowchart of a data processing method provided by the embodiments of this application. This method can be applied to electronic devices with a UEFI system, such as computers or servers, etc. The technical solutions in this example are mainly used to improve the user experience of using electronic devices.

[0049] Specifically, the method in this embodiment may include the following steps:

[0050] Step 101: Obtain an interface presentation request.

[0051] Among them, the interface presentation request is used to indicate presenting the configuration interface of the UEFI system. The configuration interface is used to present at least one configuration item corresponding to the UEFI system. For example, Figure 2 As shown in, the user can click on the interface control to generate an interface presentation request. In the output configuration interface, the user can perform setting operations on any configuration item presented in the configuration interface. For example, for configuration item A, it has an initial configuration value such as option "A1", and the user can select option "A2" from its two candidate options "A1" and "A2". Among them, the configuration interface not only refers to the page for configuration operations, but also refers to the configuration of the out-of-band data interface between the UEFI and the Baseboard Management Controller (BMC) and the configuration of the data interface for external protocols, such as: Redfish protocol interface configuration.

[0052] Step 102: In response to the interface presentation request, read the first configuration file corresponding to the UEFI system from the read-only storage medium.

[0053] Among them, the read-only storage medium is a storage medium that is allowed to be written before leaving the factory and is prohibited from being written after leaving the factory, such as a read-only memory ROM (Read-Only Memory). The first configuration file may include configuration item information set when the UEFI system is developed. Based on this, in this embodiment, after receiving the interface presentation request, the driver of the UEFI system will install the configuration item information corresponding to the first configuration file such as configuration item A and configuration item B read from the ROM into the UEFI HII (Human Interface Infrastructure) database protocol via the UEFI HII (Human Interface Infrastructure) database protocol. The driver of the UEFI system includes a UEFI driver for peripheral devices, which is provided by the peripheral device manufacturer and also exists in a form called IO optionROM.

[0054] It should be noted that the first configuration file is written to the read-only storage medium before the UEFI system leaves the factory. The first configuration file is solidified in the read-only storage medium as a firmware program of the UEFI system before leaving the factory. After the electronic device leaves the factory, the first configuration file in the read-only storage medium is not allowed to be modified.

[0055] Step 103: Obtain at least one target configuration item according to the first configuration file and the second configuration file.

[0056] The second configuration file is a configuration file that is imported into the electronic device where the UEFI system is located after the UEFI system leaves the factory.

[0057] In a specific implementation, the second configuration file can be imported into the electronic device in a variety of ways. For example, the second configuration file can be imported from the out-of-band configuration interface implemented by the baseboard management controller BMC (Baseboard Management Controller) of the electronic device; for example, the second configuration file can be imported by reading from various UEFI drivers; for example, imported through the UEFI in-band configuration interface; for example, imported by reading through the file system; for example, imported according to input parameters by executing various commands through the UEFI shell; for example, imported through the Advanced Configuration and Power Management Interface (ACPI) under the operating system OS (Operating System); and so on.

[0058] In one implementation, in step 103, at least one target configuration item can be obtained according to the configuration item information in the first configuration file and the configuration item information in the second configuration file. Wherein, in the case of a conflict between the configuration item information in the first configuration file and the configuration item information in the second configuration file, the configuration item information in the second configuration file shall prevail. For example, if the configurable attribute of configuration item B in the first configuration file indicates that configuration item B is not allowed to be configured, and the configurable attribute of configuration item B in the second configuration file indicates that configuration item B is allowed to be configured, then the obtained target configuration item B is allowed to be configured; Another example is that the current configuration value of configuration item A in the first configuration file is A1, and the current configuration value of configuration item A in the second configuration file is A2, then the current configuration value of the obtained target configuration item A is A2.

[0059] It should be noted that the file format of the second configuration file matches the file format of the first configuration file. Thus, the second configuration file can be parsed by the in-band configuration support module and the out-of-band configuration support module corresponding to the UEFI system. For example, the second configuration file can be in JSON format. Based on this, in this embodiment, the first configuration file can be read from the HII database, and the target configuration item can be obtained in combination with the imported second configuration file.

[0060] Step 104: Output a configuration interface according to the target configuration item.

[0061] Among them, the configuration interface is used to present the target configuration item, and the target configuration item is used to configure the UEFI system.

[0062] Specifically, in step 104, according to the configuration item information of each target configuration item, the configuration items whose configurable attributes indicate that configuration is allowed can be presented in the configuration interface, such as presenting configuration item A and configuration item B, and the corresponding configuration items can be presented according to the current configuration value in the configuration item information, such as presenting configuration item A with "A2".

[0063] It can be seen from the above technical solution that in a data processing method provided by an embodiment of the present application, after obtaining an interface presentation request instructing to present the configuration interface of the UEFI system, the first configuration file written before the factory corresponding to the UEFI system is read from the read-only storage medium, and then at least one target configuration item can be obtained according to the first configuration file and the second configuration file imported after the factory, and finally a configuration interface is output according to the target configuration item, so as to present the target configuration item for configuring the UEFI system. It can be seen that in this embodiment, after the UEFI system leaves the factory, the configuration items of the UEFI system can be presented based on the newly imported configuration file and the configuration file set before leaving the factory, and it is no longer limited to the configuration items that can be presented by the configuration file set before leaving the factory. In this way, the user's presentation requirements for configuration items can be met through the imported configuration file, thereby improving the user experience.

[0064] In one implementation, when obtaining at least one target configuration item in step 103, it can be implemented in the following manner: Figure 3 As shown in:

[0065] Step 301: Parse the configuration item information in the first configuration file to obtain at least one first configuration item.

[0066] In this embodiment, the configuration item information in the first configuration file can be parsed using a fixed parsing strategy corresponding to the first configuration file to obtain the first configuration item.

[0067] The fixed parsing strategies here are divided into in-band parsing strategies and out-of-band parsing strategies. The in-band parsing strategy is the parsing strategy used by the in-band configuration support module corresponding to the UEFI system to parse the first configuration file in response to the first access instruction, and the out-of-band parsing strategy is the parsing strategy used by the out-of-band configuration support module corresponding to the UEFI system to parse the first configuration file in response to the second access instruction. The first access instruction is an instruction for the electronic device where the UEFI system is located to access the configuration interface, and the second access instruction is an instruction for the remote device connected to the electronic device where the UEFI system is located to access the configuration interface through the BMC.

[0068] Specifically, the configuration item information may include at least one of the following: configuration item name, options to be selected, current configuration value, initial configuration value, configuration help text, and configurable attributes. Among them, the current configuration value is one of the options to be selected; the configurable attribute indicates whether the configuration item is allowed to be configured. Taking configuration item A as an example, "A" is the name of the configuration item, which contains two options to be selected, "A1" and "A2". The initial configuration value is the configuration value presented when configuration item A is presented to the configuration interface, and the current configuration value is the configuration value currently set for configuration item A. The configurable attribute indicates that configuration item A allows the user to adjust the configuration value when it is presented to the configuration interface.

[0069] For example, the in-band configuration support module of the UEFI system parses the first configuration file through a fixed parsing strategy, and can obtain configuration item information of configuration items such as configuration item A and configuration item B. Taking configuration item B as an example, "B" is the name of the configuration item, which contains two options "B1" and "B2" to be selected. The initial configuration value is the configuration value presented when configuration item B is presented to the configuration interface, and the current configuration value is the configuration value currently set for configuration item B. The configurable attribute indicates that the configuration value of configuration item B is not allowed to be adjusted by the user when it is presented to the configuration interface.

[0070] Step 302: According to the second configuration file, the configuration item information of the first configuration item is adjusted to obtain a target configuration item.

[0071] In a specific implementation, in step 302, the configuration item information of the first configuration item can be modified according to the setting of the configuration item information of the first configuration item in the second configuration file to obtain the target configuration item.

[0072] For example, according to the setting of the configurable attributes of configuration item B in the second configuration file, modify the configurable attributes of configuration item B parsed from the first configuration file to obtain the new configuration item B, that is, the target configuration item; for another example, according to the setting of the configuration item name of configuration item A in the second configuration file, modify the configuration item name of configuration item A parsed from the first configuration file to "A", so as to obtain the new configuration item A', that is, the target configuration item.

[0073] In one implementation, step 302 can be implemented in the following way:

[0074] First, according to the first information in the second configuration file, locate the second configuration item to be adjusted in the first configuration item. For example, among the configuration items A and B parsed from the first configuration file, locate configuration item A according to the configuration item name "A" in the second configuration file; locate configuration item B according to the configuration item name "B" in the second configuration file.

[0075] Then, according to the second information in the second configuration file, modify at least one piece of configuration item information of the second configuration item to obtain the target configuration item. For example, for the located configuration item A, according to the second configuration item file, modify the configuration item name of configuration item A to "A'", and change the configuration item name of configuration item A to "A'"; for another example, for the located configuration item B, according to the second configuration file, modify the configurable attribute of configuration item B to allow configuration, and change the configurable attribute of configuration item B to allow configuration.

[0076] In one implementation, when obtaining at least one target configuration item in step 103, it can be implemented in the following way, as Figure 4 shown in:

[0077] Step 401: According to the second configuration file, modify the configuration item information in the first configuration file to obtain the target configuration file.

[0078] Specifically, according to the configuration item information in the second configuration file, locate the configuration item in the first configuration file where the configuration item information conflicts with the configuration item information in the second configuration file, and then replace the conflicting configuration item information in the first configuration file with the configuration information in the second configuration file to obtain a new configuration file, that is, the target configuration file.

[0079] For example, both the second configuration file and the first configuration file contain the configuration item information of configuration item B. At this time, according to the content in the second configuration file that modifies the configurable attribute of configuration item B to allow configuration, modify the configurable attribute of configuration item B in the first configuration file to allow configuration; for another example, both the second configuration file and the first configuration file contain the configuration item information of configuration item A. At this time, according to the content in the second configuration file that modifies the configuration item name of configuration item A to "A'", modify the configuration item name of configuration item A in the first configuration file to "A'", thereby obtaining the target configuration file.

[0080] In one implementation, step 401 can be implemented in the following manner:

[0081] First, according to the first information in the second configuration file, locate the file content corresponding to the third configuration item that needs to be adjusted in the first configuration file, that is, the file content of the configuration item whose configuration item information conflicts with the configuration item information in the second configuration file;

[0082] Then, according to the second information in the second configuration file, modify the file content corresponding to the third configuration item to obtain the target configuration file.

[0083] For example, both the second configuration file and the first configuration file contain the configuration item information of configuration item B. At this time, according to the first information of configuration item B in the second configuration file, locate the file content corresponding to configuration item B in the first configuration file, and then according to the second information in the second configuration file that modifies the configurable attribute of configuration item B to allow configuration, modify the configurable attribute of configuration item B in the first configuration file to allow configuration, thereby obtaining the target configuration file;

[0084] For another example, both the second configuration file and the first configuration file contain the configuration item information of configuration item A. At this time, according to the first information of configuration item A in the second configuration file, locate the file content corresponding to configuration item A in the first configuration file, and then according to the second information in the second configuration file that modifies the configuration item name of configuration item A to "A'", modify the configuration item name of configuration item A in the first configuration file to "A'", thereby obtaining the target configuration file.

[0085] Step 402: Parse the configuration item information in the target configuration file to obtain at least one target configuration item.

[0086] Specifically, in this embodiment, the configuration item information in the target configuration file can be parsed by an in-band parsing strategy or an out-of-band parsing strategy to obtain the target configuration item. For example, parse the target configuration file to obtain configuration item A and configuration item B, the configuration item name of configuration item A is "A'", and the configurable attribute of configuration item B is allowed configuration.

[0087] In one implementation, there is at least one fourth configuration item in the target configuration items that is marked as not allowed to be configured in the first configuration file, and the fourth configuration item is marked as a running configuration in the second configuration file.

[0088] For example, the fourth configuration item can be a configuration item related to the central processing unit (CPU). After the UEFI system leaves the factory, these configuration items are not allowed to be configured by users. However, in some special cases, users need to modify these configuration items to enable the electronic device to achieve the corresponding operating effects. Based on this, the file content corresponding to the fourth configuration item is included in the second configuration file, such as the file content that modifies the configurable attribute of the fourth configuration item to a running configuration. Thus, by modifying the file content corresponding to the fourth configuration item in the first configuration file or modifying the fourth configuration item parsed from the first configuration file in this embodiment, when the configuration interface is output, the fourth configuration item is presented to the user, and the user is allowed to perform setting operations on the fourth configuration item on the configuration interface to implement the configuration of the UEFI system.

[0089] Reference Figure 5 , which is a schematic structural diagram of a data processing device provided by an embodiment of the present application. The device can be configured in an electronic device with a UEFI system, such as a computer or a server, etc. The technical solution in this example is mainly used to improve the user experience of using the electronic device.

[0090] Specifically, the device in this embodiment may include the following units:

[0091] A request acquisition unit 501, configured to acquire an interface presentation request, where the interface presentation request is used to indicate presenting a configuration interface of the UEFI system;

[0092] A configuration reading unit 502, configured to, in response to the interface presentation request, read the first configuration file corresponding to the UEFI system from a read-only storage medium; the first configuration file is written to the read-only storage medium before the UEFI system leaves the factory;

[0093] A configuration item acquisition unit 503, configured to acquire at least one target configuration item according to the first configuration file and the second configuration file; the second configuration file is a configuration file imported into the electronic device where the UEFI system is located after the UEFI system leaves the factory;

[0094] An interface output unit 504, configured to output the configuration interface according to the target configuration item, where the configuration interface is used to present the target configuration item, and the target configuration item is used to configure the UEFI system.

[0095] As can be seen from the above technical solution, in a data processing device provided in an embodiment of the present application, after obtaining an interface presentation request instructing to present a configuration interface of the UEFI system, a first configuration file pre-written before leaving the factory corresponding to the UEFI system is read from a read-only storage medium, and then at least one target configuration item can be obtained according to the first configuration file and a second configuration file poured in after leaving the factory. Finally, according to the target configuration item, a configuration interface is output to facilitate presenting the target configuration item for configuring the UEFI system. It can be seen that in this embodiment, after the UEFI system leaves the factory, the configuration items of the UEFI system can be presented based on the newly imported configuration file and the configuration file set before leaving the factory, and are no longer limited to the configuration items that can be presented by the configuration file set before leaving the factory. In this way, the imported configuration file can meet the user's presentation requirements for configuration items, thereby improving the user experience.

[0096] In one implementation manner, the configuration item obtaining unit 503 is specifically configured to: parse the configuration item information in the first configuration file to obtain at least one first configuration item; and adjust the configuration item information of the first configuration item according to the second configuration file to obtain a target configuration item.

[0097] Wherein, the configuration item information includes: configuration item name, selectable options, current configuration value, initial configuration value, configuration help text, configurable attribute; the current configuration value is one of the selectable options; the configurable attribute indicates whether the belonging configuration item is allowed to be configured.

[0098] Specifically, when the configuration item obtaining unit 503 adjusts the configuration item information of the first configuration item according to the second configuration file to obtain a target configuration item, it is specifically configured to: locate a second configuration item to be adjusted in the first configuration item according to the first information in the second configuration file; and modify at least one item of configuration item information of the second configuration item according to the second information in the second configuration file to obtain a target configuration item.

[0099] In one implementation manner, the configuration item obtaining unit 503 is specifically configured to: modify the configuration item information in the first configuration file according to the second configuration file to obtain a target configuration file; and parse the configuration item information in the target configuration file to obtain at least one target configuration item.

[0100] Specifically, when the configuration item obtaining unit 503 modifies the configuration item information in the first configuration file according to the second configuration file to obtain a target configuration file, it is specifically used for: according to the first information in the second configuration file, locating the file content corresponding to the third configuration item that needs to be adjusted in the first configuration file; according to the second information in the second configuration file, modifying the file content corresponding to the third configuration item to obtain a target configuration file.

[0101] Among them, there is at least one fourth configuration item in the target configuration item that is marked as not allowed to be configured in the first configuration file, and the fourth configuration item is marked as allowed to be configured in the second configuration file. The file format of the second configuration file matches the file format of the first configuration file.

[0102] It should be noted that the specific implementation manners of the units in this embodiment can refer to the corresponding content in the previous text, which will not be elaborated here.

[0103] Reference Figure 6 , is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device may include the following structures:

[0104] A read-only storage medium 601, which is used to store a first configuration file corresponding to the UEFI system; the first configuration file is written into the read-only storage medium before the UEFI system leaves the factory;

[0105] A processor 602, which is used to obtain an interface presentation request, where the interface presentation request is used to indicate presenting the configuration interface of the UEFI system; in response to the interface presentation request, reading the first configuration file from the read-only storage medium; obtaining at least one target configuration item according to the first configuration file and a second configuration file, where the second configuration file is a configuration file imported into the electronic device where the UEFI system is located after the UEFI system leaves the factory; outputting the configuration interface according to the target configuration item, where the configuration interface is used to present the target configuration item, and the target configuration item is used to configure the UEFI system.

[0106] As can be seen from the above technical solution, in an electronic device provided by an embodiment of the present application, after obtaining an interface presentation request for presenting the configuration interface of the UEFI system, the first configuration file that has been written before leaving the factory and corresponds to the UEFI system is read from the read-only storage medium, and then at least one target configuration item can be obtained according to the first configuration file and the second configuration file poured in after leaving the factory. Finally, according to the target configuration item, the configuration interface is output, so as to present the target configuration item for configuring the UEFI system. It can be seen that in this embodiment, after the UEFI system leaves the factory, the configuration items of the UEFI system can be presented based on the newly imported configuration file and the configuration file set before leaving the factory, and are no longer limited to the configuration items that can be presented by the configuration file set before leaving the factory. In this way, the imported configuration file can meet the user's presentation requirements for the configuration items, thereby improving the user experience.

[0107] Taking the UEFI system in the server as an example, a method for allowing users to dynamically adjust UEFI configuration items proposed in the present application will be described in detail below:

[0108] Currently, there are two ways to modify the values of the UEFI configuration items in the server system:

[0109] As Figure 7 shown, one is through the configuration interface presented by the UEFI in-band configuration support module, and the other is to access the configuration interface via BMC (also referred to as the out-of-band configuration support module or the out-of-band configuration interface). The configuration item name, selectable options, help text, etc. of the configuration item are all preset in the firmware of the UEFI system. And currently, users have two demand scenarios:

[0110] 1) Users need to customize a certain configuration item (modify the configuration item name, the name of the selectable option, the help text);

[0111] 2) Users need to newly expose hidden configuration items.

[0112] In the past, in order to meet these two user demand scenarios, it was necessary to modify the code of the UEFI system firmware, that is, to redistribute the new version of the UEFI system firmware to users.

[0113] However, users have to wait for the development and release of the new version of the UEFI firmware code, which affects the user's work progress. The developers of the UEFI firmware code will make frequent modifications due to user requirements, increasing the maintenance resources.

[0114] In view of this, the method proposed in the present application can avoid the above defects, enabling users to adjust the configuration items that can be presented by the UEFI system firmware by importing and adjusting the parsing configuration file (i.e., the second configuration file) into the server. It reduces the user's waiting time and saves the development resources of the UEFI firmware.

[0115] As Figure 7 shown in Figure 7 , the UEFI driver installs the configuration item A and configuration item B (i.e., the first configuration file) read from the ROM into the UEFI HII database via the UEFI HII database protocol. The in-band configuration support module of the UEFI system and the out-of-band configuration support module of the UEFI system read the configuration item A and configuration item B from the HII database according to their respective built-in fixed parsing policies through the HII configuration routing protocol and the HII configuration access protocol, and select and present the corresponding configuration items to the user. For example, both the in-band configuration support module of the UEFI system and the out-of-band configuration support module of the UEFI system present the configuration item A, but both hide the configuration item B.

[0116] Based on the first method of this application, the user uploads an adjusted parsing configuration file (i.e., the second configuration file) through the BMC, so as to be able to customize the parsing of the in-band configuration support module of the UEFI system and the out-of-band configuration support module of the UEFI system. For example, as Figure 8 shown in Figure 8 , for the framework diagram introducing the first method of this application, the user customizes the configuration item name, candidate options, help text, etc. of the configuration item A, so that both the in-band configuration support module of the UEFI system and the out-of-band configuration support module of the UEFI system output the modified configuration item A as A' according to the customized result. The user customizes that the configuration item B needs to be made user-configurable, so that the in-band configuration support module of the UEFI system and the out-of-band configuration support module of the UEFI system expose the configuration item B.

[0117] Based on this, in the first method of this application, both the in-band configuration support module of the UEFI system and the out-of-band configuration support module of the UEFI system need to modify the source code (different from modifying the firmware program of the UEFI system) in order to adjust the parsing result according to the adjusted parsing configuration file.

[0118] The adjusted parsing configuration file can be any data format that can be parsed by the in-band configuration support module of the UEFI system and the out-of-band configuration support module of the UEFI system, such as a JSON format file. The file specifies the location information of the settings items to be adjusted (the title of the UEFI HII form set and the prompt string of the UEFI HII question), whether to output the configuration item, the name of the configuration item to be modified, the option name of the candidate options, the help text, the value of the configuration item to be modified, the default value to be adjusted, etc.

[0119] It should be noted that the way to adjust the import of the parsing configuration file can be any way, not limited to importing from the out-of-band configuration support module of the BMC, but also can be imported in ways that various UEFI drivers can read, such as importing through the in-band UEFI configuration interface, importing through reading the file system, generating by executing various commands in the UEFI shell according to input parameters, or importing through ACPI under the OS, etc.

[0120] For example, in the adjusted parsing configuration file, the name, options, and help text of configuration A that the user wants to modify can be described to obtain configuration A’, and it is specified that configuration A’ can be configured both in-band and out-of-band. The following is the code:

[0121] {"FormSets":

[0122] {

[0123] "Title":"A Configuration", / / The name of the HII Form Set where the configuration item is located

[0124] "Questions":

[0125] {"Prompt":"A Setting", / / The name A of the configuration item before modification

[0126] "Exposure":"Setup and OOB", / / Allows access through the in-band configuration support module and the out-of-band configuration support module

[0127] "NewPrompt":"A’Setting", / / The name A’ after modification

[0128] "NewHelp":"Now it is A’Setting", / / The help text after modification

[0129] "NewOptions":

[0130] {"OldOption":"Option AA", / / The name AA of the option to be selected before modification

[0131] "NewOption":"Option A’A’" / / The name A’A’ of the option to be selected after modification

[0132] },

[0133] {"OldOption":"Option AB", / / The name AB of the option to be selected before modification

[0134] "NewOption":"Option A’B’" / / The name of the modified option to be selected, A’B’

[0135] }]}]}]}

[0136] For another example, in the adjusted parsing configuration file, it can be described that the user wants to change the only exposed configuration B to a configuration that can be configured both in - band and out - of - band, and specify the customized default value and current value of configuration B. The code is as follows:

[0137] {"FormSets":

[0138] {"Title":"B Configuration",

[0139] "Questions":

[0140] {"Prompt":"B Setting",

[0141] "Exposure":"Setup and OOB", / / Allow access through in - band configuration support module and out - of - band configuration support module

[0142] "Value":"Option BB", / / The current configuration value BB of the option to be selected, Option BB

[0143] "CustomDefaults":

[0144] {"Target":"Custom Default B", / / Set the default configuration value of configuration item B

[0145] "Value":"Option BA" / / Set the default value of the option to be selected for configuration item B to BA

[0146] }]}]}]}

[0147] The specific implementation flowchart is as Figure 9 shown below:

[0148] After the driver of the UEFI system reads the firmware program of the UEFI system (i.e., the first configuration file, obtained by reading from the ROM) in the UEFI HII database, it parses the firmware program through the in-band configuration support module or the out-of-band configuration support module to obtain at least one first configuration item, such as configuration item A and configuration item B. Then, it detects whether there is an adjusted parsed configuration file. If there is no adjusted parsed configuration file, it directly processes it according to the normal process, that is, outputs the configuration interface according to the parsed first configuration item. At this time, the configuration interface is the configuration interface set by the firmware of the UEFI system. If there is an adjusted parsed configuration file, it can parse the adjusted parsed configuration file to determine whether the user specifies that the configuration item is configurable (i.e., whether the configurable attribute allows configuration). If it is not configurable, it marks the configurable attribute of this configuration item as not allowed to be configured and then processes it according to the normal process, that is, outputs the configuration interface according to the configuration item after adjusting the configurable attribute. If the user specifies that the configuration item is configurable, it determines whether the user has customized the configuration item name, selectable options, help text, etc. in the adjusted parsed configuration file. If there is no user customization, it directly marks the configurable attribute of this configuration item as allowed to be configured and then processes it according to the normal process, that is, outputs the configuration interface according to the configuration item after adjusting the configurable attribute. If there is user customization, it replaces (i.e., modifies) the configuration item information of the parsed first configuration file according to the customized content in the adjusted parsed configuration file, marks the configurable attribute of this configuration item as allowed to be configured, and then processes it according to the normal process, that is, outputs the configuration interface according to the configuration item after adjusting the configurable attribute.

[0149] Based on the second method of this application, the user can also adjust the configuration item by importing a customized configuration item file (i.e., the second configuration file in the previous text). The in-band configuration support module of the UEFI system and the out-of-band configuration support module of the UEFI system continue to use the inherent parsing strategy. For example, as Figure 10 shown in the framework diagram for introducing the second method of this application, the UEFI driver adjusts configuration item A to A' according to the customized configuration file, adjusts configuration item B to be user-configurable, and then loads the adjusted configuration item A' and configuration item B into the UEFI HII database.

[0150] In the second method of this application, neither the in-band configuration support module nor the out-of-band configuration support module of the UEFI system needs to modify the source code. The driver of the UEFI system should be able to parse the custom configuration item file so as to adjust the parsing result according to the file content. The custom configuration item file can be in any data format that any UEFI driver can parse. It should be noted that the import method of the custom configuration item file can be any method, not limited to importing from the BMC out-of-band configuration interface, and can also be imported in various ways that any UEFI driver can read, such as importing through the UEFI in-band configuration interface, importing through the file system reading, generating by the UEFI shell executing various commands according to input parameters, or importing through ACPI under the OS, etc.

[0151] The specific implementation flowchart is as Figure 11 shown in

[0152] The inherent execution part of the UEFI driver is to load the pre-determined configuration items such as Configuration Item A and Configuration Item B (such as having non-display attributes) into the HII database loader program. Before loading the configuration item information into the HII database, the UEFI driver first determines whether there is a custom configuration item file. If it exists, then adjust the configuration item information according to the custom configuration item file, and then load the adjusted configuration item information into the HII database. Finally, parse it through the in-band configuration support module or the out-of-band configuration support module to obtain at least one configuration item such as Configuration Item A' and Configuration Item B (such as adjusted to have display attributes), and then perform conventional processing, that is, output the configuration interface according to the parsed configuration items.

[0153] In this specification, each embodiment is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method part.

[0154] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0155] The steps of the methods or algorithms described in connection with the embodiments disclosed herein can be implemented directly in hardware, in software modules executed by a processor, or in a combination thereof. The software modules can be located in random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium well known in the art.

[0156] The foregoing description of the disclosed embodiments enables those skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data processing method, comprising: Obtaining an interface presentation request, where the interface presentation request is used to instruct presentation of a configuration interface of a UEFI system; In response to the interface presentation request, reading a first configuration file corresponding to the UEFI system from a read-only storage medium; The first configuration file is written into the read-only storage medium before the UEFI system leaves the factory; Obtain at least one target configuration item according to the first configuration file and the second configuration file; the second configuration file is a configuration file imported into the electronic device where the UEFI system is located after the UEFI system leaves the factory; According to the target configuration item, the configuration interface is output, where the configuration interface is used to present the target configuration item, and the target configuration item is used to configure the UEFI system.

2. The method according to claim 1, obtaining at least one target configuration item according to the first configuration file and the second configuration file, comprising: Parsing the configuration item information in the first configuration file to obtain at least one first configuration item; According to the second configuration file, the configuration item information of the first configuration item is adjusted to obtain a target configuration item.

3. The method according to claim 2, wherein the configuration item information includes: Configuration item name, options to be selected, current configuration value, initial configuration value, configuration help text, and configurable properties; The current configuration value is one of the options to be selected; The configurable attribute indicates whether the configuration item is allowed to be configured.

4. The method according to claim 2, adjusting the configuration item information of the first configuration item according to the second configuration file to obtain the target configuration item, comprising: Locating, in the first configuration item, a second configuration item that needs to be adjusted according to the first information in the second configuration file; At least one configuration item information of the second configuration item is modified according to the second information in the second configuration file to obtain a target configuration item.

5. The method according to claim 1, obtaining at least one target configuration item according to the first configuration file and the second configuration file, comprises: According to the second configuration file, modify the configuration item information in the first configuration file to obtain a target configuration file; The configuration item information in the target configuration file is parsed to obtain at least one target configuration item.

6. The method according to claim 5, modifying the configuration item information in the first configuration file according to the second configuration file to obtain the target configuration file, comprising: Locating, according to the first information in the second configuration file, file content corresponding to the third configuration item that needs to be adjusted in the first configuration file; According to the second information in the second configuration file, the file content corresponding to the third configuration item is modified to obtain a target configuration file. 7 . The method according to claim 1 , wherein there is at least one fourth configuration item in the target configuration items, which is marked as not allowed to be configured in the first configuration file, and the fourth configuration item is marked as allowed to be configured in the second configuration file.

8. The method according to claim 1, wherein a file format of the second configuration file matches a file format of the first configuration file.

9. A data processing device, comprising: A request acquisition unit, configured to acquire an interface presentation request for indicating to present a configuration interface of a UEFI system; A configuration reading unit, configured to read a first configuration file corresponding to the UEFI system from a read-only storage medium in response to the interface presentation request; The first configuration file is written to the read-only storage medium before the UEFI system leaves the factory; A configuration item acquisition unit, configured to acquire at least one target configuration item according to the first configuration file and a second configuration file; The second configuration file is a configuration file imported into the electronic device where the UEFI system is located after the UEFI system leaves the factory; An interface output unit, configured to output the configuration interface according to the target configuration item, where the configuration interface is used to present the target configuration item, and the target configuration item is used to configure the UEFI system.

10. An electronic device, comprising: A read-only storage medium, configured to store a first configuration file corresponding to a UEFI system; The first configuration file is written to the read-only storage medium before the UEFI system leaves the factory; A processor, configured to acquire an interface presentation request for indicating to present a configuration interface of the UEFI system; In response to the interface presentation request, read the first configuration file from the read-only storage medium; Acquire at least one target configuration item according to the first configuration file and a second configuration file; the second configuration file is a configuration file imported into the electronic device where the UEFI system is located after the UEFI system leaves the factory; Output the configuration interface according to the target configuration item, where the configuration interface is used to present the target configuration item, and the target configuration item is used to configure the UEFI system.