Equipment positioning method and device, positioning equipment and storage medium

By deploying a function for returning silk screen information in the function configuration file, and encapsulating the silk screen information of all interfaces on the motherboard into the silk screen file, the problem that the existing technology cannot be applied to all PCIe device positioning is solved, and the system is implemented in the operating system. Quickly and accurately automatically locate the location of PCIe devices.

CN119356760AActive Publication Date: 2025-01-24INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411581454.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-01-24
Estimated Expiration
2044-11-07

AI Technical Summary

Technical Problem

The prior art is difficult to apply to the positioning of all PCIe devices, especially when the device is hot-plugged, and the device position information cannot be displayed dynamically.

Method used

Deploy the function for returning silk screen information in the function configuration file, and encapsulate the silk screen information corresponding to all interfaces on the motherboard into the silk screen file according to the data format of the silk screen information displayed on the software display interface. Based on the device number information, the port index of the device is determined, and the port index is matched in the silk screen file to locate the silk screen information of the target device.

Benefits of technology

It realizes the automatic positioning of all PCIe devices under the operating system, which is suitable for hot-plugging of devices. There is no need to build a structure for storing silk screen information for each device, ensuring that the silk screen information is consistent with the software display interface, improving the accuracy of positioning. sex and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356760A_ABST
    Figure CN119356760A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of server testing, in particular to an equipment positioning method and device, positioning equipment and a storage medium, and a function used for returning silk-screen information is deployed in a function configuration file, so that a server system can support the function of displaying the silk-screen information of the equipment. According to the data format of the silk-screen information displayed on the software display interface, the silk-screen information corresponding to all the interfaces on the mainboard is packaged into the silk-screen file, and the method can be well suitable for the hot plug condition of equipment. And determining a port index of each device based on the number information of each currently running device. And when the port index matched with the target port index of the target equipment exists in the silk-screen file, recording silk-screen information corresponding to the target port index in the silk-screen file to a memory area intercommunicated with a function, and displaying the silk-screen information of the target equipment through the function. According to the implementation mode, the positions of all equipment can be quickly, accurately and automatically positioned.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of server testing, and in particular to a method, a device, a positioning device and a storage medium for positioning equipment. Background Art

[0002] During server development and testing, Basic Input Output System (BIOS) engineers or server maintenance personnel need to match the devices displayed in the software with the physical devices on the server one by one, so as to clarify whether the device to be operated is within the expected range, or to accurately locate the device when the software reports an error, so that maintenance personnel can check and replace the faulty device. Considering that most customers or maintenance personnel work under the operating system, or there is no network in the computer room, and they cannot log in to the baseboard management controller (BMC) interface and can only operate the physical machine, it is particularly important to be able to directly match the devices in the software with the physical devices under the operating system.

[0003] There are currently two main conventional methods for matching device silkscreen location information under the operating system. The first is an indirect method: manually input relevant commands to view the type9 information in the System Management BIOS (SMBIOS), and manually view the silkscreen corresponding to the type 9 field to obtain the device's location information. The indirect method is inefficient and has the risk of human matching errors. The second is a direct method: add a Type41 structure to each device and display the device's location information through the Type41 structure. The direct method requires adding a Type41 structure for each additional device, and the added device is fixed, which cannot support dynamic display in the case of hot plugging of the device, and cannot be applied to the positioning of all high-speed serial computer expansion card standard (Peripheral Component Interconnect Express, PCIe) devices.

[0004] It can be seen that how to automatically locate the positions of all PCIe devices is a problem that technical personnel in this field need to solve. Summary of the invention

[0005] The purpose of the embodiments of the present invention is to provide a method, apparatus, positioning device and storage medium for device positioning, which can solve the positioning problem that is not applicable to all PCIe devices.

[0006] In order to solve the above technical problems, an embodiment of the present invention provides a method for positioning a device, including:

[0007] Deploy the function for returning silkscreen information in the function configuration file;

[0008] According to the set data format, the silk screen information corresponding to all interfaces on the mainboard is encapsulated into a silk screen file; wherein the data format is consistent with the data format of the silk screen information displayed on the software display interface;

[0009] Based on the serial number information of each currently running device, determine the port index of each currently running device;

[0010] When there is a port index in the silkscreen file that matches the target port index of the target device, the silkscreen information corresponding to the target port index in the silkscreen file is recorded in a memory area that communicates with the function, and the silkscreen information of the target device is displayed through the function; wherein the target device is any one of the currently running devices.

[0011] On the one hand, the function deployed in the function configuration file for returning silkscreen information includes:

[0012] Read the function configuration file and locate the free position in the function configuration file for deploying the function function;

[0013] A function for returning silk screen information is added in the free position.

