A method, device, electronic device and storage medium for acquiring equipment asset information
By using the device boot process program to obtain and split the device asset information when the hardware device is turned on, and send it to the system auxiliary management controller for storage, the problem of inconvenient acquisition of equipment asset information and low reliability in the prior art is solved, and more efficient, convenient and reliable asset information management is achieved.
Patent Information
- Application Number
- CN202211157067.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-21
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2042-09-21
AI Technical Summary
The prior art acquires asset information through in-band mode when the hardware device is turned on, resulting in inconvenient collection and maintenance of equipment asset information, and the acquisition method is low.
During the startup stage of the target device, the full amount of equipment asset information is obtained through the equipment startup process program, and the asset information data packet is split and generated based on the asset association parameter information, and sent to the system auxiliary management controller for storage, so as to obtain asset information on demand in any state.
It improves the convenience, efficiency and reliability of equipment asset information collection and maintenance, and solves the problem of low information acquisition efficiency, convenience and reliability.
Smart Images

Figure CN115454776B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of data processing technology, and in particular to a method, apparatus, electronic device, and storage medium for acquiring device asset information. Background Art
[0002] With the rapid development of Internet technology, hardware devices such as servers, network equipment, and Internet Data Centers (IDCs) that serve as carriers of the Internet have become the main hardware devices of various enterprises. The unified management of the asset information of the above hardware devices on the Internet has also become a top priority for hardware equipment management work of various enterprises.
[0003] Currently, managing device asset information often requires personnel to search for the required asset information through the in-band operating system while the device is powered on. Taking SMBIOS (System Management BIOS), a standard specification that motherboard or system manufacturers must follow to display product management information in a standardized format, as an example, the SMBIOS specification defines a series of data structures and access methods for users or applications to store and access computer system information. Conventionally, personnel can use DMI (Desktop Management Interface) technology to obtain hardware device asset information. The primary component of DMI is the Management Information Format (MIF) database, which contains all asset information related to computer systems and components. In other words, DMI is a management system that helps collect computer system information, and DMI information collection must strictly adhere to the SMBIOS specification. Thus, personnel can use the SMBIOS specification to obtain various types of asset information, including the model, parameter settings, and status of each component in a hardware device. In the prior art, obtaining SMBIOS information requires searching the SMBIOS table stored in the BIOS (Basic Input and Output System) in the in-band operating system while the device is powered on. The SMBIOS asset information is then parsed from the table. This means that if the hardware device is powered off or unable to power on due to a malfunction, the SMBIOS asset information cannot be obtained.
[0004] In the process of realizing the present invention, the inventors found that the existing technology has the following defects: the method of obtaining the asset information of the hardware device in an in-band manner when the hardware device is turned on is not conducive to the collection and maintenance of the device asset information, and the reliability of the device asset information acquisition method is low. Summary of the Invention
[0005] Embodiments of the present invention provide a method, apparatus, electronic device, and storage medium for acquiring device asset information, which can improve the convenience, efficiency, and reliability of collecting and maintaining device asset information.
[0006] According to one aspect of the present invention, a method for acquiring device asset information is provided, comprising:
[0007] During the startup phase of the target device, the full amount of device asset information of the target device is obtained through the device startup processing program of the target device;
[0008] Splitting the full amount of device asset information according to the asset-related parameter information of the full amount of device asset information by the device startup processing program to generate an asset information data packet;
[0009] The asset information data packet is sent to the system auxiliary management controller of the target device through the device startup processing program for storage, so that the user can obtain the full device asset information of the target device from the system auxiliary management controller as needed.
[0010] In the embodiment of the present invention, during the startup phase of the target device, the full device asset information of the target device is obtained through the device startup processing program of the target device, and the full device asset information is split according to the asset-related parameter information of the full device asset information through the device startup processing program to generate an asset information data packet. Finally, the asset information data packet is sent to the system auxiliary management controller of the target device for storage through the device startup processing program, so that the asset information can be obtained on demand through the system auxiliary management controller in any state of the target device, thereby solving the problems of low information acquisition efficiency, convenience and reliability of the existing device asset information acquisition method, and can improve the convenience, efficiency and reliability of device asset information collection and maintenance.
[0011] Optionally, the device startup processing program splits the full device asset information according to the asset association parameter information of the full device asset information to generate an asset information data packet, including:
[0012] Determining, by the device startup processing program, the asset version information of the full device asset information according to the asset association parameter information of the full device asset information;
[0013] Determining the asset data volume of the full device asset information according to the asset version information by the device startup processing program;
[0014] Determining, by the device startup processing program, the number of asset information data packets to be sent according to the asset data volume and a preset sending data packet size;
[0015] The device startup processing program is used to split the full amount of device asset information into data packets of the same number as those to be sent, thereby generating the asset information data packets.
[0016] The above technical solution can quickly and accurately determine the number of asset information data packets that need to be split based on the amount of asset data and the preset sending data packet size, thereby improving the generation efficiency of the asset information data packets.
[0017] Optionally, generating the asset information data packet includes:
[0018] Determining, according to the splicing position of the asset information data packet in the full device asset information, the end-of-packet identifier of the first byte of the asset information data packet and the offset of the second byte;
[0019] determining a data packet size of the third byte of the asset information data packet according to the amount of data carried by the asset information data packet;
[0020] The data content of the remaining bytes of the asset information data packet is determined according to the data carried by the asset information data packet.
[0021] The above technical solution, by setting a unified format for asset information data packets, can enable the system auxiliary management controller to quickly and completely restore the full amount of device asset information based on the received asset information data packets.
[0022] Optionally, after the asset information data packet is sent to the system auxiliary management controller of the target device for storage through the device startup processing program, the method further includes:
[0023] Obtaining a device asset information acquisition request sent by a user to the system auxiliary management controller;
[0024] In response to the device asset information acquisition request, the asset information data packet stored in the system auxiliary management controller is parsed by an asset information parsing tool integrated in the system auxiliary management controller to obtain the full device asset information;
[0025] Feedback the device asset information to the user.
[0026] The above technical solution can directly view, obtain and manage the device asset information of the device in an out-of-band batch manner, which facilitates the collection and maintenance of device asset information.
[0027] Optionally, before sending the asset information data packet to the system auxiliary management controller of the target device for storage through the device startup processing program, the method further includes:
[0028] Obtaining installation integration data of the asset information analysis tool;
[0029] The asset information parsing tool is integrated into the system auxiliary management controller according to the installation integration data of the asset information parsing tool.
[0030] By pre-integrating the asset information parsing tool into the system auxiliary management controller, the system auxiliary management controller can quickly respond to device asset information acquisition requests, parse the full amount of device asset information in a timely manner and return it to the user, thereby improving the processing efficiency of device asset information.
[0031] Optionally, after the asset information data packet is sent to the system auxiliary management controller of the target device for storage through the device startup processing program, the method further includes:
[0032] When the device startup processing program determines that the target asset information data packet fails to be sent, the target asset information data packet is resent to the system auxiliary management controller until it is determined that the target asset information data packet is sent successfully or the preset number of data packet sending times is reached.
[0033] The retry mechanism of the asset information data packet described above can effectively improve the integrity and reliability of the asset information data packet transmission.
[0034] Optionally, the device boot processing program includes BIOS; the full device asset information includes SMBIOS configuration information; and the system auxiliary management controller includes BMC.
[0035] According to another aspect of the present invention, there is provided a device for acquiring equipment asset information, comprising:
[0036] A full device asset information acquisition module is used to acquire the full device asset information of the target device through the device startup processing program of the target device during the startup phase of the target device;
[0037] an asset information data packet generating module, configured to split the full amount of device asset information according to the asset-related parameter information of the full amount of device asset information through the device startup processing program to generate an asset information data packet;
[0038] The asset information data packet storage module is used to send the asset information data packet to the system auxiliary management controller of the target device for storage through the device startup processing program.
[0039] According to another aspect of the present invention, an electronic device is provided, comprising:
[0040] at least one processor; and
[0041] a memory communicatively connected to the at least one processor; wherein,
[0042] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the device asset information acquisition method according to any embodiment of the present invention.
[0043] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the device asset information acquisition method according to any embodiment of the present invention when executed.
[0044] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0046] Figure 1 This is a flow chart of a method for obtaining device asset information provided by an embodiment of the present invention;
[0047] Figure 2 This is a flow chart of a method for obtaining device asset information provided by an embodiment of the present invention;
[0048] Figure 3 This is a flow chart of a method for obtaining device asset information provided by an embodiment of the present invention;
[0049] Figure 4 This is a schematic diagram of a device for acquiring equipment asset information provided by an embodiment of the present invention;
[0050] Figure 5 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0052] It should be noted that the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or are inherent to these processes, methods, products or apparatus.
[0053] Figure 1 This is a flow chart of a device asset information acquisition method provided by an embodiment of the present invention. This embodiment is applicable to situations where the device asset information of the device is acquired on demand in any state of the device. The method can be executed by a device asset information acquisition device, which can be implemented by software and / or hardware and can generally be integrated into an electronic device. The electronic device can be a terminal device, a server device, or a network device, etc. The embodiment of the present invention does not limit the specific device type of the electronic device. Accordingly, if Figure 1 As shown, the method includes the following operations:
[0054] S110 . During the startup phase of the target device, obtain the full amount of device asset information of the target device through a device startup processing program of the target device.
[0055] The target device can be any hardware device for which full device asset information needs to be obtained, such as a server, network equipment, or internet data center. The present invention does not limit the specific type of target device, as long as the device asset information needs to be obtained. The device startup processing program can be a program responsible for the startup function during the device startup phase. Optionally, the full device asset information can include all available asset information for the device.
[0056] In an embodiment of the present invention, in order to facilitate the user to subsequently obtain the full device asset information of the target device on demand, when the target device is powered on, its full device asset information can be obtained through the device power-on processing program of the target device.
[0057] S120 : Split the full amount of device asset information according to the asset-related parameter information of the full amount of device asset information through the device startup processing program to generate an asset information data packet.
[0058] The asset-related parameter information may be parameter information related to the full device asset information, including but not limited to the version number, size, and specific data content of the full device asset information. The asset information data packet may be a data packet obtained by splitting the full device asset information according to certain rules.
[0059] To facilitate storage of the full device asset information, after obtaining the full device asset information of the target device through the device startup processing program, the device startup processing program can further obtain asset-related parameter information for the full device asset information and, based on the asset-related parameter information, split the full device asset information of the target device into at least one asset information data packet. It is understood that the number and size of the generated asset information data packets will vary depending on the size of the full device asset information.
[0060] S130. Send the asset information data packet to the system auxiliary management controller of the target device for storage through the device startup processing program, so that the user can obtain the full device asset information of the target device from the system auxiliary management controller as needed.
[0061] The system auxiliary management controller may be a control module for providing hardware monitoring and control functions for the target device.
[0062] Accordingly, the device startup process can send the individual asset information packets obtained by splitting them to the target device's system auxiliary management controller. The system auxiliary management controller can locally store the received asset information packets. In other words, the target device's complete device asset information can be stored in the target device's system auxiliary management controller during the startup phase.
[0063] The above technical solution collects the full amount of device asset information once during the boot-up phase through the device boot-up processing program of the device, and sends it in the form of a data packet and stores it in the system auxiliary management controller, so that the system auxiliary management controller can completely store the full amount of device asset information of the device. Thereafter, when the target device is in any state, such as when the target device cannot be booted due to special reasons, the user can also obtain the full amount of device asset information of the target device on demand through the system auxiliary management controller, thereby improving the convenience, efficiency and reliability of device asset information collection and maintenance. At the same time, the system auxiliary management controller can completely store the full amount of device asset information of the device based on its own storage space, and does not require an additional chip to store the full amount of device asset information separately, thereby reducing the storage cost of the device asset information.
[0064] In an optional embodiment of the present invention, the device startup processing program may include a BIOS program; the full device asset information may include SMBIOS configuration information; and the system auxiliary management controller may include a BMC (Baseboard Management Controller).
[0065] Optionally, the SMBIOS configuration information of the target device can be used as its full device asset information. Normally, the SMBIOS configuration information can at least include the full asset information of the BIOS, the entire device, the motherboard, the memory, the processor such as the CPU (Central Processing Unit), various ports and integrated devices. Therefore, through the SMBIOS configuration information, the user can obtain information such as the configuration and health status of the target device. Especially for application scenarios with a large number of device groups, it is extremely important to uniformly view and obtain the SMBIOS configuration information of a large number of devices. The BIOS is a set of programs solidified on a ROM (Read-Only Memory) chip on the motherboard inside the device. It stores the most important basic input and output programs of the device, system setting information, self-test programs after power-on, and system self-starting programs. Its main function is to provide the computer with the lowest-level and most direct hardware settings and control.
[0066] In the related art, the methods for obtaining the SMBIOS configuration information of the device all require that the device be powered on, and the SMBIOS table stored in the BIOS be searched in the in-band operating system to parse out the required SMBIOS information. For example, under the Linux system, the SMBIOS table stored in the BIOS is viewed through the tool DMIDECODE (which complies with the SMBIOS / DMI standard, parses the SMBIOS data, and displays the system hardware configuration information recorded in the SMBIOS in a readable text format). Under UEFISHELL (an interface between the user and the UEFI system), the SMBIOS table stored in the BIOS is viewed through the command SMBIOSVIEW. Regardless of the method used to obtain the SMBIOS configuration information, the device must remain powered on. If the device is not powered on, the SMBIOS information of the device cannot be obtained.
[0067] The device asset information acquisition method provided in an embodiment of the present invention uses the BIOS to obtain the original configuration information of all SMBIOS tables during the boot phase, split it into multiple asset information packets, and send them to the BMC. The BMC can then save the received packets locally. Because the SMBIOS configuration information is fully stored in the BMC, users can access the full SMBIOS configuration information even when the device is powered off by accessing the BMC.
[0068] Optionally, the BIOS can use IPMI (Intelligent Platform Management Interface) commands to send the separated asset information packets to the BMC. IPMI is a set of computer interface specifications defined for autonomous computer subsystems. It is used to provide management and monitoring functions independent of the host system's CPU, firmware (BIOS or UEFI), operating system, and other hardware and software.
[0069] It should be noted that currently, during the startup phase of some server devices, the BIOS can send some specific configuration information to the BMC. However, since this requires the BIOS and BMC to negotiate and develop different data formats to achieve this, this asset information acquisition method cannot obtain the full amount of configuration information recorded in the SMBIOS.
[0070] In the embodiment of the present invention, during the startup phase of the target device, the full device asset information of the target device is obtained through the device startup processing program of the target device, and the full device asset information is split according to the asset-related parameter information of the full device asset information through the device startup processing program to generate an asset information data packet. Finally, the asset information data packet is sent to the system auxiliary management controller of the target device for storage through the device startup processing program, so that the asset information can be obtained on demand through the system auxiliary management controller in any state of the target device, thereby solving the problems of low information acquisition efficiency, convenience and reliability of the existing device asset information acquisition method, and can improve the convenience, efficiency and reliability of device asset information collection and maintenance.
[0071] Figure 2 This is a flow chart of a method for obtaining device asset information provided by an embodiment of the present invention. This embodiment is specific based on the above embodiment. In this embodiment, multiple specific optional implementation methods for generating asset information data packets and obtaining device asset information on demand are provided. Figure 2 As shown, the method of this embodiment may include:
[0072] S210 . During the startup phase of the target device, obtain the full amount of device asset information of the target device through a device startup processing program of the target device.
[0073] S220: Determine, through the device startup processing program, asset version information of the full device asset information according to asset association parameter information of the full device asset information.
[0074] The asset version information is also the version information of the entire device asset information.
[0075] S230: Determine the asset data volume of the full device asset information according to the asset version information through the device startup processing program.
[0076] S240: Determine, by the device startup processing program, the number of asset information data packets to be sent according to the asset data volume and a preset sending data packet size.
[0077] Among them, the preset sending data packet size can be the data size of the device asset information that can be carried in the pre-set asset information data packet. Its size can be set according to actual needs, such as 50 bytes, etc. The embodiment of the present invention does not limit the specific size setting of the preset sending data packet size.
[0078] S250 , splitting the full amount of device asset information into data packets of the same number as those to be sent through the device startup processing program to generate the asset information data packets.
[0079] Specifically, the asset-related parameter information of the full device asset information can be first obtained during the startup phase of the target device through the device startup program, and the version number of the full device asset information can be further determined based on the asset-related parameter information, so as to determine the total asset data volume of the full device asset information based on the version number of the full device asset information, and then the number of asset information data packets to be sent can be calculated through the device startup program based on the asset data volume and the preset sending data packet size. For example, the device startup program can determine the unit data volume of the asset information data that each asset information data packet can carry based on the preset sending data packet size, and thus determine the number of asset information data packets to be sent based on the quotient and residual value of the asset data volume and the unit data volume. Finally, the device startup program can split the full device asset information into the sending number of data packets, and obtain the asset information data packets that need to be sent to the system auxiliary management controller for storage.
[0080] The above technical solution can quickly and accurately determine the number of asset information data packets that need to be split based on the amount of asset data and the preset sending data packet size, thereby improving the generation efficiency of the asset information data packets.
[0081] In an optional embodiment of the present invention, the generating of the asset information data packet may include: determining the end packet identifier of the first byte of the asset information data packet and the offset of the second byte according to the splicing position of the asset information data packet in the full device asset information; determining the data packet size of the third byte of the asset information data packet according to the amount of data carried by the asset information data packet; and determining the data content of the remaining bytes of the asset information data packet according to the data carried by the asset information data packet.
[0082] The splicing position primarily refers to the location within the full device asset information where the asset information data carried by the asset information data packet is extracted. In other words, the full device asset information can be obtained by sequentially splicing the asset information data carried by each asset information data packet. The last packet identifier can be used to identify whether the current asset information data packet is the last packet. The offset in the second byte of the asset information data packet can be the offset of the asset information data carried by the asset information data packet within the full device asset information. The packet size in the third byte of the asset information data packet can represent the size of the current asset information data packet.
[0083] In a specific example, the BIOS obtains the device's SMBIOS version information during device startup to determine the size of the original SMBIOS configuration information based on the SMBIOS version information. Furthermore, a preset send packet size for the asset information packet can be pre-set based on actual needs, and the number of asset information packets to be sent can be calculated based on the size of the original SMBIOS configuration information and the preset send packet size. For example, assuming the original SMBIOS configuration information includes 101 bytes of data and the preset send packet size for the asset information packet is 50 bytes, each asset information packet can carry 50 bytes of SMBIOS information. Based on this, the original SMBIOS configuration information can be split into three asset information packets. Accordingly, in the generated asset information packet, the first byte can have a value of 0 or 1, indicating whether the current asset information packet is the last packet. The second byte can represent the offset of the asset information carried in the current asset information packet within the original SMBIOS configuration information. The third byte can represent the size of the current asset information packet, and the remaining bytes, starting from the fourth byte, represent the portion of the SMBIOS configuration information carried.
[0084] For example, assuming the original SMBIOS configuration information includes 101 bytes of data and the default asset information data packet size is 50 bytes, the first two generated asset information data packets can each carry 50 bytes of SMBIOS configuration information, while the last asset information data packet can carry 1 byte of SMBIOS configuration information. Therefore, the total size of the last asset information data packet may be different from the total size of the other asset information data packets.
[0085] The above technical solution, by setting a unified format for asset information data packets, can enable the system auxiliary management controller to quickly and completely restore the full amount of device asset information based on the received asset information data packets.
[0086] S260: Send the asset information data packet to the system auxiliary management controller of the target device for storage through the device startup processing program.
[0087] In an optional embodiment of the present invention, after the asset information data packet is sent to the system auxiliary management controller of the target device for storage through the device startup processing program, it may also include: when the device startup processing program determines that the target asset information data packet has failed to be sent, re-sending the target asset information data packet to the system auxiliary management controller until it is determined that the target asset information data packet has been sent successfully, or the preset number of data packet sending times is reached.
[0088] The preset number of times the data packet is sent may be set according to actual needs, such as 3 times or 5 times, etc. The embodiment of the present invention does not limit the specific value of the preset number of times the data packet is sent.
[0089] To ensure the integrity and reliability of asset information data packet transmission, if one or more asset information data packets fail to be transmitted, they can be identified as target asset information data packets. The device boot process can then resend the target asset information data packets to the system auxiliary management controller until the target asset information data packets are successfully transmitted or the preset number of data packet transmissions is reached. If the target asset information data packets are still not successfully transmitted after the preset number of data packet transmissions is reached, the transmission of the target asset information data packets can be stopped.
[0090] S270: Obtain a device asset information acquisition request sent by the user to the system auxiliary management controller.
[0091] The device asset information acquisition request may be a request for acquiring device asset information from a system auxiliary management controller.
[0092] S280. In response to the device asset information acquisition request, the asset information data packet stored in the system auxiliary management controller is parsed by an asset information parsing tool integrated in the system auxiliary management controller to obtain the full device asset information.
[0093] S290: Feedback the device asset information to the user.
[0094] The asset information parsing tool can be used to parse the asset information data package stored in the system auxiliary management controller. For example, for the BIOS program, the DMIDECODE tool can be used as the asset information parsing tool to parse the SMBIOS configuration information.
[0095] In an embodiment of the present invention, a user can obtain the full device asset information of a target device out-of-band. Specifically, the user sends a device asset information acquisition request to the system auxiliary management controller. Upon receiving the device asset information acquisition request, the system auxiliary management controller activates an internally integrated asset information parsing tool to parse the asset information data packet locally stored by the system auxiliary management controller, thereby obtaining the full device asset information and feeding it back to the user.
[0096] In a specific example, assuming the device boot handler is the unified BIOS, the full device asset information is the SMBIOS configuration information, and the system management controller is the BMC, after the BMC stores the asset information packets of the SMBIOS configuration information, the user can send a request to the BMC using the wget command (used to download files from a specified URL) to view or obtain the SMBIOS configuration information. After receiving the request, the BMC parses the locally stored asset information packets using the integrated DMIDECODE tool to obtain the complete SMBIOS configuration information and return the SMBIOS configuration information to the user.
[0097] The above technical solution can directly view, obtain and manage the device asset information of the device in an out-of-band batch manner, which facilitates the collection and maintenance of device asset information.
[0098] In an optional embodiment of the present invention, before the asset information data packet is sent to the system auxiliary management controller of the target device for storage through the device boot processing program, it may also include: obtaining the installation integration data of the asset information parsing tool; and integrating the asset information parsing tool into the system auxiliary management controller according to the installation integration data of the asset information parsing tool.
[0099] It is understandable that the system auxiliary management controller usually does not install the integrated asset information analysis tool by default. Therefore, the installation integration data of the asset information analysis tool can be obtained in advance so as to integrate the asset information analysis tool into the system auxiliary management controller according to the installation integration data of the asset information analysis tool.
[0100] By pre-integrating the asset information parsing tool into the system auxiliary management controller, the system auxiliary management controller can quickly respond to device asset information acquisition requests, parse the full amount of device asset information in a timely manner and return it to the user, thereby improving the processing efficiency of device asset information.
[0101] Figure 3This is a flow chart of a method for obtaining device asset information provided by an embodiment of the present invention. In order to more clearly illustrate the technical solution provided by an embodiment of the present invention, in a specific example, BIOS is used as the device boot processing program, SMBIOS configuration information is used as the full device asset information, and BMC is used as the system auxiliary management controller. Figure 3 As shown, the device asset information acquisition method may include the following process:
[0102] During device startup, the BIOS obtains the device's SMBIOS version information and uses it to determine the size of the SMBIOS information. The BIOS can send the SMBIOS information to the BMC via IPMI commands. Because IPMI commands are of type UINT8 (8-bit unsigned integer), the BIOS can use IPMI commands to split the SMBIOS information into multiple packets and send them to the BMC separately. Each packet has the following unified format: the first byte (with a value of 0 or 1) indicates whether the current packet is the last split packet; the second byte indicates the offset of the SMBIOS information carried by the current packet within the entire SMBIOS information; the third byte indicates the size of the data transmitted by the current packet; the remaining bytes can be the actual SMBIOS data. If the BIOS determines that a packet has failed to be sent, it can enable a retry mechanism to resend the packet. If the preset number of packet transmissions is reached, such as three failures, the BIOS can terminate the retry mechanism and stop sending packets. After receiving the information, the BMC writes the data to a local bin file for storage. To view or obtain SMBIOS information, users can send the wget command to the BMC to request the SMBIOS information. After receiving the wget command, the BMC uses the integrated DMIDECODE tool to parse the data stored in the bin file, obtains the complete SMBIOS information, and returns it to the user.
[0103] The above technical solution uses BIOS based on IPMI technology to send all SMBIOS raw data to the BMC for storage during the device startup process. Users access the BMC through the wget method to obtain the original SMBIOS data. Therefore, the device can collect SMBIOS data once during the startup process, and the corresponding complete data can be stored in the BMC. Even when the device cannot be started due to special reasons, the SMBIOS data information can still be obtained normally. At the same time, users can also directly obtain SMBIOS information out-of-band, which facilitates the collection and maintenance of server configuration information. The above solution is applicable to any platform that supports IPMI commands and is not restricted by various factors such as CPU architecture and device manufacturers, and has strong applicability. In addition, the command interface opened based on wget technology can support batch viewing and management of SMBIOS information of a group of devices. Using the BMC's own storage space to locally store SMBIOS information does not require additional chips or storage space, thereby reducing storage costs.
[0104] It should be noted that any arrangement and combination of the technical features in the above embodiments also falls within the protection scope of the present invention.
[0105] Figure 4 Schematic diagram of a device for acquiring equipment asset information provided by an embodiment of the present invention. Figure 4 As shown, the apparatus includes: a full device asset information acquisition module 310, an asset information data packet generation module 320, and an asset information data packet storage module 330, wherein:
[0106] The full device asset information acquisition module 310 is configured to acquire the full device asset information of the target device through the device startup processing program of the target device during the startup phase of the target device;
[0107] An asset information data packet generating module 320 is configured to split the full device asset information according to the asset-related parameter information of the full device asset information through the device startup processing program to generate an asset information data packet;
[0108] The asset information data packet storage module 330 is used to send the asset information data packet to the system auxiliary management controller of the target device for storage through the device boot processing program, so that the user can obtain the full device asset information of the target device from the system auxiliary management controller on demand.
[0109] In the embodiment of the present invention, during the startup phase of the target device, the full device asset information of the target device is obtained through the device startup processing program of the target device, and the full device asset information is split according to the asset-related parameter information of the full device asset information through the device startup processing program to generate an asset information data packet. Finally, the asset information data packet is sent to the system auxiliary management controller of the target device for storage through the device startup processing program, so that the asset information can be obtained on demand through the system auxiliary management controller in any state of the target device, thereby solving the problems of low information acquisition efficiency, convenience and reliability of the existing device asset information acquisition method, and can improve the convenience, efficiency and reliability of device asset information collection and maintenance.
[0110] Optionally, the asset information data packet generation module 320 is specifically used to: determine the asset version information of the full device asset information according to the asset-related parameter information of the full device asset information through the device startup processing program; determine the asset data volume of the full device asset information according to the asset version information through the device startup processing program; determine the number of asset information data packets to be sent according to the asset data volume and a preset sending data packet size through the device startup processing program; split the full device asset information into data packets of the sending number through the device startup processing program to generate the asset information data packet.
[0111] Optionally, the asset information data packet generation module 320 is specifically used to: determine the end packet identifier of the first byte of the asset information data packet and the offset of the second byte according to the splicing position of the asset information data packet in the full device asset information; determine the data packet size of the third byte of the asset information data packet according to the amount of data carried by the asset information data packet; and determine the data content of the remaining bytes of the asset information data packet according to the data carried by the asset information data packet.
[0112] Optionally, the device asset information acquisition apparatus may further include: a device asset information feedback module, configured to: obtain a device asset information acquisition request sent by a user to the system auxiliary management controller; in response to the device asset information acquisition request, parse the asset information data packet stored in the system auxiliary management controller through an asset information parsing tool integrated in the system auxiliary management controller to obtain the full amount of device asset information; and feed back the device asset information to the user.
[0113] Optionally, the device asset information acquisition apparatus may further include: an asset information parsing tool integration module, used to: obtain installation integration data of the asset information parsing tool; and integrate the asset information parsing tool into the system auxiliary management controller according to the installation integration data of the asset information parsing tool.
[0114] Optionally, the device asset information acquisition apparatus may further include: a data packet resending module, used to: when the device startup processing program determines that the target asset information data packet has failed to be sent, resend the target asset information data packet to the system auxiliary management controller until it is determined that the target asset information data packet has been sent successfully, or the preset number of data packet sending times is reached.
[0115] Optionally, the device boot processing program includes BIOS; the full device asset information includes SMBIOS configuration information; and the system auxiliary management controller includes BMC.
[0116] The above-mentioned device asset information acquisition device can execute the device asset information acquisition method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in this embodiment, please refer to the device asset information acquisition method provided by any embodiment of the present invention.
[0117] Since the device asset information acquisition device described above is a device that can execute the device asset information acquisition method in the embodiment of the present invention, based on the device asset information acquisition method described in the embodiment of the present invention, those skilled in the art can understand the specific implementation methods and various variations of the device asset information acquisition device in this embodiment. Therefore, how the device asset information acquisition device implements the device asset information acquisition method in the embodiment of the present invention will not be described in detail here. As long as those skilled in the art implement the device used in the device asset information acquisition method in the embodiment of the present invention, it falls within the scope of protection of this application.
[0118] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0119] like Figure 5As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0120] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0121] Processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any other suitable processor, controller, microcontroller, etc. Processor 11 executes the various methods and processes described above, such as the method for obtaining device asset information.
[0122] In some embodiments, the device asset information acquisition method can be implemented as a computer program that is tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the device asset information acquisition method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to execute the device asset information acquisition method in any other appropriate manner (e.g., by means of firmware).
[0123] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0124] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0125] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0126] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and the input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0127] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0128] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0129] An embodiment of the present invention also provides a computer storage medium storing a computer program, which, when executed by a computer processor, is used to execute the device asset information acquisition method described in any of the above embodiments of the present invention: in the startup phase of the target device, the full device asset information of the target device is acquired through the device startup processing program of the target device; the full device asset information is split according to the asset-related parameter information of the full device asset information through the device startup processing program to generate an asset information data packet; the asset information data packet is sent to the system auxiliary management controller of the target device for storage through the device startup processing program, so that the user can obtain the full device asset information of the target device from the system auxiliary management controller on demand.
[0130] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM, or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by an instruction execution system, device or device or used in combination with it.
[0131] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0132] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
[0133] Computer program code for performing the operations of the present invention may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0134] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0135] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for acquiring equipment asset information, characterized in that: include: During the startup phase of the target device, the full amount of device asset information of the target device is obtained through the device startup processing program of the target device; The device startup processing program is used to split the full amount of device asset information according to the asset-related parameter information of the full amount of device asset information to generate an asset information data packet; The asset information data packet is sent to the system auxiliary management controller of the target device for storage through the device boot processing program, so that the user can obtain the full amount of device asset information of the target device from the system auxiliary management controller as needed; The device startup processing program splits the full amount of device asset information according to the asset association parameter information of the full amount of device asset information to generate an asset information data packet, including: Determining, by the device startup processing program, the asset version information of the full device asset information according to the asset association parameter information of the full device asset information; Determining the asset data volume of the full device asset information according to the asset version information through the device startup processing program; Determining the number of asset information data packets to be sent according to the asset data volume and a preset sending data packet size through the device startup processing program, wherein the sending number is determined according to a quotient and a remainder of the asset data volume and a unit data volume, and the unit data volume is the data volume of the asset information data carried by each asset information data packet determined according to the preset sending data packet size; Splitting the full amount of device asset information into data packets of the same number as those to be sent through the device startup processing program, thereby generating the asset information data packets; Wherein, generating the asset information data packet includes: Determine the end-of-packet identifier of the first byte of the asset information data packet and the offset of the second byte according to the splicing position of the asset information data packet in the full device asset information, wherein the splicing position is the interception position of the asset information data carried by the asset information data packet in the full device asset information; Determine the data packet size of the third byte of the asset information data packet according to the amount of data carried by the asset information data packet; The data content of the remaining bytes of the asset information data packet is determined according to the data carried by the asset information data packet.
2. The method according to claim 1, characterized in that After the asset information data packet is sent to the system auxiliary management controller of the target device for storage through the device startup processing program, the method further includes: Obtaining a device asset information acquisition request sent by a user to the system auxiliary management controller; In response to the device asset information acquisition request, the asset information data packet stored in the system auxiliary management controller is parsed by an asset information parsing tool integrated in the system auxiliary management controller to obtain the full amount of device asset information; The device asset information is fed back to the user.
3. The method according to claim 2, characterized in that Before sending the asset information data packet to the system auxiliary management controller of the target device for storage through the device startup processing program, the method further includes: Obtaining installation integration data of the asset information analysis tool; The asset information parsing tool is integrated into the system auxiliary management controller according to the installation integration data of the asset information parsing tool.
4. The method according to claim 1, characterized in that: After the asset information data packet is sent to the system auxiliary management controller of the target device for storage through the device startup processing program, the method further includes: When the device startup processing program determines that the target asset information data packet fails to be sent, the target asset information data packet is resent to the system auxiliary management controller until it is determined that the target asset information data packet is sent successfully or the preset number of data packet sending times is reached.
5. The method according to any one of claims 1 to 4, characterized in that: The device boot processing program includes a basic input and output system BIOS; the full device asset information includes SMBIOS configuration information; and the system auxiliary management controller includes a baseboard management controller BMC.
6. A device for acquiring equipment asset information, characterized in that: include: A full device asset information acquisition module is used to acquire the full device asset information of the target device through the device startup processing program of the target device during the startup phase of the target device; An asset information data packet generation module, configured to split the full amount of device asset information according to the asset-related parameter information of the full amount of device asset information through the device startup processing program to generate an asset information data packet; An asset information data packet storage module, used to send the asset information data packet to the system auxiliary management controller of the target device for storage through the device boot processing program, so that the user can obtain the full amount of device asset information of the target device from the system auxiliary management controller as needed; Wherein, the asset information data packet generation module is specifically used for: The asset version information of the full device asset information is determined by the device startup processing program according to the asset-related parameter information of the full device asset information; the asset data volume of the full device asset information is determined by the device startup processing program according to the asset version information; the number of asset information data packets to be sent is determined by the device startup processing program according to the asset data volume and a preset sending data packet size; the full device asset information is split into data packets of the sending number by the device startup processing program to generate the asset information data packets, wherein the sending number is determined according to the quotient and the remainder of the asset data volume and the unit data volume, and the unit data volume is the data volume of the asset information data carried by each asset information data packet determined according to the preset sending data packet size; Wherein, the asset information data packet generation module is specifically used to: Determine the end-of-packet identifier of the first byte of the asset information data packet and the offset of the second byte according to the splicing position of the asset information data packet in the full device asset information, wherein the splicing position is the interception position of the asset information data carried by the asset information data packet in the full device asset information; Determine the data packet size of the third byte of the asset information data packet according to the amount of data carried by the asset information data packet; The data content of the remaining bytes of the asset information data packet is determined according to the data carried by the asset information data packet.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the device asset information acquisition method described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the device asset information acquisition method described in any one of claims 1-5 when executed.
Citation Information
Patent Citations
Server management system and method
CN106484031A
Starting method and electronic equipment
CN108958812A