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

CN119938155BActive Publication Date: 2026-10-09INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

当用户在服务器应用或者调试时,经常会通过带内方式和带外方式修改Setup选项值,但是可能不会在应用或者调试完成后将Setup选项值恢复到使用前的原始值,由于现有技术不能支持将带内方式或带外方式的修改情况均进行上报,这样就导致其他使用者无法获悉通过两种修改方式对Setup选项值进行修改的修改记录,以致修改操作对后续使用造成影响时不能及时了解修改详情,导致不能及时定位错误原因

Benefits of technology

[0048] The aforementioned method, apparatus, computer device, and storage medium for reporting setting option information, upon receiving a setting option modification request, first determine whether the modification operation was triggered by the user, ensuring that only user-initiated changes are recorded. If user-triggered, the original information of the setting option is saved for later comparison with the modified target information. Subsequently, the original information of the setting option is updated to the user-specified target information, and the update result is returned. If the update is successful, the system saves the target information of the setting option. Next, the system determines the structure containing the setting option, which stores the relevant setting option. 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 them to the log for future querying of modification records. This method ensures the transparency and traceability of setting modifications, making it easy for users to understand the status of setting option modifications and facilitating the identification of problem causes through modification records.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938155B_ABST
    Figure CN119938155B_ABST
Patent Text Reader

Abstract

The application 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 receiving an information modification request of a setting option, judging whether a modification operation is triggered by a user; in response to the modification operation being triggered by the user, saving original information of the setting option; updating the original information of the setting option into target information, and returning an update result; in response to the update being successful, saving the target information of the setting option; determining a structure body where the setting option is located according to the setting option; obtaining structure body information, determining naming information of the setting option according to the structure body information, and saving the naming information; obtaining the original information, the target information and the naming information of the setting option, and saving the original information, the target information and the naming information into a log for query. The method can obtain a setting option modification record, so as to help finding a problem cause through the modification record.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information reporting technology, and in particular to a method, apparatus, computer device, and storage medium for reporting setting option information. Background Technology

[0002] The Setup menu is a menu within the computer's Basic Input / Output System (BIOS) that contains settings options for configuring the computer's hardware and system settings. Through the BIOS Setup options, users can modify configurations such as the boot order to optimize computer performance. Currently, users primarily modify Setup options in two ways: in-band and out-of-band. When users are applying or debugging on servers, they often modify Setup option values ​​using both in-band and out-of-band methods. However, they may not restore the Setup option values ​​to their original values ​​after the application or debugging is complete. Because current technology cannot support reporting both in-band and out-of-band modifications, other users are unaware of the modification records made using either method. This makes it difficult to promptly understand the modification details when the modification affects subsequent use, hindering timely error identification. Summary of the Invention

[0003] Therefore, it is necessary to provide a method, apparatus, computer device, and storage medium for reporting setting option information that can obtain setting option modification records in order to help find the cause of the problem through modification records, in order to address the above-mentioned 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 settings options, determine whether the modification operation was triggered by the user;

[0006] If the modification is triggered by the user, the original information of the setting options is saved;

[0007] Update the original information of the settings options to the target information and return the update result;

[0008] If the update is successful, the target information of the settings options is saved;

[0009] The structure in which the setting option is located is determined based on the setting option, wherein the structure is used to store the setting option;

[0010] Obtain the structure information, determine the naming information of the setting option based on the structure information, and save the naming information;

[0011] 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 future reference.

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

[0013] The process involves: obtaining the call stack of the thread performing the modification operation, which includes multiple stack frames; traversing the stack frames starting from the top to obtain the function call information in each stack frame; forming a call chain based on the function call information; and searching for user-interaction-related functions and modification operation functions based on the call chain. The process then determines whether the user-interaction-related functions are ordered before the modification operation functions and whether the return values ​​of the user-interaction-related functions are related to the modification operation. If the user-interaction-related functions are ordered before the modification operation functions and their return values ​​are related to the modification operation, the modification operation is determined to be user-triggered. If the user-interaction-related functions are ordered after the modification operation functions and / or their return values ​​are unrelated to the modification operation, the modification operation is determined to be non-user-triggered.

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

[0015] Obtain the target information of the user-input settings; verify whether the target information conforms to the modification rules; if the target information conforms to the modification rules, access the memory write interface and write the target information to the memory; if the write is successful, save the target information; if the write fails, return an error result.

