A method, device and equipment for managing device information of electronic equipment
By managing the setting information and asset information of electronic devices in the shared memory area, it solves the long time problem caused by BIOS startup relying on BMC initialization, and ensures the management reliability of asset information and BIOS options when BMC is abnormal, achieving faster Device startup and management.
Patent Information
- Application Number
- CN202210619516.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-30
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-05-30
AI Technical Summary
In existing server management technology, the versions of BIOS and BMC are strongly coupled, resulting in a long device startup time and the inability to query asset information and manage BIOS options when the BMC is abnormal.
By obtaining and updating the setting information and asset information of the electronic device in the shared memory area, the shared memory area is used for data interaction, independent of the virtual USB device and HTTPs service, allowing the BIOS to work normally when BMC UBOOT is started, and monitor the setting information. Change operations.
The BIOS startup time is shortened from 50 seconds to less than 2 seconds, reducing the entire machine startup time by 25%, and solving the problem of asset information query and BIOS option management failure caused by BMC abnormalities.
Smart Images

Figure CN114968386B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device and equipment for managing device information of electronic equipment. Background Art
[0002] Server management usually uses BMC (Baseboard Management Controller) to query and manage server hardware. For example, users can view the server's hardware information such as CPU, memory, network card, GPU and hard disk through BMC, and can also change the Setup options of BIOS (Basic Input and Output System) through BMC. These server configurations can be exposed through the BMC's RESTful (Representational State Transfer, a design style and development method for network applications) API interface. Users can easily query and modify data through URLs, and data transmission is based on JSON (JavaScript Object Notation) language.
[0003] At present, the asset information and the current BIOS SETUP option value are sent to the BMC mainly through the IPMI (Intelligent Platform Management Interface) command when the BIOS is turned on. The BMC packages the asset information into JSON format for user query, and converts the option value sent by the BIOS into JSON format and exposes it to the RESTful interface. Or, when the BIOS is turned on, the asset information and the current BIOS SETUP option value are sent to the BMC through LAN OVERUSB, and the BMC exposes it to the RESTful API interface for user use. Therefore, the IPMI command interaction between the BIOS and the BMC must be fully defined in advance. Any newly added devices and BIOS options need to be re-implemented by the BIOS and the BMC. In addition, the versions of the BIOS and the BMC are strongly coupled, and the wrong version combination will result in unpredictable results. And the BIOS needs to wait for the BMC to be fully started before it can start and interact. In addition, for the occasional BMC exception, the BMC will not be able to query the asset information and manage the BIOS option function the next time it is turned on. Summary of the invention
[0004] Embodiments of the present invention provide a method, apparatus and device for managing device information of an electronic device.
[0005] According to a first aspect of the present invention, there is provided a device information management method for an electronic device, which is applied to a main control unit of the electronic device, and the method comprises: obtaining setting information of the electronic device from a shared memory area, the shared memory area being configured in a baseboard management control unit of the electronic device, and the shared memory area being accessible by the main control unit and the baseboard management control unit; initializing the electronic device according to the setting information, obtaining asset information and current setting information of the electronic device; and updating the asset information and current setting information of the electronic device to the shared memory area in a setting file format.
[0006] According to one embodiment of the present invention, obtaining the setting information of the electronic device from a shared memory area includes: reading first setting field information of the shared memory area; when the first setting field information is valid, reading second setting field information of the shared memory area, the second field information being used to represent the setting information and asset information of the electronic device.
[0007] According to one embodiment of the present invention, the electronic device is initialized according to the setting information to obtain the asset information and the current setting information of the electronic device, including: determining whether the setting information includes a setting information change request issued by the baseboard management control unit to obtain a change determination result; if the change determination result shows that the setting information of the electronic device has changed, restarting the first system of the electronic device based on the changed setting information, the first system being used to guide the startup of the operating system of the electronic device; if the change determination result shows that the setting information of the electronic device has not changed, initializing the electronic device to obtain the asset information and the current setting information of the electronic device.
[0008] According to one embodiment of the present invention, updating the electronic device asset information and the current setting information to the shared memory area in a set file format includes: converting the electronic device asset information and the current setting information into a first file in JSON format; and writing the first file into the shared memory area.
[0009] According to one embodiment of the present invention, the method further includes: upon completing the collection of the asset information and current setting information of the electronic device, sending a collection completion instruction to the baseboard management control unit, wherein the collection completion instruction is used to indicate the completion of the collection of the asset information and current setting information of the electronic device.
[0010] According to a second aspect of the present invention, there is also provided a device information management method for an electronic device, which is applied to a baseboard management control unit of the electronic device, and the method comprises: obtaining asset information and current setting information of the electronic device from a shared memory area, the shared memory area being configured in the baseboard management control unit, and the shared memory area being accessible by a main control unit of the electronic device and the baseboard management control unit; parsing the asset information and the current setting information; monitoring change operations on the current setting information; and sending a change request to the shared memory area when a change operation is detected.
[0011] According to one embodiment of the present invention, before obtaining the asset information and current setting information of the electronic device from the shared memory area, the method also includes: monitoring the collection completion instruction sent by the main control unit, and the collection completion instruction is used to indicate that the main control unit of the electronic device has completed the collection of the asset information and current setting information of the electronic device.
[0012] According to the third aspect of the present invention, there is also provided a device information management apparatus for an electronic device, which is applied to a main control unit of the electronic device, and the apparatus comprises: a first acquisition module, used to obtain setting information of the electronic device from a shared memory area, the shared memory area is configured in a baseboard management control unit of the electronic device, and the shared memory area can be accessed by the main control unit and the baseboard management control unit; a collection module, used to initialize the electronic device according to the setting information, and obtain asset information and current setting information of the electronic device; a first update module, used to update the asset information and current setting information of the electronic device to the shared memory area in the setting file format.
[0013] According to a fourth aspect of the present invention, there is also provided a device information management apparatus for an electronic device, which is applied to a baseboard management control unit of the electronic device, and the apparatus comprises: a second acquisition module, used to obtain asset information and current setting information of the electronic device from a shared memory area, the shared memory area is configured in the baseboard management control unit, and the shared memory area can be accessed by the main control unit of the electronic device and the baseboard management control unit; a parsing module, used to parse the asset information and the current setting information; a change monitoring module, used to monitor change operations on the current setting information; and a second update module, used to send a change request to the shared memory area when a change operation is detected.
[0014] According to the fifth aspect of the present invention, a device is also provided, which includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call the program instructions in the memory to execute the device information management method of the above-mentioned electronic device.
[0015] The device information management method, apparatus and device of the electronic device of the embodiment of the present invention, firstly, the main control unit of the electronic device obtains the setting information of the electronic device from the shared memory area, then initializes the electronic device according to the setting information, obtains the asset information and current setting information of the electronic device, and updates the asset information and current setting information of the electronic device to the shared memory area in the setting file format, wherein the shared memory area is configured in the baseboard management control unit of the electronic device and can be accessed by the main control unit and the baseboard management control unit. As a result, the startup of the BIOS no longer depends on the virtual USB device or (management standard based on HTTPs service) service, and can work normally only when the BMC UBOOT (boot loading system) is started, which effectively solves the problem that the BIOS startup needs to wait for the BMC initialization, resulting in a long startup time. Further, since the BIOS does not need to wait for the BMC to start the kernel to write data in the shared memory area, it can effectively solve the problem that the asset information of the electronic device cannot be queried and the BIOS options cannot be managed after the BMC is started due to BMC abnormality.
[0016] It should be understood that the teachings of the present invention are not required to achieve all of the beneficial effects described above, but specific technical solutions can achieve specific technical effects, and other embodiments of the present invention can also achieve beneficial effects not mentioned above. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which:
[0018] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.
[0019] Figure 1 A schematic diagram showing an application scenario of the device information management method of an electronic device according to an embodiment of the present invention is shown;
[0020] Figure 2 A schematic diagram showing an implementation flow of a method for managing device information of an electronic device according to an embodiment of the present invention is shown;
[0021] Figure 3A schematic diagram showing an implementation flow of a method for managing device information of an electronic device according to another embodiment of the present invention is shown;
[0022] Figure 4 A schematic diagram showing an implementation flow of a specific application example of the device information management method of an electronic device according to an embodiment of the present invention;
[0023] Figure 5 A schematic diagram showing the composition structure of a device information management apparatus for an electronic device according to another embodiment of the present invention is shown;
[0024] Figure 6 A schematic diagram showing the structure of a device information management apparatus for an electronic device according to an embodiment of the present invention is shown;
[0025] Figure 7 A schematic diagram of the structure of the device according to the embodiment of the present invention is shown. DETAILED DESCRIPTION
[0026] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.
[0027] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0028] Figure 1 A schematic diagram showing an application scenario of a method for managing device information of an electronic device according to an embodiment of the present invention is shown.
[0029] refer to Figure 1 , the embodiment of the present invention can be improved and designed based on the PCIE physical link of the server HOST (host) side and the BMC. A part of the video memory in the server's BMC is divided and used as the shared memory area between the HOST's CPU and the BMC. In this way, the HOST side can access all addresses of the shared memory area through MMIO (Memory-mapped I / O), and the BMC can also access all addresses of the shared memory area through memory mapping.
[0030] In this way, in the process of designing BMC and BIOS based on CPU operation, the embodiment of the present invention can design the data interaction process with shared memory as the center. For example: BIOS is responsible for collecting the server SETUP option information supported by BIOS and the asset information of CPU, external devices connected through interfaces that comply with PCIE (Peripheral Component Interconnect Express, high-speed serial computer expansion bus standard), MEMORY (storage) and other devices, and sends it to BMC according to the RedfishSchema (management standard mode based on HTTPs service) standard. BIOS also receives a request from BMC to modify the SETUP option information of BIOS. BMC is mainly responsible for parsing the asset information sent by BIOS and the request data for modifying the SETUP option information of BIOS, and exposing it to the RESTful API user interface after processing. In addition, the shared memory area is adopted between the HOST end and the BMC, and data can be transmitted through the interface that complies with PCIE, and the transmission rate is greatly improved, which effectively shortens the startup time of BIOS and further prompts the whole machine startup time of the electronic device. For example, through practice, the BIOS startup time of an electronic device using the technical solution of the present application can be shortened from 50 seconds to less than 2 seconds, and the entire startup time of the electronic device can be compressed by about 25%.
[0031] Figure 2 A schematic diagram of the implementation flow of a method for managing device information of an electronic device according to an embodiment of the present invention is shown.
[0032] refer to Figure 2 The device information management method of the electronic device according to the embodiment of the present invention is applied to the main control unit of the electronic device, and at least includes the following operation process: operation 201, obtaining the setting information of the electronic device from the shared memory area, the shared memory area is configured in the baseboard management control unit of the electronic device, and the shared memory area can be accessed by the main control unit and the baseboard management control unit; operation 202, initializing the electronic device according to the setting information, and obtaining the asset information and current setting information of the electronic device; operation 203, updating the asset information and current setting information of the electronic device to the shared memory area in the setting file format.
[0033] In operation 201, setting information of an electronic device is obtained from a shared memory area, the shared memory area is configured in a baseboard management control unit of the electronic device, and the shared memory area can be accessed by a main control unit and the baseboard management control unit.
[0034] In this embodiment of the present invention, the main control unit may be a CPU, the BIOS runs based on the CPU, and each operation step of this embodiment of the present invention may be written into the BIOS. The baseboard management control unit may be a BMC.
[0035] In this embodiment of the present invention, the device information of the electronic device may include asset information and setting information of the electronic device. The setting information may be setting information of the SETUP option.
[0036] In this embodiment of the present invention, the BIOS can read the first setting field information from the shared memory area of the baseboard management control unit configured in the electronic device, and read the second setting field information of the shared memory area when the first setting field information is valid, thereby obtaining the setting information and asset information from the shared memory area. The second field information is used to represent the setting information and asset information of the electronic device.
[0037] In this embodiment of the present invention, when the first setting field information is invalid, the shared memory area is reset and it is determined that the electronic setting information has not been changed.
[0038] Here, a starting address can be set for the shared memory area in the video memory of the BMC, and the set number of bits starting from the starting address can be set to fixed characters. When it is detected that the set number of bits starting from the starting address is a preset fixed character, the data in the shared memory area is determined to be valid. On the contrary, when it is detected that the set number of bits starting from the starting position is not a preset fixed character, the data in the shared memory area is determined to be invalid. The situation where the data in the shared memory area is invalid may be when a new electronic device is started for the first time or the electronic device is restored to factory settings, etc., and there is no user setting information and asset information for the SETUP option in the shared memory of the BMC.
[0039] In this embodiment of the present invention, after the PCIE device of the electronic device is initialized, all hardware devices such as the system graphics card, network card and hard disk are in an available state. Therefore, the BIOS can read and write to the shared memory area after the PCIE device of the electronic device is initialized.
[0040] In this embodiment of the present invention, the setting information stored in the shared memory may include:
[0041] "Quiet Boot": "Enable" (Quiet Boot: Enabled);
[0042] "TPM Security Device Support": "Enable"
[0043] "Pending Operation": "None";
[0044] "TCM Security Device Support": "Enable";
[0045] "TCMState": "Enabled";
[0046] "SHA-1PCRBank": "Disabled";
[0047] 'SHA256PCRBank': 'Enabled';
[0048] "SM3_256PCRBank":"Disabled";
[0049] "TPM20Pendingoperation": "None";
[0050] "Platform Hierarchy": "Enabled";
[0051] "Storage Hierarchy": "Enabled";
[0052] "EndorsementHierarchy": "Enabled";
[0053] "Physical Presence Spec Version": "1.3";
[0054] "TPM2.0UEFISpecVersion": "TCG_2"; and
[0055] "Bootmodeselect": "LEGACY", etc.
[0056] In this embodiment of the present invention, the asset information stored in the shared memory may include information such as the number of cores, maximum frequency, manufacturer and maximum power consumption of the electronic device's CPU, memory information such as the maximum frequency, current frequency, manufacturer and serial number of the memory, and external device information such as the network card model, manufacturer, serial number, firmware version, maximum supported bandwidth and current link speed connected through an interface that complies with PCIE.
[0057] In operation 202, the electronic device is initialized according to the setting information, and the asset information and current setting information of the electronic device are obtained.
[0058] In this embodiment of the present invention, the electronic device can be initialized according to the setting information to obtain the asset information and current setting information of the electronic device through the following operations: determine whether the setting information includes a setting information change request issued by the baseboard management control unit, and obtain a change determination result; if the change determination result shows that the setting information of the electronic device has changed, restart the first system of the electronic device based on the changed setting information, and the first system is used to guide the startup of the operating system of the electronic device; if the change determination result shows that the setting information of the electronic device has not changed, initialize the electronic device to obtain the asset information and current setting information of the electronic device.
[0059] In this embodiment of the present invention, valid data segments, current settings, future settings, and asset information can be defined for the data in the shared memory area. Therefore, when the BIOS reads the data in the shared memory area and reads the valid data segment of the future setting according to the data definition, it can be determined that the user has modified the SETUP option of the electronic device, that is, it is determined that the setting information includes a change request for the setting information issued by the baseboard management control unit.
[0060] In operation 203, the electronic device asset information and current setting information are updated to the shared memory area in a setting file format.
[0061] In this embodiment of the present invention, the electronic device asset information and the current setting information may be converted into a first file in JSON format, and the first file may be written into the shared memory area.
[0062] In this embodiment of the present invention, when the asset information and current setting information of the electronic device are collected, a collection completion instruction is sent to the substrate management control unit, and the collection completion instruction is used to represent the instruction for completing the collection of the asset information and current setting information of the electronic device.
[0063] In this embodiment of the present invention, the collection completion instruction can be a hardware pin, which notifies the BMC that the collection of the asset information and current setting information of the electronic device has been completed in the form of pulling the hardware pin. Specifically, the BIOS completes the modification of the SETUP information of the electronic device based on the setting information of the electronic device obtained from the shared memory area, and sends the current setting information to the shared memory area when the modification takes effect. In addition, when the BIOS finishes reading the asset information of the electronic device from the shared memory area, it converts the asset information of the electronic device into JSON format and sends it to the shared memory area. In the case where the BIOS sends the current setting information and asset information of the electronic device to the shared memory area, a hardware pin can be pulled to notify the BMC that the collection of the asset information and current setting information of the electronic device has been completed.
[0064] Figure 3 A schematic diagram of the implementation flow of a method for managing device information of an electronic device according to another embodiment of the present invention is shown.
[0065] refer to Figure 3 The device information management method of the electronic device according to the embodiment of the present invention is applied to the substrate management control unit of the electronic device, and at least includes the following operation process:
[0066] Operation 301 : obtaining asset information and current setting information of an electronic device from a shared memory area, wherein the shared memory area is configured in a baseboard management control unit and can be accessed by a main control unit and a baseboard management control unit.
[0067] In this embodiment of the present invention, before obtaining the asset information and current setting information of the electronic device from the shared memory area, the collection completion instruction sent by the main control unit of the electronic device is also monitored. The collection completion instruction is used to indicate that the main control unit of the electronic device has completed the collection of the asset information and current setting information of the electronic device.
[0068] Operation 302 , parse the asset information and the current setting information.
[0069] In this embodiment of the present invention, the asset information obtained by the analysis can also be displayed in a set form for easy viewing by the user. Here, the asset information of the electronic device can be displayed when the user views the asset information of the electronic device through a preset operation, or the asset information obtained by the analysis can be displayed in a set form at a preset time by default.
[0070] Operation 303: monitoring a change operation on the current setting information.
[0071] Operation 304 : When a change operation is detected, a change request is sent to the shared memory area.
[0072] The specific implementation process of operations 301 to 304 is as follows: Figure 1 The specific implementation process of operations 201 to 203 in the illustrated embodiment is similar and will not be described in detail here.
[0073] Figure 4 A schematic diagram of an implementation flow of a specific application example of the device information management method of an electronic device according to an embodiment of the present invention is shown.
[0074] refer to Figure 4 In a specific application example of the device information management method of an electronic device according to an embodiment of the present invention, the method at least includes:
[0075] Operation 401: BIOS startup. For example, a BIOS startup instruction is received.
[0076] In operation 402, the BIOS reads data from the shared memory area and determines whether the data in the shared memory area is valid. If yes, operation 403 is executed, and if no, operation 404 is executed.
[0077] In operation 403, the BIOS continues to read data from the shared memory area and determines whether there is an option change request from the BMC. If yes, operation 405 is executed, and if no, operation 406 and operation 407 are executed.
[0078] Operation 404, resetting the shared memory area.
[0079] In this embodiment of the present invention, resetting the shared memory area may be formatting the shared memory area. For example, the data format of the shared memory area may be initialized with the name of the data to be exchanged in a predefined format, and the starting address and length may be predefined, such as: header file + string format of setting field + other setting contents.
[0080] Operation 405 parses and applies the option change request.
[0081] In this embodiment of the present invention, upon receiving an option change request for SETUP option information from the BMC, the current SETUP option information can be read from the shared memory area, and the BIOS can be restarted to make the changes made by the user to the SETUP option information effective.
[0082] Operation 406 collects SETUP option information and edits it into JSON format.
[0083] Operation 407 collects asset information and edits it into JSON format.
[0084] In this embodiment of the present invention, if the BIOS determines that the user has not made a change request for the SETUP option of the BMC based on the asset information and the SETUP option information read from the shared memory area, it can be determined that the current setting information and asset information read by the BIOS are the latest setting information and the latest asset information of the electronic device. At this time, the SETUP option information and the asset information can be edited into JSON format and written into the shared memory area.
[0085] In this embodiment of the present invention, the reason why both the SETUP option information and the asset information are edited into JSON and stored in the shared memory area is that the JSON format is a data format defined by the redfish interface, which has strong scalability and readability. In actual application, other data formats with strong scalability and readability can also be used, which does not limit the technical solution of the present invention.
[0086] In addition, the order of operation 406 and operation 407 can be set according to actual conditions, and the present invention does not limit this.
[0087] Operation 408: Determine whether the BMC is initialized.
[0088] In this embodiment of the present invention, operation 408 is used to determine whether the BMC is initialized. For example, after the initialization of the PCIE device is completed, it can be determined that all hardware devices such as the graphics card, network card and hard disk of the electronic device are available, and the shared memory can be read and written. Here, if the BMC is initialized, operation 410 is executed. If the BMC initialization is not completed, operation 408 is repeatedly executed periodically to detect whether the BMC is initialized.
[0089] Operation 409 , the BMC starts.
[0090] Operation 410 parses the SETUP option information and asset information.
[0091] In this embodiment of the present invention, after the BMC starts up, the SETUP option information and asset information can be read from the shared memory area and parsed.
[0092] Operation 411, SETUP option information.
[0093] Operation 412, asset information.
[0094] Operation 413 determines whether the user has modified the SETUP option information. If yes, the modification of the SETUP option information by the user is written into the shared memory area. If no, operation 413 is performed again at every set period.
[0095] Operation 414: WEB display and support for RESTful query. Here, the display and viewing method of the asset information can be set according to actual needs, and the present invention does not limit this.
[0096] The device information management method of the electronic device of the embodiment of the present invention, first, the main control unit of the electronic device obtains the setting information of the electronic device from the shared memory area, then initializes the electronic device according to the setting information, obtains the asset information and current setting information of the electronic device, and updates the asset information and current setting information of the electronic device to the shared memory area in a setting file format, wherein the shared memory area is configured in the baseboard management control unit of the electronic device and can be accessed by the main control unit and the baseboard management control unit. As a result, the startup of the BIOS no longer depends on the virtual USB device or (management standard based on HTTPs service) service, and can work normally only when the BMC UBOOT (boot loading system) is started, which effectively solves the problem that the BIOS startup needs to wait for the BMC initialization, resulting in a long startup time. Further, since the BIOS does not need to wait for the BMC to start the kernel to write data in the shared memory area, it can effectively solve the problem that the asset information of the electronic device cannot be queried and the BIOS options cannot be managed after the BMC is started due to BMC abnormality.
[0097] Similarly, based on the above-mentioned device information management method of electronic devices, an embodiment of the present invention also provides a computer-readable storage medium, which stores a program. When the program is executed by a processor, the processor performs at least the following operation steps: operation 201, obtaining setting information of the electronic device from a shared memory area, the shared memory area is configured in the baseboard management control unit of the electronic device, and the shared memory area can be accessed by the main control unit and the baseboard management control unit; operation 202, initializing the electronic device according to the setting information, and obtaining the asset information and current setting information of the electronic device; operation 203, updating the asset information and current setting information of the electronic device to the shared memory area in a setting file format.
[0098] Further, based on the device information management method of the electronic device as described above, an embodiment of the present invention also provides a device information management apparatus for an electronic device, such as Figure 5 The device 50 includes: a first acquisition module 501, used to obtain setting information of the electronic device from a shared memory area, the shared memory area is configured in the baseboard management control unit of the electronic device, and the shared memory area can be accessed by the main control unit and the baseboard management control unit; a collection module 502, used to initialize the electronic device according to the setting information, and obtain the asset information and current setting information of the electronic device; a first update module 503, used to update the asset information and current setting information of the electronic device to the shared memory area in a setting file format.
[0099] Furthermore, based on the device information management method of the electronic device as described above, an embodiment of the present invention further provides a device information management apparatus for an electronic device, which is applied to a substrate management control unit of the electronic device, such as Figure 6 The device 60 includes: a second acquisition module 601, which is used to obtain the asset information and current setting information of the electronic device from a shared memory area, the shared memory area is configured in the baseboard management control unit, and the shared memory area can be accessed by the main control unit and the baseboard management control unit; a parsing module 602, which parses the asset information and the current setting information; a change monitoring module 603, which is used to monitor the change operation on the current setting information; a second update module 604, which is used to send a change request to the shared memory area when a change operation is detected.
[0100] Furthermore, based on the device information management method of the electronic device as described above, an embodiment of the present invention further provides a device, such as Figure 7 The device 70 includes at least one processor 701, and at least one memory 702 and a bus 703 connected to the processor 701; wherein the processor 701 and the memory 702 communicate with each other through the bus 703; the processor 701 is used to call the program instructions in the memory 702 to execute the device information management method of the above-mentioned electronic device.
[0101] It should be noted that: the above description of the asset information management device and equipment embodiment is the same as the above description of the asset information management device and equipment embodiment. Figures 1 to 4 The description of the method embodiment shown is similar, with the same Figures 1 to 4 The method embodiment shown in the figure has similar beneficial effects, so it will not be described in detail. For technical details not disclosed in the embodiments of the asset information management device and equipment of the present invention, please refer to the aforementioned Figures 1 to 4 The description of the method embodiment shown in the figure can be understood, and in order to save space, it will not be repeated.
[0102] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0103] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0104] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0105] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0106] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0107] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0108] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for managing device information of an electronic device, the method comprising: The main control unit of the electronic device obtains the setting information of the electronic device from the shared memory area, the shared memory area is configured in the baseboard management control unit of the electronic device, and the shared memory area can be accessed by the main control unit and the baseboard management control unit; Determine whether the setting information includes a valid data segment that has not been set effectively by the user, and obtain a change determination result; if it is included, the change determination result shows that the setting information of the electronic device has been changed, and if the change determination result shows that the setting information of the electronic device has been changed, restart the first system of the electronic device based on the changed setting information, the first system being used to guide the startup of the operating system of the electronic device; Otherwise, if the change judgment result shows that the setting information of the electronic device has not been changed, the electronic device is initialized to obtain the asset information and current setting information of the electronic device; The electronic device asset information and current setting information are updated to the shared memory area in a setting file format.
2. The method according to claim 1, wherein obtaining the setting information of the electronic device from the shared memory area comprises: Reading first setting field information of the shared memory area; When the first setting field information is valid, second setting field information of the shared memory area is read, where the second setting field information is used to represent setting information and asset information of the electronic device.
3. The method according to claim 1, wherein updating the electronic device asset information and current setting information to the shared memory area in a setting file format comprises: Convert the electronic device asset information and current setting information into a first file in JSON format; The first file is written into the shared memory area.
4. The method according to claim 1, further comprising: When the collection of the asset information and the current setting information of the electronic device is completed, a collection completion instruction is sent to the baseboard management control unit, and the collection completion instruction is used to indicate that the collection of the asset information and the current setting information of the electronic device is completed.
5. The method according to claim 1, further comprising: The baseboard management control unit of the electronic device obtains the asset information and current setting information of the electronic device from a shared memory area, the shared memory area is configured in the baseboard management control unit, and the shared memory area can be accessed by the main control unit of the electronic device and the baseboard management control unit; Parsing the asset information and current setting information; Monitor changes to current settings; When a change operation is detected, a change request is sent to the shared memory area; Before obtaining the asset information and current setting information of the electronic device from the shared memory area, the method further includes: The collection completion instruction sent by the main control unit is monitored, where the collection completion instruction is used to indicate that the main control unit of the electronic device has completed the collection of the asset information and current setting information of the electronic device.
6. A device information management apparatus for an electronic device, comprising: A first acquisition module, used for a main control unit of an electronic device to obtain setting information of the electronic device from a shared memory area, wherein the shared memory area is configured in a baseboard management control unit of the electronic device, and the shared memory area can be accessed by the main control unit and the baseboard management control unit; A collection module, used to determine whether the setting information includes a valid data segment that has not been set effectively by the user, and obtain a change determination result; If included, the change judgment result shows that the setting information of the electronic device has changed, and in the case where the change judgment result shows that the setting information of the electronic device has changed, restarting the first system of the electronic device based on the changed setting information, the first system being used to guide the startup of the operating system of the electronic device; Otherwise, if the change judgment result shows that the setting information of the electronic device has not been changed, the electronic device is initialized to obtain the asset information and current setting information of the electronic device; The first update module is used to update the electronic device asset information and current setting information to the shared memory area in a setting file format.
7. The device according to claim 6, comprising: A second acquisition module, used for a baseboard management control unit of an electronic device to obtain asset information and current setting information of the electronic device from a shared memory area, wherein the shared memory area is configured in the baseboard management control unit and can be accessed by a main control unit of the electronic device and the baseboard management control unit; A parsing module, used for parsing the asset information and current setting information; A change monitoring module is used to monitor the change operations on the current setting information; A second update module is used to send a change request to the shared memory area when a change operation is detected; The collection completion instruction sent by the main control unit is monitored, where the collection completion instruction is used to indicate that the main control unit of the electronic device has completed the collection of the asset information and current setting information of the electronic device.
8. A device comprising at least one processor, and at least one memory and a bus connected to the processor; wherein: The processor and the memory communicate with each other via the bus; The processor is used to call the program instructions in the memory to execute the device information management method of the electronic device according to any one of claims 1 to 5.
Citation Information
Patent Citations
Basic input output system (BIOS) configuration batch modification method
CN102880519A
Unattended BIOS (Basic Input / output System) configuration method
CN105824648A
Method and device for configuring SETUP options of BIOS quickly
CN106445528A
Data sharing method and device
CN108459918A
Server starting method and equipment and storage medium
CN110633110A
