Asset information verification method and device, electronic equipment and storage medium

By obtaining the asset information of PCIE devices from shared memory and central processing unit in the server and comparing and verifying it, the problem of insufficient accuracy of asset information acquisition in the existing technology is solved, and the stability of the server and the accuracy of fault location are improved. .

CN119201592APending Publication Date: 2024-12-27INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411040401.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

When existing servers obtain PCIE equipment asset information, the accuracy and completeness are ignored, resulting in the upper-level software being unable to obtain accurate asset information, affecting the stability of the system and the accuracy of fault positioning.

Method used

By obtaining the first asset information of the PCIE device read by the BIOS from the shared memory space of the target server, and obtaining the second asset information from the registers of the central processor, performing comparison and verification, and classifying and storing based on the verification results, ensuring that Accuracy of asset information.

Benefits of technology

It improves the accuracy of obtaining PCIE equipment asset information, ensures the operation stability of the target server to the greatest extent, and ensures the accuracy of fault location.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201592A_ABST
    Figure CN119201592A_ABST
Patent Text Reader

Abstract

The invention provides an asset information verification method and apparatus, an electronic device and a storage medium. The method comprises the steps of obtaining first asset information of a plurality of PCIE devices from a shared memory space of a target server; acquiring second asset information of the plurality of PCIE devices from a register of the central processing unit; and comparing the first asset information with the second asset information, verifying the asset information of each PCIE device, and based on a verification result, classifying and storing the asset information of each PCIE device. According to the asset information verification method and apparatus, the electronic device and the storage medium provided by the invention, the first asset information and the second asset information of the plurality of PCIE devices in the target server obtained based on the two channels of the BIOS and the central processing unit are verified, so that a confirmation process of the asset information of each PCIE device is realized; and the accuracy of acquiring the asset information of the PCIE equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of server technology, and in particular to a verification method, device, electronic equipment and storage medium for asset information. Background Art

[0002] On servers, PCIE devices are widely used. For example, servers can connect high-performance graphics cards or accelerator cards through PCIE interfaces to improve graphics processing or computing performance; they can also connect high-speed network adapters or storage devices to meet the needs of large-scale data processing and storage. Therefore, it is particularly important to correctly identify PCIE devices. Only when asset information is correctly identified can it be preliminarily determined that the PCIE device has been acquired. In addition, the fault diagnosis and positioning of PCIE devices also depends on the correct identification of asset information to accurately locate them. Therefore, the identification of PCIE device asset information is very important, which is related to whether the entire system can be used correctly and whether the fault can be accurately located.

[0003] Existing servers generally obtain asset information directly, ignoring the accuracy and completeness of the obtained asset information, resulting in low accuracy of asset information that cannot be obtained by upper-level software. Summary of the invention

[0004] The present invention provides an asset information verification method, device, electronic device and storage medium, which are used to improve the accuracy of asset information obtained by a server.

[0005] The present invention provides a method for verifying asset information, comprising the following steps: Acquire first asset information of multiple PCIE devices in the target server from a shared memory space of the target server, wherein the first asset information of multiple PCIE devices in the shared memory space is acquired based on BIOS reading configuration spaces of multiple PCIE devices; Based on querying the register in the central processing unit, obtaining the second asset information of the plurality of PCIE devices from the register; The first asset information is compared with the second asset information, the asset information of each PCIE device is verified, and based on the verification result, the asset information of each PCIE device is classified and stored.

[0006] According to a verification method of asset information provided by the present invention, before obtaining first asset information of multiple PCIE devices in the target server from the shared memory space of the target server, the method further includes: A data acquisition message is sent to the BIOS, so that after receiving the data acquisition message, the BIOS scans the devices on the PCIE bus of the target server, determines the multiple PCIE devices, and based on accessing the configuration space of each PCIE device, extracts the first asset information from the configuration space, and stores the extracted first asset information in the shared memory space.

