Method and device for reporting setting option information, computer equipment and storage medium

By determining whether the modification operation is triggered by the user when receiving the setting option modification request, and recording the original information and target information, the problem of the inability to effectively record and report the Setup option value modification record in the prior art is solved, and the transparency and traceability of the setting modification are achieved.

CN119938155AActive Publication Date: 2025-05-06INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202510078631.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-05-06
Estimated Expiration
2045-01-17

AI Technical Summary

Technical Problem

The prior art cannot effectively record and report the Setup option values ​​modified by in-band or out-of-band means, resulting in users being unable to understand the modification records, affecting subsequent use.

Method used

Provides a method of reporting setting option information, by determining whether the modification operation is triggered by the user, saving the original information, and updating it into target information, recording the original information, target information and naming information to the log.

Benefits of technology

Ensure the transparency and traceability of the settings modifications, and users can find the cause of the problem by modifying records, improving the system's management and maintenance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938155A_ABST
    Figure CN119938155A_ABST
Patent Text Reader

Abstract

The invention relates to a setting option information reporting method and device, computer equipment and a storage medium. The method comprises the following steps: in response to a received information modification request of a setting option, judging whether a modification operation is triggered by a user or not; in response to the condition that the modification operation is triggered by the user, storing the original information of the setting option; updating the original information of the setting option into the target information, and returning an updating result; in response to successful updating, storing target information of the setting options; determining a structural body where the setting option is located according to the setting option; obtaining structural body information, determining naming information of the setting options according to the structural body information, and storing the naming information; and obtaining original information, target information and naming information of the setting option, and storing the original information, the target information and the naming information in a log for query. By adopting the method, the setting option modification record can be obtained, so that the problem reason can be conveniently searched through the modification record.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of information reporting, and in particular to a method, device, computer equipment and storage medium for reporting setting option information. Background Art

[0002] The Setup menu is a menu in the computer's basic input and output system (BIOS), which contains setup options for configuring the computer's hardware and system settings. Through the BIOS Setup options, users can modify the computer's boot order and other configurations to optimize the computer's performance. Currently, the ways in which users modify Setup options mainly include in-band and out-of-band. When users are applying or debugging on a server, they often modify the Setup option values ​​in in-band and out-of-band ways, but they may not restore the Setup option values ​​to their original values ​​before use after the application or debugging is completed. Since the existing technology cannot support reporting of both in-band and out-of-band modification situations, other users cannot learn about the modification records of the Setup option values ​​modified by the two modification methods, so that when the modification operation affects subsequent use, they cannot promptly understand the modification details, resulting in the inability to locate the cause of the error in a timely manner. Summary of the invention

[0003] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for reporting setting option information that can obtain setting option modification records to help find the cause of the problem through modification records in response to the above technical problems.

[0004] On the one hand, a method for reporting setting option information is provided, the method comprising:

[0005] In response to receiving a request to modify information of a setting option, determining whether the modification operation is triggered by a user;

[0006] In response to the modification operation being triggered by the user, the original information of the setting option is saved;

[0007] Update the original information of the setting options to the target information and return the updated result;

[0008] In response to the update being successful, saving the target information of the setting option;

[0009] Determine, according to the setting options, a structure in which the setting options are located, wherein the structure is used to store the setting options;

[0010] Acquire structural information, determine naming information of the setting option according to the structural information, and save the naming information;

[0011] The original information, target information, and naming information of the setting option are obtained, and the original information, target information, and naming information are saved in a log for query.

[0012] In one embodiment, determining whether the modification operation is triggered by a user includes:

[0013] Obtain a call stack of an information modification operation thread, wherein the call stack includes multiple stack frames; traverse the stack frames starting from the top of the call stack to obtain the calling function information in each stack frame; form a call chain according to the calling function information; search for functions related to user interaction and modification operation functions according to the call chain, and determine whether the order of the functions related to user interaction is before the order of the modification operation functions and the return value of the functions related to user interaction is related to the modification operation: in response to the order of the functions related to user interaction being before the order of the modification operation functions and the return value of the functions related to user interaction being related to the modification operation, determine that the modification operation is triggered by the user; in response to the order of the functions related to user interaction being after the order of the modification operation functions and / or the return value of the functions related to user interaction being irrelevant to the modification operation, determine that the modification operation is not triggered by the user.

[0014] In one embodiment, the original information of the setting option is updated to the target information, and the update result is returned, including:

[0015] Obtain the target information of the setting options input by the user; verify whether the target information complies with the modification rules: in response to the target information complying with the modification rules, access the memory write interface and write the target information to the memory; in response to successful writing, save the target information; in response to failed writing, return an error result.

