A spare part detection method and electronic device

By automatically acquiring the operating system and identifying spare parts types based on hardware information comparison, the problem of low efficiency in server spare parts detection has been solved, achieving fast and accurate detection and ensuring spare parts quality and equipment stability.

CN120723569BActive Publication Date: 2025-11-25INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511220419.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-28
Publication Date
2025-11-25
Estimated Expiration
2045-08-28

AI Technical Summary

Technical Problem

In existing technologies, server spare parts testing is inefficient, prone to human input errors, resulting in non-targeted testing, long testing time, and inability to ensure spare parts quality.

Method used

By automatically acquiring the detection operating system after the first device is powered on, generating hardware interface commands and hardware information query requests, identifying spare parts types based on hardware information comparison, and determining targeted testing content, manual operation is reduced and identification efficiency and accuracy are improved.

Benefits of technology

It enables rapid and accurate identification of spare parts types, ensures the relevance of testing content, avoids redundant testing, improves spare parts testing efficiency, and guarantees the stability and reliability of equipment operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120723569B_ABST
    Figure CN120723569B_ABST
Patent Text Reader

Abstract

The application discloses a spare part detection method and electronic equipment, and relates to the technical field of computers. The method is applied to a spare part detection device. The method comprises the following steps: after a first device is powered on, a detection operating system corresponding to the first device is obtained from a preset database; a hardware interface command and a hardware information query request are generated by using the detection operating system; first group hardware information is read according to the hardware interface command; second group hardware information is queried from the preset database according to the hardware information query request; the spare part type of a spare part to be detected is identified according to the first group hardware information and the second group hardware information; and the spare part detection content is determined according to the spare part type, and the spare part to be detected is detected. According to the application, the detection operating system is automatically obtained after the first device is powered on, the spare part type of the spare part to be detected is identified based on the hardware information obtained by the system, the spare part detection content of the spare part to be detected is determined, and the spare part detection efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a spare parts testing method and electronic equipment. Background Technology

[0002] In the server industry, the stability and reliability of server operation are of paramount importance. When a server malfunctions or experiences anomalies, immediate analysis and troubleshooting are crucial, and replacement components must be replaced promptly. This necessitates a certain reserve of spare parts for each server component. Server spare parts are typically produced in proportion to the number of servers shipped. The quality of these spare parts directly impacts the server's ability to quickly restore stable operation after replacement. If spare parts are defective, replacing them may not only fail to resolve the original fault but could also introduce new problems. Therefore, accurate and efficient testing of spare parts to ensure their quality and guarantee rapid server recovery is of utmost importance. Summary of the Invention

[0003] This application provides a spare parts testing method and electronic device to at least solve the problem of how to accurately and efficiently test server spare parts.

[0004] This application provides a spare parts testing method applied to a spare parts testing device. The spare parts testing device and the spare parts to be tested constitute a first device. The spare parts to be tested in the first device are used to replace the components corresponding to the spare parts to be tested in a second device. The method includes:

[0005] After the first device is powered on, the detection operating system corresponding to the first device is retrieved from the preset database and loaded.

[0006] By utilizing the operating system detection, hardware interface commands corresponding to the first device and hardware information query requests corresponding to the second device are generated.

[0007] According to the hardware interface command, read the first set of hardware information corresponding to the first device;

[0008] Based on the hardware information query request, query the second set of hardware information corresponding to the second device from the preset database;

[0009] Based on the first set of hardware information and the second set of hardware information, identify the spare part type of the spare part to be tested;

[0010] Based on the type of spare part, determine the spare part inspection content corresponding to the spare part to be inspected;

[0011] According to the spare parts inspection requirements, the spare parts to be inspected are inspected.

[0012] This application also provides a spare parts testing device, which, together with a spare parts to be tested, forms a first device. The spare parts to be tested in the first device are used to replace the components corresponding to the spare parts to be tested in a second device, including:

[0013] The loading module is used to retrieve and load the detection operating system corresponding to the first device from the preset database after the first device is powered on.

[0014] The generation module is used to generate hardware interface commands corresponding to the first device and hardware information query requests corresponding to the second device by utilizing the detection operating system.

[0015] The reading module is used to read the first set of hardware information corresponding to the first device according to the hardware interface command corresponding to the first device;

[0016] The query module is used to query the second set of hardware information corresponding to the second device from the preset database based on the hardware information query request;

[0017] The identification module is used to identify the spare part type of the spare part to be detected based on the first set of hardware information and the second set of hardware information.

[0018] The determination module is used to determine the spare part inspection content corresponding to the spare part to be inspected based on the spare part type;

[0019] The testing module is used to test the spare parts to be tested according to the spare parts testing requirements.

[0020] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above-described spare parts detection methods.

[0021] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-described spare parts detection methods.

[0022] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described spare parts testing methods.

[0023] This application enables the automatic acquisition and loading of the corresponding testing operating system from a preset database after the first device is powered on, eliminating the tedious manual configuration process. This is particularly suitable for scenarios involving multiple spare parts testing devices or multiple batches of spare parts, shortening preparation time for spare parts testing. The testing operating system directly generates hardware interface commands for the first device and hardware information query requests for the second device, reducing manual operation and the probability of errors. By comparing the first and second sets of hardware information, hardware differences between the first and second devices can be quickly identified, accurately determining the spare part type to be tested. This avoids the risk of errors during manual input of spare part types, improving the efficiency, accuracy, and reliability of spare part type identification. Furthermore, based on the spare part type, the corresponding testing content is determined, ensuring the relevance of the testing content and avoiding invalid testing of the spare part or redundant testing of unreplaced hardware. This accelerates spare part testing, improves testing efficiency, and allows for rapid shipment of spare parts, thereby ensuring the stability and reliability of equipment operation. Attached Figure Description

[0024] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 A schematic diagram illustrating the entire production process of a spare part from assembly to shipment, provided for an embodiment of this application;

[0026] Figure 2 A flowchart of a spare parts testing method provided in this application embodiment;

[0027] Figure 3 This is a schematic diagram of the structure of a spare parts testing device provided in an embodiment of this application;

[0028] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

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

[0030] It should be noted that, in the description of this application, 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. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0031] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0032] First, the application scenarios of the embodiments of this application will be introduced by way of example.

