Asset information management method, electronic equipment, storage medium and product

Through linked list data block storage and garbage collection mechanism, server asset information storage space is dynamically allocated, solving the space waste caused by fixed format storage in BMC EEPROM and achieving more efficient storage utilization.

CN120386495BActive Publication Date: 2025-09-12INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510891470.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-09-12
Estimated Expiration
2045-06-30

AI Technical Summary

Technical Problem

In the prior art, the asset information of each server component is stored in a fixed format in the BMC EEPROM, resulting in a waste of reserved space and affecting data storage efficiency.

Method used

Use linked list data blocks to store asset information, dynamically allocate storage space, build linked list data blocks based on the minimum asset information data requirements of the device, search for free space in the storage unit, and trigger the garbage collection mechanism when necessary.

Benefits of technology

Under the same storage space, the linked list storage solution can increase the number of data blocks several times, avoid space waste, improve storage space utilization, and solve the space waste problem caused by fixed format storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120386495B_ABST
    Figure CN120386495B_ABST
Patent Text Reader

Abstract

The present application discloses an asset information management method, electronic device, storage medium and product, which relate to the field of computer technology. Since the controller no longer stores the asset information of the device in a fixed size according to the asset information data structure format, the smallest asset information data in the asset information of each type of device is obtained, and the asset information of each type of device is stored in a linked list data block. The number of data blocks in the linked list data block is set to the minimum data blocks required to store the minimum asset information data, which can achieve a size of the linked list data block that is several to dozens of times smaller than a structure for storing asset information data in a fixed space. Under the condition that the storage space size of the same controller storage unit remains unchanged, the number of linked list data blocks that can be set is increased by several to dozens of times, avoiding the idle storage space caused by reserving a very large space, thereby improving the utilization rate of data storage space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an asset information management method, electronic equipment, storage medium, and product. Background Art

[0002] The Baseboard Management Controller (BMC) is a server-specific management controller. Its primary function is to automatically monitor the server's operational status, primarily including the health of various hardware components. The server BIOS (Basic Input / Output System) is firmware loaded onto the computer's hardware system. Its primary functions include power-on self-tests, booting the bootloader, and providing a configuration interface. One of the server BMC's functions is to display server asset information, including the name, type, and status of devices such as network cards, hard drives, and GPUs. This asset information is typically obtained through BIOS interaction during system power-on / POST, and is written to the BMC's EEPROM (Electrically Erasable Programmable Read-Only Memory) immediately or according to policy. The BMC's web process periodically polls the BMC EEPROM for formatted data and displays it on a web page, allowing server maintenance engineers to determine the model, status, and other aspects of each device. Currently, asset information for various components in M6 and M7 servers is stored and retrieved in the BMC EEPROM using a predefined asset information data structure developed during platform BMC development. The data length in the reserved structure and the number of devices of the same type (taking into account the number of virtualized devices) usually reserve a large space to accommodate future expansion. If the actual project is not adapted to use devices with a large number or length, it may cause idle EEPROM storage space, thereby affecting the normal storage of other information that may need to be stored in the EEPROM. Summary of the Invention

[0003] The present application provides an asset information management method, electronic device, storage medium, and product to at least address the technical problem in the related art that asset information of various server components is currently stored and read in the BMC EEPROM in the format of an asset information data structure, resulting in a large reserved space that causes EEPROM storage space to be idle, thus affecting data storage.

[0004] This application provides an asset information management method, including:

[0005] During the hardware self-test phase of the basic input and output system, the asset information of the device is obtained through the basic input and output system and sent to the controller;

[0006] In response to the controller interacting with the basic input and output system to obtain asset information of various types of devices, obtaining the smallest asset information data in the asset information of the various types of devices, calculating the number of data blocks required to store the smallest asset information data, searching for free space in a storage unit of the controller, and determining whether the controller can store the asset information based on whether the number of data blocks in the free space found is greater than the number of data blocks required to store the smallest asset information data;

[0007] In response to the controller storage unit being able to store the asset information, constructing linked list data blocks according to a minimum number of data blocks required to store the minimum asset information data, and storing the asset information of each type of equipment in each linked list data block;

[0008] In response to the controller storage unit being unable to store the asset information, a garbage collection mechanism is triggered to recycle historical data in the controller storage unit.

[0009] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned asset information management methods when executing the computer program:

[0010] During the hardware self-test phase of the basic input and output system, the asset information of the device is obtained through the basic input and output system and sent to the controller;

[0011] In response to the controller interacting with the basic input and output system to obtain asset information of various types of devices, obtaining the smallest asset information data in the asset information of the various types of devices, calculating the number of data blocks required to store the smallest asset information data, searching for free space in a storage unit of the controller, and determining whether the controller can store the asset information based on whether the number of data blocks in the free space found is greater than the number of data blocks required to store the smallest asset information data;

[0012] In response to the controller storage unit being able to store the asset information, constructing linked list data blocks according to a minimum number of data blocks required to store the minimum asset information data, and storing the asset information of each type of equipment in each linked list data block;

