External equipment data reading method, system, equipment, medium and product

By determining the identification information and storage address of important product data in external devices in the first controller, read the required data directly, solve the problem of slow access to access to external equipment, and achieve more efficient data acquisition. The speed of the host startup is increased.

CN119376649AActive Publication Date: 2025-01-28INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411948526.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-01-28
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

The rate of accessing the device configuration space of external devices to obtain important product data is slow, which affects the rate of the boot stage of the host.

Method used

By obtaining the task of obtaining the task of important product data in the first controller, determine the target information of the important product data to be read, and determine its storage address in the equipment configuration space of the target device, and directly read the required data to achieve the application of the required data to realize the application of the required data to realize the application of the required data to realize the application of the required data to realize the application of the required data to realize the application of the required data to realize the application of the required data. Need to read.

Benefits of technology

The amount of data from a single reading of important product data is reduced, the rate of obtaining important product data has been increased, and the efficiency of the start -up start -up start is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119376649A_ABST
    Figure CN119376649A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of servers, and particularly discloses an external equipment data reading method, an external equipment data reading system, external equipment data reading equipment, a medium and a product. The method comprises the following steps of: firstly, determining identification information of target important product data to be read according to an important product data acquisition task; the target storage address of the target important product data in the important product data storage area in the equipment configuration space of the target equipment is determined according to the identification information, and the required target important product data is read from the target storage address, so that on-demand reading is realized, the data volume of the important product data read at a time is reduced, and the reading efficiency is improved. And the speed of acquiring the important product data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of server technology, and in particular to a method, system, device, medium, or product for reading data from external devices. Background Technology

[0002] Vital Product Data (VPD) is information that uniquely defines the hardware, software, and microcode elements of a system. VPD provides information on various Field Replaceable Units (FRUs) within the system, including part numbers, serial numbers, and other detailed information.

[0003] Critical product data is typically stored in non-volatile memory, which can be accessed via a two-wire serial bus (Inter-Integrated Circuit, I2C) to retrieve the data. However, in the absence of a two-wire serial bus, accessing critical product data from external devices requires accessing the device's configuration space.

[0004] In actual use, it was found that the speed of accessing external devices to obtain their important product data was slow, which in turn affected the boot-up speed of the host.

[0005] Improving the rate at which critical product data can be obtained by accessing the device configuration space of external devices is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention

[0006] The purpose of this invention is to provide an external device data reading method, system, device, medium, or product to improve the rate of obtaining important product data by accessing the device configuration space of an external device.

[0007] To address the aforementioned technical problems, this invention provides an external device data reading method, applied to a first controller, comprising: Based on the task of acquiring important product data, determine the identification information of the target important product data to be read; Based on the identification information, determine the target storage address of the target important product data in the important product data storage area of ​​the device configuration space of the target device; Read the target important product data according to the target storage address; The target device is an external device of the host where the first controller is located.

[0008] On the one hand, determining the target storage address of the target important product data in the important product data storage area of ​​the device configuration space of the target device based on the identification information includes: The keywords of the target important product data are determined based on the identification information; Read the keywords of all important product data of the target device in the important product data storage area, and after matching the keywords of the target important product data, determine the corresponding key data partition as the target keyword data partition; The target storage address is the data address of the target keyword data partition.

[0009] On the other hand, determining the target storage address of the target important product data in the important product data storage area of ​​the device configuration space of the target device based on the identification information includes: The storage address range of the target important product data in the important product data storage area is determined based on the identification information; The keywords of the target important product data are determined based on the identification information; After matching the keywords of the target important product data in the keywords corresponding to the storage address range, the corresponding key data partition is determined as the target keyword data partition; The target storage address is the data address of the target keyword data partition.

[0010] On the other hand, determining the storage address range of the target important product data in the important product data storage area based on the identification information includes: The target data type of the target important product data is determined based on the identification information; Obtain the first address range of the data group of the target data type in the important product data storage area; The data read / write attributes of the target important product data are determined based on the identification information; Based on the data read / write attributes, determine the second address range of the target important product data within the first address range; The second address range shall be used as the storage address range.

[0011] On the other hand, reading the target important product data according to the target storage address includes: The address offset of the important product data register of the target device is set according to the target storage address, so that the target device writes the target important product data into the data bits of the important product data register and then reads the target important product data from the data bits.

[0012] On the other hand, reading the target important product data from the data bits includes: If a first timeout period elapses after setting the address offset, the data in the data bits is read as the target important product data; The first timeout period corresponds to the type of the target device.

