A BIOS menu setting method and device
By setting an upper limit on the number of cycles for BIOS menu items and adjusting the button operations according to their positions, the problems of low efficiency and poor reliability in BIOS menu testing are solved, achieving efficient and reliable automated testing.
Patent Information
- Application Number
- CN202410440198.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-12
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2044-04-12
AI Technical Summary
In existing technologies, the accuracy testing of BIOS menus is inefficient and unreliable. In particular, when the Setup menu is set incorrectly, redundant loops are easily generated, which affects the execution efficiency and reliability of automated testing.
Set a corresponding loop count limit for each BIOS menu item, equal to the total number of its options, and execute different key operations based on the position of the menu item to trigger an interface refresh and obtain echo information. Limit the number of times the option value is set by the loop count limit to avoid redundant loops.
It improves the efficiency and reliability of automated testing of BIOS menus, ensuring that all available options can be traversed when menu item settings are incorrect, avoiding redundant loops, and improving the execution efficiency and accuracy of tests.
Smart Images

Figure CN118259801B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of server technology, and in particular to a BIOS menu setting method and device. Background Technology
[0002] To ensure server quality, a series of tests are conducted on computing devices before they leave the factory. Among these tests, the Basic Input / Output System (BIOS) is a program that runs when the computing device starts up. The BIOS provides a visual Setup menu, allowing users to view and configure hardware parameters such as the processor and memory, as well as software parameters related to security and boot processes. Incorrect Setup menu settings will affect the normal startup and operation of the computing device. Therefore, the accuracy of Setup menu settings is a crucial aspect of computing device testing.
[0003] However, the accuracy test of the Setup menu is inefficient and unreliable. Summary of the Invention
[0004] This application provides a BIOS menu setting method, apparatus, computing device, computer storage medium, and computer program product, which can improve the accuracy testing efficiency of the Setup menu.
[0005] In a first aspect, embodiments of this application provide a BIOS menu setting method, the method comprising: when locating a target menu item on a target menu, acquiring a key command, the target menu being an input / output system BIOS menu or a submenu of a BIOS menu; according to the key command, setting the target menu item to a first option value, the target menu item including at least one optional item, each optional item describing an option value, the first option value being one of the option values; if setting the first option value fails, if the current loop count limit for the target menu item has not been exceeded, acquiring a key command again to change the target menu item to a second option value; if the current loop count limit has been exceeded, ending the setting of the target menu item, wherein the loop count limit is equal to the total number of optional items of the target menu item, and the second option value is one of the option values.
[0006] In this embodiment, the computing device can pre-set a loop count limit for each menu item in the BIOS menu. For any menu item, the loop count limit is equal to the total number of its options. Thus, when setting an option value for a menu item (i.e., the target menu item), if the option value setting fails and the current loop count limit for the target menu item has not been exceeded, the selection value can be changed again (i.e., changing the first option value to the second option value). However, if the current loop count limit has been exceeded, the setting process for the target menu item is forcibly exited. This ensures that during automated testing, all options under the menu item can be traversed without generating redundant loops, improving the execution efficiency of automated testing.
[0007] In some possible implementations, after setting the target menu item to the first option value according to the key command, the method includes: determining the position of the target menu item in the target menu, which may be the first menu item position, the last menu item position, the middle menu item position, or the only menu item position; executing the corresponding key operation according to the position to trigger a refresh of the target menu interface and obtain echo information, which includes the setting result of the target menu item displayed on the interface after the refresh; and determining whether the first option value setting was successful based on the consistency comparison between the echo information and the preset target value of the target menu item.
[0008] In this embodiment, since the target menu item, whether it's the first, last, or only menu item in the current menu (i.e., the target menu), is already at the current menu boundary, after modifying the option value of the target menu item and pressing the default arrow keys (usually up or down), there might be no locatable menu item moving up or down from that target menu. This prevents the interface from refreshing, thus making it impossible to capture feedback information and determine whether the option value setting of the target menu item was successful. Therefore, this embodiment also uses the position of the target menu item to trigger different key operations to successfully refresh the interface, obtain the corresponding feedback information, and ensure the reliability of automated test execution.
[0009] In some possible implementations, the corresponding key operation is executed based on the position to trigger a refresh of the target menu interface and obtain echo information. This includes: if the target menu item is the first menu item in the target menu, then a first operation is executed. The first operation includes switching the menu item down from the target menu item and then switching back up to the target menu item. Through the first operation, a refresh of the interface where the target menu is located is triggered and echo information is obtained.
[0010] In this way, even if the target menu item is the first menu item, the menu interface can be successfully refreshed through the first operation, and the feedback information can be obtained.
[0011] In some possible implementations, the corresponding key operation is executed based on the position to trigger a refresh of the target menu interface and obtain echo information. This includes: if the target menu item is at the end or middle of the target menu, a second operation is executed. The second operation includes switching the menu item up from the target menu item and then switching back down to the target menu item. Through the second operation, a refresh of the interface where the target menu is located is triggered and echo information is obtained.
[0012] In this way, when the target menu item is the last or middle menu item, the menu interface can be successfully refreshed by default through the second operation, and the echo information can be obtained.
[0013] In some possible implementations, the corresponding key operation is executed based on the position to trigger a refresh of the target menu interface and obtain echo information. This includes: if the target menu item is the only menu item in the target menu, then a third operation is executed. The third operation includes exiting the target menu from the target menu item and then entering the target menu item in the target menu. Through the third operation, a refresh of the interface where the target menu is located is triggered and echo information is obtained.
[0014] In this way, when the target menu item is the only menu item, the menu interface can be successfully refreshed through a third operation to obtain the echo information.
[0015] In some possible implementations, the method also includes: setting a corresponding loop count limit for each menu item in the BIOS menu in the menu path library, such that the loop count limit for any menu item is equal to the total number of options for that menu item, in order to limit the number of times the option value of that menu item can be set, and the target menu item is one of the menu items.
[0016] In this way, by adding a corresponding loop count limit to the path configuration for each menu item in the Setup menu's path library, the computing device can call it when configuring the Setup menu, thereby facilitating the implementation of automated testing.
[0017] In some possible implementations, the method also includes: setting corresponding position description information for each menu item in the BIOS menu in the menu path library, with different values assigned to the position description information to indicate whether the menu item is the first menu item, the last menu item, the middle menu item, or the only menu item.
[0018] In this way, by adding corresponding location description information to the path configuration of each menu item in the Setup menu's path library, the computing device can call it when configuring the Setup menu, thereby facilitating the implementation of automated testing.
[0019] In some possible implementations, determining the position of the target menu item in the target menu includes: obtaining the position description information of the target menu item from the menu path library; and determining the position of the target menu item in the target menu based on the position description information.
[0020] In some possible implementations, after setting the target menu item to the first option value according to the key command, the method includes: obtaining the echo information of the interface where the target menu is located; comparing the echo information with the preset target value of the target menu item to obtain the comparison result; if the comparison result indicates that the echo information is consistent with the target value, then the first option value is determined to be set successfully; if the comparison result indicates that the echo information is inconsistent with the target value, then the first option value is determined to be set unsuccessfully.
[0021] In this way, by comparing the consistency with the echoed information, the setting result of each cycle can be determined.
[0022] Secondly, embodiments of this application provide a BIOS menu setting device, the device comprising: an acquisition module for acquiring key commands when a target menu item is located on a target menu, the target menu being an input / output system BIOS menu or a submenu of a BIOS menu; a processing module for setting the target menu item to a first option value according to the key commands, the target menu item including at least one optional item, each optional item describing an option value, the first option value being one of the option values; the processing module may also be configured to, if the setting of the first option value fails, acquire key commands again to change the target menu item to a second option value if the current loop count limit for the target menu item has not been exceeded, and terminate the setting of the target menu item if the current loop count limit has been exceeded, wherein the loop count limit is equal to the total number of optional items of the target menu item, and the second option value is one of the option values.
[0023] In some possible implementations, the processing module can also be used to: determine the position of the target menu item in the target menu, which may be the first menu item position, the last menu item position, the middle menu item position, or the only menu item position; execute the corresponding key operation according to the position to trigger a refresh of the target menu interface and obtain echo information, which includes the setting result of the target menu item displayed on the interface after the refresh; and determine whether the first option value setting is successful based on the consistency comparison result between the echo information and the preset target value of the target menu item.
[0024] In some possible implementations, the processing module can specifically be used to: if the target menu item is the first menu item in the target menu, then perform a first operation, which includes switching the menu item down from the target menu item and then switching back up to the target menu item; through the first operation, trigger a refresh of the interface where the target menu is located to obtain the echo information.
[0025] In some possible implementations, the processing module can specifically be used to: if the target menu item is at the end or middle of the target menu, then perform a second operation, which includes switching the menu item up from the target menu item and then switching it back down to the target menu item; through the second operation, trigger a refresh of the interface where the target menu is located to obtain the echo information.
[0026] In some possible implementations, the processing module can specifically be used to: if the target menu item is the only menu item in the target menu, then perform a third operation, which includes exiting the target menu from the target menu item and then entering the target menu item in the target menu; through the third operation, trigger a refresh of the interface where the target menu is located and obtain the echo information.
[0027] In some possible implementations, the processing module can also be used to: set a corresponding loop count limit for each menu item in the menu path library, such that the loop count limit for any menu item is equal to the total number of options for that menu item, thereby limiting the number of times the option value of that menu item can be set, with the target menu item being one of the menu items.
[0028] In some possible implementations, the processing module can also be used to: set corresponding position description information for each menu item in the BIOS menu in the menu path library. The position description information is assigned different values to indicate whether the menu item is the first menu item, the last menu item, the middle menu item, or the only menu item.
[0029] In some possible implementations, the processing module can specifically be used to: obtain the location description information of the target menu item from the menu path library; and determine the position of the target menu item in the target menu based on the location description information.
[0030] In some possible implementations, the acquisition module is also used to acquire the echo information of the interface where the target menu is located; the processing module can also be used to compare the echo information with the preset target value of the target menu item to obtain the comparison result; and if the comparison result indicates that the echo information is consistent with the target value, then the first option value is determined to be set successfully, and if the comparison result indicates that the echo information is inconsistent with the target value, then the first option value is determined to be set unsuccessfully.
[0031] Thirdly, embodiments of this application provide a computing device, including: at least one memory for storing a program; and at least one processor for executing the program stored in the memory; wherein, when the program stored in the memory is executed, the processor is used to execute the method described in the first aspect or any possible implementation of the first aspect.
[0032] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run on a processor, causes the processor to perform the method described in the first aspect or any possible implementation thereof.
[0033] Fifthly, embodiments of this application provide a computer program product, characterized in that, when the computer program product is run on a processor, it causes the processor to execute the method described in the first aspect or any possible implementation of the first aspect.
[0034] In a sixth aspect, embodiments of this application provide a chip, characterized in that it includes at least one processor and an interface; the at least one processor obtains program instructions or data through the interface; the at least one processor is used to execute program line instructions to implement the method described in the first aspect or any possible implementation of the first aspect.
[0035] It is understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0036] Figure 1 This is a schematic diagram of a Setup menu;
[0037] Figure 2 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application;
[0038] Figure 3 This is a schematic diagram of the process of setting and testing the Setup menu on a computing device in the embodiments of this application;
[0039] Figure 4 This is a flowchart illustrating the setup and testing process for the Setup menu in one example of this application;
[0040] Figure 5 This is a schematic diagram of the menu path library configured in a specific embodiment of this application;
[0041] Figure 6 This is a flowchart illustrating the setup and testing process for the Setup menu in one example of this application;
[0042] Figure 7 This is a schematic diagram of the menu path library configured in a specific embodiment of this application;
[0043] Figure 8 This is a flowchart illustrating a BIOS menu setting method provided in an embodiment of this application;
[0044] Figure 9This is a flowchart illustrating a BIOS menu setting method in a specific embodiment of this application;
[0045] Figure 10 This is a flowchart illustrating a BIOS menu setting method in a specific embodiment of this application;
[0046] Figure 11 This is a schematic diagram of the structure of a BIOS menu setting device provided in an embodiment of this application;
[0047] Figure 12 This is a schematic diagram of the structure of a chip provided in an embodiment of this application. Detailed Implementation
[0048] In this article, the term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The symbol " / " in this article indicates that the related objects are in an "or" relationship; for example, A / B means A or B.
[0049] The terms "first" and "second," etc., used in the specification and claims herein are used to distinguish different objects, not to describe a specific order of objects.
[0050] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0051] In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more, for example, multiple processing units means two or more processing units, multiple elements means two or more elements, etc.
[0052] To facilitate understanding of the technical solution of this application, the terms used herein are explained below.
[0053] Basic Input / Output System (BIOS): It is specifically responsible for setting various parameters of the system hardware. Essentially, it is a set of programs, or a set of codes, that are embedded in a ROM chip on the motherboard of the computer.
[0054] Setup Menu: The BIOS provides users with an interface to manipulate hardware and software parameters such as processor, memory, buses (e.g., peripheral component interconnect express, PCIe), security, and boot. After parameters are modified, the BIOS sets relevant registers or variables based on the modified values, controlling the server system's operation in different working states. This menu provides a visual interface, enhancing the operability of BIOS configuration.
[0055] Echo is used in computer programming and scripting, especially in command-line environments, to display entered commands or commands from a script on an output device (usually the screen).
[0056] In the automated testing of computing devices, BIOS testing differs from testing other components because the BIOS does not run within an operating system (OS) environment. Therefore, serial communication is typically used to send key commands (such as simulated commands for F5, F6, Page Up, Page Down, or Enter keys) to the BIOS to switch the Setup menu interface and set menu item options. The test then verifies whether each menu item's value is set successfully (i.e., whether it matches the preset target value; if it matches, it's successful; otherwise, it fails). Please refer to [reference needed]. Figure 1 As shown, taking menu item 1 as an example, if the first attempt to set its optional option 1 (each optional option represents a value) fails, the second attempt will automatically proceed. During the second attempt, optional option 2 of menu item 1 will be set to its value. If this also fails, a third attempt will be made, setting optional option 1 of menu item 1 to its value, and so on. This process continues until the setting is successful, or the system's preset maximum number of iterations is exceeded, at which point the setting process for menu item 1 ends.
[0057] Typically, testers set the maximum number of loop iterations based on the number of options under each menu item (1, 2, ...) in the Setup menu, ensuring that this maximum loop iteration covers the menu item with the most options (e.g., the maximum loop iteration equals the number of options g for menu item S). However, since the number of options for each menu item (1, 2, ...) varies, other menu items with fewer options (or even only one option) must also be looped G times if an error occurs, resulting in excessively redundant loops and impacting the efficiency of automated test execution.
[0058] To improve the efficiency of automated testing of the Setup menu, this application provides a BIOS menu setting method. This method primarily sets a corresponding loop count limit for each menu item in the Setup menu (i.e., the BIOS menu), where the maximum loop count is equal to the total number of options for that menu item. By limiting the number of times each menu item's option value can be cyclically set using its own maximum loop count, this ensures that all options for that menu item can be traversed when an error occurs, while avoiding redundant loops and improving automated testing efficiency.
[0059] To facilitate understanding of the technical solution of this application, a computing device provided in the embodiments of this application will be described below.
[0060] For example, Figure 2 A schematic diagram of the structure of a computing device provided in an embodiment of this application is shown. Figure 2 As shown, the computing device 10 can be a hardware device capable of providing data processing, computing, and / or storage functions. For example, the computing device 10 can be a hardware server, but is not limited thereto.
[0061] Please refer to Figure 2 As shown, the computing device 10 may include a processor 110, a memory 120, and a communication interface 130. The processor 110, memory 120, and communication interface 130 may be connected via a bus or other means. In this embodiment, the processor 110 (or central processing unit, CPU) is the computing and control core of the computing device 10. In some embodiments, the processor 110 may execute some or all of the steps of the method provided in this embodiment.
[0062] The memory 120 is a server's memory device that can be used to store computer program instructions, including the computer operating system (OS) and various programs and data. For example, the memory 120 may include non-volatile memory, such as at least one disk storage device, and / or read-only memory (ROM); the memory 120 may also include volatile memory, such as random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions, but is not limited thereto.
[0063] The communication interface 130 may include a standard wired interface (port), such as a FECI or GE interface, or the communication interface 130 may include a wireless interface, controlled by the processor 110 for transmitting and receiving data. It should be understood that the communication interface 130 may include multiple physical ports.
[0064] In addition, computing device 10 also includes a BIOS deployed on a separate Flash memory chip (hereinafter referred to as BIOS chip) 140. Processor 110 runs the BIOS by calling the program code of the BIOS stored in BIOS chip 140. The BIOS can provide a Setup menu (also referred to herein as the BIOS menu) so that users can view and set the parameters of hardware such as processor 110 and memory 120 through the interface provided by the Setup menu, in preparation for OS operation. The main functions of BIOS are power-on, self-test, CPU initialization, memory initialization, detection of input / output devices and bootable devices, and finally booting the OS, but are not limited to these.
[0065] Before the computing device 10 leaves the factory, in order to ensure the correctness of the variable settings of the Setup menu, it is also necessary to perform automated testing on the Setup menu settings of the BISO. It should be understood that the testing of the Setup menu can be achieved by the testing software deployed on the computing device 10 (which can be executed by the processor 110). In other possible examples, the computing device 10 can also perform the testing of the Setup menu by interacting with other external devices. This embodiment does not limit this.
[0066] The setup and testing principles of the Setup menu are explained below with reference to the accompanying diagram.
[0067] In this embodiment, a corresponding loop count limit can be set for each menu item in the Setup menu. The loop count limit for any menu item is equal to the number of options under that menu item. In this way, if an option value of any menu item is set incorrectly, the option value of that menu item can be changed within its loop count limit. Each loop will switch to one of the options of that menu item, thereby traversing all options of that menu item while ensuring that no redundant loops are generated, which helps to reduce the execution efficiency of the test.
[0068] For details, please refer to Figure 3As shown, after initializing the Setup menu test software, the test process begins. The computing device 10 first locates the target menu item in the Setup menu via step 31, and then executes step 32 to change the option value of that target menu item. For example, simulated key press commands (in this example, commands simulating pressing F5 or F6 keys, but not limited to these) can be obtained through the serial port of the computing device 10 and loaded into one of the available options (representing an option value) under the target menu item, setting it as the current option value of the target menu item. Next, the computing device 10 can execute step 33, using directional key commands to switch up or down to other menu items at the same level as the target menu item, triggering a refresh operation of the current menu interface. This allows the computing device 10 to capture the echo information of the current menu interface. It should be understood that the echo information includes the content displayed on the menu interface after the key press.
[0069] Next, the computing device 10 executes step 34, comparing the echoed information with the target value set for the target menu item. If the comparison result determines that the current option value set for the target menu item matches the target value, the target menu item is considered successfully set, "True" is returned, and the process ends. Conversely, if the comparison result determines that the current option value set for the target menu item does not match the target value, the target menu item is considered to have failed to set. If, at this point, step 35 determines that the current number of times the option value of the target menu item has been set (i.e., the number of loops) has not exceeded the upper limit W of the number of loops for the target menu item, then the loop setting stage is entered, and the option value is changed again. That is, the process returns to step 32 above and executes the option value setting process again. In the new round of the process, the next available option in the target menu item is set to the current option value by simulating the F5 / F6 key command, and the menu interface is refreshed to obtain the corresponding echoed information. The echoed information determines whether the changed option value has been set successfully. If so, "True" is returned, and the process ends; if not, the process returns to step 32 again to perform the option value change process, and so on.
[0070] The process ends when the setting is successful and "True" is returned. Alternatively, if the number of loop iterations for the target menu item exceeds the maximum number of loop iterations (W) for that target menu item and the setting still fails, "False" is returned, and the current test case execution ends. A "False" result may occur due to anomalies such as missing options for the target menu item, preventing the option value from being set successfully. However, since the maximum number of loop iterations (W) in this embodiment is the same as the actual number of options currently included in the target menu, the test case execution can iterate through all options under the current target menu item. This ensures smooth test execution without generating redundant loops, thus improving the execution efficiency of automated testing.
[0071] The following is a specific example. Please refer to it. Figure 4The current Setup menu includes S menu items, each with a different number of options. If the current setting is for menu item 1 (the target menu item), in the first round of the setting process, its option 1 is loaded as the current value of menu item 1 by simulating F6. However, after a second refresh of the menu interface and comparison of echo information, it is confirmed that the setting has failed. In this case, step 41 can be executed to enter the second round of the setting process to change the option value. In the second round of the setting process, its option 2 is loaded as the current value of menu item 1 by simulating F6. If the setting still fails after triggering a refresh of the menu interface and comparison of echo information, and the maximum number of loops for menu item 1 (the maximum value is 2) is exceeded, then "false" is returned and the process ends. Similarly, the maximum number of loops for menu item 2 is 3, and the number of failed settings for menu item 2 cannot be limited to 3 times. The maximum number of loops for menu item S is g, and the number of failed settings for menu item S is limited to g times.
[0072] In some specific examples, the maximum number of loops W for each menu item can be set through the path library 50 of the Setup menu (i.e., W1, W2, ..., WS, where S is the number of menu items). Please refer to [reference needed]. Figure 5 As shown, the path library 50 can be used to set the relevant configuration information for each menu item. This configuration information may include, but is not limited to, the menu item's function area step size X, directory layer step size Y (there can be multiple directory layers), menu item step size Z, and the maximum number of loops W. It should be understood that the X, Y, Z, and other step size information for each menu item can be used to limit the scope of the operation area for that menu item; this will not be elaborated upon here.
[0073] In this way, when the computing device 10 tests the settings of each menu item in the Setup menu, it can call the configuration information in the path library 50 and execute the test according to the upper limit W of the loop count for each menu item, so as to improve the test execution efficiency.
[0074] Optionally, in some possible examples, because some menu items in special positions on the BIOS menu interface (such as the first menu item, the last menu item, or the only menu item in a certain level of menu), when switching menu items using the Up or Down keys triggers a menu interface refresh, these menu items are already at the menu boundary, and the Up or Down keys do not actually have any switchable items. Therefore, the interface refresh cannot be triggered, and the echo information cannot be captured. Consequently, it is impossible to determine whether the current menu item setting is successful, resulting in poor test reliability. Therefore, in this example, after each change to the option value of the target menu item and before triggering the menu refresh operation, a step is added to determine the position of the target menu item. This step mainly determines whether the target menu item is the first or last menu item in the current menu, or whether it is the only menu item in the menu. Then, based on the result of the target menu item position determination, the corresponding operation is performed to ensure that the menu interface refreshes smoothly, thereby successfully capturing the echo information.
[0075] As a specific example, if the target menu item is the first menu item in the menu (e.g.) Figure 6 If the target menu item is "Menu Item 1", then the operation of first switching the menu item down and then switching the menu item up can be performed (for ease of description, this is also referred to as the first operation), thereby triggering a menu interface refresh. If the target menu item is the last menu item in the current menu (e.g., Figure 6 The "Menu Item S" or a middle menu item (i.e., any menu item located between the first and last menu items, for example...) Figure 6 If the target menu item is "Menu Item 2" or similar, then the operation of first switching the menu item upwards and then switching the menu item downwards (also referred to as the second operation in this article) can be performed, thereby triggering a menu interface refresh. If the target menu item is the only menu item in its menu (e.g., ...), then the operation can be performed. Figure 6 If "Menu Item 11" is selected, the operation of returning to the parent menu and then entering the target menu item can be performed (also referred to as the third operation in this document), thereby triggering a refresh of the menu interface. It should be understood that these operations can all be implemented through simulated key press commands input from the serial port of computing device 10.
[0076] In this example, specifically, please refer to [link / reference]. Figure 6As shown, after the Setup menu test software enters the test process, the computing device 10 can first locate the target menu item in the Setup menu through step 61, and then execute step 62 to change the option value of the target menu item by obtaining simulated F5 / F6 key commands. Next, the computing device 10 executes step 63 to determine the position of the target menu item, and executes step 64 based on the position determination result. Specifically, if the target menu item is the first menu item in its menu, the first operation described above is executed; if it is the last or middle menu item in its menu, the second operation described above is executed by default; if it is the only menu item in its menu, the third operation described above is executed. This ensures that the menu interface can be successfully refreshed and the corresponding feedback information obtained regardless of the position of the target menu item.
[0077] Next, the computing device 10 executes step 65, and determines whether the option value setting is successful based on the echo information. If so, it returns "True" and the process ends. If not, and the current loop count has not exceeded the maximum loop count W of the target menu item, it returns to step 62 until the setting is successful and returns "True", or until the loop count exceeds the maximum W and returns "false" and the test process ends.
[0078] Please refer to some possible implementation methods. Figure 7 As shown, the location description information U (i.e., U1, U2, ..., US, where S is the number of menu items) of each menu item can be set through the path library 50 of the Setup menu, so that the computing device 10 can determine the position of any menu item based on the location description information U during the execution of the test. As a specific example, the location description information U of any menu item can be assigned a specific value (such as -1, 0, 1, 2, etc.) to represent different positions. For illustrative purposes and not a limitation, the value "0" can represent that the menu item is the first menu item in the menu, the value "1" can represent that the menu item is the middle menu item in the menu, the value "2" can represent that the menu item is the last menu item in the menu, and the value "-1" can represent that the menu item is the only menu item in the menu.
[0079] Thus, in this embodiment, by using the upper limit W of the loop count for each menu item in the path library 50, the number of retries when menu settings fail during testing can be controlled, avoiding invalid loops and improving the efficiency of automated testing; by using the location description information U of each menu item, corresponding operations can be performed to trigger the refresh of the menu interface, so as to successfully capture the feedback information and improve the reliability of testing.
[0080] It should be noted that the system architecture and application scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0081] Next, based on the content described above, a BIOS menu setting method provided by an embodiment of this application will be introduced. It is understood that this method is proposed based on the content described above, and some or all of the content of this method can be found in the description above.
[0082] Please see Figure 8 , Figure 8 This is a flowchart illustrating a BIOS menu setting method provided in an embodiment of this application. It is understood that this method can be executed by any device, equipment, platform, or device cluster with computing and processing capabilities. The following description uses... Figure 2 The following is an example of execution on the computing device 10 shown. Figure 8 As shown, the method may include:
[0083] In S810, when the target menu item is located on the target menu, the key command is obtained.
[0084] In this embodiment, when the BIOS program on the BIOS chip 140 in the computing device 10 is run by the processor 110, it provides a corresponding Setup menu (i.e., the BIOS menu). This Setup menu provides a visual interface, which users can access via a browser on other devices to view and set the option values for each menu item in the Setup menu (including its sub-menus). It is understood that a menu item may correspond to a hardware configuration of the computing device 10, such as processor configuration, but is not limited to this.
[0085] For example, before leaving the factory, the computing device 10 can automatically test the correctness of the Setup menu settings. Specifically, a menu item may include one or more optional options, each describing an option value. The computing device 10 can automatically set one of the optional options in the specified menu item (i.e., the target menu item) of the menu to be set (i.e., the target menu) to the default value of the target menu item, and automatically verify whether the option value described by the optional option is consistent with the preset target value for the menu item. If they are consistent, the target menu item is set successfully; otherwise, the setting fails.
[0086] In this example, when setting up the Setup menu, the computing device 10 can first be controlled to locate the target menu item of the target menu. This target menu can be the Setup menu itself, or a submenu of the Setup menu. Furthermore, it should be understood that locating a specific menu item can be achieved by the user inputting control commands into the computing device 10. The user can view the entire menu setup process on the interface provided by the Setup menu, which will not be elaborated further.
[0087] Next, when the computing device 10 is located to the target menu item, the user can input simulated keystroke commands from the serial port of the computing device 10 to instruct the computing device 10 to change the option value of the target menu item. For example, and not as a limitation, the keystroke command could be a command simulating the F6 key to load an option value for the target menu item, or it could be a command simulating the F5 key to load the previous option value.
[0088] S820 sets the target menu item to the first option value according to the key command.
[0089] In this embodiment, the computing device 10 can load one of the optional options (also referred to herein as the first optional option) under the target menu item according to the acquired key command, that is, set the option value described by the optional option (i.e. the first option value) as the default value of the target menu item.
[0090] For example, the computing device 10 can sequentially select the first option value described under the target menu item and set it as the default value according to the key command. In other possible examples, it can also randomly select an option value described under the target menu item and set it as the default value.
[0091] Furthermore, in this example, after the computing device 10 loads the first option value for the target menu item in response to the key command, it triggers a refresh operation on the current menu interface by acquiring other menu items at the same level as the target menu item when switching up or down, thereby capturing the echo information of the interface. This echo information includes the setting result of the target menu item displayed on the interface after the refresh. Next, the computing device 10 can also compare the echo information with a preset target value for the target menu item. If the setting result of the target menu item contained in the echo information is consistent with the target value, the target menu item is set successfully, and the test ends. If the setting result of the target menu item contained in the echo information is inconsistent with the target value, the setting of the target menu item fails, that is, the setting of the first option value fails.
[0092] Furthermore, in this embodiment, the computing device 10 pre-sets a loop count limit W for each menu item in the Setup menu. For any given menu item, the loop count limit W is equal to the total number of its options, thus limiting the number of times the option value of that menu item can be set. Therefore, the computing device 10 also counts the number of settings when setting a target menu item, and each time an option value is loaded, it is counted as one setting.
[0093] If the first option value setting fails, the following S830 or S840 can be executed depending on whether the maximum number of loops W for the target menu item has been reached:
[0094] S830: If the current number of cycles for the target menu item has not exceeded the limit, then obtain the key command again to change the target menu item to the second option value.
[0095] In this embodiment, if the first option value setting fails, but the number of setting attempts has not exceeded the maximum number of loop attempts W for the target menu item, the computing device 10 automatically returns to step S810 to set the default value of the target menu item again. Since the maximum number of loop attempts W for the target menu item is equal to the total number of options for the target menu item, if the first option value setting fails, but the number of setting attempts has not exceeded the maximum number of loop attempts W for the target menu item, it indicates that there are other options available for setting. Therefore, the computing device 10 can again obtain a key command and load the option value described by another option of the target menu item (e.g., an option located below the first option) as the default value, that is, change the target menu item to the second option value. It should be understood that if the computing device 10 compares the second option value with the target value of the target menu item and confirms that the second option value also fails to be set, it can automatically return to step S810 again, ..., through this automatic loop setting, until the target menu item is successfully set or until the maximum number of loop attempts W for the target menu item is reached, the process ends.
[0096] S840, if the current loop count has been exceeded, then end the setting of the target menu item.
[0097] In this embodiment, if any option value (including the first option value) fails to be set, and the number of times it has been set has exceeded the upper limit W of the target menu item's loop count, it means that all the available options of the target menu item have been traversed and set to the default value. Therefore, the computing device 10 can end the setting of the target menu item at this time to avoid redundant loops, thereby improving the efficiency of automated test execution.
[0098] The principle of the BIOS menu setting method will be described in detail below with reference to the accompanying drawings and through a specific embodiment of this application.
[0099] For example, Figure 9A flowchart illustrating a BIOS menu setting method according to a specific embodiment of this application is shown. Figure 9 As shown, this method can be used Figure 2 The method is executed on the computing device 10 shown, and may specifically include:
[0100] In the S900, the loop count limit is set for each menu item in the BIOS menu in the menu path library, so that the loop count limit for any menu item is equal to the total number of options for that menu item, thereby limiting the number of times the option value of that menu item can be set.
[0101] In this embodiment, the computing device 10 can set the maximum number of loops W for each menu item through the path library of the Setup menu, so that the maximum number of loops W for each menu item is equal to the total number of its own options, thereby limiting the number of times the option values of these menu items can be set. That is, for any menu item, if its setting fails and its maximum number of loops W is not exceeded, the option value can be set again, while if its maximum number of loops W is exceeded, the setting process is forcibly terminated.
[0102] For example, refer again Figure 5 As shown, calculation setting 10 sets the relevant configuration information for each menu item in the path library 50 of the Setup menu. This configuration information may include, but is not limited to, the function area step size X (i.e., X1, X2, ..., XS, where S is the number of menu items, the same below), the directory layer step size Y (there can be multiple directory layers), the menu item step size Z (i.e., Z1, Z2, ..., ZS), and the maximum number of loops W (i.e., W1, W2, ..., WS), etc. It should be understood that the X, Y, Z, and other step size information of the menu items can be used to limit the scope of the operation area of the menu items, which will not be elaborated here.
[0103] In this way, when the computing device 10 tests the settings of each menu item in the Setup menu, it can call the configuration information in the path library 50 and execute the test according to the upper limit W of the loop count for each menu item, so as to improve the test execution efficiency.
[0104] S910, when the computing device is located to a target menu item on the target menu, it obtains key commands.
[0105] In this embodiment, the computing device 10 can be controlled by external instructions to locate the target menu item of the target menu and then obtain the key input from the external source.
[0106] As an example, the execution principle of step S910 can be referred to the description of S810 above, and will not be repeated here.
[0107] S920 sets the target menu item to the first option value according to the key command.
[0108] For example, the execution principle of step S920 can be referred to the description of S820 above, and will not be repeated here.
[0109] In this embodiment, after loading the first option value as the default value of the target menu item in S920, the following steps S921 to S924 are executed to determine whether the first option value has been set successfully. Wherein:
[0110] S921, obtain the echo information of the interface where the target menu is located.
[0111] In this embodiment, after the computing device 10 loads a first option value for the target menu item in response to a key press, it triggers a refresh operation on the current menu interface by acquiring other menu items at the same level as the target menu item when switching up or down, thereby capturing the echo information of the interface. This echo information includes the setting result of the target menu item displayed on the interface after the refresh.
[0112] S922, compare the displayed information with the preset target value of the target menu item to obtain the comparison result.
[0113] In this embodiment, the computing device 10 can compare the echoed information with the preset target value for the target menu item to obtain the corresponding comparison result.
[0114] S923, if the comparison result indicates that the displayed information is consistent with the target value, then the first option value is determined to be set successfully.
[0115] In this embodiment, if the setting result of the target menu item contained in the echo information is consistent with the target value, the target menu item is set successfully, and a "True" result can be returned, thus ending the test of the target menu item setting.
[0116] S924, if the comparison result characterization feedback information is inconsistent with the target value, then it is determined that the first option value setting has failed.
[0117] In this embodiment, if the setting result of the target menu item contained in the echo information is inconsistent with the target value, then the setting of the target menu item fails, that is, the setting of the first option value fails.
[0118] In this embodiment, if the first option value setting fails, the following S930 or S940 can be executed depending on whether the maximum number of loops W for the target menu item has been reached:
[0119] S930, if the current number of cycles for the target menu item has not exceeded the limit, then obtain the key command again to change the target menu item to the second option value.
[0120] In this embodiment, if the first option value setting fails, the computing device 10 calls the upper limit W of the loop count of the target menu item from the menu path library 50 and compares it with the currently counted number of times the target menu item is set (i.e., the number of loops). If the number of times the setting does not exceed the upper limit W of the loop count of the target menu item, the computing device 10 automatically returns to the execution of step S910. For the specific principle, please refer to the description of S830 in the above embodiment, which will not be repeated here.
[0121] S940, if the current loop count has been exceeded, then end the setting of the target menu item.
[0122] This step is similar to the execution principle of S840 in the above embodiment. If any option value (including the first option value) fails to be set, and the number of times it is set has exceeded the upper limit W of the loop count of the target menu item, the computing device 10 can end the setting of the target menu item to avoid redundant loops, thereby improving the efficiency of automated test execution.
[0123] In some possible implementations, to ensure that when certain menu items in special positions on the BIOS menu interface (such as the first menu item, the last menu item, and the only menu item in a certain level of menu in the interface) are set, the interface refresh can be successfully triggered and the echo information can be captured, this implementation can also add position description information for each menu item in the path library 50. So that after each change of option value of the target menu item and before the menu refresh operation is triggered, the position of the target menu item is determined according to the position description information, and then the corresponding operation is performed according to the determination result of the position of the target menu item, so as to ensure that the menu interface can be refreshed smoothly and the echo information can be successfully captured.
[0124] Specifically, such as Figure 10 As shown, in this implementation, the BIOS menu setting method may specifically include:
[0125] In the S1000, the upper limit of the number of cycles and the position description information are set for each menu item in the BIOS menu in the menu path library.
[0126] In this embodiment, the location description information can be assigned different values to indicate that the menu item is in the first menu item position, the last menu item position, the middle menu item position, or the only menu item position.
[0127] For example, refer again Figure 7As shown, the computing device 10 can add location description information U (i.e., U1, U2, ..., US) of each menu item in the configuration information related to each menu item in the path library 50 (including function area step size X, directory layer step size Y, menu item step size Z, and loop count limit W, etc.) so that the computing device 10 can determine the position of any menu item based on the location description information U during the test execution process.
[0128] As a specific example, the position description information U of any menu item can be assigned a specific value (such as -1, 0, 1, 2, etc.) to represent different positions. This is an example rather than a limitation. The value "0" can represent that the menu item is the first menu item in the menu, the value "1" can represent that the menu item is the middle menu item in the menu, the value "2" can represent that the menu item is the last menu item in the menu, and the value "-1" can represent that the menu item is the only menu item in the menu.
[0129] S1010, When the computing device is located to the target menu item on the target menu, it obtains the key command.
[0130] As an example, the execution principle of this step S1010 can be referred to the description of S810 or S910 above, and will not be repeated here.
[0131] S1020, based on the key press command, sets the target menu item to the first option value.
[0132] For example, the execution principle of step S1020 can be referred to the description of S820 or S920 above, and will not be repeated here.
[0133] In this embodiment, after loading the first option value as the default value of the target menu item in S1020, the computing device 10 further performs:
[0134] S1030, determine the position of the target menu item in the target menu, which can be the first menu item position, the last menu item position, the middle menu item position, or the only menu item position.
[0135] In this embodiment, in order to ensure that valid echo information can be successfully captured in the future, the computing device 10 can determine the position of the target menu item based on the position description information of the target menu item in the path library 50.
[0136] For example, S1030 may specifically include S1031 to S1032:
[0137] S1031, Obtain the location description information of the target menu item from the menu path library.
[0138] In this embodiment, the computing device 10 can query and retrieve the location description information U of the target menu item from the path library 50.
[0139] S1032, Based on the location description information, determine the position of the target menu item in the target menu.
[0140] In this embodiment, the computing device 10 determines the position of the target menu item in the target menu based on the value assigned to the position description information U of the target menu item, such as -1, 0, 1, 2, etc.
[0141] S1040: Execute the corresponding key operation based on the location to trigger a refresh of the target menu interface and obtain the echo information.
[0142] In this embodiment, the key operation performed differs depending on the location of the target menu item within the target menu. Specifically, it may include at least the three scenarios described in S1041 to S1043:
[0143] S1041, if the target menu item is the first menu item in the target menu, then the first operation is executed, and the interface where the target menu is located is refreshed through the first operation to obtain the echo information.
[0144] In this scenario, if the target menu item is the first menu item in its menu, then the first operation can be performed. This first operation includes switching down from the target menu item and then switching back up to the target menu item. For example... Figure 6 As shown, the computing device 10 can first obtain a Down key command to switch down to the next menu item of the target menu item, and then obtain an Up key command to switch back to the target menu item. This triggers a menu interface refresh and captures the displayed information.
[0145] S1042, if the target menu item is at the end or middle of the target menu, then the second operation is executed, and the second operation triggers a refresh of the interface where the target menu is located, and the echo information is obtained.
[0146] In this scenario, if the target menu item is either the last or middle item of the target menu, then the second operation is performed. This second operation involves switching the menu item upwards from the target menu item and then switching it back downwards. For example... Figure 6 As shown, the computing device 10 can first obtain the Up key command to switch to the previous menu item of the target menu item, and then obtain the Down key command to switch back to the target menu item. This triggers a menu interface refresh and captures the displayed information.
[0147] S1043, if the target menu item is the only menu item in the target menu, then the third operation is executed, and the interface where the target menu is located is refreshed through the third operation to obtain the echo information.
[0148] In this scenario, if the target menu item is the only menu item in the target menu, then a third operation is performed. This third operation includes exiting the target menu from the target menu item and then re-entering the target menu item within that target menu. For example... Figure 6 As shown, computing device 10 can first obtain the Esc key command to return to the previous menu of the target menu item, and then obtain the Enter key command to enter the target menu item. This triggers a menu interface refresh and captures the echo information.
[0149] Thus, based on the three different scenarios described above, different key operations are executed. This ensures that even if the target menu item is at the boundary of the target menu, the interface refresh can be successfully triggered after the key operation, thereby obtaining the corresponding echo information and executing the following S1050:
[0150] S1050, based on the consistency comparison between the displayed information and the preset target value of the target menu item, determine whether the first option value setting was successful.
[0151] Specifically, step S1050 may include the following steps S1051 to S1053.
[0152] S1051, compare the displayed information with the preset target value of the target menu item to obtain the comparison result.
[0153] The execution principle of this step is similar to that described in the above embodiments regarding S922, and will not be repeated here.
[0154] S1052, if the comparison result indicates that the displayed information is consistent with the target value, then the first option value is determined to be set successfully.
[0155] The execution principle of this step is similar to that described in the above embodiments regarding S923, and will not be repeated here.
[0156] S1053, if the comparison result characterization feedback information is inconsistent with the target value, then it is determined that the first option value setting has failed.
[0157] The execution principle of this step is similar to that described in the above embodiments regarding S924, and will not be repeated here.
[0158] In this embodiment, if the first option value setting fails, the following S1060 or S1070 can be executed depending on whether the maximum number of loops W for the target menu item has been reached:
[0159] S1060, if the current number of cycles for the target menu item has not exceeded the maximum, then obtain the key command again to change the target menu item to the second option value.
[0160] For example, the execution principle of this step can be found in the description of S830 or S930 in the above embodiments, and will not be repeated here.
[0161] S1070, if the current loop count has been exceeded, then end the setting of the target menu item.
[0162] For example, the execution principle of this step can be found in the description of S840 or S940 in the above embodiments, and will not be repeated here.
[0163] Based on the methods described in the above embodiments, this application provides a BIOS menu setting device. Please refer to... Figure 11 , Figure 11 This is a schematic diagram of the structure of a device provided in an embodiment of this application.
[0164] like Figure 11 As shown, the device 800 may include an acquisition module 801 and a processing module 802. The acquisition module 801 can acquire a key press command when a target menu item is located on a target menu, where the target menu is the input / output system BIOS menu or a submenu of the BIOS menu. The processing module 802 can set the target menu item to a first option value based on the key press command. The target menu item includes at least one optional item, each of which describes an option value, and the first option value is one of the option values. Furthermore, if setting the first option value fails, the processing module 802 can acquire the key press command again to change the target menu item to a second option value if the current loop count limit for the target menu item has not been exceeded; otherwise, the setting of the target menu item ends. The loop count limit is equal to the total number of optional items in the target menu item, and the second option value is one of the selection values.
[0165] It should be understood that the BIOS menu setting device 800 is used to execute the BIOS menu setting method in the above embodiments. The corresponding program modules in the BIOS menu setting device 800 have similar implementation principles and technical effects as described in the above methods. The working process of the BIOS menu setting device 800 can be referred to the corresponding process in the above methods, and will not be repeated here.
[0166] Based on the methods in the above embodiments, this application provides a computer-readable storage medium storing a computer program that, when run on a processor, causes the processor to execute the methods in the above embodiments.
[0167] Based on the methods in the above embodiments, this application provides a computer program product, characterized in that, when the computer program product is run on a processor, the processor executes the methods in the above embodiments.
[0168] Based on the methods described in the above embodiments, this application also provides a chip. Please refer to... Figure 12 , Figure 12 This is a schematic diagram of a chip structure provided in an embodiment of this application. Figure 12 As shown, chip 900 includes one or more processors 901 and interface circuitry 902. Optionally, chip 900 may also include a bus 903. Wherein:
[0169] The processor 901 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed through integrated logic circuits in the hardware of the processor 901 or through software instructions. The processor 901 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods and steps disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor.
[0170] The interface circuit 902 can be used to send or receive data, instructions or information. The processor 901 can use the data, instructions or other information received by the interface circuit 902 to process the data, instructions or other information, and can send the processed information out through the interface circuit 902.
[0171] Optionally, chip 900 also includes memory, which may include read-only memory and random access memory, and provides operation instructions and data to the processor. A portion of the memory may also include non-volatile random access memory (NVRAM).
[0172] Optionally, the memory stores executable software modules or data structures, and the processor can execute corresponding operations by calling the operation instructions stored in the memory (which may be stored in the operating system).
[0173] Optionally, the interface circuit 902 can be used to output the execution results of the processor 901.
[0174] It should be noted that the functions of the processor 901 and the interface circuit 902 can be implemented through hardware design, software design, or a combination of hardware and software; no restrictions are imposed here.
[0175] It should be understood that each step of the above method embodiments can be completed by hardware logic circuits or software instructions in a processor.
[0176] It is understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. In addition, in some possible implementations, each step in the above embodiments may be selectively executed according to the actual situation, and may be partially or fully executed, which is not limited here.
[0177] It is understood that the processor in the embodiments of this application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor can be a microprocessor or any conventional processor.
[0178] The method steps in the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an ASIC.
[0179] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0180] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application.
Claims
1. A BIOS menu setting method, characterized in that, The method includes: When the target menu item is located on the target menu, a key command is obtained, wherein the target menu is the input / output system BIOS menu or a submenu of the BIOS menu; According to the key instruction, the target menu item is set to a first option value. The target menu item includes at least one optional item, each of which describes an option value. The first option value is one of the option values. If setting the first option value fails, and the current loop count limit for the target menu item has not been exceeded, the key command is retrieved again to change the target menu item to the second option value. If the maximum number of iterations has been exceeded, then the setting of the target menu item will end. The maximum number of iterations is equal to the total number of options for the target menu item, and the second option value is one of the option values.
2. The method according to claim 1, characterized in that, After setting the target menu item to a first option value according to the key instruction, the method includes: Determine the position of the target menu item in the target menu, wherein the position is the first menu item position, the last menu item position, the middle menu item position, or the only menu item position; The corresponding key operation is executed according to the location to trigger a refresh of the target menu interface and obtain feedback information, which includes the setting result of the target menu item displayed on the interface after the interface refresh; Based on the consistency comparison between the displayed information and the preset target value of the target menu item, it is determined whether the first option value setting was successful.
3. The method according to claim 2, characterized in that, The step of executing the corresponding key operation based on the location to trigger a refresh of the target menu interface and obtain echo information includes: If the target menu item is the first menu item in the target menu, then the first operation is performed, which includes switching the menu item down from the target menu item and then switching back up to the target menu item; The first operation triggers a refresh of the interface containing the target menu, thereby obtaining the echo information.
4. The method according to claim 2 or 3, characterized in that, The step of executing the corresponding key operation based on the location to trigger a refresh of the target menu interface and obtain echo information includes: If the target menu item is at the end or middle of the target menu, then the second operation is performed. The second operation includes switching the menu item upwards from the target menu item and then switching back downwards to the target menu item. The second operation triggers a refresh of the interface containing the target menu, thereby obtaining the echo information.
5. The method according to any one of claims 2-3, characterized in that, The step of executing the corresponding key operation based on the location to trigger a refresh of the target menu interface and obtain echo information includes: If the target menu item is the only menu item in the target menu, then a third operation is performed, which includes exiting the target menu from the target menu item and then entering the target menu item in the target menu; The third operation triggers a refresh of the interface containing the target menu, resulting in the displayed information.
6. The method according to any one of claims 2-3, characterized in that, The method further includes: In the menu path library, a corresponding loop count limit is set for each menu item in the BIOS menu, such that the loop count limit for any menu item is equal to the total number of options for that menu item, thereby limiting the number of times the option values for that menu item can be set. The target menu item is one of the menu items.
7. The method according to any one of claims 2-3, characterized in that, The method further includes: In the menu path library, corresponding position description information is set for each menu item of the BIOS menu. The position description information is assigned different values to indicate whether the menu item is the first menu item, the last menu item, the middle menu item, or the only menu item.
8. The method according to claim 7, characterized in that, Determining the position of the target menu item in the target menu includes: Obtain the location description information of the target menu item from the menu path library; Based on the location description information, the position of the target menu item in the target menu is determined.
9. The method according to any one of claims 1-3, characterized in that, After setting the target menu item to a first option value according to the key instruction, the method includes: Obtain the echo information of the interface where the target menu is located; The echoed information is compared with the preset target value of the target menu item to obtain the comparison result. If the comparison result indicates that the displayed information matches the target value, then the first option value is determined to have been set successfully. If the comparison result indicates that the displayed information is inconsistent with the target value, then it is determined that the first option value setting has failed.
10. A computing device, characterized in that, include: At least one memory for storing programs; At least one processor for executing the program stored in the memory; When the program stored in the memory is executed, the processor is used to execute the method as described in any one of claims 1-9.
Citation Information
Patent Citations
Method and system for automatically reproducing probabilistic setting failures of options in BIOS
CN110990181A
BIOS menu page display method and server
CN117827059A