[0013] In response to the controller storage unit being unable to store the asset information, a garbage collection mechanism is triggered to recycle historical data in the controller storage unit.

[0014] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned asset information management methods are implemented:

[0015] During the hardware self-test phase of the basic input and output system, the asset information of the device is obtained through the basic input and output system and sent to the controller;

[0016] In response to the controller interacting with the basic input and output system to obtain asset information of various types of devices, obtaining the smallest asset information data in the asset information of the various types of devices, calculating the number of data blocks required to store the smallest asset information data, searching for free space in a storage unit of the controller, and determining whether the controller can store the asset information based on whether the number of data blocks in the free space found is greater than the number of data blocks required to store the smallest asset information data;

[0017] In response to the controller storage unit being able to store the asset information, constructing linked list data blocks according to a minimum number of data blocks required to store the minimum asset information data, and storing the asset information of each type of equipment in each linked list data block;

[0018] In response to the controller storage unit being unable to store the asset information, a garbage collection mechanism is triggered to recycle historical data in the controller storage unit.

[0019] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned asset information management methods:

[0020] During the hardware self-test phase of the basic input and output system, the asset information of the device is obtained through the basic input and output system and sent to the controller;

[0021] In response to the controller interacting with the basic input and output system to obtain asset information of various types of devices, obtaining the smallest asset information data in the asset information of the various types of devices, calculating the number of data blocks required to store the smallest asset information data, searching for free space in a storage unit of the controller, and determining whether the controller can store the asset information based on whether the number of data blocks in the free space found is greater than the number of data blocks required to store the smallest asset information data;

[0022] In response to the controller storage unit being able to store the asset information, constructing linked list data blocks according to a minimum number of data blocks required to store the minimum asset information data, and storing the asset information of each type of equipment in each linked list data block;

[0023] In response to the controller storage unit being unable to store the asset information, a garbage collection mechanism is triggered to recycle historical data in the controller storage unit.

[0024] Through this application, since the controller no longer stores the asset information of the device in a fixed size according to the asset information data structure format, it obtains the smallest asset information data in the asset information of each type of device, and stores the asset information of each type of device in a linked list data block. The number of data blocks in the linked list data block is set to the minimum data blocks required to store the minimum asset information data. The size of the linked list data block can be several to dozens of times smaller than the structure for storing asset information data in a fixed space. When the storage space size of the same controller storage unit remains unchanged, the number of linked list data blocks that can be set is increased by several to dozens of times, avoiding the idle storage space caused by reserving a very large space, thereby improving the utilization rate of data storage space. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0026] Figure 1 A schematic diagram of how the current server's BMC and BIOS interact to obtain asset information and display it on the web;

[0027] Figure 2 This is a schematic diagram of an asset information management method in one embodiment of the present application;

[0028] Figure 3 This is a flowchart of an asset information management method in one embodiment of the present application;

[0029] Figure 4 This is a flow chart of triggering a garbage collection mechanism in one embodiment of the present application;

[0030] Figure 5 This is a flow chart of executing a garbage collection mechanism in one embodiment of the present application;

[0031] Figure 6 A flowchart illustrating an implementation of an exception display mechanism in one embodiment of the present application;

[0032] Figure 7 This is a structural block diagram of an asset information management device in one embodiment of the present application;

[0033] Figure 8 This is a diagram of the internal structure of a computer device in one embodiment of the present application. DETAILED DESCRIPTION

[0034] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0035] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0036] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0037] As mentioned in the background technology, the asset information of the various components of the current M6 and M7 servers is stored in the BMC EEPROM using the asset information data structure that was predetermined during the development of the platform BMC, and is stored and read according to the format. For example, the network card asset information structure reserves 4 network ports and takes into account the virtualized network ports of each network port, with a total of 8 network ports with MAC addresses, each designed according to the storage length of the maximum device type, SN, manufacturer, location, bandwidth and other fields. The asset information of other devices such as GPUs and hard disks are all stored in this way. This fixed data structure storage method can ensure that each asset information device can be stably stored in a fixed location in a fixed structure when the BIOS interacts with the BMC. However, when adapting new and different asset information devices to various projects, the device name, manufacturer, and other fields often differ from the platform's initial data structure. This can also occur when virtualization is enabled (for example, the NPAR (NIC Partitioning) feature on Broadcom network cards splits a two-port NIC into 16-port NICs and sends asset information to the BMC). This situation was not anticipated when the platform's fixed BMC EEPROM asset information data structure was initially established. When the BIOS sends this abnormal asset information to the fixed BMC EEPROM area, the BMC cannot effectively store all the information in the fixed EEPROM asset information structure. As a result, subsequent BMC web processes cannot retrieve the complete asset information data structure, triggering display anomalies. If this issue occurs on the BMC of a project model during maintenance, it is often difficult to modify the platform data structure code during maintenance. Workarounds, such as data truncation, often rely on BMC engineers to deploy, test, and deploy a new BMC version, impacting the timeliness of resolving such issues. At the same time, the data length in the reserved structure and the number of devices of the same type (taking into account the number of virtualization) usually reserve a maximum value in consideration of future adaptation and expansion. If the actual project is not adapted to use devices with a larger number and length, it may cause idle EEPROM storage space, thereby affecting the normal storage of other information that may need to be stored in the EEPROM.