[0016] In one embodiment, the process includes obtaining structure information, determining the naming information for the setting options based on the structure information, and saving the naming information, including:

[0017] Obtain the globally unique identifier of the structure through the interface; pass the globally unique identifier to the database query interface to obtain the structure information that matches the globally unique identifier, where the structure information includes the naming information of at least one setting option and the 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 based on the offset of the setting option; save the naming information to the buffer.

[0018] In one embodiment, the original information, target information, and naming information of the setting options are obtained, and the information is saved to a log for later querying, including:

[0019] The controller accesses the memory address where the flag bit is located in the shared memory at preset time intervals and reads the flag bit value; it determines whether the controller should read the modification record data packet in the shared memory based on the flag bit value: if the flag bit value indicates that the data is available, it reads the modification record data packet in the shared memory; it parses the modification record data packet in the shared memory to obtain the original information, target information, and naming information of the setting option; it saves the original information, target information, and naming information of the setting option to the controller log; and it clears the flag bit value.

[0020] In one embodiment, before obtaining the original information, target information, and naming information of the setting options, the process includes:

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

[0022] In one embodiment, it further includes:

[0023] In response to a modification operation not triggered by the user, update the original information of the setting option to the target information and return the update result; in response to a successful update, save the target information of the setting option; determine the structure in which the setting option is located based on the setting option; obtain the structure information, determine the naming information of the setting option based on the structure information, and save the naming information; obtain the target information and naming information of the setting option, and save the target information and naming information to the log for querying.

[0024] On the other hand, a device for reporting setting option information is provided, the device comprising:

[0025] The request receiving module is used to respond to received requests to modify settings options and determine whether the modification operation was triggered by the user.

[0026] The first storage module is used to save the original information of the setting options in response to a modification operation triggered by the 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] The second storage module is used to save the target information of the setting options in response to a successful update;

[0029] The information determination module is used to determine the structure where the setting options are located based on the setting options, where the structure is used to store the setting options;

[0030] The information acquisition module is used to acquire structure information, determine the naming information of the setting options based on 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 querying.

[0032] In another aspect, 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 executes the computer program to perform the following steps:

[0033] In response to receiving a request to modify settings options, determine whether the modification operation was triggered by the user;

[0034] If the modification is triggered by the user, the original information of the setting options is saved;

[0035] Update the original information of the settings options to the target information and return the update result;

[0036] If the update is successful, the target information of the settings options is saved;

[0037] The structure in which the setting option is located is determined based on the setting option, wherein the structure is used to store the setting option;

[0038] Obtain the structure information, determine the naming information of the setting option based on the structure information, and save the naming information;

[0039] 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 future reference.

[0040] In another aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0041] In response to receiving a request to modify settings options, determine whether the modification operation was triggered by the user;

[0042] If the modification is triggered by the user, the original information of the setting options is saved;

[0043] Update the original information of the settings options to the target information and return the update result;

[0044] If the update is successful, the target information of the settings options is saved;

[0045] The structure in which the setting option is located is determined based on the setting option, wherein the structure is used to store the setting option;

[0046] Obtain the structure information, determine the naming information of the setting option based on the structure information, and save the naming information;

[0047] 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 future reference.

[0048] The aforementioned method, apparatus, computer device, and storage medium for reporting setting option information, upon receiving a setting option modification request, first determine whether the modification operation was triggered by the user, ensuring that only user-initiated changes are recorded. If user-triggered, the original information of the setting option is saved for later comparison with the modified target information. Subsequently, the original information of the setting option is updated to the user-specified target information, and the update result is returned. If the update is successful, the system saves the target information of the setting option. Next, the system determines the structure containing the setting option, which stores the relevant setting option. 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 them to the log for future querying of modification records. This method ensures the transparency and traceability of setting modifications, making it easy for users to understand the status of setting option modifications and facilitating the identification of problem causes through modification records. Attached Figure Description

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

[0050] Figure 2 This is a flowchart illustrating a method for reporting option information in one embodiment;

[0051] Figure 3 This is a flowchart illustrating the reporting steps for setting option information in one embodiment;

[0052] Figure 4 This is a flowchart illustrating a method for reporting option information in another embodiment;

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

[0054] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0056] The method for reporting setting option information provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices, and server 104 can be a standalone server or a server cluster consisting of multiple servers.

[0057] In one embodiment, such as Figure 2 As shown, a method for reporting setting option information is provided, which can be applied to... Figure 1 Taking the server-side as an example, the explanation includes the following steps:

[0058] Step 201: In response to receiving a request to modify the settings options, determine whether the modification operation was triggered by the user.

[0059] The settings options are included in the system's setup menu. Users can use these options to modify the computer's boot order, hardware device settings, system time and date settings, hard drive drive mode, enable or disable specific device interfaces, and adjust the processor's operating frequency and voltage.

[0060] Modification of settings options typically includes in-band and out-of-band modifications. In-band modification involves accessing the HII (Human Interface Infrastructure) interface within the BIOS (Basic Input / Output System) during startup by pressing Delete or other hotkeys, directly locating the Setup option, modifying its value, or exporting the Setup option using system tools, modifying the value as needed, and then updating it back to memory. The system retrieves the updated Setup option value from memory upon restart. Out-of-band modification involves the controller reporting the Setup menu and current settings list to the BIOS during startup. The user modifies the settings in the obtained Setup menu, which is then transmitted to the BIOS via the processor. Upon the next startup, the BIOS checks if any Setup options from the processor require modification; if so, it updates the necessary Setup option values ​​to memory and applies the changes.

[0061] Specifically, by adding a hook function before the underlying function that modifies the Setup settings options, it can determine whether the modification operation is triggered by the user, and select different processing flows based on whether the modification operation is triggered by the user.

[0062] A hook function is a programming technique that allows developers to insert custom code during program execution when specific events occur, thereby extending or modifying the program's behavior. By setting hook functions at key points in the program, developers can achieve control over program flow and enhance functionality without changing the original code.

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

[0064] Specifically, determining that the modification operation was triggered by the user indicates that the operation was not caused by system updates or other reasons for the change in option values. To facilitate understanding of the changes in option values ​​caused by human modification operations, the original information of the options set before the modification is saved.

[0065] Specifically, the raw information can be saved to a buffer (a region in computer memory used to temporarily store data for processing or transmission when needed).

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

[0067] Specifically, the NVRAM write function writes the target information specified by the user to modify the original information and returns a result indicating whether the write was successful or failed.

[0068] NVRAM (Non-Volatile Random Access Memory) combines the advantages of random access (fast reading and writing of data at any location) and non-volatility (data is not lost after power failure). It is used to retain stored data even after power is off. NVRAM is commonly used in various computer systems, including servers, network devices, and embedded systems. It is typically used to store important system configuration settings, such as the BIOS Setup menu, boot parameters, and device configurations. NVRAM can retain these settings after power failure or system restart, ensuring the system can continue operating with the correct settings. NVRAM stores the default values ​​(original information) and current values ​​(target information) of Setup options. Each time the system boots, the BIOS retrieves the current values ​​of the Setup options from NVRAM and uses these values ​​to initialize the CPU, memory, PCIe (Peripheral Component Interconnect Express) devices, load various device drivers, initialize the BIOS, initialize the boot device boot entries, and provide keyboard and mouse input and display boot information to the user. The user can then select the boot device using the keyboard and mouse.

[0069] Step 204: In response to a successful update, save the target information of the settings options.

[0070] Specifically, the success or failure result of the modification returned by NVRAM is read through the hook function. When the modification result is successful, the target information of the modified settings is saved.

[0071] Specifically, the target information can be saved to the buffer.

[0072] Step 205: Determine the structure in which the setting options are located based on the setting options, wherein the structure is used to store the setting options.

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

[0074] Specifically, by consulting the BIOS source code or related documentation, you can find the section that defines the modified setting option. The setting option is defined in a certain structure, and its name and location are described in the code or documentation, thus determining the structure where the modified setting option is located.

[0075] Step 206: Obtain structure information, determine the naming information of the setting option based on the structure information, and save 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 based on the GUID and the offset.

[0077] Among them, GUID (Globally Unique Identifier) ​​is a 128-bit binary numeric identifier generated by an algorithm. It is usually assigned to a specific structure during BIOS development and is used to uniquely identify that structure.

[0078] Offset represents the distance from the beginning of the structure to a specific setting option. Each option has a specific offset in the structure to mark the position 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 by the offset, which ensures accurate location of the user-modified setting option and the display of the name and description of the setting option in the BIOS interface.

[0080] Specifically, naming information can be saved to a buffer.

[0081] Step 207: 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 querying.

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