[0014] On the one hand, according to the set data format, the silk screen information corresponding to all interfaces on the mainboard is encapsulated into the silk screen file, including:

[0015] Get the data format of the silk-screen information displayed on the software display interface;

[0016] Collect the silkscreen information corresponding to all interfaces on the motherboard;

[0017] The silk screen information corresponding to all interfaces is format-converted according to the data format, and all silk screen information after format conversion is encapsulated into a silk screen file.

[0018] On the one hand, based on the numbering information of each currently running device, determining the port index of each currently running device includes:

[0019] Obtaining the numbering information of each currently running device; wherein the numbering information includes the CPU number, component number and port number;

[0020] The number information corresponding to each device is processed according to the set shift or operation mode to obtain the port index of each device.

[0021] On the one hand, the number information corresponding to each device is processed according to the set shift or operation mode to obtain the port index of each device, including:

[0022] The CPU number of each device shifted left by eight bits, the component number shifted left by five bits, and the port number are bitwise ORed to obtain the port index of each device.

[0023] On the one hand, when there is a port index matching the target port index of the target device in the silkscreen file, recording the silkscreen information corresponding to the target port index in the silkscreen file to a memory area interoperable with the function, and displaying the silkscreen information of the target device through the function includes:

[0024] Applying for a memory area that communicates with the function; wherein the memory area is used to store silk screen information;

[0025] Saving the address of the memory area into an address variable;

[0026] Read the silk screen information corresponding to each interface in the silk screen file; wherein the silk screen information includes number information and silk screen display name; the number information includes CPU number, component number and port number;

[0027] Process the numbering information corresponding to each interface according to the set shift or operation mode to obtain the port index of each interface;

[0028] Convert the silk screen information corresponding to each device in the silk screen file into a silk screen file including a port index and a silk screen display name to obtain a converted silk screen file;

[0029] When a trigger signal is obtained, it is determined whether there is a port index in the converted silk screen file that matches the target port index of the target device;

[0030] In the case where there is a port index matching the target port index of the target device in the converted silk-screen file, reading silk-screen information corresponding to the target port index from the converted silk-screen file;

[0031] Reading the address of the memory area from the address variable;

[0032] According to the address of the memory area, recording the silk screen information corresponding to the target port index into the memory area;

[0033] The silkscreen information of the target device is displayed through the function.

[0034] On the one hand, after determining the port index of each device based on the serial number information of each currently running device, it also includes:

[0035] When there is no port index matching the target port index of the target device in the silkscreen file, the numbering information of the target device is recorded in a memory area interoperable with the function, and the numbering information of the target device is displayed through the function.

[0036] The embodiment of the present invention also provides a device for positioning a device, including a deployment unit, a packaging unit, a determination unit, a recording unit and a display unit;

[0037] The deployment unit is used to deploy a function for returning silkscreen information in a function configuration file;

[0038] The encapsulation unit is used to encapsulate the silk-screen information corresponding to all interfaces on the mainboard into a silk-screen file according to a set data format; wherein the data format is consistent with the data format of the silk-screen information displayed on the software display interface; based on the numbering information of each currently running device, determine the port index of each device;

[0039] The determining unit is used to determine the port index of each currently running device based on the numbering information of each currently running device;

[0040] The recording unit is used to record the silkscreen information corresponding to the target port index in the silkscreen file into a memory area intercommunication with the function when there is a port index matching the target port index of the target device in the silkscreen file;

[0041] The display unit is used to display the silk screen information of the target device through the function; wherein the target device is any one of the currently running devices.

[0042] In one aspect, the deployment unit includes a read subunit and an add subunit;

[0043] The reading subunit is used to read the function configuration file and locate the free position in the function configuration file for deploying the function function;

[0044] The adding subunit is used to add a function for returning silk screen information at the idle position.

[0045] On the one hand, the encapsulation unit includes a format acquisition subunit, a collection subunit and a conversion subunit;

[0046] The format acquisition subunit is used to acquire the data format of the silk-screen information displayed on the software display interface;

[0047] The collecting subunit is used to collect the silkscreen information corresponding to all interfaces on the mainboard;

[0048] The conversion subunit is used to convert the silk screen information corresponding to all interfaces according to the data format, and encapsulate all the silk screen information after the format conversion into a silk screen file.

[0049] On the one hand, the determination unit includes a number information acquisition subunit and a processing subunit;

[0050] The number information acquisition subunit is used to acquire the number information of each currently running device; wherein the number information includes a central processing unit number, a component number and a port number;

[0051] The processing subunit is used to process the numbering information corresponding to each device according to a set shift or operation method to obtain the port index of each device.

[0052] On the one hand, the processing subunit is used to perform a bitwise OR operation on the CPU number of each device after being shifted left by eight bits, the component number after being shifted left by five bits, and the port number to obtain the port index of each device.