[0038] In C language, a linked list is a data structure consisting of multiple nodes, each node contains data and a pointer to the next node. The following are the basic concepts and implementation methods of linked lists:

[0039] Singly linked list: Each node contains a data field and a pointer field that points to the next node. The head node points to the first node in the list, and the tail node points to NULL.

[0040] Doubly linked list: Each node contains a predecessor pointer and a successor pointer, allowing bidirectional traversal.

[0041] A structure is usually used to represent a linked list node. The structure of a linked list node is defined as follows:

[0042] struct Node {

[0043] int data; / / data field

[0044] struct Node* next; / / pointer field

[0045] }.

[0046] like Figure 1 As shown, Figure 1 This is a regular and emergency refresh method for the current server BMC and BIOS images. The current server BMC and BIOS interact to obtain asset information and display it on the website: When the server is powered on and the BIOS reaches the POST (Power-On Self-Test) phase, the BMC retrieves hardware asset information (such as serial number, model, and firmware version) from the BIOS via IPMI (or other interfaces such as Redfish). When hardware configuration changes occur, such as replacing the CPU or memory or enabling network card virtualization, the BMC stores the changed asset information in EEPROM. The format and storage location are determined by the asset information structure defined during platform BMC development. The BMC web process periodically polls the asset information at this location and displays the changed hardware configuration information on the BMC web page, enabling real-time display of changed asset information.

[0047] The asset information management method provided in this application can be applied to Figure 2In the application environment shown, the asset information management method is applicable to servers displaying asset information on the BMC web. The server can be implemented as a standalone server or a server cluster consisting of multiple servers. The server includes a BIOS (Basic Input Output System) and a Baseboard Management Controller (BMC). The BIOS obtains asset information for network cards, hard drives, CPUs, and other devices whose asset information needs to be displayed on the BMC. During the POST (Hardware Self-Test) phase of the server startup process, the BIOS sends the asset information of these devices, such as network cards, hard drives, and CPUs, to the BMC via IPMI interaction. Unlike current designs, the BMC no longer stores asset information for different devices in fixed sizes and locations. The entire BMC EEPROM space used for asset information storage is divided into linked list databases of varying sizes. Each data block contains the address pointer for the next block, the data length of the current block, and storage space for the actual data content. The BMC EEPROM uses a linked list database space for asset information storage. The number and size of data blocks are determined in the platform BMC code. Unlike the previously specified fixed-location storage, the database size in this linked list space can be set to the minimum number of data blocks required to store the asset information. For example, if the total asset information to be displayed in memory is the smallest among all devices and cannot be virtualized, the linked list data block size can be set to the size of the asset information to be displayed in memory. Because data block sizes are several to dozens of times smaller than those in fixed-space storage solutions, fixed-space storage solutions typically allocate data space for long asset information data for future compatible devices, often expanding it. For example, the M6 ​​reserves four network ports for asset information, each with two virtual network port asset information blocks, for a total of eight network card asset information. Furthermore, the SN and vendor name must be reserved to the maximum scalable amount. Therefore, while the BMC EEPROM storage size remains unchanged, the number of linked list data blocks can be several to dozens of times the fixed space size.

[0048] like Figure 3 As shown, an embodiment of the present application provides an asset information management method, comprising the following steps:

[0049] Step S1, during the hardware self-test phase of the basic input and output system, obtain the asset information of the device through the basic input and output system and send it to the controller;

[0050] Step S2, in response to the controller interacting with the basic input and output system to obtain asset information of various devices, obtain the smallest asset information data in the asset information of various devices, calculate the number of data blocks required to store the smallest asset information data, search for free space in the controller storage unit, and determine whether the controller can store the asset information based on whether the number of data blocks in the found free space is greater than the number of data blocks required to store the smallest asset information data;

[0051] Step S3, in response to the controller storage unit being able to store the asset information, constructing linked list data blocks based on the minimum number of data blocks required to store the minimum asset information data, and storing the asset information of each type of device in each linked list data block;

[0052] Step S4: In response to the controller storage unit being unable to store the asset information, a garbage collection mechanism is triggered to recycle the historical data in the controller storage unit.

[0053] In this embodiment, since the controller no longer stores the asset information of the device in a fixed size according to the asset information data structure format, it obtains the smallest asset information data among the asset information of each type of device, and stores the asset information of each type of device in a linked list data block. The number of data blocks in the linked list data block is set to the minimum data blocks required to store the smallest asset information data. The size of the linked list data block can be several to dozens of times smaller than the structure for storing asset information data in a fixed space. When the storage space size of the same controller storage unit remains unchanged, the number of linked list data blocks that can be set is increased by several to dozens of times, avoiding the idle storage space caused by reserving a very large space, thereby improving the utilization rate of data storage space.