[0013] On the other hand, reading the target important product data from the data bits includes: Determine whether the write completion flag of the important product data register is the first flag; If so, the data in the data bits is read as the target important product data.

[0014] On the other hand, it also includes: If the write completion flag is not the first flag, then determine whether the current number of reads of the target important product data has reached the preset number of retries corresponding to the target device; If so, stop reading; If not, then proceed to determine whether the write completion flag of the important product data register is the first flag.

[0015] On the other hand, reading the target important product data according to the target storage address includes: Map the device configuration space to the system address space of the first controller; Generate a memory-mapped read request based on the target storage address to read the target important product data.

[0016] On the other hand, reading the target important product data according to the target storage address includes: Determine the data input / output ports corresponding to the device configuration space; Access the target storage address of the target device through the data input / output port to read the target important product data.

[0017] To address the aforementioned technical problems, the present invention also provides a method for reading data from an external device, applicable to an external device of a host, comprising: Receive important product data read request from the first controller of the host; Determine the target storage address based on the read request for the important product data; Send the target important product data from the target storage address to the first controller; Wherein, the target storage address is the address of the target important product data in the important product data storage area of ​​the device configuration space of the external device, determined by the first controller based on the identification information of the identification information after the important product data acquisition task determines the identification information of the target important product data.

[0018] To address the aforementioned technical problems, the present invention also provides a server, including a first controller and an external device; The first controller is configured to determine the identification information of the target important product data to be read based on the important product data acquisition task; determine the target storage address of the target important product data in the important product data storage area of ​​the device configuration space of the external device based on the identification information; and read the target important product data based on the target storage address.

[0019] To address the aforementioned technical problems, the present invention also provides an external device data reading device, comprising: Memory, used to store computer programs; A processor for executing the computer program, which, when executed by the processor, implements the steps of the external device data reading method as described in any of the preceding descriptions.

[0020] To address the aforementioned technical problems, the present invention also provides a non-volatile storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of the external device data reading method as described in any of the above claims.

[0021] To address the aforementioned technical problems, the present invention also provides a computer program product, comprising a computer program that, when executed by a processor, implements the steps of the external device data reading method as described in any of the above claims.

[0022] The external device data reading method provided by this invention has the advantage of improving upon related technologies where, when the controller on the host accesses the device configuration space of an external device to read important product data, it reads all the important product data locally each time and then filters the required data. Instead, it first determines the identification information of the target important product data to be read based on the important product data acquisition task, determines the target storage address of the target important product data in the important product data storage area of ​​the target device's device configuration space based on the identification information, and then reads the required target important product data from the target storage address. This achieves on-demand reading, thereby reducing the amount of important product data read in a single session and improving the rate of acquiring important product data.

[0023] The external device data reading system, device, non-volatile storage medium, and computer program product provided by the present invention have the above-mentioned beneficial effects, which will not be elaborated further here. Attached Figure Description

[0024] To more clearly illustrate the technical solutions of the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 A flowchart illustrating an external device data reading method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the connection relationship between a first controller and an external device, provided as an embodiment of the present invention. Figure 3 This is a schematic diagram of the structure of an external device data reading device provided in an embodiment of the present invention. Detailed Implementation

[0026] The core of this invention is to provide a method, system, device, medium, or product for reading data from external devices, which improves the rate of obtaining important product data by accessing the device configuration space of external devices.

[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] To facilitate understanding of the technical solutions provided in the embodiments of the present invention, some key terms used in the embodiments of the present invention will be explained here first.

[0029] Vital Product Data (VPD) uniquely defines the hardware, software, and microcode elements of a system. VPD provides information on various Field Replaceable Units (FRUs) within the system, including part numbers, serial numbers, and other detailed information. It can uniquely identify the system's software and hardware and may also store system microinstructions. VPD provides a mechanism for storing information such as device performance or faults. Software can backfill device performance parameters or fault information into the VPD, facilitating device use and debugging.

[0030] Important product data is usually stored in non-volatile memory (such as electrically erasable programmable read-only memory, EEPROM). The system generally provides an integrated circuit bus, such as an inter-integrated circuit (I2C) bus, to access this memory. In this case, important product data can be obtained by using the integrated circuit bus according to the device specification.

[0031] If critical product data cannot be obtained via the integrated circuit bus, such as for some external devices, it is necessary to retrieve the critical product data from the device configuration space of the external device. For example, for external devices connected to the host via the Peripheral Component Interconnect Express (PCIe) bus or the Peripheral Component Interconnect (PCI) bus, the critical product data can be obtained by finding the Capability register structure of the critical product data in the device configuration space of the external device and by accessing the critical product data register (VPD Capability) in the device configuration space.