[0053] On the one hand, the recording unit is used to apply for a memory area that communicates with the function; wherein the memory area is used to store silk screen information; the address of the memory area is saved in the address variable; the silk screen information corresponding to each interface in the silk screen file is read; wherein the silk screen information includes numbering information and silk screen display name; the numbering information includes a central processing unit number, a component number and a port number; the numbering information corresponding to each interface is processed according to a set shift or operation method to obtain a port index of each interface; the silk screen information corresponding to each device in the silk screen file is converted into a silk screen file containing a port index and a silk screen display name to obtain a converted silk screen file; when a trigger signal is obtained, it is determined whether there is a port index matching the target port index of the target device in the converted silk screen file; when there is a port index matching the target port index of the target device in the converted silk screen file, the silk screen information corresponding to the target port index is read from the converted silk screen file; the address of the memory area is read from the address variable; according to the address of the memory area, the silk screen information corresponding to the target port index is recorded in the memory area.

[0054] On the one hand, the recording unit is also used to record the numbering information of the target device into a memory area intercommunication with the function when there is no port index matching the target port index of the target device in the silkscreen file;

[0055] The display unit is further configured to display the serial number information of the target device through the function.

[0056] An embodiment of the present invention further provides a positioning device, including:

[0057] Memory for storing computer programs;

[0058] A processor is used to execute the computer program to implement the steps of the method for positioning the device as described above.

[0059] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned device positioning method are implemented.

[0060] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned device positioning method when executed by a processor.

[0061] It can be seen from the above technical solution that a function for returning silk screen information is deployed in the function configuration file to provide support for displaying the silk screen information of the device. In order to ensure that the data format of the silk screen information displayed on the software display interface is consistent, the silk screen information corresponding to all interfaces on the mainboard can be encapsulated into the silk screen file according to the data format. Based on the numbering information of each currently running device, the port index of each device is determined. In order to locate the specific location of the device, it can be determined whether there is a port index in the silk screen file that matches the target port index of the target device. In the case that there is a port index in the silk screen file that matches the target port index of the target device, the silk screen information corresponding to the target port index in the silk screen file is recorded in the memory area that communicates with the function, and the silk screen information of the target device is displayed through the function; wherein the target device is any one of the currently running devices.

[0062] The beneficial effect of the present invention is that by deploying a function for returning silk screen information, the server system can support the function of displaying the silk screen information of the device. The silk screen information is recorded in a memory area that communicates with the function, and the display of the silk screen information is realized through the function, so as to facilitate the test research and development personnel to accurately locate the device according to the silk screen information. The implementation method can be applicable to the display of the silk screen information of all devices, and there is no need to construct a structure for storing its silk screen information for each device. And according to the data format of the silk screen information displayed on the software display interface, the obtained silk screen information is encapsulated to ensure the consistency of the displayed silk screen information with the silk screen information on the software display interface. Considering that the device connected to the interface may be hot-plugged, but the interface will not change, by encapsulating the silk screen information corresponding to all interfaces on the mainboard into the silk screen file, it can be well applicable to the situation of hot plugging of the device. According to the method provided by the present invention, the position of all PCIe devices can be quickly and accurately automatically located. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0064] Figure 1 A flowchart of a method for positioning a device provided by an embodiment of the present invention;

[0065] Figure 2 A flowchart of a method for obtaining silk screen information of a target device provided by an embodiment of the present invention;

[0066] Figure 3 A schematic diagram of the structure of a device positioning apparatus provided by an embodiment of the present invention;

[0067] Figure 4 A structural diagram of a positioning device provided in an embodiment of the present invention. DETAILED DESCRIPTION

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

[0069] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.

[0070] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0071] There are currently two main conventional methods for determining device location information under Linux. The first is an indirect method: obtain the physical slot and bus / device / function (BUS / DEVICE / FUNCTION) number of the PCIe device by entering a command that displays more detailed information (lspci -vvv), and then manually use the command to read and display system hardware information (dmidecode –t 9) to view the System Management BIOS (SMBIOS) type 9 information, find the same physical slot and BUS / DEVICE / FUNCTION number as those queried by lspci –vvv, and then view the silkscreen information corresponding to the type 9 field to obtain the device location information. The indirect method is too cumbersome and the query efficiency is low. There is also a risk of human matching errors.