[0007] According to a method for verifying asset information provided by the present invention, the first asset information is compared with the second asset information to verify the asset information of each PCIE device, including: Comparing the first asset information with the second asset information, determining a plurality of first target devices and a plurality of second target devices from the plurality of PCIE devices, so as to verify the asset information of each PCIE device; The first target device is a device with the same first asset information as the second asset information; The second target device is a device whose first asset information is different from the second asset information.

[0008] According to a verification method of asset information provided by the present invention, after comparing the first asset information with the second asset information and determining a plurality of first target devices and a plurality of second target devices from the plurality of PCIE devices, the method further includes: Performing a secondary verification process for a preset number of verification times on each determined second target device, and determining a third target device and a fourth target device from each second target device based on the secondary verification process for the preset number of verification times; The secondary verification process includes: Re-acquire the first asset information of each second target device and re-acquire the second asset information of each second target device, and compare the re-acquired first asset information with the re-acquired second asset information; The third target device is a device determined from the plurality of second target devices to have the same comparison result in a secondary verification process of a preset number of verifications; The fourth target device is a device determined from the plurality of second target devices in a secondary verification process of a preset number of verifications, and each comparison result is different.

[0009] According to a verification method for asset information provided by the present invention, the asset information of each PCIE device is classified and stored based on the verification result, including: After the first target device, the third target device, and the fourth target device are determined, the asset information of the first target device, the asset information of the third target device, and the asset information of the fourth target device are stored in different storage spaces.

[0010] According to a method for verifying asset information provided by the present invention, after storing the asset information of the first target device, the asset information of the third target device, and the asset information of the fourth target device in different storage spaces, the method further includes: Based on the first asset information of the third target device and the second asset information of the third target device, comparison log information of the third target device is generated, and the comparison log information is stored in the black box log.

[0011] According to a verification method for asset information provided by the present invention, the asset information of the PCIE device includes one or more of the device's manufacturer ID, device ID, device class code, device subclass code, and device programming interface.

[0012] The present invention also provides an asset information verification device, comprising the following modules: The first information acquisition module is used to acquire first asset information of multiple PCIE devices in the target server from the shared memory space of the target server, wherein the first asset information of multiple PCIE devices in the shared memory space is acquired based on BIOS reading the configuration space of multiple PCIE devices; The second information acquisition module is used to acquire the second asset information of the plurality of PCIE devices from the register based on querying the register in the central processing unit; The verification module is used to compare the first asset information with the second asset information, verify the asset information of each PCIE device, and classify and store the asset information of each PCIE device based on the verification result.