[0032] In practical applications, it has been found that when using the second method to obtain important product data from external devices, a long reading time is required. This results in the boot speed being affected by the long time it takes for the Basic Input / Output System (BIOS) to obtain important product data during the server startup phase, and the task execution being affected by the long time it takes to obtain important product data through the Operating System (OS) during server operation.

[0033] To improve the speed of obtaining important product data by accessing the device configuration space of external devices, the external device data reading scheme provided by this invention improves upon the related technology where the controller on the host reads all important product data locally on each access and then filters the required data. Instead, it first determines the identification information of the target important product data to be read based on the important product data acquisition task, determines the target storage address of the target important product data in the important product data storage area of ​​the target device's device configuration space based on the identification information, and then reads the required target important product data from the target storage address. This achieves on-demand reading, thereby reducing the amount of important product data read in a single session and improving the speed of obtaining important product data.

[0034] Based on the above architecture, the method for reading external device data provided by the embodiments of the present invention will be described below with reference to the accompanying drawings.

[0035] Figure 1 This is a flowchart of an external device data reading method provided in an embodiment of the present invention.

[0036] like Figure 1 As shown, applied to the first controller, the external device data reading method provided in this embodiment of the invention includes: S101: Determine the identification information of the target important product data to be read based on the important product data acquisition task; S102: Determine the target storage address of the target important product data in the important product data storage area of ​​the device configuration space of the target device based on the identification information; S103: Read the target important product data according to the target storage address; The target device is an external device of the host where the first controller is located.

[0037] In specific implementations, the first controller can be the firmware controller of the Basic Input / Output System (BIOS) or the system controller (such as the Central Processing Unit, CPU) where the operating system (OS) resides.

[0038] In this embodiment of the invention, "host" can refer to a server host, which is the core device providing computing resources, storage resources, and network services. Peripherals are auxiliary devices connected to the server host to extend the server's functionality or improve its performance. The following are some common peripheral types:

[0039] Storage devices include hard disk drives (HDDs), solid state drives (SSDs), network attached storage (NAS), and storage area networks (SANs).

[0040] Input / output devices: such as keyboards, mice, monitors, printers, scanners, etc.

[0041] Network equipment: such as routers, switches, network interface cards (NICs), modems, etc.

[0042] Expansion cards: such as graphics processing units (GPUs), digital signal processors (DSPs), sound cards, network cards, etc.

[0043] Power supply equipment: such as uninterruptible power supply (UPS), etc.

[0044] Cooling equipment, such as fans and liquid cooling systems, is used to maintain the server at a suitable operating temperature.

[0045] External connection devices: such as external array controllers, external disk array (RAID) cards, etc.

[0046] In this embodiment of the invention, the first controller and the external device can be connected via a first bus, which can be a high-speed peripheral component interconnect (PCIe) bus or a peripheral component interconnect (PCI) bus.

[0047] In some application scenarios of this invention, when the first controller is the firmware controller of a basic input / output system, the important product data acquisition task may include one or a sub-task of the following: first device identification and marking task, system configuration and initialization task, first fault diagnosis task, first device configuration task, data backup task, or other tasks.

[0048] The first task of device identification and marking is for the basic input / output system to uniquely identify the external device based on information such as part number and serial number in important product data, so as to realize asset management, tracking and replacement of external devices.

[0049] The system configuration and initialization task is performed by the Basic Input / Output System (BIOS) during the server power-on process. This task involves initializing and configuring external devices and starting the server based on important product data from external devices.

[0050] The first fault diagnosis task is for the basic input / output system to uniquely identify the external device based on information such as part number and serial number in important product data, so as to realize the asset management, tracking and replacement of the external device.

[0051] The first equipment configuration task is to optimize the equipment configuration of the basic input / output system based on the equipment performance parameters in the important product data, so as to improve the overall performance of the system.

[0052] The data backup task is performed by the Basic Input / Output System to back up important product data from external devices to the local machine, thereby improving the efficiency of obtaining important product data the next time and preventing server startup failure due to communication problems with external devices.

[0053] In some optional application scenarios, after acquiring important product data from external devices, the basic input / output system can also transmit the important product data to the Baseboard Management Controller (BMC). The BMC can then display the important product data from the external devices on its web interface.

[0054] In other application scenarios of this invention, when the first controller is controlled by the system where the operating system is located, the important product data acquisition task may include one or a sub-task of the following: second device identification and marking task, system management task, second fault diagnosis task, second device configuration task, security detection task, remote management task, or other tasks.