[0072] The second method is a direct method: directly add a display device name (DeviceName) field in lspci –vvv, and directly display the device's silkscreen information after this field. The direct method requires adding SMBIOS Type 41 in the BIOS code. Fill in the silkscreen information to be displayed after the reference number (Reference Designation), and each device needs to add a Type41 structure. The direct method requires adding a type 41 structure for each additional device. The silkscreen information of the added device is fixed, and which devices have DeviceName is also fixed. Type 41 is called Onboard Devices ExtendedInformation, which means that the device displayed through Type41 is theoretically an onboard device, so the external non-volatile memory host controller interface (nvme) or PCIe card should not have a Type 41 structure, does not support dynamic display in the case of hot plugging of devices, and cannot be applied to all PCIe devices to display DeviceName.

[0073] Therefore, the embodiment of the present invention provides a method, device, positioning device and storage medium for device positioning. By deploying a function for returning silk screen information, the server system can support the function of displaying device silk screen information. The silk screen information is recorded in a memory area that communicates with the function, and the display of the silk screen information is realized through the function, so that it is convenient for test developers to accurately locate the device according to the silk screen information. This implementation method can be applied to the display of silk screen information of all devices, and there is no need to build a structure for storing its silk screen information for each device. And according to the data format of the silk screen information displayed on the software display interface, the obtained silk screen information is encapsulated to ensure the consistency of the displayed silk screen information with the silk screen information on the software display interface. Considering that the device connected to the interface may be hot-plugged, but the interface will not change, by encapsulating the silk screen information corresponding to all interfaces on the mainboard into the silk screen file, it can be well applicable to the situation of hot plugging of the device. According to the method provided by the present invention, the position of all PCIe devices can be quickly and accurately automatically located.

[0074] Next, a method for positioning a device provided by an embodiment of the present invention is described in detail. Figure 1 A flowchart of a method for positioning a device provided by an embodiment of the present invention, the method comprising:

[0075] S101: deploy a function for returning silkscreen information in a function configuration file.

[0076] The function configuration file records the operation logic and process of various functions. The function configuration file often contains idle positions. In the embodiment of the present invention, the function configuration file can be read, and the idle positions in the function configuration file for deploying function functions can be located; and a function for returning silk screen information is added to the idle positions.

[0077] The function configuration file can be an ASL file, which records the operation logic and process of various functions. Arg2 in the ASL file contains multiple bits, each bit represents a different function, and bit7 is a free bit. A function (DSM Method) for returning silkscreen information can be added to bit7, so that the server system can support the function of displaying DeviceName.

[0078] S102: Encapsulate the silk screen information corresponding to all interfaces on the mainboard into a silk screen file according to a set data format.

[0079] The data format is consistent with the data format of the silk-screen information displayed on the software display interface, and the protocol used by the data format may be named OemSilkNameProtocol.

[0080] The software display interface may include Setup, Type 9, and BMC WEB. In order to ensure the consistency of the displayed content in all places where silkscreen information is displayed, the data format of the silkscreen information displayed on the software display interface can be obtained; the silkscreen information corresponding to all interfaces on the motherboard can be collected; the silkscreen information corresponding to all interfaces can be formatted according to the data format, and all the silkscreen information after format conversion can be encapsulated into a silkscreen file.

[0081] Taking into account that the device connected to the interface may be hot-plugged, but the interface on the mainboard will not change, in an embodiment of the present invention, in order to adapt to the situation of hot-plugging of devices, when obtaining the silk screen information, the silk screen information corresponding to all interfaces can be obtained based on all interfaces on the mainboard, so that the silk screen information of all devices can be covered in the silk screen file.

[0082] S103: Determine the port index of each currently running device based on the number information of each currently running device.

[0083] When the device is hot-plugged, the currently running device will change. In the embodiment of the present invention, only the currently running devices can be located. Since the silk screen file covers the silk screen information of all interfaces, the silk screen information can be displayed according to the device regardless of the configuration of the machine.

[0084] The numbering information may include the central processing unit number (CPU Number), the component number (PE Number) and the port number (Port Number).

[0085] In the embodiment of the present invention, the silk screen information of the device can be queried from the silk screen file by matching the port index (PortIndex). Therefore, after obtaining the number information of each currently running device, the number information corresponding to each device can be processed according to the set shift or operation method to obtain the port index of each device.

[0086] According to the length of different numbers, different numbers can be shifted first, and then the shifted numbers can be ORed together to determine the port index. In practical applications, the CPU number of each device shifted left by eight bits, the component number shifted left by five bits, and the port number can be bitwise ORed together to obtain the port index of each device. That is, PortIndex = (CPU Number << 8) | (PE Number << 5) | Port Number.

[0087] S104: When there is a port index in the silk-screen file that matches the target port index of the target device, the silk-screen information corresponding to the target port index in the silk-screen file is recorded in a memory area that communicates with the function, and the silk-screen information of the target device is displayed through the function.

[0088] The positioning method of each device is similar. Taking any one of the currently running devices, that is, the target device, as an example, the positioning process of the target device is introduced. For the sake of distinction, the port index of the target device can be called the target port index.