[0083] The BMC (Baseboard Management Controller) is a dedicated microcontroller embedded on the server motherboard, responsible for monitoring and managing the server's hardware status. It operates independently of the host system, and can still provide remote management capabilities even if the server is shut down or the operating system crashes.

[0084] In the above-described method for reporting setting option information, upon receiving a setting option modification request, the system first determines whether the modification operation was triggered by the user, ensuring that only user-initiated changes are recorded. If user-triggered, the original information of the setting option is saved for later comparison with the modified target information. Subsequently, the original information of the setting option is updated to the user-specified target information, and the update result is returned. If the update is successful, the system saves the target information of the setting option. Next, the system determines the structure containing the setting option, which stores 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 them to the log for future querying of modification records. This method ensures the transparency and traceability of setting modifications, making it easy for users to understand the status of setting option modifications and facilitating the identification of problems through modification records.

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

[0086] The system retrieves the call stack of the thread modifying the information, where the call stack includes multiple stack frames. Starting from the top of the call stack, it traverses the stack frames to obtain the function call information in each stack frame. A call chain is formed based on the function call information. The system then searches for user interaction-related functions and modification operation functions based on the call chain, determining whether the user interaction-related functions are ordered before the modification operation functions and whether the return value of the user interaction-related functions is related to the modification operation. If the user interaction-related functions are ordered before the modification operation functions and the return value of the user interaction-related functions is related to the modification operation, then the modification operation is determined to be user-triggered, and the original information of the setting options is saved. If the user interaction-related functions are ordered after the modification operation functions and / or the return value of the user interaction-related functions is unrelated to the modification operation, then the modification operation is determined to be non-user-triggered, and no original information needs to be saved.

[0087] Specifically, such as Figure 3As shown, if a user's modification of Setup settings involves a main function, an event handler function, and a settings modification function, clicking a settings option will trigger all three functions. By hooking the call stack of the current modification operation thread, the information of the function that triggered the modification operation can be obtained. Traversing the stack from its beginning, since the call stack is pushed and popped according to the order of function calls, the order of the stack frames reflects the order of function calls. First, the settings modification function is reached; this function is where the settings are changed, but it doesn't directly interact with the user. Next, the event handler function is reached; this function handles the user's click event. By traversing the call stack, the functions in the call chain can be identified as: main function → event handler function → settings modification function. In the call chain, the event handler function related to user interaction is called before the settings modification function, and the return value of the settings modification function indicates the success or failure of the modification operation, affecting the subsequent user interface update behavior of the event handler function. Therefore, it can be reasonably inferred that the current settings option modification was triggered by the user's click behavior. At this time, it is necessary to save the original information of the settings option so as to understand the specific modification situation later.

[0088] Specifically, if by traversing the call stack, it is found that the settings modification function is called from the background check function rather than from the event handling function, it indicates that the call to the settings modification function is triggered by the background process, not by the user's click event. Furthermore, the background check function does not update the user interface or display any feedback based on the return value of the settings modification function. Since the background check function is the settings modification function called independently of user interaction, it can be reasonably inferred that the current settings option modification operation is not triggered by the user's click behavior. In this case, there is no need to save the original information of the settings options.

[0089] In the above embodiment, by introducing a hook function into 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 to form a call chain. Then, it analyzes the call order of each function in the call chain, paying particular attention to whether functions related to user interaction are called before the modification operation function, and whether their return values ​​are related to the modification operation. If these conditions are met, it can be determined that the modification operation was directly triggered by the user. If the relevant function is not called before the modification operation function or its return value is unrelated to the modification operation, it can be determined that the modification operation was not directly triggered by the user. This method ensures that only user-initiated settings modifications are recorded, avoiding misjudgments caused by automatic modifications within the system or other non-user operations, improving the accuracy of log recording, reducing unnecessary data recording, and avoiding storage waste caused by too many irrelevant logs.

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

[0091] Obtain the target information of the setting options input by the user; verify whether the target information conforms to the modification rules; in response to the target information conforming to the modification rules, access the memory write interface and write the target information into the memory; in response to successful writing, save the target information; in response to writing failure, return an error result.

[0092] Specifically, if a user needs to modify the "Change IP Address" setting under the "Network Configuration" menu, the system reads the new IP address entered by the user, for example, "192.168.1.100". It then verifies the validity of the new IP address, specifically checking if the IP address format is correct (i.e., whether it consists of four numbers between 0 and 255 separated by dots) and whether the new IP address conflicts with other devices. Next, it accesses the memory write interface, which can be NVRAM. The system provides a write function interface for writing data to NVRAM. Then, the system constructs a write request, specifying the NVRAM region to be written to as "Network Configuration", the option identifier as "IP Address", and the new option value as "192.168.1.100". The system calls the write function, sending the constructed write request to the underlying system hardware and waiting for the write to complete. After the write is complete, the write function returns a status code indicating whether the write operation was successful.