[0055] The second device identification and labeling task involves the operating system uniquely identifying the external device based on information such as part number and serial number in important product data, so as to realize asset management, tracking and replacement of the external device.

[0056] The system management task involves the operating system using software to backfill the performance parameters or fault information of external devices into the important product data, so that the important product data storage device performance information or fault information can be used to enable the system administrator to monitor the status and performance of external devices.

[0057] The second fault diagnosis task is for the operating system to diagnose the faults of external devices based on information from important product data, so as to determine the specific components that need to be replaced.

[0058] The second device configuration task is for the operating system to optimize device configuration based on device performance parameters in important product data in order to improve the overall performance of the system.

[0059] The security testing task involves the operating system testing whether external devices meet specific security and compliance standards based on important product data, especially in environments where it is necessary to trace the origin and history of devices.

[0060] Remote management tasks involve the operating system providing necessary hardware information based on important product data of external devices when remotely managing a server, thereby improving the efficiency and accuracy of remote operations.

[0061] As can be seen, the types of important product data required may differ in different application scenarios and in different important product data acquisition tasks. Observation reveals that the vast majority of important product data acquisition tasks do not require acquiring all important product data from external devices. For example, in some network cards, the effective data in important product data is generally 200-300 bytes, while the basic input / output system or operating system actually needs to acquire only a portion of this effective data. In related technologies, when the basic input / output system or operating system accesses the device configuration space of an external device to acquire important product data, it first requests to read all important product data from the external device locally, and then filters out the actually needed important product data. This results in wasted time reading unnecessary important product data. Therefore, in this embodiment of the invention, full reading is replaced with on-demand reading. When important product data needs to be read, the first controller first determines the identification information of the target important product data to be read based on the important product data acquisition task, and then determines the target storage address of the target important product data in the important product data storage area of ​​the target device's device configuration space based on this identification information.

[0062] According to the device configuration, the important product data of the external device has its specific storage structure. Therefore, after the first controller determines the target important product data that actually needs to be read, it can determine the target storage address of the target important product data in the important product data storage area in the device configuration space of the target device based on the storage structure of the important product data of the external device.

[0063] After determining the target storage address for the key product data, the first controller can actually read the key product data based on the communication connection with the target device.

[0064] In some optional embodiments of the present invention, reading the target important product data according to the target storage address in S103 may include: setting the address offset of the important product data register of the target device according to the target storage address, so that the target device writes the target important product data into the data bits of the important product data register and then reads the target important product data from the data bits. In external devices connected via a high-speed peripheral component interconnect bus, there are many function registers in their device configuration space that store different types of data. When the basic input / output system or operating system accesses the device configuration space of such external devices, it writes the target storage address of the target important product data to be read into the address offset of the important product data register. After recognizing the address offset, the target device writes the data at the corresponding address into the data bits of the important product data register. Then, the basic input / output system or operating system can read the target important product data from the data bits of the important product data register. The important product data register is typically written with four bytes of data at a time. The target device completes the transmission of all target important data by cyclically reading data from the target storage address and writing it into the data bits of the important product data register. The first controller cyclically reads data from the data bits of the important product data register until all the target important data has been read.

[0065] In this embodiment of the invention, the first controller can read important product data from the device configuration space of the target device using either data input / output (I / O) or memory address mapping (MMIO). Therefore, in some optional implementations of this invention, reading the target important product data according to the target storage address in step S103 may include: mapping the device configuration space to the system address space of the first controller; and generating a memory-mapped read request based on the target storage address to read the target important product data.

[0066] In some optional embodiments of the present invention, S103, reading target important product data according to the target storage address, may further include: determining the data input / output port corresponding to the device configuration space; and accessing the target storage address of the target device through the data input / output port to read the target important product data.

[0067] The external device data reading method provided in this invention improves upon related technologies where the controller on the host accesses the device configuration space of an external device to read important product data. Instead of reading all important product data locally each time and then filtering the required data, this method first determines the identification information of the target important product data to be read based on the important product data acquisition task. Then, it determines the target storage address of the target important product data in the important product data storage area of ​​the target device's device configuration space based on the identification information, and then reads the required target important product data from the target storage address. This achieves on-demand reading, thereby reducing the amount of important product data read in a single session and improving the rate of acquiring important product data.

[0068] Based on the above embodiments, the present invention further describes the steps for determining the target storage address of target important product data.

[0069] In some optional embodiments of the present invention, determining the target storage address of the target important product data in the important product data storage area in the device configuration space of the target device based on the identification information in S102 may include: determining the keyword of the target important product data based on the identification information; reading the keywords of all important product data of the target device in the important product data storage area, and after matching the keyword of the target important product data, determining the corresponding key data partition as the target keyword data partition; and using the data address of the target keyword data partition as the target storage address.