[0033] During server spare parts production, corresponding spare parts are manufactured according to a preset ratio based on the number of servers shipped, such as controller spare parts and battery backup unit (BBU) spare parts. When testing spare parts, they are installed in corresponding tooling to perform testing on the controller spare parts.

[0034] Figure 1 This is a schematic diagram illustrating the entire production process of a spare part, from assembly to shipment. Figure 1 During the assembly process, after the spare parts are assembled, they are transported to the workstation where the tooling is located. The spare parts are then installed into the corresponding tooling and powered on. The tooling obtains the operating system (OS) from the diagnostic server. After installing the OS, it receives spare part information, such as the spare part type, input by the operator, and retrieves the spare part's testing information from the diagnostic server based on this information. Then, based on the spare part's testing information, the tooling undergoes a complete system test, and the test results are stored in the diagnostic server. After the test is completed, the controller spare part is removed from the tooling, packaged, and shipped.

[0035] During the aforementioned spare parts inspection process, manual input of information such as spare parts type is required, which is prone to errors. Furthermore, the inspection process is performed on the entire tooling, rather than specifically on the spare parts, resulting in low efficiency, long inspection times, and a lack of targeted inspection.

[0036] In view of this, embodiments of this application provide a spare parts testing method to efficiently and accurately test spare parts.

[0037] It should be noted that the spare parts testing method provided in this embodiment of the invention can be executed by a spare parts testing device. This device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. The electronic device can be a server or a terminal. In this embodiment, the server can be a single server or a server cluster composed of multiple servers. The terminal in this embodiment can be a smartphone, personal computer, tablet computer, wearable device, or other intelligent hardware device such as an intelligent robot. The following method embodiments will use an electronic device as an example for explanation.

[0038] According to an embodiment of the present invention, a spare parts testing method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0039] This embodiment provides a spare parts testing method, applied to a spare parts testing device. The spare parts testing device and the spare parts to be tested constitute a first device, such as... Figure 1 The tooling in the first device is used to replace the component in the second device that corresponds to the component to be tested. Figure 2 This is a flowchart of a spare parts testing method provided according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes:

[0040] S101, after the first device is powered on, the detection operating system corresponding to the first device is retrieved from the preset database and loaded.

[0041] Specifically, the spare parts to be tested refer to spare parts that need to be tested. After the spare parts to be tested pass the test, they will be configured on the second device so that if the corresponding hardware in the second device fails, the spare parts corresponding to the faulty hardware can be replaced on the second device.

[0042] After the spare part to be tested is installed on the first device, the power supply of the first device is turned on so that the first device can automatically obtain the testing operating system from the preset database and load the testing operating system.

[0043] For example, based on the Preboot Execution Environment (PXE) technology, the detection operating system is obtained from the pre-set database of the diagnostic server. In this way, by using PXE technology, after the first device is powered on, it can directly communicate with the diagnostic server to obtain the detection operating system using the network card in the first device without relying on local storage, thus reducing the reliance on the local storage of the first device.

[0044] It detects whether the operating system is compatible with the first device and has functions such as hardware driver, data acquisition, and command generation.

[0045] S102, using the detection operating system, generate hardware interface commands corresponding to the first device and hardware information query requests corresponding to the second device.

[0046] Specifically, the hardware interface command is used to trigger the first device to read the hardware identifier of the hardware contained in the first device. For example, the hardware identifier of the hardware in the controller spare part can be read through the ipmitool raw interface command.

[0047] A hardware information query request is a request instruction used to retrieve hardware information from a preset database for a second device. For example, the hardware information query request may include identification information of the second device, such as its model number and name.

[0048] S103, read the first set of hardware information corresponding to the first device according to the hardware interface command corresponding to the first device.

[0049] S104, based on the hardware information query request, query the second set of hardware information corresponding to the second device from the preset database.

[0050] For example, when the preset database is stored in the diagnostic server, the first device sends a hardware information query request to the diagnostic server, and the diagnostic server responds to the request by returning a second set of hardware information of the second device to the first device based on the preset database.

[0051] Hardware information includes, but is not limited to, the hardware model, hardware configuration parameters, and hardware serial number of the device.

[0052] S105, based on the first set of hardware information and the second set of hardware information, identifies the spare part type of the spare part to be tested.

[0053] Specifically, the spare parts to be tested include, but are not limited to, controller spare parts, BBU spare parts, power supply spare parts, and BBU and power supply spare parts, etc.

[0054] S106. Determine the spare part inspection content corresponding to the spare part to be inspected based on the spare part type.

[0055] Specifically, spare parts testing includes both software and hardware testing. Software testing includes firmware updates and installing pre-installed software. Hardware testing includes CPU testing and hard drive testing. For example, hard drive testing may include bad sector detection, read / write speed testing, and stability testing. Of course, spare parts testing can also be specific to that particular spare part, such as testing based on the requirements of the order in which the spare part is located.

[0056] Different types of spare parts have different functions and performance specifications, therefore, the corresponding testing content will also differ. Determining the testing content based on the spare part type allows for targeted testing of the spare part to be inspected, thereby improving testing efficiency.

[0057] S107, Inspect the spare parts to be inspected according to the spare parts inspection content.

[0058] After the first device completes the inspection of the spare part to be tested, the inspection results can be stored in a file such as... Figure 1 In the diagnostic server.

[0059] In this embodiment, after the first device is powered on, the corresponding detection operating system is automatically retrieved and loaded from a preset database, eliminating the tedious manual configuration process. This is particularly suitable for scenarios involving multiple spare parts testing devices or multiple batches of spare parts testing, shortening the preparation time for spare parts testing. The detection operating system directly generates hardware interface commands for the first device and hardware information query requests for the second device, reducing manual operations and the probability of errors. By comparing the first and second sets of hardware information, the hardware differences between the first and second devices can be quickly identified, accurately determining the spare part type to be tested. This avoids the risk of errors during manual input of spare part types, improving the efficiency, accuracy, and reliability of spare part type identification. Furthermore, based on the spare part type, the corresponding testing content is determined, ensuring the relevance of the testing content and avoiding invalid testing of the spare part or redundant testing of unreplaced hardware. This accelerates the spare part testing speed, improves testing efficiency, and enables rapid shipment of spare parts, thereby ensuring the stability and reliability of equipment operation.