[0016] In one embodiment, obtaining structure information, determining naming information of setting options according to the structure information, and saving the naming information includes:

[0017] Obtain a globally unique identifier of the structure through an interface; pass the globally unique identifier into a database query interface to obtain structure information that matches the globally unique identifier, wherein the structure information includes naming information of at least one setting option and an offset corresponding to the naming information; obtain the offset of the setting option; traverse the structure information, and determine the naming information that matches the offset of the setting option according to the offset of the setting option; and save the naming information to a buffer.

[0018] In one embodiment, obtaining original information, target information, and naming information of the setting option, and saving the information to a log for query, includes:

[0019] The controller accesses the memory address where the flag bit is located in the shared memory according to a preset time interval and reads the flag bit value; determines whether the controller reads the modification record data packet in the shared memory according to the flag bit value: if the response flag bit value indicates that the data is available, reads the modification record data packet in the shared memory; parses the modification record data packet in the shared memory to obtain the original information, target information, and naming information of the setting options; saves the original information, target information, and naming information of the setting options to the controller log; and clears the flag bit value.

[0020] In one embodiment, before obtaining the original information, target information, and naming information of the setting option, the following steps are included:

[0021] Get the original information, target information, and naming information of the setting options in the buffer; check the shared memory status and call the driver interface to open the shared memory; write the original information, target information, and naming information of the setting options into the shared memory to generate a modification record data packet; determine the flag bit according to the write position of the modification record data packet, and set the flag bit value.

[0022] In one embodiment, it also includes:

[0023] In response to a modification operation not triggered by the user, the original information of the setting option is updated to the target information, and the update result is returned; in response to a successful update, the target information of the setting option is saved; the structure in which the setting option is located is determined according to the setting option; the structure information is obtained, the naming information of the setting option is determined according to the structure information, and the naming information is saved; the target information and naming information of the setting option are obtained, and the target information and naming information are saved to the log for query.

[0024] In another aspect, a device for reporting setting option information is provided, the device comprising:

[0025] A request receiving module, used for, upon receiving a request to modify the information of a setting option, determining whether the modification operation is triggered by a user;

[0026] A first storage module, for saving original information of the setting options in response to a modification operation being triggered by a user;

[0027] The information modification module is used to update the original information of the setting options to the target information and return the update result;

[0028] A second storage module, configured to save target information of the setting option in response to a successful update;

[0029] An information determination module, used for determining a structure where a setting option is located according to the setting option, wherein the structure is used for storing the setting option;

[0030] The information acquisition module is used to obtain the structure information, determine the naming information of the setting options according to the structure information, and save the naming information;

[0031] The information recording module is used to obtain the original information, target information, and naming information of the setting options, and save the original information, target information, and naming information to the log for query.

[0032] In another aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:

[0033] In response to receiving a request to modify information of a setting option, determining whether the modification operation is triggered by a user;

[0034] In response to the modification operation being triggered by the user, the original information of the setting option is saved;

[0035] Update the original information of the setting options to the target information and return the updated result;

[0036] In response to the update being successful, saving the target information of the setting option;

[0037] Determine, according to the setting options, a structure in which the setting options are located, wherein the structure is used to store the setting options;

[0038] Acquire structural information, determine naming information of the setting option according to the structural information, and save the naming information;

[0039] The original information, target information, and naming information of the setting option are obtained, and the original information, target information, and naming information are saved in a log for query.

[0040] In another aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0041] In response to receiving a request to modify information of a setting option, determining whether the modification operation is triggered by a user;

[0042] In response to the modification operation being triggered by the user, the original information of the setting option is saved;

[0043] Update the original information of the setting options to the target information and return the updated result;

[0044] In response to the update being successful, saving the target information of the setting option;

[0045] Determine, according to the setting options, a structure in which the setting options are located, wherein the structure is used to store the setting options;

[0046] Acquire structural information, determine naming information of the setting option according to the structural information, and save the naming information;

[0047] The original information, target information, and naming information of the setting option are obtained, and the original information, target information, and naming information are saved in a log for query.

[0048] The above-mentioned method, device, computer equipment and storage medium for reporting setting option information, when receiving a setting option modification request, first determine whether the modification operation is triggered by the user, so as to ensure that only the settings actively changed by the user are recorded. If it is confirmed that it is triggered by the user, the original information of the setting option is saved for subsequent comparison with the modified target information. Subsequently, the original information of the setting option is updated to the target information specified by the user, and the update result is returned. If the update is successful, the system saves the target information of the setting option. Then, according to the setting option, the structure in which it is located is determined, and the structure is used to store related setting options. By obtaining the structure information, the system can determine the naming information of the setting option modified by the user and save it. Finally, the controller obtains the original information, target information and naming information of the setting option and saves it in the log for future query of the modification record. This method ensures the transparency and traceability of the setting modification, which is convenient for users to understand the modification of the setting option, so as to help find the cause of the problem through the modification record. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 An application environment diagram of a method for reporting option information in an embodiment;