[0089] After determining the target port index of the target device, in order to locate the specific location of the target device, it can be determined whether there is a port index matching the target port index of the target device in the silkscreen file. If there is a port index matching the target port index of the target device in the silkscreen file, the silkscreen information corresponding to the target port index in the silkscreen file can be directly recorded in the memory area that communicates with the function, and the silkscreen information of the target device can be displayed through the function.

[0090] It can be seen from the above technical solution that a function for returning silk screen information is deployed in the function configuration file, so as to provide support for displaying the silk screen information of the device. In order to ensure that the data format of the silk screen information displayed on the software display interface is consistent, the silk screen information corresponding to all interfaces on the mainboard can be encapsulated into the silk screen file according to the data format. Based on the numbering information of each currently running device, the port index of each device is determined. In order to locate the specific location of the device, it can be determined whether there is a port index matching the target port index of the target device in the silk screen file. In the case where there is a port index matching the target port index of the target device in the silk screen file, the silk screen information corresponding to the target port index in the silk screen file is recorded in the memory area that communicates with the function, and the silk screen information of the target device is displayed through the function; wherein, the target device is any one of the currently running devices. The beneficial effect of the present invention is that by deploying a function for returning silk screen information, the server system can support the function of displaying the silk screen information of the device. The silk screen information is recorded in a memory area that is interoperable with the function, and the display of the silk screen information is realized through the function, so that the test R&D personnel can accurately locate the device according to the silk screen information. This implementation method can be applied to the display of silk screen information of all devices, and there is no need to construct a structure for storing its silk screen information for each device. And according to the data format of the silk screen information displayed on the software display interface, the obtained silk screen information is encapsulated to ensure the consistency of the displayed silk screen information with the silk screen information on the software display interface. Considering that the device connected to the interface may be hot-plugged, but the interface will not change, by encapsulating the silk screen information corresponding to all interfaces on the mainboard into the silk screen file, it can be well applicable to the hot-plugging of the device. According to the method provided by the present invention, the position of all PCIe devices can be quickly and accurately automatically located.

[0091] Figure 2 A flowchart of a method for obtaining silk screen information of a target device provided by an embodiment of the present invention, the method comprising:

[0092] S201: Apply for a memory area that communicates with the function.

[0093] During the basic input and output system startup phase (BIOS DXE), a memory area can be requested to store silk screen information.

[0094] S202: Save the address of the memory area into the address variable.

[0095] After applying for a memory area, the address of the memory area can be passed to ASL and saved in an address variable (DSMADDRVariable).

[0096] S203: Read the silk screen information corresponding to each interface in the silk screen file.

[0097] The silk screen information may include numbering information and a silk screen display name (SilkNameDisplay); the numbering information includes a CPU number, a component number, and a port number.

[0098] S204: Process the numbering information corresponding to each interface according to a set shift or operation method to obtain a port index of each interface.

[0099] In order to achieve the matching of the port index, the numbering information corresponding to each interface may be processed according to a set shift or operation mode, so as to convert the numbering information into the form of the port index.

[0100] The shift OR operation may include performing a bitwise OR operation on the CPU number after being shifted left by eight bits, the component number after being shifted left by five bits, and the port number of each interface to obtain the port index of each interface.

[0101] S205: Convert the silk screen information corresponding to each device in the silk screen file into a silk screen file including a port index and a silk screen display name, so as to obtain a converted silk screen file.

[0102] Each interface in the converted silk screen file has a corresponding variable structure (Variable), and Variable consists of [PortIndex, SilkNameDisplay].

[0103] S206: When the trigger signal is obtained, it is determined whether there is a port index in the converted silk screen file that matches the target port index of the target device.

[0104] In order to realize the interaction between BIOS and operating system (OS), you can register system interrupt management (SMI). Executing lspci –vvv in Linux will trigger SMI and execute the corresponding processing (Handler).

[0105] Different sequence numbers can be used to distinguish different SMIs, so the trigger signal can include the sequence number used to trigger the current SMI.

[0106] When there is a port index matching the target port index of the target device in the converted silk-screen file, it indicates that the silk-screen information of the target device is recorded in the silk-screen file, and S207 can be executed at this time.

[0107] S207: Read the silk screen information corresponding to the target port index from the converted silk screen file.

[0108] In the case that there is a port index matching the target port index of the target device in the converted silk-screen file, silk-screen information corresponding to the target port index may be read from the converted silk-screen file.

[0109] S208: Read the address of the memory area from the address variable.

[0110] In order to display the silk screen information, the silk screen information needs to be recorded in the memory area. Since the address of the memory area is saved in the address variable in advance, the address of the memory area can be read from the address variable to locate the memory area.