[0060] In some embodiments, based on the foregoing embodiments, the first set of hardware information includes the hardware name and hardware identifier of each hardware component in the first device, and the second set of hardware information includes the hardware name and hardware identifier of each hardware component in the second device.

[0061] For example, hardware names can be CPU, Hard Disk Drive (HDD), memory, etc. Hardware identifiers can be hardware serial numbers, hardware model numbers, or other information that can distinguish the hardware.

[0062] In step S105 above, the spare part type of the spare part to be detected is identified based on the first set of hardware information and the second set of hardware information, specifically including the following steps:

[0063] a1. Based on the hardware names and hardware identifiers of all hardware in the first set of hardware information and the hardware names and hardware identifiers of all hardware in the second set of hardware information, determine the hardware pairs in the first set of hardware information and the second set of hardware information that have the same hardware name but different hardware identifiers.

[0064] Specifically, a hardware pair refers to a combination of two hardware devices with the same name but different identifiers in the first and second sets of hardware information. For example, if the first device contains hardware named "hard drive" with the identifier "HD001", and the second device contains hardware named "hard drive" with the identifier "HD002", these two hardware devices constitute a hardware pair.

[0065] Hardware with the same name (e.g., CPU) indicates they belong to the same type of hardware, while hardware with different identifiers indicates they are different hardware entities. Filtering the first and second sets of hardware information for hardware pairs with the same name but different identifiers can pinpoint the different hardware in the two sets of devices resulting from spare parts replacement, providing a basis for determining the spare parts type.

[0066] a2, count the number of hardware pairs.

[0067] a3. Based on the number of hardware pairs and the preset mapping relationship between the number of hardware pairs and spare parts types, determine the spare parts type of the spare parts to be tested.

[0068] Specifically, the hardware included in different spare parts types will vary. For example, controller spare parts include the motherboard, memory, system disk, CPU, management board, and Baseboard Management Controller (BMC). Power supply spare parts include the power supply board and Power Supply Unit (PSU). BBU spare parts include the BBU unit itself. It can be seen that the number of hardware components in a spare part is related to its type. Therefore, the spare part type can be quickly and accurately determined based on the number of hardware pairs (i.e., the hardware differences between the first and second devices).

[0069] The preset mapping relationship between the number of hardware pairs and spare parts types indicates the correspondence rules between the number of hardware pairs and the corresponding spare parts types. For example, when the number of hardware pairs is 1, the corresponding spare parts type is BBU spare parts; when the number of hardware pairs is 2, the corresponding spare parts type is power supply spare parts, etc. Table 1 shows the preset mapping relationship between the number of hardware pairs and spare parts types.

[0070] Table 1

[0071]

[0072] In this embodiment, by comparing the hardware names and hardware identifiers of two sets of devices, the different hardware pairs are identified, and a mapping relationship between the number of hardware pairs and the spare parts type is further established. Based on the number of different hardware pairs, the spare parts type can be quickly and accurately identified. Compared with manual judgment and input of spare parts type, the detection speed is accelerated. Especially when the device hardware configuration is complex and the spare parts type is diverse, the detection efficiency can be significantly improved.

[0073] In one possible implementation, in a1 above, hardware pairs with the same hardware name but different hardware identifiers in the first set of hardware information and the second set of hardware information are determined in the following way:

[0074] b1, Based on the hardware names and hardware identifiers of all hardware in the first group of hardware information, determine the first matrix corresponding to the first device.

[0075] Optionally, the hardware identifier includes the hardware serial number and hardware model. Based on the hardware names and hardware identifiers of all hardware in the first group of hardware information, the first matrix corresponding to the first device is determined, specifically including the following:

[0076] First, the hardware name, hardware serial number, and hardware model of the first hardware are determined as the row elements corresponding to the first hardware in the first matrix.

[0077] The first hardware is any one of all the hardware in the first group of hardware information.

[0078] Specifically, row elements refer to all the information contained in each row of a matrix.

[0079] Then, after determining the row elements corresponding to all hardware in the first group of hardware information in the first matrix, the first matrix is ​​obtained based on the row elements corresponding to all hardware in the first group of hardware information.

[0080] b2, based on the hardware names and hardware identifiers of all hardware in the second set of hardware information, determine the second matrix corresponding to the second device.

[0081] The method for determining the second matrix is ​​similar to that for the first matrix, and will not be elaborated here.

[0082] In the first and second matrices, each row element includes the hardware name and hardware identifier.

[0083] The first set of hardware information is used to determine the first matrix corresponding to the first device, and the second set of hardware information is used to determine the second matrix corresponding to the second device. The first and second sets of hardware information are transformed into the first and second matrices, realizing a structured description of hardware information. This solves the problem of fragmented information being difficult to compare efficiently and provides a basis for subsequent difference analysis.

[0084] b3, Based on the first matrix and the second matrix, determine the first difference matrix between the first matrix and the second matrix.

[0085] Specifically, the first difference matrix is ​​obtained by comparing the first matrix and the second matrix, and is used to indicate hardware information in the two matrices that have the same hardware name but different hardware identifiers.

[0086] Optionally, in b3 above, determining the first difference matrix between the first matrix and the second matrix based on the first matrix and the second matrix specifically includes the following steps:

[0087] c1 matches the row elements in the first matrix and the row elements in the second matrix according to the hardware name, and obtains row element pairs with the same hardware name.

[0088] c2 determines the first difference matrix based on the hardware serial number and hardware model in the row element pairs with the same hardware name.

[0089] In one possible scenario, in c2 above, the first difference matrix is ​​determined based on the hardware serial number and hardware model in the row element pairs with the same hardware name. This involves the following steps:

[0090] d1 performs an XOR operation on the hardware serial numbers of the two row elements in the first row element pair to obtain the first type of XOR result corresponding to the first row element pair.

[0091] The first row of elements consists of any one of the row element pairs with the same hardware name.

[0092] Specifically, the XOR operation means that when the hardware serial numbers of the two row elements are different, the result of the first type of XOR is 1, and when the hardware serial numbers of the two row elements are the same, the result of the first type of XOR is 0.