[0050] Figure 2 A schematic diagram of a flow chart of a method for reporting option information in an embodiment;

[0051] Figure 3 A schematic diagram of a flow chart of a reporting step for setting option information in an embodiment;

[0052] Figure 4 A schematic diagram of a flow chart of a method for reporting option information in another embodiment;

[0053] Figure 5 It is a structural block diagram of a reporting device for setting option information in an embodiment;

[0054] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0056] The method for reporting setting option information provided in this application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.

[0057] In one embodiment, Figure 2 As shown, a method for reporting setting option information is provided, and the method is applied to Figure 1 The server in the example is used as an example to illustrate, including the following steps:

[0058] Step 201: In response to receiving a request to modify information of a setting option, it is determined whether the modification operation is triggered by a user.

[0059] Among them, the setting options are included in the system's setup menu. Through the setting options, users can modify the computer's boot order, hardware device settings, system time and date settings, hard disk drive mode, enable or disable specific device interfaces, and adjust the processor's operating frequency and voltage.

[0060] The modification methods of setting options usually include in-band modification and out-of-band modification. Among them, the in-band modification includes directly finding the Setup option by pressing Delete or other hotkeys during the boot process to enter the HII interface (Human Interface Infrastructure) in the BIOS (Basic Input / Output System), modifying the option value or exporting the Setup option through the system tool, modifying the Setup option value as needed, and then updating the Setup option value back to the memory through the tool. The system obtains the updated Setup option value from the memory when it restarts; the out-of-band method includes the controller obtaining the list of Setup menus and current setting values ​​through BIOS reporting during the boot process, the user modifies the setting option value of the obtained Setup menu, and then passes it to the BIOS through the processor. The BIOS determines whether there is a Setup option sent by the processor that needs to be modified when the computer is booted next time. If so, the Setup option value that needs to be modified is updated to the memory and takes effect.

[0061] Specifically, by adding a hook function before the underlying function modified by the Setup setting option, it is determined whether the modification operation is triggered by the user, and different processing flows are selected according to whether the modification operation is triggered by the user.

[0062] Among them, the hook function is a programming technique that allows developers to insert custom code when a specific event occurs during the execution of a program to extend or modify the behavior of the program. By setting a hook function at a key point in the program, the developer can control the program flow and enhance the function without changing the original code.

[0063] Step 202: In response to a modification operation being triggered by a user, the original information of the setting option is saved.

[0064] Specifically, determining that the modification operation is triggered by the user indicates that the operation is not an option value change caused by system update or the like. To facilitate understanding of option value changes caused by human modification operations, the original information of the option settings before the modification is saved.

[0065] Specifically, the original information can be saved in a buffer (buffer is an area in the computer memory used to temporarily store data so that data can be processed or transmitted when needed).

[0066] Step 203: Update the original information of the setting option to the target information, and return the update result.

[0067] Specifically, the target information specified by the user is written through the NVRAM write function to modify the original information, and the result of writing success or failure is returned.

[0068] Among them, NVRAM (Non-Volatile Random Access Memory) combines the advantages of random access, i.e., fast reading and writing of data at any location, and non-volatility, i.e., data is not lost after power failure, and is used to keep the stored data from being lost after the power is turned off. NVRAM is commonly used in various computer systems, including servers, network devices, and embedded systems. It is usually used to store important system configuration settings, such as BIOS Setup menus, boot parameters, and device configurations. NVRAM can retain these settings after power failure or system restart, ensuring that the system can continue to run with the correct settings. The default value (original information) and current value (target information) of the Setup setting options are stored in NVRAM. Each time the computer is turned on, the BIOS will obtain the current value of the Setup setting options from NVRAM, and initialize the CPU, memory, PCIe (Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard) devices, etc. through the current value of Setup, load various device drivers, initialize BIOS, initialize the boot device boot items, provide keyboard and mouse input to the user, and display boot information to the user. The user can choose to boot through the keyboard, mouse, etc.

[0069] Step 204: In response to the update being successful, the target information of the setting option is saved.

[0070] Specifically, the modification success or failure result returned by the NVRAM is read through the hook function, and when the modification result is successful, the target information after the setting option is modified is saved.

[0071] Specifically, the target information may be saved in a buffer.