[0054] The BMC EEPROM uses a linked list database space for asset information storage. The number and size of data blocks are determined in the platform BMC code. Unlike the previously fixed-location storage, the database size in this linked list space can be set to the minimum number of data blocks required to store the asset information. For example, if the total asset information to be displayed in memory is the smallest among all devices and cannot be virtualized, the linked list data block size can be set to the size of the asset information to be displayed in memory. This is because the data block size is several to dozens of times smaller than that of a fixed-space storage solution. Fixed-space storage allocates data space to reserve long asset information data for future compatible devices and is typically expanded. For example, the M6 ​​reserves four network ports for asset information, each with two virtual network port asset information blocks, totaling eight network card asset information. Furthermore, the SN and vendor name must be reserved to the maximum scalable size. Therefore, while the BMC EEPROM storage size remains unchanged, the number of linked list data blocks can be several to dozens of times the fixed space size.

[0055] like Figure 4 As shown, in this embodiment, searching for free space in the controller storage unit and determining whether the controller can store asset information based on whether the number of data blocks in the found free space is greater than the number of data blocks required to store the minimum asset information data includes:

[0056] Obtain the first data block in the controller storage unit, and traverse the continuous available data space from the first data block pointer along the next data block pointer of the linked list;

[0057] According to the number of data blocks required to store the minimum asset information data, search in the continuously available data space to see whether there are continuously set data blocks that are larger than the data blocks required to store the minimum asset information data. If so, it is determined that the controller storage unit can store the asset information, the data block is marked as allocated, and the file identifier is set according to the device type. Otherwise, it is determined that the controller storage unit cannot store the asset information.

[0058] The numerous small linked list data blocks in the BMC's EEPROM aren't dedicated to any particular component. Instead, the BIOS obtains them during the POST process, sequentially calculating the number of data blocks required for the data size. The BIOS then traverses the available data space sequentially, starting from the first data block pointer and following the next data pointer in the linked list. For example, if the data space required for a network card's asset information is 1800 bytes, and a linked list data block is 512 bytes, the BIOS will search for space containing four consecutive data blocks along the first linked list data block pointer. If found, these four consecutive data blocks will be written into the network card's asset information, and a file identifier will be used to indicate that they are occupied by the network card's asset information data. This will allow the front-end BMC web process to call and retrieve the data for display on the web.

[0059] In this embodiment, a linked list data block is constructed based on the minimum number of data blocks required to store the minimum asset information data. The asset information of each type of equipment stored in each linked list data block includes:

[0060] In the free space, a linked list data block is set for storing the asset information. The number of the linked list data blocks is set according to the number of data blocks required for minimum storage of the asset information data. The total space of the linked list data blocks is greater than or equal to the storage space required for the asset information.

[0061] Each data block in the linked list data block contains the address pointer of the next data block, the data length of the current data block and the storage space for storing the actual data content;

[0062] The number of linked list data blocks is set according to the number of device types, and the asset information of each type of device is stored in each linked list data block.

[0063] like Figure 5 As shown, in this embodiment, the asset information management method further includes:

[0064] In response to monitoring that the used size of the linked list database exceeds a warning threshold, or when no continuous available data blocks can be found by traversing the linked list database, a garbage collection mechanism for the asset information storage space of the controller storage unit is triggered.

[0065] Among them, the warning threshold is preferably 70%.

[0066] like Figure 5 As shown, in this embodiment, the garbage collection mechanism of the asset information storage space of the trigger controller storage unit includes:

[0067] Check whether the timestamp of the occupied data block is the latest;

[0068] In response to the timestamp of the occupied data block being the latest, checking whether the timestamp of the next occupied data block is the latest through the next address pointer of the linked list;

[0069] In response to the updated timestamp data of the timestamp of the occupied data block, it is determined that the asset information data stored in the currently occupied data block has expired, the occupied data block is deleted and released, and the timestamp of the next occupied data block is checked through the next address pointer of the linked list to see whether it is the latest.

[0070] like Figure 5 As shown, in this embodiment, the garbage collection mechanism of the asset information storage space of the trigger controller storage unit further includes:

[0071] In response to traversing all asset information data blocks and deleting expired data, the current linked list database is hot-sorted to form a deleted address sort, a new compactly arranged address, and the released idle data blocks are placed at the end of the linked list database.

[0072] That is, when it is detected that the size of the linked list database used exceeds the warning threshold, or the asset information sent from the BIOS cannot find an available continuous block, the first address of the BMC EEPROM linked list asset information storage space is compared based on the data type and the data timestamp to see if it is the latest value of the data type. If it is not the latest value, it proves that there is updated timestamp data, which is the asset information data of this type sent by the BIOS update to the BMC. In this case, the asset information data is outdated and is deleted and the occupied data block is released. After traversing all asset information data blocks and deleting expired data, the existing data block linked list is hot-sorted, that is, the addresses after deletion are sorted, and new compactly arranged addresses are formed to release free data blocks and place them at the end of the EEPROM, which is a garbage collection action.