[0111] S209: Record the silk screen information corresponding to the target port index into the memory area according to the address of the memory area.

[0112] After recording the silk-screen information into the memory area, the silk-screen information of the target device can be automatically displayed through the function connected to the memory area.

[0113] The device positioning method provided by the embodiment of the present invention is more convenient and intuitive, very user-friendly, saves the steps and time of manual search, and reduces the possibility of search errors due to human factors. Compared with the method of using SMBIOS type41 to display DeviceName, which is limited to fixed devices, the device positioning method of the present invention is more universal. And when a Pcie device fails, the specific location of the faulty device can be quickly determined by obtaining the silk screen information, so that R&D test personnel can directly obtain the device's location silk screen information through the lspci –vvv command under the Linux OS when there is no network connection to the BMC in the computer room and they do not want to restart. This simplifies the operation steps of R&D test personnel and reduces the risk of errors.

[0114] Considering the actual application, there may be a situation where there is no port index matching the target port index of the target device in the silkscreen file. In view of this situation, in order to locate the target device, the target device number information can be directly recorded in the memory area that communicates with the function, and the target device number information can be displayed through the function.

[0115] Although there are differences between the numbering information and the silkscreen information, the test developers can locate the specific location of the device based on the device numbering information. Therefore, when there is no port index matching the target port index of the target device in the silkscreen file, by displaying the target device numbering information, although the consistency between the displayed content and the silkscreen information on the software display interface cannot be guaranteed, it does not affect the location of the device.

[0116] In the case where there is no port index in the silkscreen file that matches the target port index of the target device, after the numbering information of the target device is recorded in the memory area that communicates with the function, prompt information for supplementing the silkscreen information can be displayed through the human-computer interaction page, so that the operation and maintenance personnel can enter the silkscreen information corresponding to the target device into the human-computer interaction page after viewing the prompt information, so that the BIOS can supplement the silkscreen information corresponding to the target device into the silkscreen file after obtaining the silkscreen information corresponding to the target device.

[0117] By supplementing and improving the silk-screen files, it can be ensured that the silk-screen files can cover the silk-screen information of all devices as much as possible, thereby providing reliable support for the positioning of the equipment.

[0118] Figure 3 A schematic diagram of the structure of a device positioning apparatus provided by an embodiment of the present invention, comprising a deployment unit 31, a packaging unit 32, a determination unit 33, a recording unit 34 and a display unit 35;

[0119] A deployment unit 31, used for deploying a function for returning silk screen information in a function configuration file;

[0120] The encapsulation unit 32 is used to encapsulate the silk-screen information corresponding to all interfaces on the mainboard into a silk-screen file according to a set data format; wherein the data format is consistent with the data format of the silk-screen information displayed on the software display interface; based on the serial number information of each currently running device, the port index of each device is determined;

[0121] A determination unit 33, configured to determine a port index of each currently running device based on the number information of each currently running device;

[0122] The recording unit 34 is used to record the silk screen information corresponding to the target port index in the silk screen file to the memory area intercommunication with the function when there is a port index matching the target port index of the target device in the silk screen file;

[0123] The display unit 35 is used to display the silk screen information of the target device through a function; wherein the target device is any one of the currently running devices.

[0124] In some embodiments, the deployment unit includes a read subunit and an add subunit;

[0125] A reading subunit is used to read a function configuration file and locate an idle position in the function configuration file for deploying a function function;

[0126] Add a subunit to add a function for returning silkscreen information in the free position.

[0127] In some embodiments, the encapsulation unit includes a format acquisition subunit, a collection subunit, and a conversion subunit;

[0128] The format acquisition subunit is used to acquire the data format of the silk-screen information displayed on the software display interface;

[0129] The collection subunit is used to collect the silkscreen information corresponding to all interfaces on the mainboard;

[0130] The conversion subunit is used to convert the silk screen information corresponding to all interfaces according to the data format, and encapsulate all the silk screen information after the format conversion into the silk screen file.

[0131] In some embodiments, the determination unit includes a number information acquisition subunit and a processing subunit;

[0132] The number information acquisition subunit is used to acquire the number information of each currently running device; wherein the number information includes the CPU number, component number and port number;

[0133] The processing subunit is used to process the numbering information corresponding to each device according to a set shift or operation method to obtain the port index of each device.

[0134] In some embodiments, the processing subunit is used to perform a bitwise OR operation on the CPU number of each device after being shifted left by eight bits, the component number after being shifted left by five bits, and the port number to obtain the port index of each device.