[0072] Step 205: Determine the structure where the setting option is located according to the setting option, wherein the structure is used to store the setting option.

[0073] The structure is used to store setting options, define the properties of each setting option, default values, and display methods in the BIOS setting interface, etc.

[0074] Specifically, by consulting the source code or related documents of the BIOS, the part defining the modified setting options is found, wherein the setting options are defined in a certain structure, and their names and locations are described in the code or documents, thereby determining the structure where the modified setting options are located.

[0075] Step 206, obtaining structure information, determining the naming information of the setting option according to the structure information, and saving the naming information.

[0076] Specifically, the GUID of the structure and the offset corresponding to the setting option are obtained, and the naming information of the setting option is determined according to the GUID and the offset.

[0077] Among them, GUID (Globally Unique Identifier) ​​is a digital identifier with a binary length of 128 bits generated by an algorithm, which is usually allocated to a specific structure during the BIOS development process and is used to uniquely identify the structure.

[0078] The offset represents the distance from the start position of the structure to a specific setting option. Each option has a specific offset in the structure to mark the location of the setting option.

[0079] Naming information refers to the name of the setting option. The name of the option setting is determined in the structure through the offset to ensure accurate positioning of the setting option modified by the user and the display of the name and description of the setting option in the BIOS interface.

[0080] Specifically, the naming information may be saved in a buffer.

[0081] Step 207, obtaining the original information, target information, and naming information of the setting option, and saving the original information, target information, and naming information to a log for query.

[0082] Specifically, the BMC obtains the original information, target information, and naming information of the setting options saved by the buffer to the shared memory, and saves the original information, target information, and naming information in the BMC log.

[0083] Among them, BMC (Baseboard Management Controller) is a special microcontroller embedded in the server motherboard, which is responsible for monitoring and managing the hardware status of the server. It runs independently of the host system and can still provide remote management functions even if the server is shut down or the operating system crashes.

[0084] In the above-mentioned method for reporting setting option information, when receiving a setting option modification request, first determine whether the modification operation is triggered by the user, so as to ensure that only the settings actively changed by the user are recorded. If it is confirmed that it is triggered by the user, the original information of the setting option is saved for subsequent comparison with the modified target information. Subsequently, the original information of the setting option is updated to the target information specified by the user, and the update result is returned. If the update is successful, the system saves the target information of the setting option. Next, the structure in which the setting option is located is determined according to the setting option, and the structure is used to store the relevant setting options. By obtaining the structure information, the system can determine the naming information of the setting option modified by the user and save it. Finally, the controller obtains the original information, target information and naming information of the setting option and saves it in the log for future query of the modification record. This method ensures the transparency and traceability of the setting modification, which is convenient for users to understand the modification of the setting option, so as to help find the cause of the problem through the modification record.

[0085] In one embodiment, determining whether the modification operation is triggered by a user includes:

[0086] Obtain a call stack of an information modification operation thread, wherein the call stack includes multiple stack frames; traverse the stack frames starting from the top of the call stack to obtain calling function information in each stack frame; form a call chain according to the calling function information; search for functions related to user interaction and modification operation functions according to the call chain, and determine whether the order of the function related to user interaction is before the order of the modification operation function and whether the return value of the function related to user interaction is related to the modification operation: in response to the order of the function related to user interaction being before the order of the modification operation function and the return value of the function related to user interaction being related to the modification operation, determine that the modification operation is triggered by the user, and save the original information of the setting option; in response to the order of the function related to user interaction being after the order of the modification operation function and / or the return value of the function related to user interaction being irrelevant to the modification operation, determine that the modification operation is not triggered by the user, and there is no need to save the original information.

[0087] Specifically, Figure 3As shown in the figure, if the user modifies the Setup setting option, it involves a main function, an event processing function, and a setting modification function. When the user clicks the setting option, the main function, event processing function, and setting modification function will be triggered. The call stack of the current information modification operation thread is obtained through the hook function, and the call function information that triggers the modification operation is obtained. Starting from the stack, since the call stack is pushed and popped in the order of function calls, the order of stack frames in the call stack reflects the order of function calls. First, the setting modification function is reached. This function is where the setting value is changed, but it does not interact directly with the user. Then the event processing function is reached. This function handles user click events. By traversing the call stack, it can be identified that the functions in the call chain are: main function → event processing function → setting modification function. In the call chain, the event processing function related to user interaction is called before the setting modification function, and the return value of the setting modification function indicates the success or failure of the modification operation, which affects the subsequent user interface update behavior of the event processing function. Therefore, it can be reasonably inferred that the current setting option modification operation is triggered by the user's click behavior. At this time, the original information of the setting option needs to be saved in order to understand the specific modification situation later.