[0093] d2 performs an XOR operation on the hardware models of the two row elements in the first row element pair to obtain the second type of XOR result corresponding to the first row element pair.

[0094] d3, determine the first difference matrix based on the hardware name, the first type of XOR result and the second type of XOR result corresponding to all row element pairs.

[0095] For example, in d3 above, the first difference matrix is ​​determined based on the hardware name, the first type of XOR result, and the second type of XOR result corresponding to all row element pairs, specifically including the following:

[0096] First, the hardware name, the first type of XOR result, and the second type of XOR result corresponding to the first row element pair are determined as the row elements in the second difference matrix that correspond to the first row element pair.

[0097] Secondly, after determining the row elements corresponding to all row element pairs in the second difference matrix, the second difference matrix is ​​obtained based on the row elements corresponding to all row element pairs.

[0098] Next, perform a logical OR operation on the i-th first-type XOR result and the i-th second-type XOR result in the second difference matrix to obtain the i-th logical OR result.

[0099] Here, the i-th first-type XOR result is any first-type XOR result in the second difference matrix, and i is a positive integer.

[0100] Specifically, the logical OR operation means that when either the i-th first-type XOR result or the i-th second-type XOR result is 1, the i-th logical OR result is 1. Only when both the i-th first-type XOR result and the i-th second-type XOR result are 0, is the i-th logical OR result 0.

[0101] The logical OR operation can comprehensively reflect whether there is a difference between the hardware serial number and hardware model corresponding to the same hardware name in two devices. As long as one of them is different, that is, non-zero, it indicates that the hardware corresponding to the same hardware name in the first device and the second device are different.

[0102] Then, the hardware name corresponding to the i-th first type XOR result and the i-th logical OR result are determined as the row elements in the first difference matrix corresponding to the i-th first type XOR result.

[0103] Finally, after determining the row elements corresponding to all first-type XOR results in the first difference matrix, the first difference matrix is ​​determined based on the row elements corresponding to all first-type XOR results.

[0104] For example, the first matrix is ​​represented as follows:

[0105] .

[0106] The second matrix is ​​represented as follows:

[0107] .

[0108] Assume that the row element pairs with the same hardware name are the row element pairs consisting of (Power Board Serial Number 11 Model 11) in the first matrix and (Power Board Serial Number 11 Model 11) in the second matrix, the row element pairs consisting of (PSU Serial Number 12 Model 12) in the first matrix and (PSU Serial Number 12 Model 12) in the second matrix, and the row element pairs consisting of (BBU Serial Number 1n Model 1n) in the first matrix and (BBU Serial Number 2n Model 2n) in the second matrix.

[0109] The second difference matrix is ​​obtained by performing an XOR operation on the hardware serial number and hardware model in the above three pairs of row elements, as shown below:

[0110] ,

[0111] Perform a logical OR operation on the first type XOR result and the corresponding second type XOR result in the second difference matrix to obtain the logical OR result corresponding to the first type XOR result. Use the hardware name and the logical OR result as row elements in the first difference matrix. The resulting first difference matrix is ​​represented as follows:

[0112] .

[0113] Optionally, in b3 above, a matrix comparison algorithm is used, for example, to traverse each row of data in the two matrices, first matching rows with the same hardware name, then comparing the hardware identifiers of these rows, and extracting rows with the same hardware name but different identifiers to form the first difference matrix.

[0114] In this embodiment, a comprehensive judgment on differences in hardware serial numbers and models is achieved through logical OR operations. This not only quickly identifies hardware with differences but also covers two types of differences (different hardware serial numbers or different hardware models), ensuring the accuracy of the differences between the first and second devices and providing a reliable basis for determining the type of spare parts.

[0115] b4. Based on the first difference matrix, determine the hardware pair.

[0116] For example, the two different hardware identifiers corresponding to the hardware name in each row of the first difference matrix are considered as a hardware pair. For instance, if the two hardware identifiers corresponding to the row element in the first difference matrix where the hardware name is "hard disk" are HD001 and HD002, then these two hard disks are considered as a hardware pair.

[0117] In another possible implementation, in a1 above, the hardware name, hardware serial number, and hardware model can be determined as column elements corresponding to the first hardware in the first matrix, thus obtaining the first matrix and the second matrix. Further, the hardware name, first-type XOR result, and second-type XOR result corresponding to the column element pairs are determined as column elements corresponding to the first column element pairs in the second difference matrix to obtain the second difference matrix. The hardware name corresponding to the i-th first-type XOR result and the i-th logical OR result are determined as column elements corresponding to the i-th first-type XOR result in the first difference matrix, finally obtaining the first difference matrix.

[0118] In other embodiments, based on any of the foregoing embodiments, in step S105 above, the spare part type of the spare part to be detected is identified according to the first set of hardware information and the second set of hardware information, specifically including the following steps:

[0119] e1, based on the hardware names of all hardware in the first group of hardware information and the hardware names of the hardware included in the preset spare parts types, group the hardware in the first device to obtain multiple sets of first-type hardware.

[0120] Among them, the preset spare parts types include, but are not limited to, BBU spare parts, power supply spare parts, and controller spare parts.

[0121] Specifically, each set of hardware in category one corresponds to a preset spare part type. For example, if the preset spare part type is a controller spare part, and the hardware it includes is a motherboard, memory, system disk, CPU, management board, and BMC board, then the motherboard, memory, system disk, CPU, management board, and BMC board are grouped into one set of hardware in category one, and the preset spare part type corresponding to this set of hardware is controller spare part. If the preset spare part type is a power supply spare part, and the hardware it includes is a power supply board and PSU, then the power supply board and PSU are grouped into one set of hardware in category one, and the preset spare part type corresponding to this set of hardware is power supply spare part. If the preset spare part type is a BBU spare part, and the hardware it includes is a single BBU unit, then the single BBU unit is grouped into one set of hardware in category one, and the preset spare part type corresponding to this set of hardware is BBU spare part.

[0122] e2, based on the hardware names of all hardware in the second set of hardware information and the hardware names of the hardware included in the preset spare parts types, group the hardware in the second device to obtain multiple sets of second-type hardware.

[0123] One set of hardware corresponds to a preset spare part type.

[0124] Specifically, similar to the first type of hardware set, each group of the second type of hardware set corresponds to a preset spare part type.