[0070] In the critical product data storage area of ​​the external device's configuration space, critical product data is typically stored using a keyword data partitioning method. Each keyword data partition includes the actual critical product data stored in that partition and its corresponding keyword. For example, if the keyword is the Product Number (PN), then the critical product data is the actual product number of the external device. The first controller can first read the keywords from each keyword data partition to determine the target keyword data partition that matches the keyword corresponding to the identifier information of the target critical product data. Then, according to the storage structure of the keyword data partition, it determines the data address, which is used as the target storage address for the target critical product data.

[0071] Reading the keywords of each keyword data partition can be used to read the list of important product data keywords in the device configuration space of the target device. From this, the keywords and storage order of all important product data of the target device can be determined, and then the target keyword data partition can be determined.

[0072] While the above methods can achieve on-demand reading, they require traversing all keywords or pre-reading the keyword list locally and maintaining the storage order of each keyword data partition. To further improve the reading speed of target important data, in some optional embodiments of the present invention, determining the target storage address of the target important product data in the important product data storage area of ​​the device configuration space of the target device based on the identification information may further include: determining the storage address range of the target important product data in the important product data storage area based on the identification information; determining the keywords of the target important product data based on the identification information; after matching the keywords of the target important product data among the keywords corresponding to the storage address range, determining the corresponding key data partition as the target keyword data partition; and using the data address of the target keyword data partition as the target storage address.

[0073] As described in the above embodiments of the present invention, the important product data of external devices has a specific storage structure. For example, after classifying all important product data, important product data of the same type are stored together, and important product data of different types are stored in a specific order.

[0074] In some optional implementations, critical product data is categorized into two data types: Small Resource Data Type and Large Resource Data Type. Resource data type tags for critical product data can be found in the device configuration space. These tags contain a list of keywords for all critical data types of the external device. For example, this tag may include: Large Resource Data Type - Identifier String, Large Resource Data Type - VPD-R List containing one or more VPD keywords, Large Resource Data Type - VPD-W List containing one or more VPD keywords, and Small Resource Data Type - End Tag. The VPD-R list stores keywords for read-only critical product data of the external device (e.g., product number PN, engineering change level EC, system layout information FG, address LC, manufacturer ID (MN), etc.). The VPD-W list stores keywords for read-write critical product data of the external device (e.g., supplier-specific information Vx, system-specific information Yx, asset tag identifier YA, remaining read / write area RW, etc.).

[0075] In a keyword data partition, data is typically stored in the order of keyword, data length, and data.

[0076] Therefore, when determining the target storage address, we can first determine the storage address range of the target important product data in the important product data storage area based on the important product data storage structure of the target device, so as to narrow down the query range. Then, according to the keywords of the target important product data determined by the identification information, we can find the target keyword data partition that matches the keywords in each keyword data partition in the storage address range. The data address of the target keyword data partition is the target storage address. Thus, we only need to query a small number of keywords to determine the target storage address.

[0077] In some optional embodiments of the present invention, determining the storage address range of target important product data in the important product data storage area based on the identification information may include: determining the target data type of the target important product data based on the identification information, obtaining the first address range of the data group of the target data type in the important product data storage area; and using the first address range as the storage address range.

[0078] In some optional embodiments of the present invention, determining the storage address range of the target important product data in the important product data storage area based on the identification information may further include: determining the target data type of the target important product data based on the identification information; obtaining a first address range of the data group of the target data type in the important product data storage area; determining the data read / write attributes of the target important product data based on the identification information; determining a second address range of the target important product data in the first address range based on the data read / write attributes; and using the second address range as the storage address range.

[0079] Based on the above embodiments, the present invention further describes the steps for reading target important product data.

[0080] As described in the above embodiment, S103, reading target important product data according to the target storage address, may include: setting the address offset of the important product data register of the target device according to the target storage address, so that the target device writes the target important product data into the data bits of the important product data register and then reads the target important product data from the data bits.

[0081] Compared to related technologies, this invention changes the method of reading all important product data from the device configuration space of an external device to local filtering, and instead reads on demand. Correspondingly, the address configuration of the important product data register on the target device is modified to achieve on-demand reading. However, in actual server use, it has been found that the important product data obtained by the basic input / output system or operating system is sometimes garbled or unavailable. Observing the structure of the important product data register reveals that it includes several parts: important product data address registration information, next function register pointer, function register ID, and important product data registration information. The important product data address registration information includes a write-complete flag and the important product data address. The design of the basic input / output system or operating system for reading important product data in related technologies is as follows:

[0082] The basic input / output system or operating system writes the address of the important product data storage area to be accessed to the important product data address, and sets the write completion flag to 0.

[0083] After four bytes of data are transferred to the critical product data register, the hardware mechanism will change the write completion flag from 0 to 1, indicating that the data has been written. At this time, the data can be read from the critical product data register.

[0084] The addresses of the important product data to be read are incremented, and the above reading process is repeated until all data in the important product data storage area is read.

[0085] Testing revealed that in the relevant technologies, the basic input / output system or operating system reads important product data by setting a timeout period. For example, the timeout period of the basic input / output system is usually 3 milliseconds (ms). After this time, regardless of whether the important product data register has been written, the basic input / output system or operating system will read the data from the data bits of the important product data register. This causes some external devices with slower processing speeds to fail to write the data in the important product data register within the timeout period, resulting in failure to obtain important product data.

[0086] In some optional embodiments of this invention, reading target important product data from the data bits may include: if a first timeout period has elapsed after setting the address offset, then reading the data from the data bits as the target important product data; wherein, the first timeout period corresponds to the type of the target device. That is, different first timeout periods can be set for different external devices to adapt to the processing speed of the external devices. It is understood that the first timeout period is negatively correlated with the processing speed, and a shorter first timeout period can be set for external devices with higher processing speeds.

[0087] The external device data reading method provided in this embodiment of the invention may further include: determining a first timeout time corresponding to the external device based on the type of the external device and its historical test data. By combining actual testing, a more suitable first timeout time for the external device can be determined. The external device data reading method provided in this embodiment of the invention may further include: adjusting the first timeout time based on the number of failures in reading important product data from the external device. When the number of failures is 0, the first timeout time can be appropriately reduced; when the number of failures is not 0, the first timeout time can be increased, and the increase is positively correlated with the number of failures.

[0088] In some optional embodiments of the present invention, reading target important product data from the data bits may further include: determining whether the write completion flag bit of the important product data register is a first flag; if so, then reading the data from the data bits as the target important product data. That is, the first controller can determine whether to read the data from the data bits based on the write completion flag bit of the important product data register, rather than reading data regardless of whether the important product data register is ready.

[0089] Furthermore, the external device data reading method provided in this embodiment of the invention may further include, if the write completion flag is not a first flag, determining whether the current number of reads of the target important product data has reached the preset retry number corresponding to the target device; if yes, then stopping the reading; if no, then jumping to determine whether the write completion flag of the important product data register is a first flag. By adding a reset mechanism, the success rate of reading important product data can be improved. Different retry numbers can be set for different external devices to adapt to the processing speed of the external devices. It is understood that the number of retry numbers is positively correlated with the processing speed; for external devices with higher processing speeds, fewer retry numbers can be set.

[0090] The external device data reading method provided in this embodiment of the invention may further include: determining the number of retries corresponding to the external device based on the type of the external device and its historical test data. By combining actual testing, a more suitable number of retries for the external device can be determined. The external device data reading method provided in this embodiment of the invention may further include: adjusting the number of retries based on the number of failures in reading important product data from the external device. When the number of failures is 0, the number of retries can be appropriately reduced; when the number of failures is not 0, the number of retries can be increased, and the increase is positively correlated with the number of failures.

[0091] For external devices applied to a host, the data reading method for external devices provided in this embodiment of the invention may further include: Receive important product data read requests from the host's first controller; Determine the target storage address based on read requests for important product data; Send the target important product data from the target storage address to the first controller; The target storage address is the address of the target important product data in the important product data storage area of ​​the device configuration space of the external device, determined by the first controller after the important product data acquisition task determines the identification information of the target important product data.

[0092] For a detailed description of the external device data reading method provided in this embodiment of the invention, please refer to the above description of the external device data reading method applied to the first controller.

[0093] It should be noted that in the embodiments of the external device data reading methods of the present invention, some steps or features may be omitted or not executed. The division of hardware or software functional modules for ease of explanation is not the only implementation of the external device data reading methods provided in the embodiments of the present invention.

[0094] The above details various embodiments of the external device data reading method. Based on this, the present invention also discloses servers, external device data reading devices, equipment, non-volatile storage media, and computer program products corresponding to the above methods.

[0095] Figure 2 This is a schematic diagram illustrating the connection relationship between a first controller and an external device, provided as an embodiment of the present invention.