[0135] In some embodiments, a recording unit is used to apply for a memory area that communicates with a function; wherein the memory area is used to store silk screen information; the address of the memory area is saved in an address variable; the silk screen information corresponding to each interface in the silk screen file is read; wherein the silk screen information includes numbering information and a silk screen display name; the numbering information includes a central processing unit number, a component number, and a port number; the numbering information corresponding to each interface is processed according to a set shift or operation method to obtain a port index of each interface; the silk screen information corresponding to each device in the silk screen file is converted into a silk screen file containing a port index and a silk screen display name to obtain a converted silk screen file; when a trigger signal is obtained, it is determined whether there is a port index matching the target port index of the target device in the converted silk screen file; when there is a port index matching the target port index of the target device in the converted silk screen file, the silk screen information corresponding to the target port index is read from the converted silk screen file; the address of the memory area is read from the address variable; based on the address of the memory area, the silk screen information corresponding to the target port index is recorded in the memory area.

[0136] In some embodiments, the recording unit is further configured to record the numbering information of the target device into a memory area intercommunication with the function if there is no port index matching the target port index of the target device in the silkscreen file;

[0137] The display unit is also used to display the target device number information through the function.

[0138] Figure 3 The description of the features in the corresponding embodiments can be found in Figure 1 The relevant descriptions of the corresponding embodiments will not be repeated here one by one.

[0139] It can be seen from the above technical solution that a function for returning silk screen information is deployed in the function configuration file, so as to provide support for displaying the silk screen information of the device. In order to ensure that the data format of the silk screen information displayed on the software display interface is consistent, the silk screen information corresponding to all interfaces on the mainboard can be encapsulated into the silk screen file according to the data format. Based on the numbering information of each currently running device, the port index of each device is determined. In order to locate the specific location of the device, it can be determined whether there is a port index matching the target port index of the target device in the silk screen file. In the case where there is a port index matching the target port index of the target device in the silk screen file, the silk screen information corresponding to the target port index in the silk screen file is recorded in the memory area that communicates with the function, and the silk screen information of the target device is displayed through the function; wherein, the target device is any one of the currently running devices. The beneficial effect of the present invention is that by deploying a function for returning silk screen information, the server system can support the function of displaying the silk screen information of the device. The silk screen information is recorded in a memory area that is interoperable with the function, and the display of the silk screen information is realized through the function, so that the test R&D personnel can accurately locate the device according to the silk screen information. This implementation method can be applied to the display of silk screen information of all devices, and there is no need to construct a structure for storing its silk screen information for each device. And according to the data format of the silk screen information displayed on the software display interface, the obtained silk screen information is encapsulated to ensure the consistency of the displayed silk screen information with the silk screen information on the software display interface. Considering that the device connected to the interface may be hot-plugged, but the interface will not change, by encapsulating the silk screen information corresponding to all interfaces on the mainboard into the silk screen file, it can be well applicable to the hot-plugging of the device. According to the method provided by the present invention, the position of all PCIe devices can be quickly and accurately automatically located.

[0140] Figure 4 A structural diagram of a positioning device provided by an embodiment of the present invention, such as Figure 4 As shown, the positioning device includes: a memory 40 for storing a computer program;

[0141] The processor 41 is used to implement the steps of device positioning in the above embodiment when executing the computer program.

[0142] The positioning device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.

[0143] Among them, the processor 41 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 41 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 41 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 41 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 41 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0144] The memory 40 may include one or more computer-readable storage media, which may be non-transitory. The memory 40 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 40 is at least used to store the following computer program 401, wherein, after the computer program is loaded and executed by the processor 41, the relevant steps of the device positioning method disclosed in any of the aforementioned embodiments can be implemented. In addition, the resources stored in the memory 40 may also include an operating system 402 and data 403, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 402 may include Windows, Unix, Linux, etc. Data 403 may include but is not limited to the silk screen information corresponding to all interfaces, the data format of the silk screen information displayed on the software display interface, the port index of each currently running device, etc.

[0145] In some embodiments, the positioning device may further include a display screen 42 , an input / output interface 43 , a communication interface 44 , a power supply 45 , and a communication bus 46 .

[0146] Those skilled in the art will understand that Figure 4 The structure shown in the figure does not constitute a limitation of the positioning device, and may include more or fewer components than shown in the figure.

[0147] It is understandable that if the device positioning method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the current technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, magnetic disk or optical disk, etc. Various media that can store program codes.

[0148] Based on this, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned device positioning method are implemented.

[0149] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned device positioning method when executed by a processor.

[0150] The above is a detailed introduction to a method, device, positioning device, computer-readable storage medium and computer program product for positioning a device provided by an embodiment of the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

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

[0152] The above is a detailed introduction to a method, apparatus, positioning device, computer-readable storage medium and computer program product for positioning a device provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.

Claims