[0088] Specifically, if it is found through traversing the call stack that the stored setting modification function is called from the background check function rather than from the event processing function, it means that the call of the setting modification function is triggered by the background process rather than the user's click event, and the background check function will not update the user interface or display any feedback based on the return value of the setting modification function. Since the background check function is a setting modification function called independently of user interaction, it can be reasonably inferred that the current setting option modification operation is not triggered by the user's click behavior, and there is no need to save the original information of the setting option at this time.

[0089] In the above embodiment, by introducing the hook function in the underlying function, the call stack can be checked to determine the source of the modification operation. Specifically, the hook function obtains the call stack information of the current thread, traverses each stack frame, and forms a call chain. Then, the call order of each function in the call chain is analyzed, and special attention is paid to whether the function related to user interaction is called before the modification operation function, and whether its return value is related to the modification operation. If these conditions are met, it can be determined that the modification operation is directly triggered by the user. If the relevant function is not called before the modification operation function or the return value is irrelevant to the modification operation, it can be determined that the modification operation is not directly triggered by the user. This method ensures that only the setting changes actively made by the user are recorded, avoids misjudgment caused by automatic modification within the system or other non-user operations, improves the accuracy of log records, reduces unnecessary data records, and avoids storage waste caused by too many irrelevant logs.

[0090] In one embodiment, the original information of the setting option is updated to the target information, and the update result is returned, including:

[0091] Obtain target information of the setting options input by the user; verify whether the target information complies with the modification rules: in response to the target information complying with the modification rules, access the memory write interface and write the target information to the memory; in response to successful writing, save the target information; in response to failed writing, return an error result.

[0092] Specifically, if the user needs to modify the "Change IP Address" setting option under the "Network Configuration" menu, the system reads the new IP address entered by the user, for example, the new IP address is "192.168.1.100". The validity of the new IP address is verified, specifically to check whether the format of the IP address is correct, that is, whether it is four numbers between 0 and 255 separated by dots, and whether the new IP address conflicts with other devices. Next, the memory write interface is accessed, and the memory can be NVRAM. The system provides a write function interface for writing data to NVRAM. Secondly, the system constructs a write request, specifies the NVRAM area to be written as "Network Configuration", the option identifier is "IP Address", and the new option value is "192.168.1.100". The system calls the write function, sends the constructed write request to the underlying hardware of the system and waits for the write to be completed. After the write is completed, the write function returns a status code to indicate whether the write operation is successful.

[0093] In the above embodiment, after the system obtains the target information input by the user, it verifies the target information to ensure that it complies with the predetermined modification rules, thereby avoiding the negative impact that illegal or incorrect configuration may have on the system. Only after the target information passes the verification, the system will write the new setting value to the specified storage area through the memory write interface and return the write result to indicate whether the modification is successful, so as to ensure that the modified target information is recorded only when the modification is successful. If the modification fails, it can be considered that the modification operation has failed, and there is no need to record the modification changes, thereby reducing unnecessary data recording.

[0094] In one embodiment, obtaining structure information, determining naming information of the setting option according to the structure information, and saving the naming information includes:

[0095] Obtain a globally unique identifier of the structure through an interface; pass the globally unique identifier into a database query interface to obtain structure information matching the globally unique identifier, wherein the structure information includes naming information of at least one setting option and an offset corresponding to the naming information; obtain the offset of the setting option; traverse the structure information, and determine the naming information matching the offset of the setting option according to the offset of the setting option; and save the naming information to a buffer.

[0096] Specifically, if the setting option is "boot order", which is used to configure the boot order of the system, first obtain the GUID of the structure where the "boot order" is located. The allocation of this GUID has been completed during the BIOS development process. Call the query function through the HII database interface to access the information in the HII database, pass the obtained GUID into the query function, and you may also need to pass in other parameters, such as the version number, to obtain the structure information. Secondly, get the offset of the Setup setting option in the structure, and the determination of this offset has been completed during the BIOS development process. Traverse the structure information and check the offset of each field in the structure. When a field with the same offset as the Setup setting option to be found is matched, it can be determined that the naming information of the field is "boot order", then it is considered that the naming information corresponding to the Setup setting option has been found, and the naming information is saved to the buffer.

[0097] Among them, HII (Human Interface Infrastructure), the HII database is responsible for managing and storing resources related to the user interface, and storing metadata and configuration information related to the BIOS interface.

