A setting option value correction method, device, equipment and medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR SUZHOU INTELLIGENT TECH CO LTD
- Filing Date
- 2023-09-28
- Publication Date
- 2026-06-26
AI Technical Summary
Existing technology cannot automatically determine inconsistencies in the Setup option values in the BIOS firmware, forcing maintenance engineers to manually compare them, which is inefficient and cannot be automatically corrected to the standard required values, thus hindering production.
During the fault self-diagnosis phase, the script execution file automatically detects and corrects the option values of the Setup option in the BIOS firmware. The script execution file exports reference option values from the reference server, generates a reference file, and compares it with the current option values of the server to be corrected, automatically correcting any inconsistent option values.
The production line process was optimized, saving manpower, improving production efficiency, avoiding production line blockages, and ensuring that the option values of each server are consistent with the standard requirements.
Smart Images

Figure CN117234781B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of server technology, and more specifically to a method, apparatus, device, and medium for correcting option values in setting options. Background Technology
[0002] The BIOS (Basic Input Output System) firmware in servers offers an increasing number of Setup options, and these options are becoming increasingly complex and varied. In the BIOS firmware of general-purpose servers, there are 5000 to 6000 Setup options. Each option has different current and default values depending on customer needs and the type of server product. When shipping servers of the same model, it is required that the Setup option values in the BIOS firmware remain completely consistent, and that the Setup option values for each server match the standard requirements.
[0003] Currently, during server production, a self-diagnostic program checks the Setup option values in the BIOS firmware of the server. Existing self-diagnostic programs can only detect instances where the Setup option values of problematic servers do not match the standard requirements, and will alert the self-diagnostic system accordingly. However, current technology cannot identify the inconsistent settings and their corresponding current values. Maintenance engineers must manually retrieve the Setup option values from the production line, compare them with the standard requirements, and analyze to pinpoint the inconsistent Setup options and their values. This process is inefficient, can disrupt production, and increases the difficulty of fault detection on the server production line.
[0004] Therefore, existing technologies have the problem of being unable to determine the setting options with inconsistent values and their corresponding current values, requiring maintenance engineers to manually compare them. This results in low self-diagnosis efficiency and the inability to automatically correct the Setup option values in the BIOS firmware to the standard required values. Summary of the Invention
[0005] In view of this, the present invention provides a method, apparatus, device and medium for correcting the option values of setting options, in order to solve the problem that setting options with inconsistent option values and their corresponding current values cannot be determined, requiring maintenance engineers to manually compare them, resulting in low efficiency of fault self-diagnosis and the inability to automatically correct the option values of Setup options in BIOS firmware to the standard required values.
[0006] In a first aspect, the present invention provides a method for correcting option values in setting options, the method comprising:
[0007] In the reference server, a read command is initiated, which is used to execute the configuration control tool;
[0008] Based on the settings control tool, export the reference option values for all settings options in the reference server;
[0009] Generate a reference file based on the reference option values;
[0010] Obtain the script execution file used to correct the option values, and copy the script execution file and reference file to the server to be corrected;
[0011] Run the script execution file, obtain the current option values of all settings in the server to be corrected based on the script execution file, and store the current option values in the current option value file;
[0012] Based on the script execution file, the reference file and the current option value file are compared to obtain the option values to be corrected in the current option value file;
[0013] Based on the script execution file and reference files, correct the values of the options that need to be corrected.
[0014] The option value correction method provided in this embodiment automatically detects the current option values using a script execution file during the production line fault self-check phase. It compares the current option value file with a reference file, and if any option values in the current option value file are found to be inconsistent with the reference values in the reference file, it automatically corrects them according to the reference file, ensuring that the Setup option values of each server are consistent with the standard requirements. This invention optimizes the production line process, saves manpower, improves production line efficiency, and avoids problems such as production line blockage. It solves the problem of not being able to determine the inconsistent setting options and their corresponding current values, requiring maintenance engineers to manually compare them, resulting in low fault self-check efficiency and the inability to automatically correct the Setup option values in the BIOS firmware to the standard requirements.
[0015] In one optional implementation, based on the script execution file, a comparison is made between the reference file and the current option value file to obtain the option values to be corrected in the current option value file, including:
[0016] In the server to be corrected, a script execution file is used to call a preset tool, which is used to compare the reference file and the current option value file.
[0017] Based on the preset tools, reference files, and the current option value file, determine whether there are any inconsistent option values between the current option value file and the reference file;
[0018] If inconsistent option values exist, these inconsistent option values will be treated as option values to be corrected.
[0019] If no inconsistent option values exist, output "No correction needed" information.
[0020] In this embodiment, a script execution file is used to call a preset tool to compare the reference file and the current option value file. If inconsistent option values are found, these inconsistent option values are designated as options to be corrected. The script execution file automatically detects the current option values, optimizing the production line process, saving manpower, improving production line efficiency, and avoiding problems such as production line blockage.
[0021] In one alternative implementation, the value of the option to be corrected is modified based on the script execution file and the reference file, including:
[0022] Determine if any option values to be corrected exist in the current option value file;
[0023] If there are option values to be corrected, save the option values to be corrected and output a warning message;
[0024] Based on the reference document, obtain the reference option values corresponding to the option values to be corrected;
[0025] Modify the option value to be corrected to the reference option value to obtain the corrected current option value file;
[0026] Adjust all settings options in the server to be corrected using the revised current option value file.
[0027] In this implementation, a script execution file is used to determine if there is an option value to be corrected. If so, a reference option value corresponding to the option value to be corrected is obtained according to a reference file. The option value to be corrected is then modified to the reference option value. Finally, the corrected current option value file is used to adjust all settings options in the server to be corrected. Using a script execution file to automatically correct the option value to be corrected according to a reference file optimizes the production line process, saves manpower, improves production line efficiency, and avoids problems such as production line blockage.
[0028] In one alternative implementation, running a script execution file includes:
[0029] Obtain read and write permissions for the folder on the server to be fixed;
[0030] Run the script to execute the file based on folder read and write permissions.
[0031] In this implementation, read and write permissions are obtained for the folder on the server to be corrected. Based on these permissions, a script executable file is run. This allows the script executable file to modify the current option value file, and then correct the option value to be corrected according to the reference file.
[0032] In one optional implementation, the reference option value corresponding to the option value to be corrected is obtained according to the reference document, including:
[0033] Get the string corresponding to the value of the option to be corrected;
[0034] In the reference file, find the target setting option corresponding to the string;
[0035] Use the reference option value of the target setting option as the reference option value corresponding to the option value to be corrected.
[0036] In this embodiment, the script execution file searches for the reference option value corresponding to the option value to be corrected in the reference file based on the string corresponding to the option value to be corrected, so as to facilitate the subsequent correction of the option value to be corrected.
[0037] In one alternative implementation, all setting options in the server to be corrected are adjusted using a revised current option value file, including:
[0038] Import the corrected current option value file into the server to be corrected;
[0039] On the server to be corrected, an adjustment command is initiated, which is used to execute the settings control tool;
[0040] Use the settings control tool to import all option values from the corrected current option value file into the server to be corrected.
[0041] In this embodiment, the corrected current option value file is imported into the server to be corrected. Then, the control tool is used to import all option values from the corrected current option value file into the server to be corrected. This completes the correction of all option values in the server to be corrected that are inconsistent with the standard requirements.
[0042] In an alternative implementation, after adjusting all setting options in the server to be corrected using the revised current option value file, the method further includes:
[0043] The modified current option value file is verified using a preset verification script to obtain the verification result. The verification result is used to determine whether there are option values to be corrected in the modified current option value file.
[0044] If the verification result indicates that the correction was successful, a preset test script is used to test each setting option in the server to be corrected, and the test results are obtained. The test results are used to determine whether the function of each setting option is normal.
[0045] If the test results are normal, the option value to be corrected and the corresponding reference option value will be stored in the analysis database;
[0046] Based on the data in the database, target setting options are obtained, where the probability that the current value of the target setting option is the value to be corrected is greater than a preset threshold.
[0047] The output includes information about the target setting options.
[0048] In this implementation, the corrected current option value file is verified to obtain the verification results, ensuring that all option values to be corrected are successfully corrected. Testing each setting option in the server to be corrected ensures that each setting option functions correctly. If the test results are normal, the option values to be corrected and their corresponding reference option values are stored in the analysis database to obtain the target setting options. This facilitates server production personnel in updating production processes and standard requirements, preventing inconsistencies between the current and reference option values from recurring.
[0049] In one alternative implementation, the value of the option to be corrected is modified based on the script execution file and the reference file, including:
[0050] Determine the preset correction method, which includes: non-full correction and full correction;
[0051] When the default correction method is full correction, the target option value partition in the current option value file is determined, wherein the current option value file contains a first number of option value partitions, and the option value partition contains a second number of current option values;
[0052] Based on the reference files and target option values, partition the space and generate an image file;
[0053] In the current option value file, erase all current option values in the target option value partition and write the data from the image file to the target option value partition;
[0054] When the default correction method is non-full correction, the reference option value corresponding to the option value to be corrected is determined according to the reference file;
[0055] Modify the value of the option to be corrected to the reference value to complete the correction of the option value.
[0056] In this embodiment, the preset correction methods include: partial correction and full correction. Partial correction only corrects inconsistent option values, which is fast and efficient. Full correction corrects inconsistent option values and their related inconsistent option values together, avoiding omissions when searching for inconsistent option values.
[0057] In a second aspect, the present invention provides an option value correction device for setting options, the device comprising:
[0058] The initiation module is used to initiate read commands in the reference server, whereby the read commands are used to execute the configuration control tools;
[0059] The export module is used to export the reference option values of all setting options in the reference server based on the setting control tool;
[0060] The generation module is used to generate reference files based on the reference option values;
[0061] The acquisition module is used to acquire the script execution file used to correct the option values, and copy the script execution file and reference file to the server to be corrected;
[0062] The storage module is used to run the script execution file, obtain the current option values of all settings in the server to be corrected based on the script execution file, and store the current option values in the current option value file;
[0063] The module is used to compare the reference file and the current option value file based on the script execution file to obtain the option values to be corrected in the current option value file;
[0064] The correction module is used to correct the values of options to be corrected based on the script execution file and reference files.
[0065] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the option value correction method of the setting option described in the first aspect or any corresponding embodiment thereof.
[0066] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the option value correction method of the setting option in the first aspect or any corresponding embodiment described above. Attached Figure Description
[0067] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0068] Figure 1 This is a flowchart illustrating a method for correcting option values in setting options according to an embodiment of the present invention;
[0069] Figure 2 This is a schematic diagram of a method for automatically detecting whether the option values in the server to be corrected are consistent with the standard requirement values according to an embodiment of the present invention;
[0070] Figure 3 This is a schematic diagram of the script execution file execution flow according to an embodiment of the present invention;
[0071] Figure 4 This is a structural block diagram of an option value correction device for setting options according to an embodiment of the present invention;
[0072] Figure 5 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0073] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0074] With the rapid development of the server industry, the Setup options in BIOS are becoming increasingly numerous and complex. Mastering the values of these Setup options and maintaining consistency between the current and default values of the BIOS Setup options across the same server model is a mandatory requirement for BIOS testing and server product shipment. Each BIOS setting option has different configurable current and default values depending on customer needs and server product type. For example, in Setup - System Debug Configuration - System DebugLevel [Value], the Value has four options: 0: Disabled, 1: Minimum, 2: Normal, 3: Maximum. The Value setting will vary depending on customer needs and server model requirements. When shipping servers of the same model, the Setup options must remain completely consistent. This necessitates checking the BIOS Setup option values in the BIOS of each server during production to ensure they match the standard requirements. Currently, for machines reporting problems, a repair engineer needs to intervene in the repair. The repair engineer will manually modify the option values of the settings. After analyzing and locating the problem, the repair engineer may neglect to change the values back to the original values and directly proceed with the process, which will cause the server to continue to alarm about inconsistent settings during subsequent fault self-checks.
[0075] Based on the above, this invention provides a method for correcting option values in the configuration settings. Before the production line fault self-check process, a script under the OS (Operating System) automatically checks whether the Setup option settings meet the required consistency. If inconsistent options are found, a warning message is reported. Simultaneously, the script automatically locates the inconsistent Setup options and automatically corrects them according to the standard requirements. After correction, a "Success" message is reported. This improves the efficiency of production line fault self-checks, optimizes the first-pass yield of the server production line, enhances the level of production line automation, increases production efficiency, avoids production line blockages, and saves manpower and material resources.
[0076] According to an embodiment of the present invention, an embodiment of a method for correcting option values for setting options is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a set of computer devices with data processing capabilities. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0077] This embodiment provides a method for correcting option values, which can be used in the aforementioned computer device. Figure 1 This is a flowchart of a method for correcting option values in a setting option according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:
[0078] Step S101: In the reference server, a read command is initiated, wherein the read command is used to execute the setting control tool.
[0079] Step S102: Based on the setting control tool, export the reference option values of all setting options in the reference server.
[0080] Step S103: Generate a reference file based on the reference option values.
[0081] Step S104: Obtain the script execution file used to correct the option values, and copy the script execution file and the reference file to the server to be corrected.
[0082] Step S105: Run the script execution file, obtain the current option values of all settings in the server to be corrected according to the script execution file, and store the current option values in the current option value file.
[0083] Step S106: Based on the script execution file, compare the reference file and the current option value file to obtain the option values to be corrected in the current option value file.
[0084] Step S107: Correct the value of the option to be corrected based on the script execution file and the reference file.
[0085] Specifically, a standard-approved server is used as the reference server. On the reference server, the OS initiates a read command, which executes a configuration control tool, such as the AMI configuration control tool. The read command is: `. / SCELnx / o / s bios.log / lang`. Based on the configuration control tool, reference option values for all configuration options on the reference server are exported. The number of reference option values varies depending on the machine model, but is approximately 5000 to 6000. These reference option values are saved, generating a reference file named `bios.log`.
[0086] This invention utilizes a script executable file (same as the script file) under the OS system of the server to be corrected to automatically detect whether the option values of the settings options meet the standard requirements. If inconsistent option values are found, the script executable file will report a warning message. At the same time, the script executable file can automatically locate the inconsistent Setup option and automatically correct the inconsistent option according to the standard requirements. After the correction is completed, a Success message will be reported. Here, the script is a processing command under the OS.
[0087] Using a customer-approved standard server as a reference server, the reference option values for all settings on the reference server are exported from its OS and saved as a reference file, bios.log. bios.log contains the customer's standard requirements for the settings options, i.e., the reference option values. A script executable file, test.sh, is obtained to correct these option values, and both test.sh and bios.log are copied to the corresponding directory on the OS of the server to be corrected. The OS of the server to be corrected runs test.sh, for example, using the command: . / test.sh. The script generates the current option values for all setup options on the server to be corrected and saves these values as a current option value file, biostset.log. After test.sh generates biostset.log, the option value data in biostset.log and bios.log are compared. Inconsistent setup option values are identified and added as the corrected option values in biostset.log. The corrected option values in biostset.log are then adjusted according to the reference option values in bios.log.
[0088] The option value correction method provided in this embodiment automatically detects the current option values using a script execution file during the production line fault self-check phase. It compares the current option value file with a reference file, and if any option values in the current option value file are found to be inconsistent with the reference values in the reference file, it automatically corrects them according to the reference file, ensuring that the Setup option values of each server are consistent with the standard requirements. This invention optimizes the production line process, saves manpower, improves production line efficiency, and avoids problems such as production line blockage. It solves the problem of not being able to determine the inconsistent setting options and their corresponding current values, requiring maintenance engineers to manually compare them, resulting in low fault self-check efficiency and the inability to automatically correct the Setup option values in the BIOS firmware to the standard requirements.
[0089] In some optional implementations, based on the script execution file, the reference file and the current option value file are compared to obtain the option values to be corrected in the current option value file, including:
[0090] In the server to be corrected, a script execution file is used to call a preset tool, which is used to compare the reference file and the current option value file.
[0091] Based on the preset tools, reference files, and the current option value file, determine whether there are any inconsistent option values between the current option value file and the reference file;
[0092] If inconsistent option values exist, these inconsistent option values will be treated as option values to be corrected.
[0093] If no inconsistent option values exist, output "No correction needed" information.
[0094] Specifically, on the server to be patched, the script execution file test.sh is run using the OS system of the server to be patched. test.sh will call preset tools, such as Vim, a text editing tool under the Linux operating system.
[0095] Taking Vim as the default tool as an example, Vim will compare the reference file bios.log with the current option value file biostest.log to determine if there are any inconsistent option values between biostest.log and bios.log. If so, the inconsistent option values will be recorded as the option values to be corrected and saved in the diff.log file. If no inconsistent option values are found, no correction is required (Pass information) will be output.
[0096] The above process is as follows Figure 3As shown, the script execution flow includes: On the server to be tested, importing bios.log and the script execution file. Under the OS, using the command `. / SCElnx / o / sbiostest.log / lang` to export all option values for Setup. On the server to be tested, under the OS, calling the Vim tool. Comparing the bios.log and biostest.log files, and saving the inconsistent options in the diff.log file.
[0097] In this embodiment, a script execution file is used to call a preset tool to compare the reference file and the current option value file. If inconsistent option values are found, these inconsistent option values are designated as options to be corrected. The script execution file automatically detects the current option values, optimizing the production line process, saving manpower, improving production line efficiency, and avoiding problems such as production line blockage.
[0098] In some optional implementations, the value of the option to be corrected is modified based on the script execution file and reference files, including:
[0099] Determine if any option values to be corrected exist in the current option value file;
[0100] If there are option values to be corrected, save the option values to be corrected and output a warning message;
[0101] Based on the reference document, obtain the reference option values corresponding to the option values to be corrected;
[0102] Modify the option value to be corrected to the reference option value to obtain the corrected current option value file;
[0103] Adjust all settings options in the server to be corrected using the revised current option value file.
[0104] Specifically, in combination Figure 3 To illustrate this embodiment, the script execution file test.sh saves the option values to be corrected in the current option value file in the diff.log file. test.sh checks the setupQuestion=XXX field (XXX is the inconsistent option value) in the diff.log file to determine whether there is an option value to be corrected in the current option value file. If there is, it saves the field string of the option value to be corrected "Setup Question=XXX" and outputs a warning message.
[0105] In the reference file bios.log, locate the saved option for the field "Setup Question=XXX". Once found, locate the corresponding reference option value for "Setup Question=XXX". In the current option value file biostest.log, locate the saved setting option for "Setup Question=XXX", then modify the value of the setting option to be corrected to the reference option value and output a "Success" message. After correcting all the option values to be corrected, obtain the corrected current option value file. The above process is as follows: Figure 2 As shown, if no inconsistent options are found in the script execution file test.sh, the script will output a "No correction needed" message (Pass message). If inconsistent options are found, the script will wait until it finishes execution, output a "Success" message, and then end the process.
[0106] Adjust all settings options in the server to be corrected using the revised current option value file.
[0107] It should be noted that this invention allows users to understand the status of the server to be corrected by viewing the screen output. If the screen displays "Pass," the settings of the server to be corrected match the required standard values. If the screen displays "Success," it indicates that the settings of the server to be corrected were inconsistent with the required standard values and have been fixed; the inconsistent Setup values can be seen in the diff.log file.
[0108] In this implementation, a script execution file is used to determine if there is an option value to be corrected. If so, a reference option value corresponding to the option value to be corrected is obtained according to a reference file. The option value to be corrected is then modified to the reference option value. Finally, the corrected current option value file is used to adjust all settings options in the server to be corrected. Using a script execution file to automatically correct the option value to be corrected according to the reference file optimizes the production line process, saves manpower, improves production line efficiency, and avoids problems such as production line blockage.
[0109] In some alternative implementations, the script execution file is run, including:
[0110] Obtain read and write permissions for the folder on the server to be fixed;
[0111] Run the script to execute the file based on folder read and write permissions.
[0112] Specifically, in combination Figure 2The detailed steps of this embodiment are described below. First, after copying the script execution file test.sh and the bios.log file to the corresponding directories in the OS, the OS system of the server to be corrected obtains read / write permissions for the folder on the server to be corrected using the command: chmod 777 *. Then, based on the folder read / write permissions, the OS system runs the script execution file test.sh using the command: . / test.sh.
[0113] In this implementation, read and write permissions are obtained for the folder on the server to be corrected. Based on these permissions, a script executable file is run. This allows the script executable file to modify the current option value file, and then correct the option value to be corrected according to the reference file.
[0114] In some optional implementations, reference option values corresponding to the option value to be corrected are obtained according to a reference document, including:
[0115] Get the string corresponding to the value of the option to be corrected;
[0116] In the reference file, find the target setting option corresponding to the string;
[0117] Use the reference option value of the target setting option as the reference option value corresponding to the option value to be corrected.
[0118] Specifically, the script retrieves the string corresponding to the option value to be corrected, for example, "Setup Question=XXX". The script execution file test.sh searches for the target setting option corresponding to the string "Setup Question=XXX" in the reference file bios.log. After finding it, it searches for the reference option value "Options=AAA" for the target setting option, and records AAA as the reference option value for the standard corresponding to SetupQuestion=XXX.
[0119] In this embodiment, the script execution file searches for the reference option value corresponding to the option value to be corrected in the reference file based on the string corresponding to the option value to be corrected, so as to facilitate the subsequent correction of the option value to be corrected.
[0120] In some alternative implementations, all setting options in the server to be corrected are adjusted using a revised current option value file, including:
[0121] Import the corrected current option value file into the server to be corrected;
[0122] On the server to be corrected, an adjustment command is initiated, which is used to execute the settings control tool;
[0123] Use the settings control tool to import all option values from the corrected current option value file into the server to be corrected.
[0124] Specifically, if a corrected current option value file exists, it indicates that the server to be corrected has option values that are inconsistent with the standard requirements, and the script executable file test.sh has already corrected the inconsistent option values based on the reference option values. The OS system of the server to be corrected imports the corrected current option value file into the server. The OS system initiates an adjustment command, which is used to execute a setup control tool, such as the AMI (Application Management Interface) Setup Control Environment (SCE). The adjustment command is: . / SCELnx / i / sbiostest.log. The setup control tool then imports all option values from the corrected current option value file into the server to be corrected.
[0125] In this embodiment, the corrected current option value file is imported into the server to be corrected. Then, the control tool is used to import all option values from the corrected current option value file into the server to be corrected. This completes the correction of all option values in the server to be corrected that are inconsistent with the standard requirements.
[0126] In some alternative implementations, after adjusting all setting options in the server to be corrected using the revised current option value file, the method further includes:
[0127] Using a preset verification script, the corrected current option value file is verified to obtain the verification result. The verification result is used to determine whether there are option values to be corrected in the corrected current option value file.
[0128] If the verification result indicates that the correction was successful, a preset test script is used to test each setting option in the server to be corrected, and the test results are obtained. The test results are used to determine whether the function of each setting option is normal.
[0129] If the test results are normal, the option value to be corrected and the corresponding reference option value will be stored in the analysis database;
[0130] Based on the data in the database, target setting options are obtained, where the probability that the current value of the target setting option is the value to be corrected is greater than a preset threshold.
[0131] The output includes information about the target setting options.
[0132] Specifically, a preset verification script is used to verify the corrected current option value file to determine whether all option values to be corrected have been successfully corrected. If the corrected current option value file still contains option values to be corrected, the verification result is that the correction has failed; if the corrected current option value file does not contain option values to be corrected, the verification result is that the correction has been successful. The verification process performed by the preset verification script includes: obtaining the latest option values of the target Setup options through the SCE tool, and verifying whether the Setup options of the server to be corrected have been successfully modified based on the latest option values.
[0133] If the verification result indicates successful correction, a pre-edited test script is invoked to test each setting option in the server to be corrected. The script determines whether each setting option functions correctly and obtains the test result. If all setting options function correctly, the test result is normal; if any setting option malfunctions, the test result is abnormal. The pre-edited test script is an executable Java script, and its execution process follows standard testing methods, which will not be elaborated upon here.
[0134] Deploy remote management tools and a database logging system on the server production line. After each server is manufactured, the remote management tool automatically collects and records the setup option values of the BIOS firmware, including the option values to be corrected and the corresponding reference option values, and stores them in the analysis database.
[0135] Regularly analyzing and statistically processing data in the database reveals instances where the probability of a specific setting option's current value deviating from the reference value on a particular server model exceeds a preset threshold. In other words, the probability that the current value of the target setting option is the value to be corrected exceeds the preset threshold, which is set based on actual needs. Information containing the target setting option is output to server production personnel. Based on this information, they can update production processes and provide more detailed standard requirements to avoid such inconsistencies. Simultaneously, remote management tools and automated correction scripts check and correct the Setup option values in the BIOS firmware of each server in real time during configuration, ensuring consistency with standard requirements and improving production efficiency and quality control capabilities.
[0136] In this implementation, the corrected current option value file is verified to obtain the verification results, ensuring that all option values to be corrected are successfully corrected. Testing each setting option in the server to be corrected ensures that each setting option functions correctly. If the test results are normal, the option values to be corrected and their corresponding reference option values are stored in the analysis database to obtain the target setting options. This facilitates server production personnel in updating production processes and standard requirements, preventing inconsistencies between the current and reference option values from recurring.
[0137] In some optional implementations, the value of the option to be corrected is modified based on the script execution file and reference files, including:
[0138] Determine the preset correction method, which includes: non-full correction and full correction;
[0139] When the default correction method is full correction, the target option value partition in the current option value file is determined, wherein the current option value file contains a first number of option value partitions, and the option value partition contains a second number of current option values;
[0140] Based on the reference files and target option values, partition the space and generate an image file;
[0141] In the current option value file, erase all current option values in the target option value partition and write the data from the image file to the target option value partition;
[0142] When the default correction method is non-full correction, the reference option value corresponding to the option value to be corrected is determined according to the reference file;
[0143] Modify the value of the option to be corrected to the reference value to complete the correction of the option value.
[0144] Specifically, a preset correction method is set in advance when correcting the option value to be corrected, including: non-full correction and full correction. If the preset correction method is full correction, it means that the option value to be corrected and its related option values need to be corrected to avoid omissions when comparing the reference file and the current option value file to find inconsistent option values. The current option value file contains a first number of option value partitions, and each option value partition contains a second number of current option values. For example, option values that are set in the same BIOS page can be placed in the same option value partition. The first and second numbers both indicate that there are multiple options. The target option value partition of the option value to be corrected in the current option value file is determined. If it is in the same option value partition as the option value to be corrected, it means that it is related to the option value to be corrected.
[0145] Based on the reference file and the target option value partition, a mirror file is generated. The mirror file contains reference option values corresponding to all current option values in the target option value partition. In the current option value file, all current option values in the target option value partition are erased, and the data in the mirror file is written to the target option value partition, thus completing the correction of the option value to be corrected and its related option values.
[0146] If the default correction method is non-full correction, it means that only the option value to be corrected needs to be corrected. You only need to determine the reference option value corresponding to the option value to be corrected according to the reference file, modify the option value to be corrected to the reference option value, and complete the correction of the option value to be corrected.
[0147] In this embodiment, the preset correction methods include: partial correction and full correction. Partial correction only corrects inconsistent option values, which is fast and efficient. Full correction corrects inconsistent option values and their related inconsistent option values together, avoiding omissions when searching for inconsistent option values.
[0148] Based on the above embodiments, the option value correction method for setting options provided in this application further provides a method to reduce the number of option values that need to be compared and corrected.
[0149] Specifically, Setup options in the server that require frequent value adjustments or are based on customer requirements are marked with unique identifiers, such as Map Strings. The script executable is adapted to call the SCE tool, exporting the option values and Map Strings of the BIOS options marked with Map Strings from the server to be corrected as a bios.txt file. Based on the Map Strings in the exported bios.txt, the SCE tool modifies the target Setup options (those with values inconsistent with the reference values) according to the reference file via command line. After modifying the inconsistent values, the server is restarted. The SCE tool then retrieves the latest value of the target Setup option and verifies whether the modification was successful. If the server is verified as successfully corrected, the functionality of the modified target Setup option is automatically tested.
[0150] It should be noted that the above-mentioned script executable file can be an executable JAVA script, and other languages can also be used to implement it, such as C++ or C#, to achieve the same function, depending on the actual situation.
[0151] Additionally, when modifying target Setup options via the command line using the SCE tool according to the reference file, the command line can be: . / SCELNX_64 / i / ms <map string> / qv"value". In this command line, "MapString" is the Map String of the target SETUP option, and "value" is the current option value of the corresponding target Setup option.
[0152] Furthermore, the method for automating the testing of whether the modified target Setup options function correctly is as follows: call the pre-edited corresponding test case script to perform automated testing on the modified target Setup options. The test case script is an executable JAVA script.
[0153] In this implementation, unique identifiers are used to mark Setup options in the server that require frequent value adjustments or are based on customer requirements. This reduces the number of Setup options that need to be compared and corrected, improving correction efficiency and shortening correction time. The script automatically corrects Setup options with unique identifier Map Strings, solving the problems of existing technologies that require manual comparison by maintenance engineers, have low fault self-diagnosis efficiency, and cannot automatically correct the Setup option values in the BIOS firmware to the standard required values.
[0154] This embodiment provides a device for correcting option values when setting options, such as... Figure 4 As shown, it includes:
[0155] Initiation module 401 is used to initiate a read command in the reference server, wherein the read command is used to execute the setting control tool;
[0156] Export module 402 is used to export the reference option values of all setting options in the reference server according to the setting control tool;
[0157] The generation module 403 is used to generate a reference file based on the reference option values;
[0158] Module 404 is used to obtain the script execution file for correcting option values, and copy the script execution file and reference file to the server to be corrected;
[0159] Storage module 405 is used to run a script execution file, obtain the current option values of all settings options in the server to be corrected according to the script execution file, and store the current option values to the current option value file;
[0160] Module 406 is obtained, which is used to compare the reference file and the current option value file based on the script execution file to obtain the option value to be corrected in the current option value file;
[0161] The correction module 407 is used to correct the value of the option to be corrected based on the script execution file and the reference file.
[0162] In some alternative implementations, module 406 includes:
[0163] The calling unit is used to call a preset tool in the server to be corrected using a script execution file. The preset tool is used to compare the reference file and the current option value file.
[0164] The first judgment unit is used to determine whether there are inconsistent option values between the current option value file and the reference file based on the preset tool, the reference file and the current option value file;
[0165] As a unit, it is used to treat inconsistent option values as option values to be corrected if inconsistent option values exist.
[0166] The first output unit is used to output no-correction information if there are no inconsistent option values.
[0167] In some alternative implementations, the correction module 407 includes:
[0168] The second judgment unit is used to determine whether there are option values to be corrected in the current option value file;
[0169] The second output unit is used to save the option value to be corrected and output the warning information if there is an option value to be corrected.
[0170] The first obtaining unit is used to obtain the reference option value corresponding to the option value to be corrected based on the reference file;
[0171] The second obtaining unit is used to modify the option value to be corrected to the reference option value, and obtain the corrected current option value file;
[0172] The correction unit is used to adjust all setting options in the server to be corrected using the corrected current option value file.
[0173] In some alternative implementations, the storage module 405 includes:
[0174] The acquisition unit is used to acquire read and write permissions for the folder on the server to be corrected.
[0175] The execution unit is used to run scripts and executable files based on folder read and write permissions.
[0176] In some alternative implementations, the first obtaining unit includes:
[0177] The `get` submodule is used to retrieve the string corresponding to the value of the option to be corrected.
[0178] The search submodule is used to find the target setting option corresponding to a string in the reference file;
[0179] As a submodule, it is used to use the reference option value of the target setting option as the reference option value corresponding to the option value to be corrected.
[0180] In some optional implementations, the correction unit includes:
[0181] The first import submodule is used to import the corrected current option value file into the server to be corrected.
[0182] The initiation submodule is used to initiate adjustment commands on the server to be corrected. These adjustment commands are used to execute the settings control tools.
[0183] The second import submodule is used to import all option values from the corrected current option value file into the server to be corrected using the settings control tool.
[0184] In some alternative implementations, the correction module 407 includes:
[0185] The verification unit is used to verify the corrected current option value file using a preset verification script and obtain the verification result. The verification result is used to determine whether there are option values to be corrected in the corrected current option value file.
[0186] The test unit is used to test each setting option in the server to be corrected using a preset test script when the verification result is successful. The test results are used to determine whether the function of each setting option is normal.
[0187] The storage unit is used to store the option value to be corrected and the corresponding reference option value into the analysis database when the test result is normal.
[0188] The third obtaining unit is used to obtain the target setting option based on the data in the analysis database, wherein the probability that the current option value of the target setting option is the value of the option to be corrected is greater than a preset threshold.
[0189] The third output unit is used to output information containing target setting options.
[0190] In some alternative implementations, the correction module 407 includes:
[0191] The first determining unit is used to determine a preset correction method, wherein the preset correction method includes: non-full correction and full correction;
[0192] The second determining unit is used to determine the target option value partition in the current option value file of the option value to be corrected when the preset correction method is full correction. The current option value file contains a first number of option value partitions, and the option value partition contains a second number of current option values.
[0193] The generation unit is used to partition the data according to the reference file and target option values to generate image files;
[0194] The write unit is used to erase all current option values in the target option value partition in the current option value file and write the data in the image file to the target option value partition.
[0195] The third determining unit is used to determine the reference option value corresponding to the option value to be corrected based on the reference document when the preset correction method is non-full correction.
[0196] The modification unit is used to change the value of the option to be corrected to the reference value, thus completing the correction of the option value to be corrected.
[0197] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0198] In this embodiment, the option value correction device for setting options is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0199] This invention also provides a computer device having the above-described features. Figure 4 The option value correction device for the settings shown.
[0200] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 5 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 5 Take a processor 10 as an example.
[0201] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GPA), or any combination thereof.
[0202] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0203] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0204] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0205] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0206] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0207] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.< / map>
Claims
1. A method for correcting option values in setting options, characterized in that, The method includes: In the reference server, a read command is initiated, wherein the read command is used to execute the setting control tool; Based on the setting control tool, export the reference option values for all setting options in the reference server; Generate a reference file based on the reference option values; Obtain the script execution file used to correct the option values, and copy the script execution file and the reference file to the server to be corrected; Run the script execution file, obtain the current option values of all the setting options in the server to be corrected according to the script execution file, and store the current option values in the current option value file; Based on the script execution file, the reference file and the current option value file are compared to obtain the option values to be corrected in the current option value file; The step of comparing the reference file and the current option value file based on the script execution file to obtain the option value to be corrected in the current option value file includes: in the server to be corrected, using the script execution file to call a preset tool, wherein the preset tool is used to compare the reference file and the current option value file; based on the preset tool, the reference file, and the current option value file, determining whether there are inconsistent option values between the current option value file and the reference file; if there are inconsistent option values, using the inconsistent option values as the option values to be corrected; if there are no inconsistent option values, outputting no correction information. Based on the script execution file and the reference file, correct the value of the option to be corrected; The step of correcting the option value to be corrected based on the script execution file and the reference file includes: determining a preset correction method, wherein the preset correction method includes: non-full correction and full correction; when the preset correction method is full correction, determining the target option value partition of the option value to be corrected in the current option value file, wherein the current option value file contains a first number of option value partitions, and the option value partition contains a second number of current option values; generating a mirror file based on the reference file and the target option value partition; erasing all current option values in the target option value partition in the current option value file, and writing the data from the mirror file into the target option value partition; when the preset correction method is non-full correction, determining the reference option value corresponding to the option value to be corrected based on the reference file; modifying the option value to be corrected to the reference option value, thereby completing the correction of the option value to be corrected.
2. The method according to claim 1, characterized in that, The step of correcting the value of the option to be corrected based on the script execution file and the reference file includes: Determine whether the option value to be corrected exists in the current option value file; If the value of the option to be corrected exists, save the value of the option to be corrected and output a warning message; Based on the reference document, the reference option value corresponding to the option value to be corrected is obtained; Modify the option value to be corrected to the reference option value to obtain the corrected current option value file; Adjust all the setting options in the server to be corrected using the revised current option value file.
3. The method according to claim 1, characterized in that, The execution of the script file includes: Obtain read and write permissions for the folder on the server to be corrected; Based on the folder's read and write permissions, the script execution file is run.
4. The method according to claim 2, characterized in that, The step of obtaining the reference option value corresponding to the option value to be corrected based on the reference document includes: Obtain the string corresponding to the value of the option to be corrected; In the reference file, locate the target setting option corresponding to the string; The reference option value of the target setting option is used as the reference option value corresponding to the option value to be corrected.
5. The method according to claim 2, characterized in that, The step of adjusting all the setting options in the server to be corrected using the corrected current option value file includes: Import the corrected current option value file into the server to be corrected; On the server to be corrected, an adjustment command is initiated, wherein the adjustment command is used to execute the setting control tool; The settings control tool is used to import all option values from the corrected current option value file into the server to be corrected.
6. The method according to claim 2, characterized in that, After adjusting all the setting options in the server to be corrected using the revised current option value file, the method further includes: Using a preset verification script, the corrected current option value file is verified to obtain a verification result, wherein the verification result is used to determine whether the option value to be corrected exists in the corrected current option value file; If the verification result indicates that the correction is successful, a preset test script is used to test each of the setting options in the server to be corrected to obtain test results. The test results are used to determine whether the function of each setting option is normal. If the test result is normal, the option value to be corrected and the corresponding reference option value are stored in the analysis database; Based on the data in the analysis database, a target setting option is obtained, wherein the probability that the current option value of the target setting option is the value of the option to be corrected is greater than a preset threshold; The output contains information about the target setting options.
7. An option value correction device for setting options, characterized in that, The device includes: The initiation module is used to initiate a read command in the reference server, wherein the read command is used to execute the setting control tool; The export module is used to export the reference option values of all setting options in the reference server according to the setting control tool. A generation module is used to generate a reference file based on the reference option values; The acquisition module is used to acquire the script execution file for correcting option values, and copy the script execution file and the reference file to the server to be corrected; The storage module is used to run the script execution file, obtain the current option values of all the setting options in the server to be corrected according to the script execution file, and store the current option values in the current option value file; The module is used to compare the reference file and the current option value file based on the script execution file to obtain the option value to be corrected in the current option value file; The obtaining module includes: a calling unit, configured to call a preset tool in the server to be corrected using the script execution file, wherein the preset tool is used to compare the reference file and the current option value file; a first judging unit, configured to judge whether there are inconsistent option values between the current option value file and the reference file based on the preset tool, the reference file, and the current option value file; an assigning unit, configured to, if there are inconsistent option values, use the inconsistent option values as the option values to be corrected; and a first output unit, configured to, if there are no inconsistent option values, output information indicating no correction is needed. The correction module is used to correct the value of the option to be corrected based on the script execution file and the reference file; The correction module includes: a first determining unit, configured to determine a preset correction method, wherein the preset correction method includes: non-full correction and full correction; a second determining unit, configured to determine, when the preset correction method is full correction, a target option value partition of the option value to be corrected in the current option value file, wherein the current option value file contains a first number of option value partitions, and the option value partition contains a second number of current option values; a generating unit, configured to generate a mirror file based on the reference file and the target option value partition; a writing unit, configured to erase all current option values in the target option value partition in the current option value file and write the data from the mirror file to the target option value partition; a third determining unit, configured to determine, when the preset correction method is non-full correction, a reference option value corresponding to the option value to be corrected based on the reference file; and a modifying unit, configured to modify the option value to be corrected to the reference option value, thereby completing the correction of the option value to be corrected.
8. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the option value correction method of any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the option value correction method for the setting option according to any one of claims 1 to 6.