1. A method for positioning a device, characterized in that: include: Deploy the function for returning silkscreen information in the function configuration file; According to the set data format, the silk screen information corresponding to all interfaces on the mainboard is encapsulated into a silk screen file; wherein the data format is consistent with the data format of the silk screen information displayed on the software display interface; Based on the serial number information of each currently running device, determine the port index of each currently running device; When there is a port index in the silkscreen file that matches the target port index of the target device, the silkscreen information corresponding to the target port index in the silkscreen file is recorded in a memory area that communicates with the function, and the silkscreen information of the target device is displayed through the function; wherein the target device is any one of the currently running devices.

2. The device positioning method according to claim 1, characterized in that: The functions deployed in the function configuration file to return silkscreen information include: Read the function configuration file and locate the free position in the function configuration file for deploying the function function; A function for returning silk screen information is added in the free position.

3. The device positioning method according to claim 1, characterized in that: According to the set data format, the silkscreen information corresponding to all interfaces on the mainboard is encapsulated into the silkscreen file, including: Get the data format of the silk-screen information displayed on the software display interface; Collect the silkscreen information corresponding to all interfaces on the motherboard; The silk screen information corresponding to all interfaces is format-converted according to the data format, and all silk screen information after format conversion is encapsulated into a silk screen file.

4. The device positioning method according to claim 1, characterized in that: Based on the serial number information of each currently running device, the port index of each currently running device is determined to include: Obtaining the numbering information of each currently running device; wherein the numbering information includes the CPU number, component number and port number; The number information corresponding to each device is processed according to the set shift or operation mode to obtain the port index of each device.

5. The device positioning method according to claim 4, characterized in that: The number information corresponding to each device is processed according to the set shift or operation mode to obtain the port index of each device, including: The CPU number of each device shifted left by eight bits, the component number shifted left by five bits, and the port number are bitwise ORed to obtain the port index of each device.

6. The device positioning method according to claim 1, characterized in that: In the case where there is a port index matching the target port index of the target device in the silkscreen file, recording the silkscreen information corresponding to the target port index in the silkscreen file to a memory area interoperable with the function, and displaying the silkscreen information of the target device through the function includes: Applying for a memory area that communicates with the function; wherein the memory area is used to store silk screen information; Saving the address of the memory area into an address variable; Read the silk screen information corresponding to each interface in the silk screen file; wherein the silk screen information includes number information and silk screen display name; the number information includes CPU number, component number and port number; Process the numbering information corresponding to each interface according to the set shift or operation mode to obtain the port index of each interface; Convert the silk screen information corresponding to each device in the silk screen file into a silk screen file including a port index and a silk screen display name to obtain a converted silk screen file; When a trigger signal is obtained, it is determined whether there is a port index in the converted silk screen file that matches the target port index of the target device; In the case where there is a port index matching the target port index of the target device in the converted silk-screen file, reading silk-screen information corresponding to the target port index from the converted silk-screen file; Reading the address of the memory area from the address variable; According to the address of the memory area, recording the silk screen information corresponding to the target port index into the memory area; The silkscreen information of the target device is displayed through the function.

7. The device positioning method according to any one of claims 1 to 6, characterized in that: After determining the port index of each device based on the serial number information of each currently running device, the following steps are also included: When there is no port index matching the target port index of the target device in the silkscreen file, the numbering information of the target device is recorded in a memory area interoperable with the function, and the numbering information of the target device is displayed through the function.

8. A device for positioning equipment, characterized in that: It includes a deployment unit, a packaging unit, a determination unit, a recording unit and a display unit; The deployment unit is used to deploy a function for returning silkscreen information in a function configuration file; The encapsulation unit is used to encapsulate the silk-screen information corresponding to all interfaces on the mainboard into a silk-screen file according to a set data format; wherein the data format is consistent with the data format of the silk-screen information displayed on the software display interface; based on the numbering information of each currently running device, determine the port index of each device; The determining unit is used to determine the port index of each currently running device based on the numbering information of each currently running device; The recording unit is used to record the silkscreen information corresponding to the target port index in the silkscreen file into a memory area intercommunication with the function when there is a port index matching the target port index of the target device in the silkscreen file; The display unit is used to display the silk screen information of the target device through the function; wherein the target device is any one of the currently running devices.

9. A positioning device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the method for positioning a device as claimed in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for positioning a device as claimed in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Equipment numbering method and device and computer readable storage medium

    CN111625285A

  • Method, device and equipment for processing asset information function of PCIE (Peripheral Component Interface Express) equipment and medium

    CN115543750A

  • Screen printing display method and device for equipment case, computer equipment and medium

    CN117077222A

  • Device information display method and system

    CN117194306A

  • Equipment position determination method and device, electronic equipment and storage medium

    CN117435417A