[0098] In the above embodiment, the naming information of the setup options is determined by the GUID and the offset, which can effectively improve the accuracy and efficiency of the system configuration management. The GUID ensures the uniqueness of each structure in the system, avoids naming conflicts and confusion, and accurately locates the corresponding Setup setup option naming information in the structure corresponding to the GUID through the offset of the Setup setup option, ensuring the accuracy of search and matching. This is also the key to determining the Setup setup options through the underlying function, which improves the security and accuracy of the modification of the Setup setup options.

[0099] In one embodiment, obtaining original information, target information, and naming information of the setting option, and saving the information to a log for query, includes:

[0100] The controller accesses the memory address where the flag bit is located in the shared memory according to a preset time interval, and reads the flag bit value; determines whether the controller reads the modification record data packet in the shared memory according to the flag bit value; in response to the flag bit value indicating that data is available, reads the modification record data packet in the shared memory; parses the modification record data packet in the shared memory to obtain the original information, target information, and naming information of the setting option; saves the original information, target information, and naming information of the setting option to the controller log; and clears the flag bit value.

[0101] Specifically, Figure 4 As shown, the BMC polls the flag address of the shared memory according to the preset time interval to read the current flag value. According to the preset relationship between the flag and the data status, if the read value is 1, it means that the BIOS has updated the shared memory data and the data is available. The BMC starts to read the data in the shared memory. If the read flag value is 0, the BMC continues to wait or perform other tasks until the data is available. The BMC parses the data packet according to the storage address of the Setup setting option data packet, obtains the original information, target information, and naming information of the Setup setting option, and saves the parsed information to the log for future query. After saving, the flag is cleared.

[0102] Among them, BMC (Baseboard Management Controller) is a special microcontroller embedded in the server motherboard, which is responsible for monitoring and managing the hardware status of the server. BMC has an independent processor and memory, and can be remotely managed through BMC even if the host system is shut down or fails.

[0103] In the above embodiment, the system periodically accesses the flag bit in the shared memory through the controller to detect the modification of the Setup setting options. When the flag bit indicates that there is new data, the controller reads the modification record data packet in the shared memory, parses the original information, target information and naming information of the setting options, and saves this information in the log for future query. Subsequently, the controller clears the flag bit to indicate that the current data has been processed. Through the mechanism of shared memory and flag bits, frequent polling and waste of resources are avoided, and the performance and reliability of the system are improved. Reporting the modification record to the log can provide an important basis for system maintenance and troubleshooting, and enhance the manageability of the system.

[0104] In one of the embodiments, the method further includes determining a flag bit according to the write position of the modification record data packet, setting the flag bit value, sending an interrupt signal to the controller, and the controller, in response to receiving the interrupt signal, accesses the memory address where the flag bit is located in the shared memory and reads the flag bit value.

[0105] Specifically, when information is modified in the shared memory, an interrupt signal is sent to the controller to notify it of new setting changes. After receiving the interrupt signal, the controller immediately executes the interrupt service routine, accesses the memory address where the flag is located in the shared memory, reads the flag value, parses the original information, target information and naming information of the setting option, saves the parsed information in the log for future query, and clears the flag after saving is completed.

[0106] In the above embodiment, the interrupt mechanism allows the system to respond immediately when a critical event occurs without the need for continuous polling by the controller. Polling the CPU requires constantly checking the device status, wasting a lot of processing power, while the interrupt mechanism only occupies CPU time when needed, avoiding unnecessary resource consumption, thereby improving the real-time performance and response speed of the system.

[0107] In one embodiment, before obtaining the original information, target information, and naming information of the setting option, the following steps are included:

[0108] Obtain the original information, target information, and naming information of the setting options in the buffer; check the shared memory status and call the driver interface to open the shared memory; write the original information, target information, and naming information of the setting options into the shared memory to generate a modification record data packet; determine a flag bit according to the write position of the modification record data packet, and set the flag bit value.

[0109] Specifically, the original information, target information, and naming information of the saved setting options are obtained from the buffer, the state of the shared memory is checked to ensure that it is not occupied or locked by other processes, the driver interface function of the shared memory is called, and the obtained information is written to the pre-allocated shared memory area to generate a modification record data packet. After the writing is completed, the flag position is determined, and the flag is set to a specific value through, for example, bit operation to indicate the availability of data. Specifically, the flag bit is 1 to indicate that the data is available, and the flag bit is 0 to indicate that the data is not available.

[0110] In the above embodiment, by extracting the original information, target information and naming information of the setting options from the buffer, checking the state of the shared memory, ensuring the integrity of the data, and avoiding data conflicts when multiple processes access. By calling the driver interface to open the shared memory, after writing the extracted information into the shared memory, a modification record data packet is generated, and a flag is set to indicate the availability of the data, ensuring real-time sharing of the data, and facilitating other processes to obtain information in a timely manner. The efficiency and accuracy of system configuration management are improved, and inter-process communication is realized by using shared memory, avoiding data copying in traditional methods, and the introduction of flags ensures the reliability of data synchronization.