[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a verification method for asset information as described above is implemented.

[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the asset information verification methods described above.

[0015] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the asset information verification methods described above.

[0016] The asset information verification method, device, electronic device and storage medium provided by the present invention obtain the first asset information and the second asset information of multiple PCIE devices in the target server based on two channels of BIOS and central processing unit, and verify based on the asset information obtained from the two channels, thereby realizing the confirmation process of the asset information of each PCIE device, improving the accuracy of obtaining the asset information of the PCIE device, and ensuring the stability of the operation of the target server to the greatest extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 It is a flowchart of the verification of asset information provided by the present invention.

[0019] Figure 2 It is a schematic diagram of the process of obtaining the first asset information provided by the present invention.

[0020] Figure 3 It is a schematic diagram of the process of obtaining the second asset information provided by the present invention.

[0021] Figure 4 It is a schematic diagram of the PCIE device identification process provided by the present invention.

[0022] Figure 5 It is a schematic diagram of the verification process provided by the present invention.

[0023] Figure 6 It is a structural schematic diagram of the asset information verification device provided by the present invention.

[0024] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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 creative work are within the scope of protection of the present invention.

[0026] In the server, BIOS and BMC are the two main firmwares of the server. There are generally two ways for the upper management system in the related method to obtain the asset information of the PCIE device. One is that the BIOS reads the configuration space of the PCIE device to obtain the asset information of the device, stores it in a certain storage space, and then the BMC grabs the information from the storage space, parses the captured information, and displays it in the upper management system after the parsing is completed; the other is that the BMC directly obtains the asset information by command through the SMBUS / I2C method or the MCTP protocol, and then parses it according to the read information and displays it to the upper management system.

[0027] First, the first method relies on BIOS. During the server startup process, BIOS and BMC are initialized separately. If a timeout occurs during the interaction process when capturing and storing information, BMC will not be able to capture normal information, or BIOS will have deviations when reading the PCIE device configuration space, which will also cause the BMC to capture incorrect information. The second method only uses BMC to issue commands to obtain asset information, but if the current PCIE device is not initialized, it will also cause the information to be unable to be correctly obtained or timeout. Both methods will cause the upper-level software to be unable to obtain accurate asset information.

[0028] In view of the defects of the related methods, the present invention proposes a verification method for asset information. Figure 1 It is a flow chart of the verification of asset information provided by the present invention, such as Figure 1 As shown, the method includes the following: Step 110, obtaining first asset information of multiple PCIE devices in the target server from the shared memory space of the target server, wherein the first asset information of the multiple PCIE devices in the shared memory space is obtained based on BIOS reading the configuration space of the multiple PCIE devices; Step 120, based on querying the register in the central processing unit, obtaining the second asset information of the plurality of PCIE devices from the register; Step 130, comparing the first asset information with the second asset information, verifying the asset information of each PCIE device, and classifying and storing the asset information of each PCIE device based on the verification result.

[0029] The execution subject of the asset information verification method provided by the present invention can be an electronic device, a component in an electronic device, an integrated circuit, or a chip. The electronic device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), or a personal computer (PC), etc., which is not specifically limited by the present invention.

[0030] The following takes a baseboard management controller (BMC) executing the asset information verification method provided by the present invention as an example to describe the technical solution of the present invention in detail.

[0031] In step 110, first asset information of multiple PCIE devices in the target server is obtained from the shared memory space of the target server, and the first asset information of multiple PCIE devices in the shared memory space is obtained based on BIOS reading the configuration space of multiple PCIE devices.

[0032] Optionally, the BMC may rely on the BIOS to obtain the asset information of the PCIE device. The first asset information acquisition process diagram may be as follows: Figure 2 The first asset information acquisition process provided by the present invention is shown in a schematic diagram. The target server is powered on, the system starts to boot, and the BIOS is loaded into the memory as the first software component in the boot process. The BIOS starts to initialize the PCIe bus and scans the devices on the PCIe bus. The scanning process involves traversing each slot on the bus to detect whether there is a PCIe device connected. For each detected PCIe device, the BIOS can read its configuration space (ConfigurationSpace). The configuration space contains key data such as the device's identification information, function code, resource requirements, etc.

[0033] BIOS parses the data read from the configuration space and extracts the first asset information of the PCIE device. The first asset information includes the manufacturer ID, device ID, class code, subclass code, programming interface, etc. of the device. BIOS saves the parsed first asset information to a shared memory space, which can be a device such as a memory or hard disk. BMC can use general commands to read the PCIE device information in the shared memory space. Specifically, BMC obtains the PCIE device information of the PCIE device from BIOS through the shared memory space. The obtained PCIE device information includes the existence, location, model, status, etc. of the device. BMC parses and records the obtained PCIE device information to obtain the first asset information.

[0034] In step 120, based on querying a register in a central processing unit, second asset information of the plurality of PCIE devices is obtained from the register.

[0035] The BMC can obtain the asset information of the PCIe device without relying on the BIOS. The BMC obtains the second asset information based on querying the register in the CPU.

[0036] Specifically, in actual applications, there is a stable way to decouple the BMC from the BIOS asset information. The BMC can directly obtain device information from this storage space without relying on BIOS push. In a more advanced implementation, the BMC can even directly query the relevant registers in the CPU by sending a raw package command to obtain the asset information of the PCIe device. This method does not require the participation of the BIOS and is completely completed by the BMC independently.

[0037] Optionally, obtaining the second asset information may be as follows: Figure 3 The schematic diagram of the process of obtaining the second asset information provided by the present invention is shown. During the startup of the target server, the BMC will also perform initialization loading and self-testing. After the self-testing and loading are completed, the PCIE bus can be accessed through the PCIE protocol, and the PCIE device can be directly connected to the PCIE bus interface for communication, and the asset information of the PCIE device can be read using a query command. The BMC generates the second asset information based on parsing the asset information of the read PCIE device. Among them, the read asset information can also be stored in a fixed area through parsing.

[0038] In step 130, the first asset information is compared with the second asset information, the asset information of each PCIE device is verified, and based on the verification result, the asset information of each PCIE device is classified and stored.

[0039] Optionally, the comparison between the first asset information and the second asset information can be quickly implemented based on the message digest.

[0040] The comparison process of the first asset information and the second asset information based on the message digest algorithm mainly relies on the characteristics of the message digest algorithm, that is, for the same input data, regardless of its size, the same fixed-length digest (or hash value) will be generated, and this generation process is irreversible, that is, the original data cannot be restored from the digest.

[0041] The first asset information is calculated using a selected message digest algorithm (such as SHA-256) to obtain its digest value. Similarly, the second asset information is calculated using the same algorithm to obtain its digest value.

[0042] The summary value of the first asset information is compared with the summary value of the second asset information. If the two summary values ​​are exactly the same, it can be considered that the first asset information and the second asset information are consistent in content. If the two summary values ​​are different, it can be determined that there is a difference in content between the first asset information and the second asset information.

[0043] It can be understood that the first asset information and the second asset information obtained by BMC through two channels can be compared based on some pre-set rules to maximize the correctness of asset information identification, and uncertain information can be recorded as a log as a basis for debug analysis to resolve potential risks in the server.

[0044] Specifically, for each PCIE device, the first asset information and the second asset information of the PCIE device are obtained based on two different channels. Based on the comparison of the first asset information and the second asset information of the PCIE device, the asset information verification process of the PCIE device can be implemented.

[0045] For multiple PCIE devices in the target server, determine whether the asset information of each PCIE device has passed the verification. The PCIE devices that have passed the verification can be stored in storage space A, and the asset information of the PCIE devices that have not passed the verification can be stored in storage space B, so as to implement the classified storage process of the asset information of each PCIE device.

[0046] The asset information verification method provided by the present invention obtains the first asset information and the second asset information of multiple PCIE devices in the target server based on two channels of BIOS and central processing unit, and verifies based on the asset information obtained from the two channels, thereby realizing the confirmation process of the asset information of each PCIE device, improving the accuracy of obtaining the asset information of the PCIE device, and ensuring the stability of the operation of the target server to the greatest extent.

[0047] In one embodiment, before obtaining the first asset information of multiple PCIE devices in the target server from the shared memory space of the target server, it also includes: sending a data acquisition message to the BIOS, so that after the BIOS receives the data acquisition message, it scans the devices on the PCIE bus of the target server, determines the multiple PCIE devices, and based on accessing the configuration space of each PCIE device, extracts the first asset information from the configuration space, and stores the extracted first asset information in the shared memory space.

[0048] Specifically, BMC can rely on BIOS to obtain the asset information of PCIE devices. Before obtaining the asset information, the PCIE device needs to be identified. The identification process of the PCIE device can be as follows: Figure 4 The PCIE device identification process provided by the present invention is shown in the schematic diagram. The target server is powered on, the system starts to start, and it is determined whether the model of the target server is a composite model, a computer model or a storage model. The BIOS of the target server is loaded into the memory as the first software component in the startup process. The BIOS starts to initialize the PCIe bus and scans the devices on the PCIe bus. The scanning process involves traversing each slot on the bus to detect whether there is a PCIe device connected. For each detected PCIe device, the BIOS can read its configuration space (Configuration Space). The configuration space contains key data such as the device's identification information, function code, and resource requirements. The BIOS parses the data read from the configuration space and extracts the first asset information of the PCIE device. Among them, the first asset information includes the device's manufacturer ID, device ID, class code, subclass code, programming interface, etc. The BIOS saves the parsed first asset information to a shared memory space, which can be a device such as a memory or a hard disk. The BMC can read the first asset information in the shared memory space using a general command.

[0049] Optionally, information can be obtained according to different common paths of PCIE devices, and the information obtained from different paths can be compared for consistency. The information can be classified and prioritized according to the type of PCIE device information, and loaded in order of priority. For example, in general, the type of device must be identified first, such as a network card, RAID card, SAS card, and onboard RAID. The device type can be placed in a category of priority identification and judgment, and the priority can be set in front; SN and PN can be placed in one category as a secondary priority, and the division rules can be customized according to the business scenarios of server manufacturers or application manufacturers.

[0050] In one embodiment, the first asset information is compared with the second asset information to verify the asset information of each PCIE device, including: comparing the first asset information with the second asset information, determining multiple first target devices and multiple second target devices from the multiple PCIE devices to verify the asset information of each PCIE device; the first target device is a device whose first asset information is the same as the second asset information; the second target device is a device whose first asset information is different from the second asset information.

[0051] Among them, after comparing the first asset information with the second asset information and determining multiple first target devices and multiple second target devices from the multiple PCIE devices, it also includes: executing a secondary verification process with a preset number of verifications for each second target device, and determining a third target device and a fourth target device from the second target devices based on the secondary verification process with the preset number of verifications; the secondary verification process includes: re-acquiring the first asset information of each second target device and re-acquiring the second asset information of each second target device, and comparing the re-acquired first asset information and the re-acquired second asset information; the third target device is a device determined from the multiple second target devices in the secondary verification process with a preset number of verifications and having the same comparison results; the fourth target device is a device determined from the multiple second target devices in the secondary verification process with a preset number of verifications and having different comparison results each time.

[0052] For each PCIE device, the first asset information of the PCIE device is compared with the second asset information of the PCIE device to determine whether they are the same. If the first asset information of the PCIE device is the same as the second asset information of the PCIE device, the PCIE device is classified as a first target device; if the first asset information of the PCIE device is different from the second asset information of the PCIE device, the PCIE device is classified as a second target device.

[0053] The multiple PCIE devices in the target server are verified respectively, and multiple first target devices and multiple second target devices are determined from the multiple PCIE devices.

[0054] It is understandable that the determination of the second target device is based on only one comparison result. Due to the high efficiency and fast acquisition speed of data in the PCIE channel, there may be a situation where data is acquired inaccurately at one time.

[0055] Therefore, multiple re-verification processes can be implemented based on a secondary verification process with a preset number of verification times.

[0056] Specifically, based on multiple re-verification processes, a third target device and a fourth target device are determined from multiple second target devices. The third target device is a device whose two asset information obtained again during the multiple re-verification processes are identical; the fourth target device is a device whose two asset information obtained multiple times during the multiple re-verification processes are different.

[0057] Optionally, the specific verification process can be as follows Figure 5 As shown in the schematic diagram of the verification process provided by the present invention, the asset information of a certain PCIE device is specifically divided into A1, A2, and A3 according to the priority. A preset verification number N is set, and the initial value is 0. Then, the information of A1 read out by different paths is compared. It is assumed that the data read out by mode 1 based on BIOS is A1-1, and the data read out by mode 2 based on the register of the central processing unit is A1-2, and the data read out by the two modes are compared.

[0058] If the read data is the same, the data will be stored in storage space B. If it is different, it will return to the starting point and re-scan and read, and perform the second polling verification. The number of verifications can be customized according to user needs. Taking the preset number of verifications as ten times as an example, the parameter N will be increased by one each time. If it is still inconsistent for the tenth time, the data will be stored in storage space D. If the data obtained is consistent at any time, the data will be saved in storage space C.

[0059] After multiple polling comparisons and verifications of A1 information, information A2 is obtained and compared. It should be noted that for inconsistent information obtained from A1 information, inconsistent information of A1 block will be added when obtaining and scanning A2 block, which will increase the query volume of inconsistent information in A1, and increase the possibility of obtaining consistent information of PCIE device. Some faults of PCIE device may be repaired in continuous polling, and relatively low-level probabilistic errors will be fault-tolerant. A3 information is consistent with the scanning, acquisition and verification of previous A2 information.

[0060] Finally, according to the continuous polling and verification, the information may be divided into three parts. The information that passes the first verification is stored in storage space B, the information that is consistent with multiple verifications is placed in storage space C, and the inconsistent information is placed in storage space D. Because the use of the target server should also have a certain fault tolerance function, the information in space B and C can be transmitted to the upper-level software for direct display. However, if the information in space C is inconsistent, the log should be saved in the black box log. In case of subsequent risks, debugging can be performed by querying the black box log. The information in space D is uploaded to the upper-level software for display with the information closest to the display rules, and it should be recorded in the startup log to facilitate debugging and troubleshooting.

[0061] In one embodiment, based on the verification results, the asset information of each PCIE device is classified and stored, including: after determining the first target device, the third target device and the fourth target device, the asset information of the first target device, the asset information of the third target device and the asset information of the fourth target device are stored in different storage spaces.

[0062] Among them, after the asset information of the first target device, the asset information of the third target device and the asset information of the fourth target device are stored in different storage spaces, it also includes: based on the first asset information of the third target device and the second asset information of the third target device, generating comparison log information of the third target device, and storing the comparison log information in the black box log.

[0063] The asset information of the first target device, the asset information of the third target device, and the asset information of the fourth target device are classified and stored to facilitate the subsequent retrieval and analysis process.

[0064] For example, the asset information of the first target device that passed the first verification is stored in storage space B, the asset information of the third target device that has been verified to be consistent for multiple times is placed in storage space C, and the inconsistent asset information of the fourth target device is placed in storage space D. Because the use of the target server should also have a certain fault tolerance function, the information in spaces B and C can be transmitted to the upper-level software for direct display, but the information in space C has been inconsistent. Based on the first asset information of the third target device and the second asset information of the third target device, a comparison log information is generated and saved in a black box log. In case of subsequent risks, debugging can be performed by querying the black box log. The information in space D is uploaded to the upper-level software for display with the information closest to the display rules, and it must be recorded in the startup log to facilitate debugging and troubleshooting.

[0065] Among them, black box logs usually refer to log records used to help technicians troubleshoot and diagnose when a system or device fails. This type of log record usually contains key information, error codes, abnormal events, etc. during the operation of the system, but does not directly display the internal implementation details of the system, hence the name "black box".

[0066] In one embodiment, the asset information of the PCIE device includes one or more of the manufacturer ID, device ID, device class code, device subclass code, and programming interface of the device.

[0067] Among them, the manufacturer ID is an identification code representing the patent owner (technology manufacturer) of the invention device.

[0068] The device ID is a code that identifies the device itself. This ID mainly distinguishes different models of the same type of device.

[0069] The device class code is the PCI Express (PCIe) Class Code, which is an identifier used to classify different device types in PCI and PCIExpress devices.

[0070] The device subclass code corresponds to the Subclass part of the device class code and is used to further refine the specific purpose or type of the device under the basic category.

[0071] The device programming interface provides additional information about how the device can be programmed or its interface characteristics.

[0072] The asset information verification device provided by the present invention is described below. The asset information verification device described below and the asset information verification method described above can be referenced to each other.

[0073] like Figure 6 As shown, the device comprises: The first information acquisition module 610 is used to acquire first asset information of multiple PCIE devices in the target server from the shared memory space of the target server, where the first asset information of multiple PCIE devices in the shared memory space is acquired based on BIOS reading the configuration space of multiple PCIE devices; The second information acquisition module 620 is used to acquire the second asset information of the plurality of PCIE devices from the register based on querying the register in the central processor; The verification module 630 is used to compare the first asset information with the second asset information, verify the asset information of each PCIE device, and classify and store the asset information of each PCIE device based on the verification result.

[0074] The asset information verification device provided by the present invention obtains the first asset information and the second asset information of multiple PCIE devices in the target server based on two channels of BIOS and central processing unit, and verifies based on the asset information obtained from the two channels, thereby realizing the confirmation process of the asset information of each PCIE device, improving the accuracy of obtaining the asset information of the PCIE device, and ensuring the stability of the operation of the target server to the greatest extent.

[0075] In one embodiment, the information first acquisition module 610 is specifically used to: Before acquiring the first asset information of the plurality of PCIE devices in the target server from the shared memory space of the target server, the method further includes: A data acquisition message is sent to the BIOS, so that after receiving the data acquisition message, the BIOS scans the devices on the PCIE bus of the target server, determines the multiple PCIE devices, and based on accessing the configuration space of each PCIE device, extracts the first asset information from the configuration space, and stores the extracted first asset information in the shared memory space.

[0076] In one embodiment, the verification module 630 is specifically used to: The comparing the first asset information with the second asset information to verify the asset information of each PCIE device includes: Comparing the first asset information with the second asset information, determining a plurality of first target devices and a plurality of second target devices from the plurality of PCIE devices, so as to verify the asset information of each PCIE device; The first target device is a device with the same first asset information as the second asset information; The second target device is a device whose first asset information is different from the second asset information.

[0077] In one embodiment, the verification module 630 is further specifically configured to: After comparing the first asset information with the second asset information and determining a plurality of first target devices and a plurality of second target devices from the plurality of PCIE devices, the method further includes: Performing a secondary verification process for a preset number of verification times on each determined second target device, and determining a third target device and a fourth target device from each second target device based on the secondary verification process for the preset number of verification times; The secondary verification process includes: Re-acquire the first asset information of each second target device and re-acquire the second asset information of each second target device, and compare the re-acquired first asset information with the re-acquired second asset information; The third target device is a device determined from the plurality of second target devices to have the same comparison result in a secondary verification process of a preset number of verifications; The fourth target device is a device determined from the plurality of second target devices in a secondary verification process of a preset number of verifications, and each comparison result is different.

[0078] In one embodiment, the verification module 630 is further specifically configured to: Based on the verification result, the asset information of each PCIE device is classified and stored, including: After the first target device, the third target device, and the fourth target device are determined, the asset information of the first target device, the asset information of the third target device, and the asset information of the fourth target device are stored in different storage spaces.

[0079] In one embodiment, the verification module 630 is further specifically configured to: After storing the asset information of the first target device, the asset information of the third target device, and the asset information of the fourth target device in different storage spaces, the method further includes: Based on the first asset information of the third target device and the second asset information of the third target device, comparison log information of the third target device is generated, and the comparison log information is stored in the black box log.

[0080] In one embodiment, the information first acquisition module 610 is further specifically used for: Determining the asset information of the PCIE device includes one or more of the manufacturer ID, device ID, device class code, device subclass code, and programming interface of the device.

[0081] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the asset information verification method, the method comprising: obtaining the first asset information of multiple PCIE devices in the target server from the shared memory space of the target server, the first asset information of the multiple PCIE devices in the shared memory space is obtained based on BIOS reading the configuration space of the multiple PCIE devices; Based on querying the register in the central processing unit, obtaining the second asset information of the plurality of PCIE devices from the register; The first asset information is compared with the second asset information, the asset information of each PCIE device is verified, and based on the verification result, the asset information of each PCIE device is classified and stored.

[0082] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0083] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the asset information verification method provided by the above methods, the method comprising: obtaining first asset information of multiple PCIE devices in the target server from a shared memory space of the target server, the first asset information of the multiple PCIE devices in the shared memory space is obtained based on BIOS reading the configuration space of the multiple PCIE devices; Based on querying the register in the central processing unit, obtaining the second asset information of the plurality of PCIE devices from the register; The first asset information is compared with the second asset information, the asset information of each PCIE device is verified, and based on the verification result, the asset information of each PCIE device is classified and stored.