[0073] like Figure 6 As shown, in this embodiment, the asset information management method further includes:

[0074] When executing the garbage collection mechanism, it is determined in real time whether the free space of the controller storage unit after clearing non-latest data can store asset information;

[0075] In response to the controller storage unit having free space capable of storing asset information after clearing non-latest data, exiting the garbage collection mechanism;

[0076] In response to the controller storage unit finding that the free space after clearing non-latest data cannot store the asset information, the controller storage unit does not store the asset information in the free space and executes an exception display mechanism.

[0077] It's understandable that if data usage still exceeds the threshold after garbage collection or no contiguous free data blocks can be found, an exception display mechanism will be triggered. Due to the dynamic storage mechanism of this solution, compared to the existing BMC EEPROM fixed-format storage of asset information, it has a more compact data structure, significantly improving EEPROM utilization and generally preventing the exception display mechanism from being triggered due to data overflow.

[0078] In this embodiment, the asset information management method further includes:

[0079] In response to displaying the asset information through the controller page, obtaining the stored asset information in the controller storage unit and determining whether there is any unstored asset information;

[0080] The asset information is displayed on the controller page in the order of display priority. The stored asset information is displayed directly, and the unstored asset information executes the exception display mechanism to generate a display details button.

[0081] In this embodiment, the asset information management method further includes:

[0082] In response to a click of the display details button, calling an interactive interface between the basic input and output system and the controller to obtain asset information from a source and display the asset information on the controller page;

[0083] Determine whether the asset information corresponding to the display details button is displayed successfully. If so, exit the exception display mechanism. If not, delete the non-important asset information in the asset information corresponding to the display details button and perform defragmentation to release storage space of the controller storage unit.

[0084] In this embodiment, the asset information management method further includes:

[0085] In response to the existence of non-important asset information in the asset information corresponding to the detail display button being deleted, the control stores the important asset information in the released space the next time the basic input and output system interacts with the controller.

[0086] In this embodiment, the asset information management method further includes:

[0087] In response to the controller storage unit having no free space after clearing non-latest data being able to store the asset information, determining whether there is a non-high priority display item for which there is no space to store;

[0088] In response to the existence of non-high priority display items with no storage space, the non-high priority display items are recorded in a pop-up window, log or serial port on the controller page, and the recorded non-high priority display items can be manually obtained through IPMI commands.

[0089] Specifically, the asset information display priority is first defined. For example, "MAC address" and "in-place status" can be set as high-priority display items. A "Show Details" button is first generated on the web. When the user clicks it, the BIOS and BMC interaction interface is directly invoked to obtain asset information from the source and display it on the BMC web page, skipping the EEPROM. If the execution fails, non-critical asset information such as "manufacture date" and "serial number" is forcibly deleted, and defragmentation is performed to free up EEPROM storage space. The next time the BIOS and BMC interact, important asset information is stored in the freed space. If it is determined that there is no space for a non-high-priority display item, a pop-up window / log or serial port record is displayed on the web, allowing the user to manually obtain this information through IPMI commands.

[0090] In this embodiment, the asset information management method further includes:

[0091] In response to the controller storage unit finding that the free space after clearing non-latest data cannot store asset information, the number of data blocks required to store the minimum asset information data is obtained, and the controller searches for free space again the next time the basic input and output system interacts with the controller, and determines whether the free space is larger than the space required to store the asset information. If so, the asset information is stored in the free space using a distributed storage method.

[0092] Among them, distributed storage is used to attempt to store asset information that cannot be stored, avoiding space residue caused by continuous data block storage.

[0093] After reinstalling and restarting the BMC, the BMC determines the file uploaded using the MCU SPI communication. If it is not the BMC image itself, it calls the interface for refreshing other firmware, automatically performs the next step of component refreshing, and restarts the component module to take effect.

[0094] In this embodiment, the asset information management method further includes:

[0095] In response to the asset information of a new device being obtained through the basic input / output system during the hardware self-test phase of the basic input / output system, the linked list database is expanded. The expanded space is equal to the number of data blocks required to store the asset information data of the new device minus the free space in the linked list database.

[0096] This configuration minimizes the controller's storage unit and keeps the linked list data blocks fully populated. Furthermore, the linked list database is expanded only when new device asset information is added, ensuring that the linked list data blocks remain fully populated after the expansion. This approach doesn't simply expand the linked list data block space. Instead, it expands the space by the number of data blocks required to store the new device asset information, minus the free space in the linked list database. This ensures that the linked list data blocks are always fully populated.

[0097] Compared to the current fixed storage solution for BMC asset information, this embodiment improves storage flexibility, accommodating asset information ranging from a few bytes to hundreds of bytes without requiring a pre-set fixed length, thus improving storage utilization. In extreme cases unforeseen by platform development, such as when NPAR (NIC Partitioning) is enabled on a Broadcom network card, the two-port NIC is split into 16-port NICs, and asset information is sent to the BMC via dynamic allocation of shared linked list space. This avoids truncation or overflow issues caused by fixed lengths, reducing the manpower and resources consumed in BMC version development, testing, and client import, which can lead to abnormal asset information display due to incompatibility with different device asset information.