[0093] In the above embodiments, after the system obtains the target information input by the user, it verifies the target information to ensure that it conforms to the predetermined modification rules, thereby avoiding the negative impact that illegal or incorrect configurations may have on the system. Only after the target information passes the verification will the system write the new setting value to the specified storage area through the memory write interface and return the writing result to indicate whether the modification was successful. This ensures 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, thus reducing unnecessary data recording.

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

[0095] Obtain the globally unique identifier of the structure through the interface; pass the globally unique identifier to the database query interface to obtain the structure information that matches the globally unique identifier, wherein the structure information includes the naming information of at least one setting option and the 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 based on the offset of the setting option; save the naming information to the buffer.

[0096] Specifically, if the setting option is "Boot Order," used to configure the system's boot order, the GUID of the structure containing "Boot Order" is first obtained. This GUID allocation was completed during BIOS development. A query function is called through the HII database interface to access information in the HII database. The obtained GUID is passed to the query function, and other parameters, such as the version number, may also be required to obtain structure information. Next, the offset of the Setup setting option within the structure is obtained. This offset determination was also completed during BIOS development. The structure information is traversed, checking the offset of each field. When a field with the same offset as the Setup setting option is found, its naming information is determined to be "Boot Order." Therefore, the naming information corresponding to the Setup setting option has been found, and this information is saved to a buffer.

[0097] Among them, HII (Human Interface Infrastructure) 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 embodiments, determining the naming information of setting options using GUIDs and offsets effectively improves the accuracy and efficiency of system configuration management. GUIDs ensure the uniqueness of each structure within the system, avoiding naming conflicts and confusion. The offset of the Setup setting option precisely locates the corresponding Setup setting option naming information within the structure corresponding to the GUID, ensuring accurate lookup and matching. This is also key to determining Setup setting options through underlying functions, enhancing the security and accuracy of Setup setting option modifications.

[0099] In one embodiment, the original information, target information, and naming information of the setting options are obtained, and the information is saved to a log for later querying, including:

[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; it determines whether the controller should read the modification record data packet in the shared memory based on the flag bit value: if the flag bit value indicates that the data is available, it reads the modification record data packet in the shared memory; it parses the modification record data packet in the shared memory to obtain the original information, target information, and naming information of the setting option; it saves the original information, target information, and naming information of the setting option to the controller log; and it clears the flag bit value.

[0101] Specifically, such as Figure 4 As shown, the BMC polls the shared memory flag address at preset time intervals to read the current flag value. Based on the preset relationship between the flag and data status, if the read value is 1, it indicates that the BIOS has updated the shared memory data and the data is available; the BMC then begins reading the data from the shared memory. If the read flag value is 0, the BMC continues to wait or execute other tasks until the data is available. The BMC parses the data packet according to the storage address of the Setup option data packet, obtaining the original information, target information, and naming information of the Setup option. The parsed information is saved to the log for future reference. After saving, the flag is cleared.

[0102] The BMC (Baseboard Management Controller) is a dedicated microcontroller embedded on the server motherboard, responsible for monitoring and managing the server's hardware status. The BMC has its own processor and memory, allowing for remote management even when the host system is shut down or malfunctions.

[0103] In the above embodiment, the system periodically accesses a flag in shared memory via the controller to detect modifications to Setup settings options. When the flag indicates new data, the controller reads the modification record data packet from shared memory, parses out the original, target, and naming information of the settings option, and saves this information to a log for future retrieval. Subsequently, the controller clears the flag, indicating that the current data has been processed. This shared memory and flag mechanism avoids frequent polling and resource waste, improving system performance and reliability. Reporting modification records to the log provides important information for system maintenance and troubleshooting, enhancing system manageability.

[0104] In one embodiment, the method further includes determining a flag bit based on the write position of the modified record data packet, setting the flag bit value, sending an interrupt signal to the controller, and the controller responding to receiving the interrupt signal by accessing the memory address where the flag bit is located in the shared memory and reading the flag bit value.

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

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

[0107] In one embodiment, before obtaining the original information, target information, and naming information of the setting options, the process includes:

[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 the flag bit according to the writing position of the modification record data packet and set the flag bit value.

[0109] Specifically, the process retrieves the original, target, and naming information of the saved settings options from the buffer. It then checks the shared memory's status to ensure it's not occupied or locked by other processes. The shared memory driver interface function is called to write the retrieved information to a pre-allocated shared memory area, generating a modification record data packet. After writing, the flag position is determined, and the flag is set to a specific value using bit manipulation to indicate data availability. Specifically, a flag of 1 indicates data availability, while a flag of 0 indicates no data availability.

[0110] In the above embodiments, by extracting the original, target, and naming information of the setting options from the buffer, and checking the status of shared memory, data integrity is ensured, and data conflicts during multi-process access are avoided. The shared memory is opened by calling the driver interface, and after the extracted information is written to the shared memory, a modification record data packet is generated. A flag is set to indicate data availability, ensuring real-time data sharing and facilitating timely information retrieval by other processes. This improves the efficiency and accuracy of system configuration management, utilizes shared memory for inter-process communication, avoids data copying in traditional methods, and the introduction of flags ensures reliable data synchronization.

[0111] It should be understood that, although Figure 1-4The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1-4 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed 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 some of the sub-steps or stages of other steps.

[0112] In one embodiment, such as Figure 5 As shown, a device for reporting setting option information is provided, including: 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] The request receiving module is used to respond to received requests to modify settings options and determine whether the modification operation was triggered by the user.

[0114] The first storage module is used to save the original information of the setting options in response to a modification operation triggered by the 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] The second storage module is used to save the target information of the setting options in response to a successful update;