[0125] e3, based on the hardware names and hardware identifiers of all hardware in multiple sets of first-class hardware and multiple sets of second-class hardware, selects the target spare part type from multiple spare part types.

[0126] Among them, the first and second hardware sets corresponding to the target spare parts type contain hardware with the same hardware name but different hardware identifiers.

[0127] For example, when the default spare part type is BBU spare part, the hardware in the first hardware set and the hardware in the second hardware set are BBU units. When the hardware identifier of the BBU unit in the first hardware set is different from the hardware identifier in the second hardware set, the BBU spare part is used as the target spare part type.

[0128] In one possible implementation, in e3 above, the target spare part type is selected from a variety of preset spare part types in the following way:

[0129] First, iterate through each preset spare part type, and for the first and second hardware sets corresponding to the preset spare part type, compare the hardware identifiers of hardware with the same hardware name in the first and second hardware sets one by one.

[0130] Then, when comparing the first set of hardware with the second set of hardware and hardware with the same hardware name but different hardware identifiers, the spare part type is marked as the target spare part type.

[0131] At this point, there is no need to continue checking other hardware under this spare part type. For example, when comparing the first and second hardware sets corresponding to the controller spare part, first check the hardware identifier for the hardware name CPU. If it is identifier 1 in the first hardware set and identifier 2 in the second hardware set, then the controller spare part is directly determined as the target spare part type, and it is no longer necessary to check whether the motherboard, memory, system disk, management board, and BMC board in the controller spare part have the same hardware identifier.

[0132] In this way, it is not necessary to check the hardware identifiers of all hardware under a certain spare part type. As long as a hardware with a different hardware identifier is found, the spare part type can be identified as the target spare part type, which greatly reduces the number of comparison operations. Especially for complex spare part types that contain multiple hardware (such as controller spare parts that may contain chips, interfaces, heat sinks, etc.), it can significantly shorten the screening time and improve the overall detection efficiency.

[0133] e4. Determine the spare part type of the spare part to be tested based on the target spare part type.

[0134] For example, if the target spare part type is a BBU spare part, then the spare part type of the spare part to be tested is a BBU spare part. If the target spare part type is both a BBU spare part and a power supply spare part, then the spare part type of the spare part to be tested is both a BBU and a power supply spare part.

[0135] In some embodiments, based on any of the foregoing embodiments, the spare parts testing content includes software testing content. In s106 above, the spare parts testing content corresponding to the spare parts to be tested is determined according to the spare parts type, specifically including the following:

[0136] f1, based on the spare part type, determine at least one hardware type corresponding to the spare part type.

[0137] Specifically, at least one hardware type corresponding to the spare part type is the hardware contained in the spare part belonging to that spare part type.

[0138] f2 generates hardware interface commands corresponding to the first hardware type, based on the first hardware type.

[0139] The first hardware type can be any one of at least one hardware type.

[0140] f3, according to the hardware interface command corresponding to the first hardware type, reads the hardware identifier in the first device corresponding to the first hardware type.

[0141] Specifically, the hardware identifier is information used to uniquely identify the hardware in the spare parts to be tested, usually the hardware's serial number (Query Number, QN), production batch, and other information.

[0142] Taking a controller spare part as an example, the hardware identifier of the hardware in the controller spare part can be read through the ipmitool raw interface command.

[0143] f4: After reading the hardware identifiers of all hardware types corresponding to the spare parts type in the first device, generate a software version query request corresponding to the spare parts type based on the hardware identifiers of all hardware types corresponding to the spare parts type.

[0144] f5 retrieves the software version identifier corresponding to the spare part type from the preset database based on the software version query request.

[0145] Specifically, the software version identifier is used to distinguish different software versions. The software version identifier can be the software version number compatible with the spare part under test, along with related characteristic descriptions, such as the product name (PN) of the software version. Different software versions correspond to different functions and testing standards. A preset database stores the correspondence between hardware identifiers and software version identifiers. Based on the hardware identifiers of each piece of hardware in the spare part under test, the corresponding software version identifier can be found in the preset database.

[0146] For example, the preset database can be stored in, such as Figure 1 In the diagnostic server shown, the first device obtains the software version identifier through interaction with the diagnostic server.

[0147] f6 determines the software testing content corresponding to the spare part to be tested based on the software version identifier.

[0148] Specifically, software testing content refers to the testing items specified for the software version corresponding to the spare part under test, including functional testing, stability testing, etc. Even for spare parts of the same type, if the software version identifier is different, their respective software testing content will be different. For example, software testing content includes, but is not limited to, firmware (such as Basic Input Output System (BIOS)) flashing, installation of preset software versions, etc.

[0149] For example, the preset database also stores the mapping relationship between software version identifiers and software testing content. The first device can obtain the software testing content of the spare part to be tested by searching the preset database through the software version identifier of the spare part to be tested.

[0150] In related technologies, due to fixed detection logic, the first device cannot flexibly adapt to different software versions under the same spare part type. For example, Figure 1 The existing tooling can only detect controller spare parts of version V1.0. For controller spare parts with other software versions, the tooling will fail to detect them due to software version incompatibility, requiring additional equipment to complete the detection of controller spare parts with other software versions. In this embodiment, when the first device encounters spare parts of different software versions of the same spare part type, it reads the hardware identifiers of all included hardware through the spare part type and associates the software version corresponding to the hardware through the spare part identifier, thereby matching the spare part detection content. This allows the first device to cover the detection needs of multiple software versions under the same spare part type without the need to configure separate equipment for different software versions, improving the versatility of the first device and enabling it to better cope with diverse spare part detection needs.

[0151] In some embodiments, based on any of the foregoing embodiments, the spare parts testing content includes hardware testing content.

[0152] Specifically, hardware testing refers to the testing items performed on the hardware itself of the spare part under test, covering aspects such as physical performance, electrical characteristics, and structural integrity. For example, for hard drive spare parts, hardware testing may include disk read / write performance testing, interface plug-and-play durability testing, and vibration resistance testing. Similarly, for memory spare parts, hardware testing may include memory chip stability testing, gold finger conductivity testing, and operating temperature range testing.

[0153] In this embodiment of the application, the method provided further includes the following:

[0154] Based on the spare part type and the preset mapping relationship between spare part types and hardware testing content, determine the hardware testing content corresponding to the spare part to be tested.

[0155] Specifically, the preset mapping relationship between spare parts types and hardware testing content can exist in the form of tables, database tables, etc., and this application embodiment does not specifically limit this. For example, the mapping relationship may include hardware testing content such as the temperature tolerance test of the corresponding chip of the controller spare parts.

[0156] Different types of spare parts differ in hardware structure, function, and working principle; therefore, the corresponding hardware testing requirements will also differ. The preset mapping relationship between spare part types and hardware testing requirements is determined based on the hardware characteristics and actual usage needs of the spare part under test. This ensures that each type of spare part can be matched with targeted hardware testing content, preventing misjudgments of spare part hardware quality due to omissions or inappropriate testing items.

[0157] Of course, the hardware corresponding to all hardware names with a logical OR result of 1 in the first difference matrix can also be used as the hardware to be tested, and the hardware test content corresponding to the spare part to be tested can be determined based on the preset mapping relationship between hardware and hardware test content.

[0158] Furthermore, the hardware identifier can also be associated with the spare part identifier (Serial Number, SN) of the spare part to be tested and the order. The method provided in this application embodiment also includes the following:

[0159] First, based on the hardware identifier, determine the order information corresponding to the spare part to be tested.

[0160] Specifically, order information can include order number, order name, etc.

[0161] For example, the preset database also includes a preset mapping relationship between hardware identifiers and order information, so that the first device can obtain the corresponding order information through the hardware identifier of the spare part to be tested.

[0162] Then, based on the order information, determine the specific testing requirements for the spare parts to be tested.

[0163] For example, order information may include specific spare part testing content for a particular order, configuration, or spare part usage scenario. This clarifies the additional testing required for the spare part to be tested, and these tests may exceed the conventional preset testing content. For instance, the order information may include "perform a continuous 72-hour high-load stress test on a spare part installed on a certain model of system disk." Based on the order information, the first device will include "a continuous 72-hour high-load stress test" as the spare part testing content for that system disk. As another example, in a certain configuration of storage server, the controller spare part needs to adapt to a new interface protocol. The order information may include "perform a special test on the compatibility of the new interface protocol for this controller spare part." Based on the order information, the first device will add "special test on the compatibility of the new interface protocol" to the conventional hardware testing content for the controller spare part (such as power module output voltage testing, chip temperature tolerance testing, etc.) to meet the requirements of the special configuration in the order information.

[0164] Considering that in real-world scenarios, the specific requirements of different orders or configurations may not be included in the conventional preset testing content, the first device adjusts the testing based on the spare parts testing content in the order information, thereby improving the flexibility and targeting of spare parts testing, meeting the personalized needs of different scenarios, and enhancing the applicability and customer satisfaction of spare parts testing.

[0165] For example, the spare parts testing includes firmware flashing tests on the Baseboard Management Controller (BMC) (FLASH_BMC), firmware flashing tests on the Basic Input / Output System (BIOS) (FLASH_BIOS), software-level power cycling (reboot) tests on the device (SOFT_PCYCLE), performance tests on M.2 interface storage devices (such as read / write speed, stability, etc.) (M2PERF_TEST), and functional or performance tests on IMTI-related hardware modules (IMTIPT_TEST).

[0166] The method provided in this application will be illustrated below by taking Example 1, which uses the detection of spare parts for the controller of a certain model of storage server as an example.

[0167] Example 1:

[0168] First, after the spare part to be tested is assembled, it is transported to the tooling station. The spare part to be tested is installed into the tooling (i.e., the first device). This tooling supports spare part testing for all software versions of the spare part to be tested. After the tooling is powered on, it starts the testing OS. Next, the tooling scans the current hardware information of the tooling and generates a spare part sequence information matrix (i.e., the first matrix). Then, it obtains the tooling sequence information matrix (i.e., the second matrix) from the diagnostic server. The tooling generates a first difference matrix through the first matrix and the second matrix, obtaining a hardware pair count of 6, confirming that the spare part type is a controller spare part.

[0169] After determining that the spare part to be tested is a controller spare part, the following steps are taken: First, the hardware identifier QN of the controller spare part, MBR522KD02, is read using the ipmitool raw interface command. The software testing content for the spare part is then determined based on the hardware identifier. Specifically, the tooling uses the QN to find the spare part identifier SN (21X618977), order number (30432986), and software version identifier PN (BA3601). Since no specific spare part testing content is found for this order number, the spare part testing content is the software testing content corresponding to the software version identifier PN, including: BIOS firmware update, BMC firmware update, Complex Programming Logic Device (CPLD) firmware update, spare part configuration check, CPU stress test, and system disk stress test. Second, based on the spare part type, the corresponding hardware testing content for the controller spare part is determined, including memory stress and motherboard link checks. Furthermore, the diagnostic content for this controller spare part can be stored in the diagnostic server, named according to the order, for later retrieval.

[0170] The above mainly describes the solution provided by the embodiments of this application from a methodological perspective.

[0171] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0172] This application also provides a spare parts testing device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0173] This embodiment provides a spare parts testing device, such as... Figure 3As shown, the spare parts testing device and the spare parts to be tested constitute a first device. The spare parts to be tested in the first device are used to replace the components corresponding to the spare parts to be tested in the second device, including:

[0174] The loading module 301 is used to retrieve and load the detection operating system corresponding to the first device from the preset database after the first device is powered on.

[0175] The generation module 302 is used to generate hardware interface commands corresponding to the first device and hardware information query requests corresponding to the second device by utilizing the detection operating system.

[0176] The reading module 303 is used to read the first set of hardware information corresponding to the first device according to the hardware interface command corresponding to the first device;

[0177] The query module 304 is used to query the second set of hardware information corresponding to the second device from the preset database according to the hardware information query request.

[0178] The identification module 305 is used to identify the spare part type of the spare part to be detected based on the first set of hardware information and the second set of hardware information.

[0179] The determination module 306 is used to determine the spare part inspection content corresponding to the spare part to be inspected based on the spare part type;

[0180] The detection module 307 is used to detect the spare parts to be tested according to the spare parts detection content.