[0111] It should be understood that although Figure 1-4The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-4 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0112] In one embodiment, Figure 5 As shown, a device for reporting setting option information is provided, comprising: a request receiving module 21, a first storage module 22, an information modification module 23, a second storage module 24, an information determination module 25, an information acquisition module 26 and an information recording module 27, wherein:

[0113] A request receiving module, used for, upon receiving a request to modify the information of a setting option, determining whether the modification operation is triggered by a user;

[0114] A first storage module, for saving original information of the setting options in response to a modification operation being triggered by a user;

[0115] The information modification module is used to update the original information of the setting options to the target information and return the update result;

[0116] A second storage module, configured to save the target information of the setting option in response to the update being successful;

[0117] An information determination module, used to determine a structure where the setting option is located according to the setting option, wherein the structure is used to store the setting option;

[0118] An information acquisition module, used to acquire structural information, determine the naming information of the setting option according to the structural information, and save the naming information;

[0119] The information recording module is used to obtain the original information, target information, and naming information of the setting option, and save the original information, target information, and naming information to a log for query.

[0120] In one embodiment, the information recording module 27 is used to obtain the original information, target information, and naming information of the setting option in the buffer;

[0121] Check the shared memory status and call the driver interface to open the shared memory;

[0122] Writing the setting option original information, target information, and naming information into the shared memory to generate a modification record data packet;

[0123] Determine a flag bit according to the write position of the modification record data packet, and set the flag bit value;

[0124] The controller accesses the memory address where the flag bit is located in the shared memory according to a preset time interval and reads the flag bit value;

[0125] Determine whether the controller reads the modification record data packet in the shared memory according to the flag value:

[0126] In response to the flag value indicating that data is available, reading the modification record data packet in the shared memory;

[0127] Parsing the modification record data packet in the shared memory to obtain original information, target information, and naming information of the setting option;

[0128] Saving the original information, target information, and naming information of the setting option to a controller log;

[0129] Clear the flag value.

[0130] For the specific definition of the reporting device for setting option information, please refer to the definition of the reporting method for setting option information in the above text, which will not be repeated here. Each module in the above-mentioned reporting device for setting option information can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0131] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for reporting setting option information is implemented.

[0132] Those skilled in the art will understand that Figure 6The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0133] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0134] In response to receiving a request to modify information of a setting option, determining whether the modification operation is triggered by a user;

[0135] In response to the modification operation being triggered by the user, the original information of the setting option is saved;

[0136] Update the original information of the setting options to the target information and return the updated result;

[0137] In response to the update being successful, saving the target information of the setting option;

[0138] Determine, according to the setting options, a structure in which the setting options are located, wherein the structure is used to store the setting options;

[0139] Acquire structural information, determine naming information of the setting option according to the structural information, and save the naming information;

[0140] The original information, target information, and naming information of the setting option are obtained, and the original information, target information, and naming information are saved in a log for query.

[0141] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0142] In response to receiving a request to modify information of a setting option, determining whether the modification operation is triggered by a user;

[0143] In response to the modification operation being triggered by the user, the original information of the setting option is saved;

[0144] Update the original information of the setting options to the target information and return the updated result;

[0145] In response to the update being successful, saving the target information of the setting option;

[0146] Determine, according to the setting options, a structure in which the setting options are located, wherein the structure is used to store the setting options;

[0147] Acquire structural information, determine naming information of the setting option according to the structural information, and save the naming information;

[0148] The original information, target information, and naming information of the setting option are obtained, and the original information, target information, and naming information are saved in a log for query.

[0149] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0150] In response to receiving a request to modify information of a setting option, determining whether the modification operation is triggered by a user;

[0151] In response to the modification operation being triggered by the user, the original information of the setting option is saved;

[0152] Update the original information of the setting options to the target information and return the updated result;

[0153] In response to the update being successful, saving the target information of the setting option;

[0154] Determine, according to the setting options, a structure in which the setting options are located, wherein the structure is used to store the setting options;

[0155] Acquire structural information, determine naming information of the setting option according to the structural information, and save the naming information;

[0156] The original information, target information, and naming information of the setting option are obtained, and the original information, target information, and naming information are saved in a log for query.