[0117] An information determination module is used to determine the structure in which the setting option is located based on the setting option, wherein the structure is used to store the setting option;

[0118] An information acquisition module is used to acquire structure information, determine the naming information of the setting option based on the structure 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 options, and save the original information, target information, and naming information to the log for querying.

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

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

[0122] The original information, target information, and naming information of the setting options are written into the shared memory to generate a modification record data packet;

[0123] The flag bit is determined based on the write position of the modified record data packet, and the flag bit value is set.

[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] The controller determines whether to read the modification record data packet in the shared memory based on the flag value.

[0126] If the flag value indicates that data is available, then the modification record data packet in the shared memory is read;

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

[0128] Save the original information, target information, and naming information of the settings options to the controller log;

[0129] Clear the flag value.

[0130] Specific limitations regarding the device for reporting setting option information can be found in the limitations on the method for reporting setting option information above, and will not be repeated here. Each module in the aforementioned device for reporting setting option information can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0131] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a method for reporting setting option information.

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

[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 executes the computer program to perform the following steps:

[0134] In response to receiving a request to modify settings options, determine whether the modification operation was triggered by the user;

[0135] If the modification is triggered by the user, the original information of the setting options is saved;

[0136] Update the original information of the settings options to the target information and return the update result;

[0137] If the update is successful, the target information of the settings options is saved;

[0138] The structure in which the setting option is located is determined based on the setting option, wherein the structure is used to store the setting option;

[0139] Obtain the structure information, determine the naming information of the setting option based on the structure information, and save the naming information;

[0140] 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 future reference.

[0141] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0142] In response to receiving a request to modify settings options, determine whether the modification operation was triggered by the user;

[0143] If the modification is triggered by the user, the original information of the setting options is saved;

[0144] Update the original information of the settings options to the target information and return the update result;

[0145] If the update is successful, the target information of the settings options is saved;

[0146] The structure in which the setting option is located is determined based on the setting option, wherein the structure is used to store the setting option;

[0147] Obtain the structure information, determine the naming information of the setting option based on the structure information, and save the naming information;

[0148] 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 future reference.

[0149] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0150] In response to receiving a request to modify settings options, determine whether the modification operation was triggered by the user;

[0151] If the modification is triggered by the user, the original information of the setting options is saved;

[0152] Update the original information of the settings options to the target information and return the update result;

[0153] If the update is successful, the target information of the settings options is saved;

[0154] The structure in which the setting option is located is determined based on the setting option, wherein the structure is used to store the setting option;

[0155] Obtain the structure information, determine the naming information of the setting option based on the structure information, and save the naming information;

[0156] 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 future reference.