[0181] The apparatus provided in this application automatically retrieves and loads the corresponding detection operating system from a preset database after the first device is powered on, eliminating the tedious manual configuration process. This is particularly suitable for scenarios involving multiple spare parts testing devices or multiple batches of spare parts, shortening preparation time for spare parts testing. Based on the detection operating system, it directly generates hardware interface commands for the first device and hardware information query requests for the second device, reducing manual operation and the probability of errors. By comparing the first and second sets of hardware information, the hardware differences between the first and second devices can be quickly identified, accurately determining the spare part type to be tested. This avoids the risk of errors during manual input of spare part types, improving the efficiency, accuracy, and reliability of spare part type identification. Furthermore, based on the spare part type, the corresponding testing content is determined, ensuring the relevance of the testing content and avoiding invalid testing of the spare part or redundant testing of unreplaced hardware. This accelerates spare part testing, improves testing efficiency, and enables rapid shipment of spare parts, thereby ensuring the stability and reliability of equipment operation.

[0182] In one possible implementation, the first set of hardware information includes the hardware name and hardware identifier of each hardware in the first device, and the second set of hardware information includes the hardware name and hardware identifier of each hardware in the second device; the identification module 305 is specifically used to determine the hardware pairs in the first set of hardware information and the second set of hardware information that have the same hardware name but different hardware identifiers based on the hardware name and hardware identifier of all hardware in the first set of hardware information and the hardware name and hardware identifier of all hardware in the second set of hardware information.

[0183] Count the number of hardware pairs;

[0184] Based on the number of hardware pairs and the preset mapping relationship between the number of hardware pairs and spare parts types, the spare parts type of the spare parts to be tested is determined.

[0185] In one possible implementation, the identification module 305 is specifically used to determine the first matrix corresponding to the first device based on the hardware name and hardware identifier of all hardware in the first group of hardware information.

[0186] Based on the hardware names and hardware identifiers of all hardware in the second set of hardware information, determine the second matrix corresponding to the second device;

[0187] Based on the first matrix and the second matrix, determine the first difference matrix between the first matrix and the second matrix;

[0188] The hardware pair is determined based on the first difference matrix.

[0189] In one possible implementation, the hardware identifier includes a hardware serial number and a hardware model. The identification module 305 is specifically used to determine the hardware name, hardware serial number, and hardware model of the first hardware as the row element corresponding to the first hardware in the first matrix, wherein the first hardware is any one of all hardware in the first group of hardware information.

[0190] After determining the row elements corresponding to all hardware in the first group of hardware information in the first matrix, the first matrix is ​​obtained based on the row elements corresponding to all hardware in the first group of hardware information.

[0191] In one possible implementation, the identification module 305 is specifically used to match the row elements in the first matrix and the row elements in the second matrix according to the hardware name, so as to obtain the row element pairs with the same hardware name;

[0192] The first difference matrix is ​​determined based on the hardware serial number and hardware model in the row element pairs with the same hardware name.

[0193] In one possible implementation, the identification module 305 is specifically used to perform an XOR operation on the hardware serial numbers of the two row elements in the first row element pair to obtain the first type of XOR result corresponding to the first row element pair, wherein the first row element pair is any one of the row element pairs with the same hardware name;

[0194] Perform an XOR operation on the hardware models of the two rows of elements in the first row to obtain the second type of XOR result corresponding to the first row of elements;

[0195] The first difference matrix is ​​determined based on the hardware name, the first type of XOR result, and the second type of XOR result corresponding to each row element pair.

[0196] In one possible implementation, the identification module 305 is specifically used to determine the hardware name, the first type of XOR result, and the second type of XOR result corresponding to the first row element pair as the row element in the second difference matrix that corresponds to the first row element pair.

[0197] After determining the row elements corresponding to all row element pairs in the second difference matrix, the second difference matrix is ​​obtained based on the row elements corresponding to all row element pairs.

[0198] Perform a logical OR operation on the i-th first-type XOR result and the i-th second-type XOR result in the second difference matrix to obtain the i-th logical OR result, where the i-th first-type XOR result is any first-type XOR result in the second difference matrix, and i is a positive integer;

[0199] The hardware name corresponding to the i-th first type XOR result and the i-th logical OR result are determined as the row elements in the first difference matrix corresponding to the i-th first type XOR result;

[0200] After determining the row elements corresponding to all first-type XOR results in the first difference matrix, the first difference matrix is ​​determined based on the row elements corresponding to all first-type XOR results.

[0201] In one possible implementation, the spare parts detection content includes software detection content, and the determination module 306 is specifically used to determine at least one hardware type corresponding to the spare parts type based on the spare parts type.

[0202] Based on the first hardware type, generate hardware interface commands corresponding to the first hardware type, wherein the first hardware type is any one of at least one hardware type;

[0203] Based on the hardware interface command corresponding to the first hardware type, read the hardware identifier in the first device that corresponds to the first hardware type;

[0204] After reading the hardware identifiers of all hardware types corresponding to the spare parts type in the first device, a software version query request corresponding to the spare parts type is generated based on the hardware identifiers of all hardware types corresponding to the spare parts type.

[0205] Based on the software version query request, retrieve the software version identifier corresponding to the spare part type from the preset database;

[0206] Based on the software version identifier, determine the software testing content corresponding to the spare part to be tested.

[0207] In one possible implementation, the spare parts detection content includes hardware detection content. The determining module 306 is further configured to determine the hardware detection content corresponding to the spare parts to be detected based on the spare parts type and the preset mapping relationship between the spare parts type and the preset hardware detection content.

[0208] For a description of the features in the embodiment corresponding to the spare parts testing device, please refer to the relevant description in the embodiment corresponding to the spare parts testing method, which will not be repeated here.

[0209] Embodiments of this application also provide an electronic device, such as... Figure 4 As shown, it includes a memory 10 and a processor 20. The memory 10 stores a computer program, and the processor 20 is configured to run the computer program to perform the steps in any of the above-described spare parts testing method embodiments.

[0210] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described spare parts testing method embodiments when running.

[0211] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0212] The embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described spare parts testing method embodiments.

[0213] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described spare parts detection method embodiments.