[0096] like Figure 2 As shown, the server provided in this embodiment of the invention may include a first controller 201 and an external device 202; wherein, the first controller 201 is used to determine the identification information of the target important product data to be read according to the important product data acquisition task; determine the target storage address of the target important product data in the important product data storage area in the device configuration space of the external device 202 according to the identification information; and read the target important product data according to the target storage address.

[0097] like Figure 2 As shown, in the server provided in this embodiment of the invention, the first controller 201 writes the target storage address into the address offset of the important product data register of the external device 202. After the external device 202 writes the target important product data into the data bit of the important product data register, the first controller 201 reads the data from the data bit as the target important product data.

[0098] Since the embodiments of the server part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the server part, and they will not be repeated here.

[0099] The external device data reading device provided in this embodiment of the invention, applied to the first controller, includes: The identification determination unit is used to determine the identification information of the target important product data to be read based on the important product data acquisition task. The first address determination unit is used to determine the target storage address of the target important product data in the important product data storage area in the device configuration space of the target device based on the identification information. The data read unit is used to read target important product data according to the target storage address; The target device is an external device of the host where the first controller is located.

[0100] An external device applied to a host computer, the external device data reading device provided in this embodiment of the invention may further include: The receiving unit is used to receive important product data read requests from the host's first controller; The second address determination unit determines the target storage address based on the important product data read request; The sending unit is used to send target important product data from the target storage address to the first controller; The target storage address is the address of the target important product data in the important product data storage area of ​​the target device's device configuration space, determined by the first controller after the important product data acquisition task determines the identification information of the target important product data based on the identification information.

[0101] It should be noted that in the various embodiments of the external device data reading device provided in this invention, the division of units is only a logical functional division, and other division methods can be used. The connection between different units can be electrical, mechanical, or other connection methods. Separate units can be located in the same physical location or distributed across multiple network nodes. Each unit can be implemented in hardware or as a software functional unit. That is, some or all of the units provided in this invention can be selected according to actual needs, and corresponding connection or integration methods can be used to achieve the purpose of the solution in this invention.

[0102] Since the embodiments of the apparatus and the embodiments of the method correspond to each other, please refer to the description of the embodiments of the method for the embodiments of the apparatus, which will not be repeated here.

[0103] Figure 3 This is a schematic diagram of the structure of an external device data reading device provided in an embodiment of the present invention.

[0104] like Figure 3As shown, the external device data reading device provided in this embodiment of the invention includes: a memory 310 for storing a computer program 311; and a processor 320 for executing the computer program 311, wherein the computer program 311, when executed by the processor 320, implements the steps of the external device data reading method provided in any of the above embodiments.

[0105] The processor 320 may include one or more processing cores, such as a 3-core processor or an 8-core processor. The processor 320 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 320 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 320 may integrate a Graphics Processing Unit (GPU) responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 320 may also include an Artificial Intelligence (AI) processor for handling computational operations related to machine learning.

[0106] The memory 310 may include one or more non-volatile storage media, which may be non-transitory. The memory 310 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 310 is used to store at least the following computer program 311, which, after being loaded and executed by the processor 320, can implement the relevant steps in the external device data reading method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 310 may also include an operating system 312 and data 313, and the storage method may be temporary storage or permanent storage. The operating system 312 may be Windows or other types of operating systems. The data 313 may include, but is not limited to, the data involved in the above methods.

[0107] In some embodiments, the external device data reading device may further include a display screen 330, a power supply 340, a communication interface 350, an input / output interface 360, a sensor 370, and a communication bus 380.

[0108] Those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the external device data reading device and may include more or fewer components than shown.

[0109] The external device data reading device provided in this embodiment of the invention includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the steps of the external device data reading method provided in the above embodiment, and the effect is the same as above.

[0110] This invention provides a non-volatile storage medium storing a computer program thereon. When executed by a processor, the computer program can implement the steps of the external device data reading method provided in any of the above embodiments.

[0111] The non-volatile storage medium may include: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks or optical disks, and other media that can store program code.

[0112] For an introduction to the non-volatile storage medium provided in the embodiments of the present invention, please refer to the above method embodiments. The effects it achieves are the same as those of the external device data reading method provided in the embodiments of the present invention, and the present invention will not elaborate further here.

[0113] This invention provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the external device data reading method provided in any of the above embodiments.

[0114] For a description of the computer program product provided in the embodiments of the present invention, please refer to the above method embodiments. The effects it achieves are the same as those of the external device data reading method provided in the embodiments of the present invention, and the present invention will not repeat them here.

[0115] The foregoing has provided a detailed description of an external device data reading method, apparatus, device, and non-volatile storage medium provided by the present invention. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus, device, non-volatile storage medium, and computer program product disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from the principles of the invention, and these improvements and modifications also fall within the protection scope of the present invention.