[0084] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for verifying the asset information provided by the above methods is implemented, the method comprising: obtaining first asset information of multiple PCIE devices in the target server from a shared memory space of the target server, wherein the first asset information of the multiple PCIE devices in the shared memory space is obtained based on BIOS reading the configuration space of the multiple PCIE devices; Based on querying the register in the central processing unit, obtaining the second asset information of the plurality of PCIE devices from the register; The first asset information is compared with the second asset information, the asset information of each PCIE device is verified, and based on the verification result, the asset information of each PCIE device is classified and stored.

[0085] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0086] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0087] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for verifying asset information, characterized in that: The method comprises: Acquire first asset information of a plurality of high-speed serial computer expansion bus standard PCIE devices in the target server from a shared memory space of the target server, wherein the first asset information of the plurality of PCIE devices in the shared memory space is acquired based on a basic input and output system BIOS reading a configuration space of the plurality of PCIE devices; Based on querying the register in the central processing unit, obtaining the second asset information of the plurality of PCIE devices from the register; The first asset information is compared with the second asset information, the asset information of each PCIE device is verified, and based on the verification result, the asset information of each PCIE device is classified and stored.

2. The asset information verification method according to claim 1, characterized in that: Before acquiring the first asset information of the plurality of PCIE devices in the target server from the shared memory space of the target server, the method further includes: A data acquisition message is sent to the BIOS, so that after receiving the data acquisition message, the BIOS scans the devices on the PCIE bus of the target server, determines the multiple PCIE devices, and based on accessing the configuration space of each PCIE device, extracts the first asset information from the configuration space, and stores the extracted first asset information in the shared memory space.