[0214] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0215] The above provides a detailed description of a spare parts testing method and electronic device provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only intended to help understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A spare parts testing method, characterized in that, An application is made in a spare parts testing device, wherein the spare parts testing device and the spare parts to be tested constitute a first device, and the spare parts to be tested in the first device are used to replace a component corresponding to the spare parts to be tested in a second device. The method includes: After the first device is powered on, the detection operating system corresponding to the first device is retrieved from the preset database and loaded. Using the detection operating system, generate hardware interface commands corresponding to the first device and hardware information query requests corresponding to the second device; According to the hardware interface command corresponding to the first device, read the first set of hardware information corresponding to the first device; Based on the hardware information query request, query the second set of hardware information corresponding to the second device from the preset database; Based on the first set of hardware information and the second set of hardware information, identify the spare part type of the spare part to be detected; Based on the spare part type, determine the spare part inspection content corresponding to the spare part to be inspected; The spare parts to be tested are tested according to the spare parts testing requirements. The first set of hardware information includes the hardware name and hardware identifier of each hardware component in the first device; the second set of hardware information includes the hardware name and hardware identifier of each hardware component in the second device; identifying the spare part type of the spare part to be tested based on the first set of hardware information and the second set of hardware information includes: Based on the hardware name and hardware identifier of all hardware in the first group of hardware information, and the hardware name and hardware identifier of all hardware in the second group of hardware information, determine the hardware pairs in the first group of hardware information and the second group of hardware information that have the same hardware name but different hardware identifiers. Count the number of the hardware pairs; The spare part type of the spare part to be tested is determined based on the number of hardware pairs and the preset mapping relationship between the number of hardware pairs and spare part types.

2. The method according to claim 1, characterized in that, The step of determining hardware pairs in the first and second sets of hardware information that have the same hardware name but different hardware identifiers based on the hardware names and hardware identifiers of all hardware in the first set of hardware information and the hardware names and hardware identifiers of all hardware in the second set of hardware information includes: Based on the hardware names and hardware identifiers of all hardware in the first group of hardware information, determine the first matrix corresponding to the first device; Based on the hardware names and hardware identifiers of all hardware in the second set of hardware information, determine the second matrix corresponding to the second device; Based on the first matrix and the second matrix, determine the first difference matrix between the first matrix and the second matrix; The hardware pair is determined based on the first difference matrix.

3. The method according to claim 2, characterized in that, The hardware identifier includes a hardware serial number and a hardware model. The step of determining the first matrix corresponding to the first device based on the hardware names and hardware identifiers of all hardware in the first group of hardware information includes: The hardware name, hardware serial number, and hardware model of the first hardware are determined as the row elements corresponding to the first hardware in the first matrix, wherein the first hardware is any one of all hardware in the first group of hardware information; After determining the row elements corresponding to all hardware in the first group of hardware information in the first matrix, the first matrix is ​​obtained based on the row elements corresponding to all hardware in the first group of hardware information.

4. The method according to claim 2 or 3, characterized in that, Determining the first difference matrix between the first matrix and the second matrix based on the first matrix and the second matrix includes: Based on the hardware name, the row elements in the first matrix and the row elements in the second matrix are matched to obtain pairs of row elements with the same hardware name; The first difference matrix is ​​determined based on the hardware serial number and hardware model in the row element pairs with the same hardware name.

5. The method according to claim 4, characterized in that, Determining the first difference matrix based on the hardware serial number and hardware model in the row element pairs with the same hardware name includes: Perform an XOR operation on the hardware serial numbers of the two row elements in the first row element pair to obtain the first type of XOR result corresponding to the first row element pair, wherein the first row element pair is any one of the row element pairs with the same hardware name; Perform an XOR operation on the hardware model of the two row elements in the first row element pair to obtain the second type of XOR result corresponding to the first row element pair; The first difference matrix is ​​determined based on the hardware name, the first type of XOR result, and the second type of XOR result corresponding to all the row element pairs.

6. The method according to claim 5, characterized in that, The step of determining the first difference matrix based on the hardware name, the first type of XOR result, and the second type of XOR result corresponding to all the row element pairs includes: The hardware name, the first type of XOR result, and the second type of XOR result corresponding to the first row element pair are determined as the row elements in the second difference matrix that correspond to the first row element pair. After determining the row elements corresponding to all the row element pairs in the second difference matrix, the second difference matrix is ​​obtained based on the row elements corresponding to all the row element pairs. Perform a logical OR operation on the i-th first-type XOR result and the i-th second-type XOR result in the second difference matrix to obtain the i-th logical OR result, wherein the i-th first-type XOR result is any first-type XOR result in the second difference matrix, and i is a positive integer; The hardware name corresponding to the i-th first type XOR result and the i-th logical OR result are determined as the row elements in the first difference matrix corresponding to the i-th first type XOR result; After determining the row elements corresponding to all the first type of XOR results in the first difference matrix, the first difference matrix is ​​determined based on the row elements corresponding to all the first type of XOR results.

7. The method according to any one of claims 1-3, characterized in that, The spare parts testing content includes software testing content. Determining the spare parts testing content corresponding to the spare parts to be tested based on the spare parts type includes: Based on the spare part type, determine at least one hardware type corresponding to the spare part type; Based on the first hardware type, generate hardware interface commands corresponding to the first hardware type, wherein the first hardware type is any one of at least one of the hardware types; Based on the hardware interface command corresponding to the first hardware type, read the hardware identifier in the first device that corresponds to the first hardware type; After reading the hardware identifiers of all hardware types corresponding to the spare part type in the first device, a software version query request corresponding to the spare part type is generated based on the hardware identifiers of all hardware types corresponding to the spare part type. Based on the software version query request, query the software version identifier corresponding to the spare part type from the preset database; Based on the software version identifier, determine the software testing content corresponding to the spare part to be tested.

8. The method according to any one of claims 1-3, characterized in that, The spare parts testing includes hardware testing, and the method further includes: Based on the spare part type and the preset mapping relationship between the spare part type and the preset hardware detection content, the hardware detection content corresponding to the spare part to be detected is determined.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the spare parts detection method as described in any one of claims 1-8 when executing the computer program.

Citation Information

Patent Citations

  • Method and device for detecting equipment, computer equipment, and storage medium

    CN109186666A

  • Built-in self-testing of programmable visual accelerators for systems on chip

    CN115701589A