[0116] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

Claims

1. A method for reading data from an external device, characterized in that: Applied to the first controller, comprising: Determine identification information of target important product data to be read according to the important product data acquisition task; Determine, according to the identification information, a target storage address of the target important product data in an important product data storage area in a device configuration space of a target device; Read the target important product data according to the target storage address; The target device is an external device of the host where the first controller is located.

2. The method for reading data from an external device according to claim 1, characterized in that: Determining, according to the identification information, a target storage address of the target important product data in an important product data storage area in a device configuration space of a target device, comprises: Determine the keyword of the target important product data according to the identification information; Reading the keywords of all the important product data of the target device in the important product data storage area, and after matching the keywords of the target important product data therefrom, determining the corresponding key data partition as the target keyword data partition; The data address of the target keyword data partition is used as the target storage address.

3. The external device data reading method according to claim 1, characterized in that: Determining, according to the identification information, a target storage address of the target important product data in an important product data storage area in a device configuration space of a target device, comprises: Determine a storage address range of the target important product data in the important product data storage area according to the identification information; Determine the keyword of the target important product data according to the identification information; After matching the keyword of the target important product data among the keywords corresponding to the storage address range, determining the corresponding key data partition as the target keyword data partition; The data address of the target keyword data partition is used as the target storage address.

4. The method for reading data from an external device according to claim 3, characterized in that: Determining the storage address range of the target important product data in the important product data storage area according to the identification information includes: Determining a target data type of the target important product data according to the identification information; Acquire a data group of the target data type within a first address range of the important product data storage area; Determining data read and write attributes of the target important product data according to the identification information; Determine a second address range of the target important product data in the first address range according to the data read and write attribute; The second address range is used as the storage address range.

5. The method for reading data from an external device according to claim 1, characterized in that: Reading the target important product data according to the target storage address includes: The address offset of the important product data register of the target device is set according to the target storage address, so that after the target device writes the target important product data into the data bit of the important product data register, it reads the target important product data from the data bit.

6. The method for reading data from an external device according to claim 5, characterized in that: Reading the target important product data from the data bit includes: If a first timeout period has elapsed after the address offset is set, reading the data of the data bit as the target important product data; The first timeout period corresponds to the type of the target device.

7. The method for reading data from an external device according to claim 5, characterized in that: Reading the target important product data from the data bit includes: Determine whether the write completion flag of the important product data register is the first flag; If yes, the data of the data bit is read as the target important product data.

8. The method for reading data from an external device according to claim 7, characterized in that: Also includes: If the write completion flag is not the first flag, determining whether the current number of reads of the target important product data reaches a preset number of retries corresponding to the target device; If yes, stop reading; If not, jump to determine whether the write completion flag of the important product data register is the first flag.

9. The method for reading data from an external device according to claim 1, characterized in that: Reading the target important product data according to the target storage address includes: Mapping the device configuration space to the system address space of the first controller; A memory mapping read request is generated according to the target storage address to read the target important product data.

10. The method for reading data from an external device according to claim 1, characterized in that: Reading the target important product data according to the target storage address includes: Determine the data input and output ports corresponding to the device configuration space; The target storage address of the target device is accessed through the data input and output port to read the target important product data.

11. A method for reading data from an external device, characterized in that: External devices for host computers include: receiving a request to read important product data from a first controller of the host; Determine a target storage address according to the important product data read request; sending target important product data from the target storage address to the first controller; Among them, the target storage address is the address of the target important product data in the important product data storage area in the device configuration space of the external device determined by the first controller according to the identification information of the target important product data in the important product data acquisition task.

12. A server, characterized in that: including a first controller and an external device; Among them, the first controller is used to determine the identification information of the target important product data to be read according to the important product data acquisition task; determine the target storage address of the target important product data in the important product data storage area in the device configuration space of the external device according to the identification information; and read the target important product data according to the target storage address.

13. An external device data reading device, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of the external device data reading method as claimed in any one of claims 1 to 11 are implemented.

14. A non-volatile storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the external device data reading method according to any one of claims 1 to 11 are implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the external device data reading method according to any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Information processing method and device, and storage medium

    CN107357674A

  • Case VPD data access method, apparatus and device, and storage medium

    CN111399773A

  • Data access method and device, electronic equipment and storage medium

    CN117807136A

  • Management control method and device of nonvolatile memory, equipment and medium

    CN118276779A

  • Method for realizing important product data function by software, computer equipment and medium

    CN119003097A