[0157] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0158] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0159] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for reporting setting option information, characterized in that: include: In response to receiving a request to modify information of a setting option, determining whether the modification operation is triggered by a user; In response to the modification operation being triggered by the user, the original information of the setting option is saved; Update the original information of the setting options to the target information and return the updated result; In response to the update being successful, saving the target information of the setting option; Determine, according to the setting options, a structure in which the setting options are located, wherein the structure is used to store the setting options; Acquire structural information, determine naming information of the setting option according to the structural information, and save the naming information; The original information, target information, and naming information of the setting option are obtained, and the original information, target information, and naming information are saved in a log for query.

2. The method according to claim 1, characterized in that The determining whether the modification operation is triggered by the user includes: Acquire a call stack of an information modification operation thread, wherein the call stack includes a plurality of stack frames; Traversing the stack frames starting from the top of the call stack to obtain calling function information in each stack frame; Forming a call chain according to the calling function information; Searching for functions related to user interaction and modification operations according to the call chain, determining whether the function related to user interaction is ranked before the modification operation function and whether the return value of the function related to user interaction is related to the modification operation: In response to the function related to user interaction being ranked before the modification operation function and the return value of the function related to user interaction being related to the modification operation, It is determined that the modification operation is triggered by the user; In response to the order of the function related to user interaction being after the order of the modification operation function and / or the return value of the function related to user interaction being irrelevant to the modification operation, It is determined that the modification operation is not triggered by the user.

3. The method according to claim 1, characterized in that The original information of the setting option is updated to the target information, and the update result is returned, including: Get the target information of the setting options entered by the user; Verify whether the target information complies with the modification rules: In response to the target information complying with the modification rule, accessing a memory write interface to write the target information into the memory; In response to the writing being successful, saving the target information; In response to a write failure, an error result is returned.

4. The method according to claim 1, characterized in that: The acquiring structure information, determining the naming information of the setting option according to the structure information, and saving the naming information includes: Obtain the globally unique identifier of the structure through the interface; The globally unique identifier is passed into a database query interface to obtain structure information matching the globally unique identifier, wherein the structure information includes naming information of at least one setting option and an offset corresponding to the naming information; Get the offset of the setting option; Traversing the structure information, and determining, according to the offset of the setting option, the naming information matching the offset of the setting option; The naming information is saved in a buffer.

5. The method according to claim 1, characterized in that The obtaining of original information, target information, and naming information of the setting option, and saving the information to a log for query, includes: The controller accesses the memory address where the flag bit is located in the shared memory according to a preset time interval and reads the flag bit value; Determine whether the controller reads the modification record data packet in the shared memory according to the flag value: In response to the flag value indicating that data is available, reading the modification record data packet in the shared memory; Parsing the modification record data packet in the shared memory to obtain original information, target information, and naming information of the setting option; Saving the original information, target information, and naming information of the setting option to a controller log; Clear the flag value.

6. The method according to claim 5, characterized in that Before obtaining the original information, target information, and naming information of the setting option, the following steps are included: Obtaining the original information, target information, and naming information of the setting options in the buffer; Check the shared memory status and call the driver interface to open the shared memory; Writing the setting option original information, target information, and naming information into the shared memory to generate a modification record data packet; A flag is determined according to the write position of the modification record data packet, and the flag value is set.

7. The method according to claim 2, characterized in that The method further comprises: In response to a modification operation not triggered by a user, the original information of the setting option is updated to the target information, and an update result is returned; In response to the update being successful, saving the target information of the setting option; Determine the structure where the setting option is located according to the setting option; Acquire structural information, determine naming information of the setting option according to the structural information, and save the naming information; The target information and the naming information of the setting option are obtained, and the target information and the naming information are saved in a log for query.

8. A device for reporting setting option information, characterized in that: The device comprises: A request receiving module, used for, upon receiving a request to modify the information of a setting option, determining whether the modification operation is triggered by a user; A first storage module, for saving original information of the setting options in response to a modification operation being triggered by a user; The information modification module is used to update the original information of the setting options to the target information and return the update result; A second storage module, configured to save the target information of the setting option in response to the update being successful; An information determination module, used to determine a structure where the setting option is located according to the setting option, wherein the structure is used to store the setting option; An information acquisition module, used to acquire structural information, determine the naming information of the setting option according to the structural information, and save the naming information; The information recording module is used to obtain the original information, target information, and naming information of the setting option, and save the original information, target information, and naming information to a log for query.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Variable access management method and device, computer equipment and storage medium

    CN116910744A

  • Menu option modification method and device, BIOS system, equipment and storage medium

    CN117311844A

  • Method and device for setting Setup option of BIOS (Basic Input / Output System) under operating system

    CN117785300A

  • Configuration option management method and device, equipment and storage medium

    CN119292680A

  • Information processor, log storage method, and program

    JP2010170325A

Cited By

  • Configuration modification method of access control service, server and computer program product

    CN120832689A