[0098] During the POST process, the BIOS calculates the number of data blocks required for the data size in the order obtained, and then traverses the continuous available data space from the first data block pointer along the next data pointer in the linked list. It then searches for space with continuous data blocks along the first linked list data block pointer. If found, the continuous data block space is written to the device asset information and a file identifier is used to indicate that it is occupied by the network card asset information data, so that the front-end BMC web process can call and obtain the data and display it on the web. The BMC monitors and uses timestamps and file resource identifiers to traverse and release obsolete storage information. It also implements a garbage collection mechanism through defragmentation to maintain the validity and occupancy continuity of the used linked list space data, and provides a walk-around solution for exceptions, such as skipping EEPROM.

[0099] In the above-mentioned asset information management method, since the controller no longer stores the asset information of the device in a fixed size according to the asset information data structure format, it obtains the smallest asset information data among the asset information of each type of device, and stores the asset information of each type of device in a linked list data block. The number of data blocks in the linked list data block is set to the minimum data blocks required to store the smallest asset information data. The size of the linked list data block can be several to dozens of times smaller than the structure for storing asset information data in a fixed space. When the storage space size of the same controller storage unit remains unchanged, the number of linked list data blocks that can be set is increased by several to dozens of times, avoiding the idle storage space caused by reserving a very large space, thereby improving the utilization rate of data storage space.

[0100] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0101] In one embodiment, Figure 7 As shown, an asset information management device 10 is provided, including: an asset information acquisition module 1, a storage space judgment module 2, a linked list data block setting module 3, and a garbage collection mechanism module 4.

[0102] The asset information acquisition module 1 is used to obtain the asset information of the device through the basic input and output system during the hardware self-test phase of the basic input and output system, and send it to the controller.

[0103] The storage space judgment module 2 is used to obtain the asset information of various devices in response to the interaction between the controller and the basic input and output system, obtain the minimum asset information data in the asset information of various devices, calculate the number of data blocks required to store the minimum asset information data, search for free space in the controller storage unit, and judge whether the controller can store the asset information based on whether the number of data blocks in the free space found is greater than the number of data blocks required to store the minimum asset information data.

[0104] The linked list data block setting module 3 is used to construct linked list data blocks based on the minimum number of data blocks required to store the minimum asset information data in response to the controller storage unit being able to store asset information, and store the asset information of each type of equipment in each linked list data block.

[0105] The garbage collection mechanism module 4 is configured to trigger a garbage collection mechanism to recycle historical data in the controller storage unit in response to the controller storage unit being unable to store asset information.

[0106] In this embodiment, searching for free space in the controller storage unit and determining whether the controller can store the asset information based on whether the number of data blocks in the found free space is greater than the number of data blocks required to store the minimum asset information data includes:

[0107] Obtain the first data block in the controller storage unit, and traverse the continuous available data space from the first data block pointer along the next data block pointer of the linked list;

[0108] According to the number of data blocks required to store the minimum asset information data, search in the continuously available data space to see whether there are continuously set data blocks that are larger than the data blocks required to store the minimum asset information data. If so, it is determined that the controller storage unit can store the asset information, the data block is marked as allocated, and the file identifier is set according to the device type. Otherwise, it is determined that the controller storage unit cannot store the asset information.

[0109] In this embodiment, linked list data blocks for storing asset information are obtained from the free space. The number of linked list data blocks is set to the minimum data blocks required to store the asset information data, including:

[0110] In the free space, a linked list data block is set for storing the asset information. The number of the linked list data blocks is set according to the number of data blocks required for minimum storage of the asset information data. The total space of the linked list data blocks is greater than or equal to the storage space required for the asset information.

[0111] Each data block in the linked list data block contains the address pointer of the next data block, the data length of the current data block and the storage space for storing the actual data content;

[0112] The number of linked list data blocks is set according to the number of device types, and the asset information of each type of device is stored in each linked list data block.

[0113] In this embodiment, the garbage collection mechanism module 4 is further configured to:

[0114] In response to monitoring that the used size of the linked list database exceeds a warning threshold, or when no continuous available data blocks can be found by traversing the linked list database, a garbage collection mechanism for the asset information storage space of the controller storage unit is triggered.

[0115] In this embodiment, triggering the garbage collection mechanism of the asset information storage space of the controller storage unit includes:

[0116] Check whether the timestamp of the occupied data block is the latest;

[0117] In response to the timestamp of the occupied data block being the latest, checking whether the timestamp of the next occupied data block is the latest through the next address pointer of the linked list;

[0118] In response to the updated timestamp data of the timestamp of the occupied data block, it is determined that the asset information data stored in the currently occupied data block has expired, the occupied data block is deleted and released, and the timestamp of the next occupied data block is checked through the next address pointer of the linked list to see whether it is the latest.

[0119] In this embodiment, the garbage collection mechanism of the asset information storage space of the triggering controller storage unit further includes:

[0120] In response to traversing all asset information data blocks and deleting expired data, the current linked list database is hot-sorted to form a deleted address sort, a new compactly arranged address, and the released idle data blocks are placed at the end of the linked list database.

[0121] In this embodiment, the garbage collection mechanism module 4 is further configured to:

[0122] When executing the garbage collection mechanism, it is determined in real time whether the free space of the controller storage unit after clearing non-latest data can store asset information;

[0123] In response to the controller storage unit having free space capable of storing asset information after clearing non-latest data, exiting the garbage collection mechanism;

[0124] In response to the controller storage unit finding that the free space after clearing non-latest data cannot store the asset information, the controller storage unit does not store the asset information in the free space and executes an exception display mechanism.

[0125] In this embodiment, if Figure 7 As shown, the asset information management device 10 further includes: an asset information display module 5, which is used to:

[0126] In response to displaying the asset information through the controller page, obtaining the stored asset information in the controller storage unit and determining whether there is any unstored asset information;

[0127] The asset information is displayed on the controller page in the order of display priority. The stored asset information is displayed directly, and the unstored asset information executes the exception display mechanism to generate a display details button.

[0128] In this embodiment, the asset information display module 5 is further used to:

[0129] In response to a click of the display details button, calling an interactive interface between the basic input and output system and the controller to obtain asset information from a source and display the asset information on the controller page;

[0130] Determine whether the asset information corresponding to the display details button is displayed successfully. If so, exit the exception display mechanism. If not, delete the non-important asset information in the asset information corresponding to the display details button and perform defragmentation to release storage space of the controller storage unit.

[0131] In this embodiment, the asset information management device is further configured to:

[0132] In response to the existence of non-important asset information in the asset information corresponding to the detail display button being deleted, the control stores the important asset information in the released space the next time the basic input and output system interacts with the controller.

[0133] In this embodiment, the asset information display module 5 is further used to:

[0134] In response to the controller storage unit having no free space after clearing non-latest data being able to store the asset information, determining whether there is a non-high priority display item for which there is no space to store;

[0135] In response to the existence of non-high priority display items with no storage space, the non-high priority display items are recorded in a pop-up window, log or serial port on the controller page, and the recorded non-high priority display items can be manually obtained through IPMI commands.

[0136] In this embodiment, the asset information display module 5 is further used to:

[0137] In response to the controller storage unit finding that the free space after clearing non-latest data cannot store asset information, the number of data blocks required to store the minimum asset information data is obtained, and the controller searches for free space again the next time the basic input and output system interacts with the controller, and determines whether the free space is larger than the space required to store the asset information. If so, the asset information is stored in the free space using a distributed storage method.

[0138] In the above-mentioned asset information management device, since the controller no longer stores the asset information of the device in a fixed size according to the asset information data structure format, it obtains the smallest asset information data among the asset information of each type of device, and stores the asset information of each type of device in a linked list data block. The number of data blocks in the linked list data block is set to the minimum data blocks required to store the smallest asset information data. The size of the linked list data block can be several to dozens of times smaller than the structure for storing asset information data in a fixed space. When the storage space size of the same controller storage unit remains unchanged, the number of linked list data blocks that can be set is increased by several to dozens of times, avoiding the idle storage space caused by reserving a very large space, thereby improving the utilization rate of data storage space.

[0139] For the description of the features in the embodiment corresponding to the asset information management device, please refer to the relevant description of the embodiment corresponding to the asset information management method, and will not be repeated here.

[0140] An embodiment of the present application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned asset information management method embodiments.

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

[0142] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned asset information management method embodiments when run.

[0143] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0144] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned asset information management method embodiments are implemented.

[0145] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps in any of the above-mentioned asset information management method embodiments.

[0146] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0147] The above is a detailed introduction to the asset information management method, electronic device, storage medium and product provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.

Claims

1. An asset information management method, characterized in that: The asset information management method includes: During the hardware self-test phase of the basic input and output system, the asset information of the device is obtained through the basic input and output system and sent to the controller; In response to the controller interacting with the basic input and output system to obtain asset information of various types of devices, obtaining the smallest asset information data in the asset information of the various types of devices, calculating the number of data blocks required to store the smallest asset information data, searching for free space in a storage unit of the controller, and determining whether the controller can store the asset information based on whether the number of data blocks in the free space found is greater than the number of data blocks required to store the smallest asset information data; In response to the controller storage unit being able to store the asset information, constructing linked list data blocks according to a minimum number of data blocks required to store the minimum asset information data, and storing the asset information of each type of equipment in each linked list data block; In response to the controller storage unit being unable to store the asset information, triggering a garbage collection mechanism to recycle historical data in the controller storage unit; According to the size of the asset information data of each device other than the smallest asset information data, the number of corresponding linked list data blocks is calculated, the corresponding number of continuous available data spaces are found, and the corresponding asset information data is written into the continuous available data spaces.