3. The asset information verification method according to claim 1, characterized in that: The comparing the first asset information with the second asset information to verify the asset information of each PCIE device includes: Comparing the first asset information with the second asset information, determining a plurality of first target devices and a plurality of second target devices from the plurality of PCIE devices, so as to verify the asset information of each PCIE device; The first target device is a device with the same first asset information as the second asset information; The second target device is a device whose first asset information is different from the second asset information.

4. The asset information verification method according to claim 3, characterized in that: After comparing the first asset information with the second asset information and determining a plurality of first target devices and a plurality of second target devices from the plurality of PCIE devices, the method further includes: Performing a secondary verification process for a preset number of verification times on each determined second target device, and determining a third target device and a fourth target device from each second target device based on the secondary verification process for the preset number of verification times; The secondary verification process includes: Re-acquire the first asset information of each second target device and re-acquire the second asset information of each second target device, and compare the re-acquired first asset information with the re-acquired second asset information; The third target device is a device determined from the plurality of second target devices to have the same comparison result in a secondary verification process of a preset number of verifications; The fourth target device is a device determined from the plurality of second target devices in a secondary verification process of a preset number of verifications, and each comparison result is different.

5. The asset information verification method according to claim 4, characterized in that: Based on the verification result, the asset information of each PCIE device is classified and stored, including: After the first target device, the third target device, and the fourth target device are determined, the asset information of the first target device, the asset information of the third target device, and the asset information of the fourth target device are stored in different storage spaces.

6. The asset information verification method according to claim 5, characterized in that: After storing the asset information of the first target device, the asset information of the third target device, and the asset information of the fourth target device in different storage spaces, the method further includes: Based on the first asset information of the third target device and the second asset information of the third target device, comparison log information of the third target device is generated, and the comparison log information is stored in the black box log.

7. The asset information verification method according to claim 1, characterized in that: The asset information of the PCIE device includes one or more of the manufacturer ID, device ID, device class code, device subclass code and programming interface of the device.

8. A device for verifying asset information, characterized in that: include: The first information acquisition module is used to acquire first asset information of multiple high-speed serial computer expansion bus standard PCIE devices in the target server from the shared memory space of the target server, wherein the first asset information of the multiple PCIE devices in the shared memory space is acquired based on the basic input and output system BIOS reading the configuration space of the multiple PCIE devices; The second information acquisition module is used to acquire the second asset information of the plurality of PCIE devices from the register based on querying the register in the central processing unit; The verification module is used to compare the first asset information with the second asset information, verify the asset information of each PCIE device, and classify and store the asset information of each PCIE device based on the verification result.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the asset information verification method according to any one of claims 1 to 7 is implemented.

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

Citation Information

Cited By

  • Resource processing method and electronic equipment

    CN120892096A