[0157] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, 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. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0158] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for reporting setting option information, characterized in that, include: In response to receiving a request to modify settings options, determine whether the modification operation was triggered by the user; If the modification is triggered by the user, the original information of the setting options is saved; Update the original information of the settings options to the target information and return the update result; If the update is successful, the target information of the settings options is saved; The structure in which the setting option is located is determined based on the setting option, wherein the structure is used to store the setting option; Obtain the structure information, determine the naming information of the setting option based on the structure information, and save the naming information; 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 future reference. The determination of whether the modification operation was triggered by the user includes: The call stack of the information acquisition and modification operation thread is obtained, wherein the call stack includes multiple stack frames; Starting from the top of the call stack, traverse the stack frames to obtain the function call information in each stack frame; A call chain is formed based on the called function information; Based on the call chain, locate the functions related to user interaction and the modification operation functions, and determine whether the order of the functions related to user interaction is before the order of the modification operation functions, and whether the return value of the functions related to user interaction is related to the modification operation: In response to the fact that the user interaction-related functions are ordered before the modification operation functions, and the return values ​​of the user interaction-related functions are related to the modification operation, Then it is determined that the modification operation was triggered by the user.

2. The method according to claim 1, characterized in that, The determination of whether the modification operation was triggered by the user includes: In response to the user interaction-related functions being ordered after the modification operation functions and / or the return values ​​of the user interaction-related functions being unrelated to the modification operation, Then it is determined that the modification operation was not triggered by the user.

3. The method according to claim 1, characterized in that, The process of updating the original information of the setting options to the target information and returning the update result includes: Obtain target information for the user-inputted settings options; Verify whether the target information conforms to the modification rules: If the target information conforms to the modification rules, the memory write interface is accessed to write the target information into the memory; If the write operation is successful, the target information is saved. If the write fails, an error result is returned.

4. The method according to claim 1, characterized in that, The process of obtaining structure information, determining the naming information of the setting options based on 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 to the database query interface to obtain the structure information that matches the globally unique identifier. The structure information includes the naming information of at least one setting option and the 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 based on the offset of the setting option; Save the naming information to the buffer.

5. The method according to claim 1, characterized in that, The process of obtaining the original information, target information, and naming information of the setting options, and saving the information to a log for future querying, 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; The controller determines whether to read the modification record data packet in the shared memory based on the flag value. If the flag value indicates that data is available, then the modification record data packet in the shared memory is read; Parse the modification record data packet in the shared memory to obtain the original information, target information, and naming information of the setting options; Save the original information, target information, and naming information of the settings options to the 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 options, the process includes: Retrieve the original, target, and naming information of the setting options from the buffer; Check the shared memory status and call the driver interface to open the shared memory; The original information, target information, and naming information of the setting options are written into the shared memory to generate a modification record data packet; The flag bit is determined based on the write position of the modified record data packet, and the flag bit value is set.

7. The method according to claim 2, characterized in that, The method further includes: In response to a modification operation not triggered by the user, update the original information of the setting option to the target information and return the update result; If the update is successful, the target information of the settings options is saved; Determine the structure in which the setting options are located based on the setting options; Obtain the structure information, determine the naming information of the setting option based on the structure information, and save the naming information; Obtain the target information and naming information of the setting options, and save the target information and naming information to the log for future reference.

8. A device for reporting setting option information, characterized in that, The device includes: A request receiving module is used to, upon receiving a request to modify setting options, determine whether the modification operation is triggered by the user. The determination of whether the modification operation is triggered by the user includes: obtaining the call stack of the information modification operation thread, wherein the call stack includes multiple stack frames; traversing the stack frames starting from the top of the call stack to obtain the call function information in each stack frame; forming a call chain based on the call function information; searching for functions related to user interaction and modification operation functions based on the call chain; and determining whether the order of the functions related to user interaction is before the order of the modification operation functions and whether the return value of the functions related to user interaction is related to the modification operation. If 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, then it is determined that the modification operation is triggered by the user. The first storage module is used to save the original information of the setting options in response to a modification operation triggered by the 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; The second storage module is used to save the target information of the setting options in response to a successful update; An information determination module is used to determine the structure in which the setting option is located based on the setting option, wherein the structure is used to store the setting option; An information acquisition module is used to acquire structure information, determine the naming information of the setting option based on the structure 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 options, and save the original information, target information, and naming information to the log for querying.

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, it implements the steps of the method according to any one of claims 1 to 7.

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

Citation Information

Patent Citations

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

    CN117785300A

  • Information processor, log storage method, and program

    JP2010170325A