2. The asset information management method according to claim 1, characterized in that: The searching for free space in the controller storage unit and determining whether the controller can store the asset information according to whether the number of data blocks in the found free space is greater than the number of data blocks required to store the minimum asset information data includes: Obtaining a first data block from the controller storage unit, and traversing the continuously available data space in sequence from the first data block pointer along the next data block pointer of the linked list; According to the number of data blocks required to store the minimum asset information data, the controller searches the continuously available data space for data blocks that are larger than the data blocks required to store the minimum asset information data. If so, the controller determines that the storage unit is capable of storing the asset information, marks the data blocks as allocated, and sets a file identifier according to the device type. Otherwise, the controller determines that the storage unit cannot store the asset information.

3. The asset information management method according to claim 2, characterized in that: The step of constructing linked list data blocks based on the minimum number of data blocks required to store the minimum asset information data, and storing the asset information of each type of equipment in each linked list data block includes: Setting linked list data blocks for storing asset information in the free space, wherein the number of the linked list data blocks is set according to the number of data blocks required for minimum storage of the asset information data, and the total space of the linked list data blocks is greater than or equal to the required storage space of the asset information; Each data block in the linked list data block includes an address pointer of the next data block, a data length of the current data block, and a storage space for storing actual data content; The number of linked list data blocks is set according to the number of device types, and the asset information of each type of device is stored in each linked list data block.

4. The asset information management method according to claim 2, characterized in that: The asset information management method further includes: In response to monitoring that the used size of the linked list database exceeds a warning threshold, or when no continuous available data blocks can be found by traversing the linked list database, a garbage collection mechanism for the asset information storage space of the controller storage unit is triggered.

5. The asset information management method according to claim 4, characterized in that: The garbage collection mechanism of triggering the storage space of the controller storage unit for storing asset information includes: Check whether the timestamp of the occupied data block is the latest; In response to the timestamp of the occupied data block being the latest, checking whether the timestamp of the next occupied data block is the latest through the next address pointer of the linked list; In response to the updated timestamp data of the timestamp of the occupied data block, it is determined that the asset information data stored in the currently occupied data block has expired, the occupied data block is deleted and released, and the timestamp of the next occupied data block is checked through the next address pointer of the linked list to see whether it is the latest.

6. The asset information management method according to claim 5, characterized in that: The garbage collection mechanism of triggering the storage space of the controller storage unit for storing asset information further includes: In response to traversing all asset information data blocks and deleting expired data, the current linked list database is hot-sorted to form a deleted address sort, a new compactly arranged address, and the released idle data blocks are placed at the end of the linked list database.

7. The asset information management method according to claim 4, characterized in that: The asset information management method further includes: When executing the garbage collection mechanism, determining in real time whether the free space of the controller storage unit after clearing non-latest data can store the asset information; In response to the controller storage unit having free space after clearing non-latest data capable of storing the asset information, exiting the garbage collection mechanism; In response to the controller storage unit not being able to store the asset information in the free space after clearing non-latest data, the controller storage unit does not store the asset information in the free space and executes an exception display mechanism.

8. The asset information management method according to claim 7, characterized in that: The asset information management method further includes: In response to displaying asset information through the controller page, obtaining stored asset information in the controller storage unit and determining whether there is unstored asset information; The asset information is displayed on the controller page in the order of display priority, wherein the stored asset information is directly displayed, and the unstored asset information executes the exception display mechanism to generate a display detail button.

9. The asset information management method according to claim 8, characterized in that: The asset information management method further includes: In response to the display details button being clicked, calling the interactive interface between the basic input and output system and the controller to obtain asset information from a source and display the asset information on the controller page; Determine whether the asset information corresponding to the display details button is displayed successfully. If so, exit the exception display mechanism. If not, delete the non-important asset information in the asset information corresponding to the display details button, and perform defragmentation to release the storage space of the controller storage unit.

10. The asset information management method according to claim 9, characterized in that: The asset information management method further includes: In response to the deletion of non-important asset information in the asset information corresponding to the display details button, the control stores important asset information in the released space the next time the basic input and output system interacts with the controller.

11. The asset information management method according to claim 8, characterized in that: The asset information management method further includes: In response to the controller storage unit having no free space after clearing non-latest data being able to store the asset information, determining whether there is a non-high priority display item for which there is no space to store; In response to the existence of non-high priority display items with no storage space, the non-high priority display items are recorded in a pop-up window, log or serial port on the controller page, and the recorded non-high priority display items can be manually obtained through IPMI commands.

12. The asset information management method according to claim 7, characterized in that: The asset information management method further includes: In response to the controller storage unit having free space that cannot store the asset information after clearing non-latest data, the number of data blocks required to store the minimum asset information data is obtained, and the controller storage unit is controlled to search for free space again the next time the basic input and output system interacts with the controller, and it is determined whether the free space is larger than the space required to store the asset information. If so, the asset information is stored in the free space in a distributed storage manner.

13. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the asset information management method according to any one of claims 1 to 12 when executing the computer program.

14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the asset information management method according to any one of claims 1 to 12.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the asset information management method according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Non-fixed-length record data recognition method

    CN1936864A