Test method and electronic device
By dynamically loading board configuration information and dividing test batches into parallel attributes, the problem of fixed test strategies and resource conflicts caused by the diversity of board models is solved, realizing an automatic adaptation and optimization test method, and improving the testing efficiency and quality of electronic devices.
Patent Information
- Application Number
- CN202611663714.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-26
- Publication Date
- 2026-11-24
AI Technical Summary
In the existing technology, the board models of electronic devices such as servers are diverse and iterate frequently, making it difficult to dynamically adjust the testing methods. When testing multiple boards in parallel, resource conflicts are severe, and abnormal results cannot optimize the testing strategy for the same type of board.
By loading configuration information based on board identification information, dynamically adjusting test items and parallel attributes, dividing conflict-free test batches, generating parallel test scripts, collecting data in real time and performing anomaly analysis, and adjusting test strategies for boards of the same type.
It enables automatic adaptation of test content, improves multi-model compatibility, reduces development cycle, avoids resource contention, improves parallel testing efficiency, optimizes testing strategies, and reduces the recurrence of similar problems.
Smart Images

Figure CN123157531A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more particularly to a testing method and electronic device. Background Technology
[0002] Servers and other electronic devices have diverse and frequently iterated circuit board models, with differences in interfaces, chip configurations, and testing requirements. Existing testing methods typically pre-set fixed test items and parameters based on the circuit board model, making it difficult to dynamically adjust test content as the model changes. This results in long test program development cycles and poor adaptability. Furthermore, when multiple circuit boards or test items are executed in parallel, the lack of unified coordination regarding resource usage by test tasks easily leads to competition for the same test resources, impacting parallel testing efficiency. In addition, abnormal results generated during testing are usually only used for the current circuit board's assessment, and similar problems are prone to recurring in subsequent tests of the same type of circuit board. Summary of the Invention
[0003] This application provides a testing method and electronic device to at least solve the problems in the related art where fixed test items and test parameters prevent the test strategy from being dynamically adjusted according to the board model, lack of resource conflict detection when multiple boards are running in parallel leads to test resource preemption, and abnormal results are only used for the current board and cannot optimize the test strategy for the same type of board.
[0004] This application provides a testing method, including: The corresponding board configuration information is loaded based on the identification information of the board to be tested. The board configuration information includes the test items corresponding to the board to be tested and the parallel attributes of the test items. Based on the parallel attributes, determine the parallelizable test tasks and serial test tasks in the test items, and divide the parallelizable test tasks into multiple test batches. Among them, there are no resource conflicts between the parallelizable test tasks in the same test batch. Parallel test scripts are generated based on multiple test batches and serial test tasks. The parallel test scripts are executed and test data is collected in real time. Anomaly analysis is performed on the test data to obtain structured fault codes. Based on these structured fault codes, the test strategies for other boards are adjusted. These other boards are of the same type as the board under test.
[0005] This application also provides a testing apparatus, including: The loading unit is used to load the corresponding board configuration information according to the identification information of the board to be tested. The board configuration information includes the test items corresponding to the board to be tested and the parallel attributes of the test items. The determination unit is used to determine parallelizable test tasks and serial test tasks in a test item based on the parallelism attribute. A partitioning unit is used to divide a parallelizable test task into multiple test batches, wherein there are no resource conflicts between parallelizable test tasks in the same test batch; The execution unit is used to generate parallel test scripts based on multiple test batches and serial test tasks, execute the parallel test scripts, and collect test data in real time. The analysis unit is used to perform anomaly analysis based on test data and obtain structured fault codes; The adjustment unit is used to adjust the test strategies of other boards based on structured fault codes. The other boards are boards of the same type as the board under test.
[0006] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the steps of any of the above-described test methods when executing the computer program.
[0007] 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 test methods.
[0008] 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 test methods.
[0009] The testing method and electronic equipment of this application load board configuration information containing test items and parallel attributes based on the identification information of the board under test, so that the test content is automatically matched with the board model, without the need to pre-fix test items and test parameters, thereby improving the adaptability to multiple models and shortening the development cycle; by distinguishing between parallel and serial test tasks through parallel attributes, and dividing parallel tasks into conflict-free test batches after resource conflict detection, it avoids competition for the same test resources when multiple boards are running in parallel, thereby improving resource utilization and parallel efficiency; by performing anomaly analysis on the real-time collected test data to obtain structured fault codes, and adjusting the test strategies of other boards of the same type accordingly, the abnormal results are not only used for the current board's judgment, reducing the recurrence of similar problems and realizing continuous optimization of the test strategy. Attached Figure Description
[0010] 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.
[0011] Figure 1 A flowchart illustrating a testing method provided in an embodiment of this application; Figure 2 A flowchart of an adaptive testing method for a circuit board is provided in an embodiment of this application; Figure 3 This is a schematic diagram of the overall structure of a board testing fixture provided in an embodiment of this application; Figure 4 This is a schematic diagram of the disassembled structure of a board test fixture provided in an embodiment of this application; Figure 5 This is a schematic diagram of an edge card socket type probe adapter board structure provided in an embodiment of this application; Figure 6 This is a schematic diagram of a probe array type probe adapter board structure provided in an embodiment of this application; Figure 7 This is a schematic diagram of a dedicated socket-type probe adapter board provided in an embodiment of this application. Detailed Implementation
[0012] 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.
[0013] 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.
[0014] The testing method described in this application can be executed by testing equipment capable of data processing and instruction issuance, such as a control device containing a processor, memory, communication interface, and test program. Communication between the testing equipment and the board under test can be established via a system management bus, general purpose interface bus, network interface, or dedicated test cable.
[0015] The testing method described in this application can be applied to the testing of various electronic equipment boards, such as those in servers, computers, communication equipment, automotive electronics, and industrial control. Examples of boards to be tested include computer motherboards, graphics cards, power supply boards, communication interface boards, industrial control boards, and automotive electronic control unit boards. For boards with identification information that can be read via management chips or storage units, this method can dynamically load corresponding test items and parallel attributes based on the identification information, achieving adaptive test configuration for different board models. For scenarios requiring parallel testing of multiple boards or test items, this method can achieve conflict-free parallel scheduling through resource conflict detection and batch partitioning. Furthermore, by performing anomaly analysis on test data to obtain structured fault codes, and adjusting subsequent testing strategies for similar boards accordingly, this method can be widely applied to various electronic equipment board testing scenarios requiring batch testing, multi-model mixed-line testing, or continuous optimization of testing strategies.
[0016] 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.
[0017] Figure 1 This document provides a flowchart illustrating a testing method for an embodiment of this application. The testing method will be described in detail below, taking into account the flowchart.
[0018] Step 101: Load the corresponding board configuration information according to the identification information of the board to be tested. The board configuration information includes the test items corresponding to the board to be tested and the parallel attributes of the test items.
[0019] In the embodiments of this application, the board to be tested refers to the board that needs to be tested. The board to be tested typically has one or more management chips for storing board model, version, serial number, manufacturer information, etc. Identification information refers to information that can uniquely distinguish the model or version of the board to be tested; it can be raw data read from the management chip or a standard identification code obtained after processing the raw data. The purpose of the identification information is to enable the testing system to identify the model and version of the currently connected board, thereby loading test content matching that board.
[0020] Board configuration information refers to the configuration data corresponding to the board under test, used to guide the test system in executing tests. Board configuration information can exist in the form of files, database records, data structures, or configuration files. The test system loads the board configuration information based on the identification information, meaning that the test system uses the identification information as an index to retrieve the configuration content matching the current board from the local cache, remote database, or configuration file. Different board models can correspond to different board configuration information, eliminating the need to develop a fixed test program for each board.
[0021] Test items refer to the specific tests that need to be performed on the board under test. For example, test items may include verifying the communication capability of a certain interface, measuring the voltage of a certain power supply, detecting the signal integrity of a certain bus, and verifying the read and write functions of the memory unit.
[0022] Each test item typically has corresponding test parameters, test conditions, expected results, and the resources required to execute the test item. Parallelism attributes refer to information used to characterize whether a test item is allowed to execute simultaneously with other test items. Parallelism attributes can be a flag field, for example, with a value indicating whether parallelism is allowed or not; or a more granular description, for example, indicating which other test items the test item can run in parallel. Parallelism attributes can be pre-configured in the board configuration information and change dynamically depending on the board model or test requirements.
[0023] After the test board is connected to the test station, the test system first obtains the identification information of the test board. This can be achieved by establishing a communication link between the test system and the management chip on the board, reading data from the predefined register address of the management chip; or by other identification methods, such as scanning the identification code on the board or reading the electronic tag stored on the board. After obtaining the identification information, the test system uses this information as the basis to search for matching board configuration information in a pre-defined configuration database. If the board configuration information corresponding to the identification information already exists in the local cache, it can be loaded directly from the local cache to improve loading speed; if it does not exist in the local cache, it is obtained from a remote database or a central database and can be stored in the local cache for later use. The loaded board configuration information contains the test items corresponding to the test board and the parallel attributes of each test item.
[0024] Step 102: Determine the parallelizable test tasks and serial test tasks in the test items based on the parallel attributes, and divide the parallelizable test tasks into multiple test batches, wherein there are no resource conflicts between the parallelizable test tasks in the same test batch.
[0025] In the embodiments of this application, a parallelizable test task refers to a task that is allowed to be executed simultaneously with other test tasks during the testing process. A serial test task refers to a task that is not allowed to be executed simultaneously with other test tasks during the testing process, or that needs to depend on the completion of other test tasks before it can be executed.
[0026] The testing system iterates through each test item in the board configuration information and reads the parallelism attribute of each test item. If the parallelism attribute of a test item indicates that parallel execution is allowed, then the test item is identified as a parallelizable test task; if the parallelism attribute of a test item indicates that parallel execution is not allowed, or if the test item lacks a parallelism attribute, then the test item is identified as a serial test task.
[0027] A test batch refers to a group of test tasks that can be executed simultaneously without resource conflicts. A resource conflict occurs when two or more test tasks need to use the same test resource during execution, and that resource can only be used by one test task at a time, thus preventing these test tasks from executing simultaneously.
[0028] Test resources may include interfaces, buses, memory, power channels, clock signals, test instrument channels, processor computing resources, memory resources, network bandwidth, etc. on the board under test.
[0029] If two parallelizable test tasks require the same resource, a resource conflict exists between them; if the resources required by the two parallelizable test tasks are different, no resource conflict exists between them. The testing system determines whether there is a resource conflict between any two parallelizable test tasks based on the resources required by each parallelizable test task during the test. For parallelizable test tasks without resource conflicts, the testing system merges them into the same test batch; for parallelizable test tasks with resource conflicts, the testing system divides them into different test batches.
[0030] Step 103: Generate parallel test scripts based on multiple test batches and serial test tasks, execute the parallel test scripts and collect test data in real time.
[0031] In the embodiments of this application, a parallel test script refers to a set of instructions that can be automatically executed by the test system to control multiple test tasks to run in a predetermined order and in parallel. A parallel test script may include execution instructions for starting parallel tasks, synchronization instructions for waiting for parallel tasks to complete, execution instructions for starting serial tasks, and instructions for recording task identifiers and output information.
[0032] The testing system creates a corresponding script execution block for each test batch. Within each script execution block, parallel execution instructions for each parallelizable test task within the test batch are added. Then, the testing system combines the script execution blocks for each test batch in a preset order and adds execution instructions for the serial test tasks after the combined script execution blocks. Thus, after the testing system starts the parallel test scripts, it first executes the parallelizable test tasks sequentially according to the test batches, with each parallelizable test task executing in parallel within each test batch. Once all test batches have been executed, the serial test tasks are then executed sequentially.
[0033] Test data refers to signals or information returned by the board under test during the execution of a test task, which can reflect the working status and test results of the board under test.
[0034] Test data can include voltage signals, current signals, communication data, status register values, log information, sensor monitoring data, etc., output by the board under test. The test system acquires the test signals returned by the board under test in real time during the execution of each test task, performs analog-to-digital conversion on the test signals, and stores them as test data. The test data can include timestamps, board identifiers, test item identifiers, and batch number tags to accurately trace the time, location, and context of anomalies during subsequent anomaly analysis.
[0035] Step 104: Perform anomaly analysis based on the test data to obtain structured fault codes. Adjust the test strategies for other boards based on the structured fault codes. The other boards are boards of the same type as the board under test.
[0036] In the embodiments of this application, anomaly analysis refers to analyzing and processing the collected test data to identify whether there is information that deviates from the normal range, does not meet the expected results, or indicates a fault.
[0037] Structured fault codes are codes that uniquely identify a fault type, generated by encoding anomaly information obtained from anomaly analysis according to a preset format. Structured fault codes can not only contain fault type information, but can also be bound to board description files, test execution contexts, and environmental conditions, thus forming a structured fault record.
[0038] Other boards refer to boards of the same type as the board under test. "Same type" can mean the same model, version, batch, or board with the same hardware design. Once the test system obtains structured fault codes based on the test data of the board under test, it can adjust the test strategies for other boards based on these codes. Adjustments to the test strategy can include: modifying test items in the board configuration information of the other boards, adjusting test parameters, changing the execution order of test items, adding new test items, modifying parallel attributes or resource requirements, etc.
[0039] The testing method provided in this application dynamically loads board configuration information through identification information, enabling the testing system to adapt to various models of boards under test without the need to develop fixed test programs for each board. By dividing test items into parallelizable and serial test tasks through parallel attributes, and further dividing parallelizable test tasks into multiple test batches based on resource conflict judgment, parallel testing of multiple boards and test items can be achieved without resource contention, improving the utilization rate and efficiency of test resources. By generating parallel test scripts and collecting test data in real time, the orderly execution of the test process and the complete recording of test results can be ensured. By generating structured fault codes through anomaly analysis and adjusting the test strategies for similar boards based on these structured fault codes, the testing system possesses the ability for continuous optimization and adaptive adjustment, thereby improving overall test quality and test coverage.
[0040] In one possible implementation of this application embodiment, when loading the corresponding board configuration information based on the identification information of the board under test, the following methods can be used, but are not limited to: sending a read command to the predefined register address of the management chip on the board under test to obtain the original identification data returned by the management chip; performing cyclic redundancy check on the original identification data, assembling the original identification data that passes the check into a standard identification code according to a preset format, and using the standard identification code as the identification information of the board under test; using the identification information as the query key value to query the board description file that matches the identification information in the preset configuration database; and constructing board configuration information containing test items and the parallel attributes corresponding to each test item based on the board description file.
[0041] In the embodiments of this application, the management chip refers to an integrated circuit or control unit disposed on the board under test for managing and monitoring the board's operating status. The management chip can operate independently of the main processor on the board and can be accessed when the main processor is not powered on or the board is in standby mode. The management chip can store information such as the board's model, version, serial number, manufacturer, and production batch. The management chip can communicate with external test equipment via the system management bus. A predefined register address refers to a pre-agreed address range in the register space of the management chip, which is used to store the board's identification data.
[0042] A read command is an instruction issued by the test device to the management chip, requesting the management chip to return the contents of a specified register. The raw identification data can be in the form of binary data, byte sequences, or register values, and its content may include board model code, version number, serial number, etc.
[0043] Cyclic Redundancy Check (CRBC) is a verification method that generates a checksum based on the data content and uses this checksum to determine whether errors have occurred during data transmission or storage. CRBC can prevent incorrect board configuration information from being loaded due to incorrect identification data, thereby improving the accuracy of the test system in identifying boards.
[0044] A preset format refers to the standard identification code organization format pre-agreed upon between the test system and the circuit board. The preset format can specify the field order, field length, field meaning, and separation method of the standard identification code. For example, a standard identification code can sequentially include a manufacturer code field, a circuit board model field, a version field, and a checksum field. The raw identification data returned by different management chips may have inconsistent formats; by uniformly assembling it into a standard identification code, the test system can identify different circuit boards in a consistent manner.
[0045] A query key is an index value used to locate a target record in a database. In this embodiment, the test system uses the identification information as the query key to search for board description files that match the identification information in the preset configuration database. The preset configuration database is a pre-established database used to store board description files.
[0046] A board description file is a pre-written file for a specific model or version of a board that records relevant testing information for that board.
[0047] In one implementation, a board description file table can be established in the pre-configured database. This table contains at least the following fields: a board identifier field to store the standard identification code; a description file content field to store the complete board description file content; a version field to store the version information of the description file; and an update time field to store the last update time of the description file. The testing system uses the standard identification code as the query key to search for records in the board description file table whose board identifier field matches the standard identification code, thereby obtaining the corresponding board description file. If multiple records are found, the latest version of the board description file can be selected based on the version field or the update time field. If no matching record is found, the testing system can issue a prompt message indicating that the board under test has not yet been configured with the corresponding board description file, or proceed to the manual confirmation process.
[0048] To improve loading efficiency, the testing system can employ a multi-level caching approach. The first-level cache can be located in the testing system's local memory to store recently used board description files. When the same board model is connected to the same test station again, the testing system can directly retrieve the board description file from local memory, avoiding repeated access to the preset configuration database. The second-level cache can be located in a distributed cache shared by multiple test stations. When a test station loads a new board description file from the preset configuration database, it can write that file to the distributed cache. Other test stations that need to load the same board description file can directly retrieve it from the distributed cache, avoiding repeated access to the preset configuration database. Furthermore, when the production line plans to switch board batches, the testing system can push the board description files corresponding to the next batch of boards from the preset configuration database to the local caches of each test station in advance, enabling fast loading and reducing waiting time during batch switching.
[0049] Board configuration information can be a direct reference to the board description file, or it can be a data structure obtained by extracting relevant fields from the board description file and reorganizing them. For example, the test system can extract information such as the test item list, parameters of each test item, parallel attributes, and resource requirements from the board description file, and convert it into a configuration object that the test scheduler can directly read.
[0050] This application embodiment utilizes the management chip to automatically return identification data, avoiding operational errors caused by manually selecting the board model; it improves the reliability of identification information through cyclic redundancy check and standard identification code assembly; it queries the board description file from the preset configuration database using the identification information as the query key and constructs the board configuration information, enabling the test system to dynamically obtain the corresponding test items and parallel attributes according to the board model, without having to develop a fixed test program for each board.
[0051] In one possible implementation of this application embodiment, the board configuration information is constructed based on a preset information model and a board description file. The preset information model includes static design information, dynamic specification information, test requirement information, and historical experience information. The methods for constructing the board description file include: Extract the first information, including netlist, component reference numbers and interface package information, from the board design file corresponding to the board under test; Parse the bill of materials to identify the chip model, and retrieve the data definition and parameter information of the board under test based on the chip model; The initial information, data definition and parameter information, dynamic specification information, and test requirement information are integrated to generate a board description file. The board description file is used to record test items, the parameters corresponding to each test item, parallel attributes, and resource requirements.
[0052] In the embodiments of this application, the preset information model refers to a predefined structured framework used to describe information related to the board under test. The preset information model collects board information from different sources and in different formats according to a unified structure, enabling the test system to read and use this information in a consistent manner.
[0053] Static design information refers to the information used to define the physical and logical design data of the board. Dynamic specification information refers to the information used to define the board's operating parameters and limits. Test requirement information refers to the information used to define the board's test types and test content. Historical experience information refers to the information used to define experience data from the production and testing processes.
[0054] A board description file (BDR) is a file generated for a specific model or version of a board under test, recording relevant testing information. The BDR is an instantiation of a pre-defined information model on a specific board. BDRs can be stored in a structured data format for automatic parsing and retrieval by the testing system. They can also be stored in a pre-defined configuration database, indexed by the board's identification information, allowing the testing system to query and load data based on this information.
[0055] A circuit board design file is a file generated by electronic design automation (EDA) tools that describes the design content of a circuit board. Circuit board design files can include schematic files, printed circuit board design files, netlist files, component list files, etc. The first information refers to the basic information extracted from the circuit board design file used to construct the circuit board description file.
[0056] A netlist is a list describing the electrical connections between the pins of various components on a circuit board. A component reference designator (PIC) is a unique identifier assigned to each component in the circuit board design file. Interface package information describes the physical form and pin definitions of interfaces or connectors on the circuit board.
[0057] The testing system can extract netlists, component reference numbers, and interface package information from the exported files of the board design files using electronic design automation tool scripts.
[0058] A bill of materials (BOM) is a list of all materials on a circuit board, along with their corresponding models, quantities, and reference designators. A chip model number identifies the specific specifications and functions of a chip. Through the chip model number, the testing system can determine the chip's manufacturer, functional category, pin definitions, electrical characteristics, communication protocols, and other information. Data definitions and parameter information correspond to the chip model number and describe the chip's operating mode and performance parameters. Data definitions may include the chip's register definitions, pin function definitions, and communication interface definitions; parameter information may include the chip's operating voltage, operating frequency, power consumption, temperature range, and timing requirements.
[0059] The information integration process may include: associating network connections in the network table with interface definitions in the interface encapsulation information to determine the networks and components connected to each interface; associating chip models identified in the bill of materials with data definitions and parameter information in the component library to determine the operating conditions and test requirements for each chip; associating interfaces and nodes in the static design information with test items in the test requirements information to determine the interface or node targeted by each test item; using parameter ranges in the dynamic specification information as test conditions and judgment criteria for test items; and using fault records and repair plans related to the board in historical experience information as supplementary information for test items. The integrated information is organized according to the structure defined by the preset information model to form a board description file. The board description file records test items, parameters corresponding to each test item, parallel attributes, and resource requirements. The parallel attributes and resource requirements can be automatically determined based on the interface, chip, and test conditions targeted by the test item, or they can be supplemented or adjusted by testers based on experience.
[0060] This application uses a pre-defined information model to uniformly classify and structure static design information, dynamic specification information, test requirement information, and historical experience information, ensuring the completeness and standardized format of the board description file, facilitating automatic parsing and use by the test system. By automatically extracting netlists, component reference numbers, and interface package information from the board design file, and parsing the bill of materials to identify chip models and retrieve data definitions and parameter information, the workload of manual information processing is reduced, lowering the risk of information omissions and input errors. Integrating primary information, data definitions and parameter information with dynamic specification information and test requirement information ensures that the board description file not only contains the board's design information but also the parameters, parallel attributes, and resource requirements needed for testing, thus providing a complete and accurate configuration basis for subsequent adaptive testing processes.
[0061] In one possible implementation of this application embodiment, the following methods may also be used, but are not limited to: matching the interface information in the board description file with the target interface field of each test case in the preset test case library to filter out test items to be executed; concatenating the key information in the board description file into a text description, and generating a board description vector through a pre-trained language model; generating a test case description vector based on each test case in the preset test case library, and calculating the vector similarity between the board description vector and each test case description vector; sorting the test items according to the order of vector similarity from largest to smallest, and selecting a preset number of test items at the top of the sort as recommended test items; using minimizing the total test time as the sequence decision objective, using a preset machine learning model to determine the execution order of the test items to be executed and the recommended test items, and obtaining a test item sequence; and determining the test item sequence as the test items in the board configuration information.
[0062] In the embodiments of this application, interface information refers to the information recorded in the board description file that describes the type, quantity, pin definition, connection relationship, and communication protocols supported by each interface on the board under test.
[0063] A pre-built test case library refers to a database that has been established in advance and stores multiple test cases. A test case is a set of test programs or test instructions written for a specific type of interface, a specific type of function, or a specific type of failure mode, and that can be executed by the system under test. Each test case has a corresponding target interface field, which indicates the type or identifier of the interface that the test case targets.
[0064] Test items to be executed refer to test items that have been filtered through interface matching and match the actual interfaces existing on the board under test. Matching methods may include: precisely matching the interface identifier in the board description file with the target interface field of the test case; or matching the interface type in the board description file with the interface type indicated by the target interface field of the test case. If the target interface field of a test case matches a certain interface information in the board description file, then the test item corresponding to that test case is determined as a test item to be executed.
[0065] Key information refers to the fields in the board description file that reflect the board's characteristics and testing requirements, such as: board model, interface type, chip model, operating parameters, test requirement description, and historical fault information. Concatenation refers to combining these fields into a continuous text sequence in a specific order. A pre-trained language model is a machine learning model trained on a large-scale text corpus that can convert text into a high-dimensional vector representation. The board description vector is a high-dimensional numerical vector used to represent the semantic features of the board under test.
[0066] Generate a test case description vector based on each test case in a pre-set test case library. The generation method may include: concatenating the name, functional description, target interface, test conditions, and expected results of each test case into a test case text description; then inputting the test case text description into the same pre-trained language model, which outputs the corresponding test case description vector.
[0067] Vector similarity is a numerical value used to measure how close two vectors are in a vector space. Higher vector similarity indicates that the text corresponding to the two vectors is semantically similar. In this embodiment, vector similarity can be calculated using cosine similarity, i.e., calculating the cosine of the angle between two vectors; other similarity measures, such as Euclidean distance or dot product, can also be used. The preset number can be set according to the test time budget, test coverage requirements, or tester experience. A higher vector similarity indicates a stronger relevance of the test case to the current board, therefore it is considered a recommended test item.
[0068] The sequence decision objective refers to the goal that needs to be optimized when sorting test items. In this embodiment, minimizing the total test time is used as the optimization objective, that is, to complete the test in the shortest possible time. The preset machine learning model refers to a pre-trained model that can select the next action based on the current state. In this embodiment, the preset machine learning model can select the next test item to be executed from the remaining test items based on information such as the currently executed test items and their results, the remaining test items to be executed, the estimated execution time of each test item, and the fault detection rate. The selection criteria for the preset machine learning model may include: prioritizing the execution of test items with high fault detection rates and short execution times to detect faults as early as possible; providing high positive feedback if a test item detects a fault; providing low positive feedback or zero feedback if a test item passes; and providing negative feedback if the total execution time exceeds a threshold.
[0069] The test item sequence refers to the execution order list containing test items to be executed and recommended test items, which has been sorted by a preset machine learning model.
[0070] This embodiment filters out test cases that do not match the interface of the board under test by matching interface information with target interface fields, avoiding invalid tests and improving testing efficiency. By generating board description vectors and test case description vectors through a pre-trained language model and calculating vector similarity, the relevance of test cases to the board under test can be measured semantically, thereby selecting recommended test items that are more closely aligned with the board's features and improving the targeting of the tests. Using minimizing the total testing time as the sequence decision objective, a pre-set machine learning model is used to determine the execution order of test items, prioritizing test items with high fault detection rates and short execution times, which helps to discover faults earlier and shorten the testing cycle.
[0071] In one possible implementation of this application embodiment, when determining the parallelizable test tasks and serial test tasks in the test items based on the parallel attributes, it can be implemented in the following ways, but not limited to: traversing each test item in the board configuration information and obtaining the parallel attributes of each test item; in response to the parallel attribute indication of the target test item allowing parallel execution, determining the target test item as a parallelizable test task, wherein the target test item is any test item in the board configuration information; in response to the parallel attribute indication of the target test item not allowing parallel execution or the parallel attribute being missing, determining the target test item as a serial test task.
[0072] In the embodiments of this application, the target test item refers to any test item in the board configuration information, that is, the test item currently being processed during the traversal process.
[0073] Parallel execution is allowed, meaning the test item can run concurrently with other test items that are allowed to run in parallel during the test process, without waiting for the completion of other test items. Parallel execution is not allowed, meaning the test item cannot run concurrently with other test items during the test process, and needs to exclusively use test resources or depend on the results of other test items. Missing parallel attribute means that the parallel attribute field is not set for a certain test item in the board configuration information, or the field is empty, invalid, or unrecognizable.
[0074] Parallelizable test tasks are test items that, after evaluation, are determined to be allowed to execute simultaneously with other test tasks. Serial test tasks are test items that, after evaluation, are determined not to be allowed to execute simultaneously with other test tasks, or that, due to the lack of parallel attributes, must be executed serially.
[0075] In one implementation, the testing system can extract all test items from the board configuration information before traversing the entire system, forming a task list. Each task in the task list can include information such as board identifier, test item name, parallelism attribute, estimated time, and resource requirements. The testing system traverses each task in the task list and reads its parallelism attribute. If the parallelism attribute of a task indicates that parallel execution is allowed, then the task is included in the set of parallelizable tasks; if the parallelism attribute of a task indicates that parallel execution is not allowed or the parallelism attribute is missing, then the task is included in the set of serial tasks.
[0076] This embodiment, by traversing each test item in the board configuration information and reading its parallel attributes, enables the testing system to automatically determine the execution method for each test item without relying on human experience. This avoids inconsistencies that may occur when manually arranging parallel relationships. Test items whose parallel attributes indicate they can be executed in parallel are identified as parallelizable test tasks, while those whose parallel attributes indicate they cannot be executed in parallel or whose parallel attributes are missing are identified as serial test tasks. This ensures that test items requiring exclusive resources or with dependencies are not incorrectly scheduled for parallel execution, thereby reducing the risk of test resource conflicts and abnormal test results.
[0077] In one possible implementation of this application embodiment, when dividing a parallelizable test task into multiple test batches, it can be implemented in the following ways, but not limited to: based on the board resources required by each parallelizable test task during the test, a resource requirement set is constructed for each parallelizable test task; Perform an intersection operation on the resource requirement sets of the first parallelizable test task and the resource requirement sets of the second parallelizable test task to obtain the intersection operation result, wherein the first parallelizable test task and the second parallelizable test task are any two parallelizable test tasks; in response to the intersection operation result being empty, it is determined that the first parallelizable test task and the second parallelizable test task have no resource conflict; merge the parallelizable test tasks without resource conflict into the same test batch, and divide the parallelizable test tasks with resource conflict into different test batches.
[0078] In the embodiments of this application, board resources refer to hardware resources, interface resources, channel resources, or logic resources related to the board under test that can be occupied or used by the test task during the testing process. The resource requirement set refers to the set of all board resources required by a parallel test task during its testing process.
[0079] The methods for constructing a resource requirement set may include: reading the resource requirement field corresponding to the parallelizable test task from the board configuration information; or querying the corresponding resource usage information in the board description file based on the interface, chip, and test conditions targeted by the parallelizable test task; or having the test system preset a resource usage template according to the type of test task, and then combine it with the interface information and chip information in the board description file to generate a specific resource requirement set.
[0080] The first parallelizable test task and the second parallelizable test task refer to any two parallelizable test tasks. The terms "first" and "second" are used only to distinguish two different parallelizable test tasks and do not indicate any restrictions on order, priority, or number.
[0081] The intersection operation is the operation of finding the common elements of two sets. The result of the intersection operation represents the board resources required by two parallelizable test tasks. If the intersection operation result is empty, it means that the first and second parallelizable test tasks do not share any board resources, that is, the board resources required by the two tasks are different, and therefore they can be executed simultaneously without interference. If the intersection operation result is not empty, it means that the first and second parallelizable test tasks require at least one of the same board resources, that is, there is a resource conflict between the two tasks, and they cannot be executed simultaneously.
[0082] Resource conflict refers to a situation where two or more parallel test tasks need to occupy the same board resource during execution, and that board resource can only be occupied by one test task at a time, thus preventing these test tasks from executing simultaneously.
[0083] In one implementation, the testing system can construct a resource occupancy table to record which test tasks are currently occupying each board resource. The testing system processes each parallelizable test task sequentially according to a preset order. For each currently processed parallelizable test task, it queries the resource occupancy table to see if each board resource in its resource requirement set is already occupied. If all board resources in the resource requirement set are unoccupied, the parallelizable test task is added to the current test batch, and these board resources are marked as occupied by the test task in the resource occupancy table. If at least one board resource in the resource requirement set is already occupied, the parallelizable test task is added to a new test batch, and the occupancy status of the corresponding board resource is updated in the resource occupancy table.
[0084] This embodiment constructs a resource requirement set for each parallelizable test task, quantifying the resource usage of a parallelizable test task in set form. This provides a basis for resource conflict judgment and avoids subjective judgment based on human experience. By performing an intersection operation on the resource requirement sets of any two parallelizable test tasks, it is possible to accurately determine whether there is a resource conflict between them. This avoids scheduling test tasks that require the same board resource in the same batch for parallel execution, reducing the risk of resource contention and test failure. Merging parallelizable test tasks without resource conflicts into the same test batch and dividing parallelizable test tasks with resource conflicts into different test batches can maximize the parallelism within the same test batch while ensuring test stability, thereby improving the utilization rate of test resources and the overall test efficiency.
[0085] In one possible implementation of this application embodiment, when generating parallel test scripts based on multiple test batches and serial test tasks, executing the parallel test scripts and collecting test data in real time, the following methods can be used, but are not limited to: creating a corresponding script execution block for each test batch, adding parallel execution instructions for each parallelizable test task within the corresponding test batch to each script execution block; combining the script execution blocks corresponding to each test batch in a preset order, and adding execution instructions for serial test tasks to the combined script execution blocks to generate parallel test scripts; starting the parallel test scripts, executing parallelizable test tasks in parallel within each test batch, and executing serial test tasks sequentially after all test batches have been executed; collecting test signals returned by the board under test during the execution of each test task, converting the test signals from analog to digital and storing them as test data, with the test data containing a timestamp, board identifier, test item identifier, and batch number label.
[0086] In the embodiments of this application, a script execution block refers to a code segment in a parallel test script used to carry the execution instructions of each parallel test task within a test batch. Each test batch corresponds to one script execution block, and different script execution blocks are independent of each other and can be arranged in a preset order.
[0087] Parallel execution instructions are instructions added to a script execution block to enable parallel test tasks within the corresponding test batch to run simultaneously.
[0088] The preset order refers to the order in which the script execution blocks corresponding to each test batch are arranged in the parallel test script. The preset order can be determined based on the dependencies between test batches, the importance of test items, test time budget, or tester experience.
[0089] Adding execution instructions for serial test tasks to the combined script execution block means adding instructions to execute serial test tasks after the script execution blocks of all test batches. These instructions can include commands to start each serial test task sequentially, synchronization commands to wait for the previous serial test task to complete before starting the next, and commands to record the execution results of the serial test tasks. The final generated parallel test script executes according to the following logic: first, each test batch is executed sequentially in a preset order, with parallelizable test tasks executed in parallel within each batch; after all test batches have been executed, the serial test tasks are then executed sequentially.
[0090] "All test batches have been completed" means that all script execution blocks corresponding to all test batches in the parallel test script have been executed, i.e., all parallelizable test tasks have been completed. "Execute serial test tasks sequentially" means that the serial test tasks are executed one by one according to the order in the board configuration information or other preset order, and the next serial test task is started only after the previous one is completed.
[0091] Test signals are signals returned by the board under test during the execution of various test tasks, reflecting the board's operating status and test results. Test signals can be analog or digital. They can be output from interfaces, buses, management chips, sensors, or test points on the board under test and transmitted to the test system via test fixtures, test instruments, or test cables.
[0092] Analog-to-digital conversion (ADC) refers to the process of converting analog test signals into digital data. Test data refers to the digital test results stored after ADC conversion for subsequent anomaly analysis. A timestamp records the moment the test data was acquired. A board identifier records the board to which the test data belongs. A test item identifier records the test item corresponding to the test data. A batch number label records the test batch to which the test data belongs.
[0093] In one implementation, parallel test scripts can start parallelizable test tasks in the background and record the execution flag of each task. The test system can determine whether each parallelizable test task has completed by querying the execution flag. Once all parallelizable test tasks within a test batch have completed, the test system releases the resources occupied by that batch and proceeds to the next test batch. For serial test tasks, the test system can start them sequentially after all parallelizable test tasks have completed, and record the execution result of each serial test task upon completion. Throughout the testing process, the test system continuously collects test signals returned by the board under test, converts analog signals into digital data, and stores them according to timestamps, board identifiers, test item identifiers, and batch number tags.
[0094] This embodiment improves testing efficiency by creating a script execution block for each test batch and adding parallel execution instructions within it, enabling parallelizable test tasks within the same test batch to be started and executed in parallel. By combining the script execution blocks corresponding to each test batch in a preset order and adding execution instructions for serial test tasks to the combined script execution block, the execution order between parallelizable and serial test tasks is clearly controlled, avoiding resource conflicts between them. By executing serial test tasks sequentially only after all test batches have been completed, it is ensured that serial test tasks are not interfered with by parallel test tasks, which helps improve the accuracy of test results.
[0095] In one possible implementation of this application embodiment, when performing anomaly analysis based on test data to obtain structured fault codes, the following methods can be used, but are not limited to: comparing the test data with the corresponding preset standard results to obtain comparison results; in response to the comparison results exceeding a preset deviation range, marking the test items exceeding the preset deviation range as abnormal test items; clustering the log data in the test data into templates using a log parsing algorithm, taking the unknown templates in the templates as abnormal records, using a time series model to detect abnormal fluctuations in the sensor data stream in the test data, and determining abnormal data streams; extracting features from abnormal test items, abnormal records, and abnormal data streams to obtain abnormal features; generating fault codes based on abnormal features using a hierarchical coding method, binding the fault codes with the board description file, test execution context, and environmental conditions to generate structured fault codes.
[0096] In the embodiments of this application, the preset standard result refers to a reference result pre-set for each test item to determine whether the test data is normal. The preset standard result may include numerical range, threshold, allowable deviation, expected state, expected response, expected communication data, etc.
[0097] The preset deviation range refers to the maximum extent to which test data is allowed to deviate from the preset standard result. The preset deviation range can be set according to the importance of the test item, the board's operating conditions, and the test accuracy requirements.
[0098] Log data refers to test data recorded in text form, reflecting the test process, system operating status, program execution information, error messages, warnings, etc. Sensor data streams refer to the data sequences continuously collected in chronological order from one or more sensors within the test data. A time series model is a model used to model and analyze data arranged in chronological order. Time series models can determine whether current data deviates from normal patterns based on historical data trends and periodicity. Abnormal fluctuations refer to data changes in sensor data streams that deviate from normal trends, exceed normal fluctuation ranges, or exhibit abrupt changes. Abnormal data streams are sensor data streams that the time series model identifies as exhibiting abnormal fluctuations.
[0099] Anomaly features refer to information that describes the nature, location, severity, and context of an anomaly. These features can include the timestamp of the anomaly occurrence, anomaly type, anomaly location, key values, original log fragments, sensor identifiers, test item identifiers, board identifiers, batch numbers, etc. The testing system can extract the test item identifier, values exceeding the deviation range, and corresponding timestamps from the anomalous test items; extract the text content, frequency, and first occurrence time of unknown templates from the anomalous records; and extract the sensor identifier, time interval of the anomalous fluctuation, fluctuation amplitude, and trend from the anomalous data stream. These features are then aggregated to form an anomaly feature set.
[0100] Hierarchical coding refers to the method of organizing and coding abnormal features according to different levels.
[0101] Binding fault codes to board description files associates them with specific board models, versions, and test configurations. Test execution context refers to execution information related to faults during test execution; binding fault codes to this context facilitates subsequent analysis to determine if faults are related to parallel execution, test order, or batch partitioning. Environmental conditions refer to the external conditions of the board under test and the test equipment during test execution; binding fault codes to these conditions facilitates subsequent analysis to determine if faults only occur under specific environmental conditions. Structured fault codes are fault records formed by organizing fault codes, board description files, test execution contexts, and environmental conditions according to a pre-defined structure.
[0102] In one implementation, the testing system can parse test and monitoring data in real time to extract abnormal events. For known error patterns, a pre-written log template library can be used, and log parsing algorithms can cluster logs into templates. Unknown templates are then identified and recorded as potential anomalies in the database. For sensor data streams, time series models can be used to detect abnormal fluctuations. For detected and identified abnormal data, features including timestamps, anomaly types, anomaly locations, key values, and original log fragments are extracted, and a hierarchical coding method is used to generate fault codes. Finally, the generated fault codes are bound to the board description file, test execution context, and environmental conditions, and packaged into a structured fault record.
[0103] This embodiment compares test data with preset standard results to directly identify test items with values exceeding limits or abnormal states, marking them as anomalous test items and ensuring the accuracy of basic anomaly detection. By clustering log data into templates using log parsing algorithms and identifying unknown templates, it can discover undefined abnormal patterns, improving the coverage of anomaly detection. By using a time series model to detect abnormal fluctuations in sensor data streams, it can discover abnormal trends in the time dimension, compensating for the shortcomings of single-point threshold judgment. By binding fault codes with board description files, test execution contexts, and environmental conditions, structured fault codes are generated, ensuring that fault information includes not only the fault itself but also the board configuration, test execution background, and environmental conditions in which the fault occurred.
[0104] In one possible implementation of this application embodiment, when adjusting the test strategy corresponding to other boards based on structured fault codes, the following methods can be used, but are not limited to: associating structured fault codes with historical fault data, root cause analysis results, and maintenance plans to construct and update a knowledge graph; querying the board models, test conditions, and component batches related to the anomaly based on the updated knowledge graph, and recommending test adjustment actions based on the causal paths in the knowledge graph; modifying the test configuration in the board description files of other boards according to the recommended test adjustment actions, and pushing the updated board description files to the test scheduler; wherein, the test adjustment actions include at least one of adjusting the parameters of existing tests, advancing the priority of anomaly-related test items in the test sequence, and adding a special test with a preset temperature point to the test plan.
[0105] In the embodiments of this application, historical fault data refers to recorded data related to various board faults accumulated during previous testing. Root cause analysis results refer to information indicating the root cause of a fault obtained after analyzing the causes of historical faults. Repair plans refer to the remedial measures or handling methods taken for faults that have occurred.
[0106] A knowledge graph is a graph-structured data model that organizes and stores knowledge in the form of entities and relations. In a knowledge graph, entities represent specific objects or concepts, such as fault codes, fault phenomena, fault causes, repair plans, solutions, test conditions, board models, component batches, etc.; relations represent the associations between entities, such as "cause", "manifest as", "through repair", "associated with", "occurs in", etc.
[0107] A causal path refers to a path in a knowledge graph that starts from one entity, goes through a series of relationships, and reaches another entity, where the relationships on the path have causal implications.
[0108] The structured fault codes are associated with historical fault data, root cause analysis results, and repair plans. Association methods may include: treating the fault code field in the structured fault code as an entity and associating it with records in the historical fault data that have the same or similar fault codes; associating the board description file information in the structured fault code with existing board model entities in the knowledge graph; associating the test execution context and environmental conditions in the structured fault code with existing test condition entities in the knowledge graph; and associating root cause analysis results and repair plans as entities with the corresponding fault code entities and fault phenomenon entities.
[0109] After updating the knowledge graph, the testing system queries the updated knowledge graph for board models, test conditions, and component batches related to the anomaly. The query method can include: starting with a fault code in the structured fault code, searching the knowledge graph for board model entities, test condition entities, and component batch entities that are directly associated with the fault code or indirectly associated through several relationships. A board model refers to the same or similar board model as the board under test that experienced the anomaly. Test conditions refer to the test conditions corresponding to the occurrence or reproduction of the anomaly. A component batch refers to the production batch of one or more components used on the board that experienced the anomaly.
[0110] Test adjustment actions refer to adjustments made to the test strategy to screen, reproduce, or prevent similar anomalies. Adjusting existing test parameters involves modifying parameters such as test conditions, decision thresholds, applied signal amplitude, sampling frequency, and test duration for one or more test items. Prioritizing anomaly-related test items in the test sequence means placing anomaly-related test items earlier in the test item sequence. Adding specific tests with preset temperature points to the test plan involves adding test items executed under specific temperature conditions to the existing test plan to verify whether the anomaly only occurs under those specific temperature conditions.
[0111] Test configuration refers to the configuration content related to test execution in the board description file, including the list of test items, parameters of each test item, parallel attributes, resource requirements, and test item sequence.
[0112] The test scheduler is a module in a test system responsible for receiving board description files, scheduling test tasks, allocating test resources, and controlling test execution. Based on updated board description files, the test scheduler can redetermine test items, test parameters, parallel attributes, resource requirements, and execution order for other boards, and execute subsequent tests according to the updated test configuration.
[0113] In one implementation, the testing system can connect to a new board to be tested and determine new failure modes. Conditions for determining a new failure mode may include failure code generation, a matching degree below a threshold, and an empty root cause analysis recommendation. For a new failure mode, the testing system can create a temporary failure code and push it to an approval queue for marking, then insert the new failure mode as a new entity into the knowledge graph. An entity can consist of multiple nodes, including failure code, failure phenomenon, failure cause, repair plan, solution, and test conditions. The testing system can use a similarity algorithm to calculate the similarity between the new failure and existing failures, associating the new entity with other existing entities.
[0114] This embodiment constructs and updates a knowledge graph by associating structured fault codes with historical fault data, root cause analysis results, and repair plans. This systematically organizes scattered fault information, facilitating subsequent querying and reasoning. By querying the updated knowledge graph for board models, test conditions, and component batches related to the anomaly, and recommending test adjustment actions based on causal paths, test strategy adjustments no longer rely on manual experience judgment but are based on causal relationships within the knowledge graph, improving the accuracy and relevance of adjustments. By modifying the test configurations in the board description files of other boards according to the recommended test adjustment actions and pushing the updated board description files to the test scheduler, similar boards can automatically adopt the optimized test configurations in subsequent tests, thereby achieving rapid reuse of fault experience and continuous optimization of test strategies.
[0115] In one possible implementation of the embodiments of this application, in order to facilitate understanding of the implementation of the embodiments of this application, an example is also provided for illustration as follows: Figure 2 A flowchart of a board adaptive testing method provided in this application embodiment is shown below. Figure 2 As shown, it includes: Step 1. Using a test motherboard with a heterogeneous computing architecture of a central processing unit (CPU) and a field programmable gate array (FPGA) as the test controller, the test instruments are virtualized into a resource pool through a network interface, and a general-purpose board test fixture is designed. Step 2. Construct the information model and description file of the board to be tested (e.g., server board), read and identify the management chip information of the board to be tested, dynamically load the corresponding description file, and automatically match and generate the optimal test vector set; Step 3. Based on the parallel identifier in the board description file, merge and package the test items that are allowed to be executed simultaneously on different boards, and generate a test script for parallel testing that includes nohup parallel commands; Step 4. Execute the test script and parse the logs and monitoring data in real time. Generate structured fault codes from the abnormal data, associate them with historical fault codes, root cause analysis results and maintenance plans to build a knowledge graph. Step 5. Analyze new faults based on the knowledge graph and automatically adjust and optimize the testing strategy for the same type of boards.
[0116] In step 1, the motherboard being tested includes a CPU processing module and an FPGA programmable logic module. The test system uses the Modeling and Analysis of Real-Time and Embedded Systems (MARTE) modeling language to divide the test tasks into two categories according to the resource allocation dimension: time-scheduled tasks and space-scheduled tasks. Time-scheduled tasks are allocated to the CPU processing module, and space-scheduled tasks are allocated to the hardware logic resources of the FPGA programmable logic module to achieve the purpose of parallel testing.
[0117] In step 1, the test instruments include an oscilloscope, a programmable power supply, and an FPGA controller. Multiple isolated containers are created in the test equipment, and a test task or data processing service runs independently in each container. The CPU usage time, memory size, and network bandwidth of each container are limited based on the control group (Cgroups) mechanism. The containers distributed in different test instruments are interconnected using Veth virtual network technology to build a virtual test network resource pool.
[0118] The information sources included in the information model described in step 2 include: Static design information used to define the physical and logical design data of the board.
[0119] Dynamic specification information used to define the board's operating parameters and ultimate capabilities.
[0120] Test requirement information used to define the test types and test content of the board.
[0121] Historical experience information used to define experience data for production and testing processes.
[0122] The above information uses JavaScript Object Notation (JSON) schema syntax to describe each type of information source as a standard data structure, uses reference fields to define the association of information, and stores the resulting information model in the database; The Electronic Design Automation (EDA) tool script extracts netlists, component reference numbers, and interface package information from the exported files of the Printed Circuit Board (PCB) design software. It then parses the Bill of Materials (BOM) to read the board component list and identify chip models. The system automatically retrieves the corresponding board data definitions and parameter information from the component library. This information, along with dynamic specifications and test requirements, is integrated from the EDA tool script and component library. Finally, based on the schema defined in the information model, the system automatically generates a board description file, including: 1) Associate the parsed physical interface with the corresponding chip model in the BOM table, and populate the chip specifications in the preset chip knowledge base; 2) Select the test items to be performed according to the board specifications, and configure specific parameters for each test item; 3) Define the framework based on the information model and mark the test items that will be executed concurrently with other board tests; In step 2, a hybrid intelligent matching algorithm is used to generate the optimal test vector set, including: 1) Based on the static information in the board description file, the test items that must be executed are selected. The matching logic is that the interfaces array in the board description file is precisely matched with the targetInterface field of each test case.
[0123] 2) In the matched candidate set, the key information in the board description file is concatenated into a text description. A high-dimensional vector Vboard (board description vector) is generated from the text description using a pre-trained model (such as CodeBERT). A description vector Vtest (test case description vector) is generated for each test case in the test case library. Calculate the cosine similarity between Vboard and Vtest, and sort the test items according to the similarity value. The higher the similarity, the stronger the relevance of the test case to the current board. 3) Using the minimization of total test time as the modeling sequence decision point, the trained reinforcement learning model is used to prioritize the execution of test items with high fault detection rate and short execution time.
[0124] In step 3, the data structure is defined by designing a parallelFlag field (parallel identifier field) for each test item in the board description file. The action of merging and packaging parallel test tasks is divided into the following steps: 1) Connect different models of boards to the test system, load the corresponding description file for each board, and then extract all test items of all boards to form a task list. Each task in the task list includes board ID, test item name, parallel identifier, estimated time and resource requirements. 2) Based on the parallel flag, the tasks are divided into two groups, including the parallelizable task set P and the serial task set S. The parallelizable task set P represents all tasks with parallelFlag=true (parallel flag field is true), and the serial task set S represents all tasks with parallelFlag=false (parallel flag field is false). 3) Construct a resource occupancy table to record the current task occupancy status of each resource, and group the parallelizable task set P into conflict groups, placing non-conflicting tasks in the same batch and distributing conflicting tasks into different batches; 4) For each batch of tasks without resource conflicts, generate a shell script to be executed in parallel, use nohup to put the task to run in the background, redirect the output and record the process identifier (PID) of each task. For a serial task set S, after all parallel batches are completed, the serial tasks are executed sequentially, and a script for sequential execution is generated.
[0125] In step 4, logs and monitoring data include test program output, system logs, sensor monitoring streams, and test condition records. These logs and monitoring data are analyzed in real time to extract abnormal events. The steps are as follows: 1) For known error patterns, write a log template library, use a log parsing algorithm to cluster logs into templates, and identify unknown templates as potential exceptions and record them in the database; 2) Use a time series model to detect abnormal fluctuations in the sensor data stream; 3) Extract features from the detected and identified abnormal data, including timestamps, abnormal types, abnormal locations, key values, and original log fragments, and generate fault codes using a hierarchical coding method; The generated fault codes are bound to the board description file, test execution context, and environmental conditions, and packaged into a structured fault record in JSON format.
[0126] In step 5, a new board to be tested is connected, and the new fault mode is determined, including fault code generation failure, matching degree below the threshold and root cause analysis recommendation empty. A temporary fault code is created for the fault mode and pushed to the review queue for marking. New fault modes are inserted into the knowledge graph as new entities. Each entity consists of multiple nodes, including fault code, fault phenomenon, fault cause, maintenance plan, solution and test conditions. The similarity between the new fault and existing faults is calculated using the Jaccard similarity algorithm, and the new entity is associated with other existing entities. The steps for reasoning and dynamically updating the testing strategy based on the constructed knowledge graph include: 1) Query the knowledge graph to find all board models, test conditions and component batches related to the new fault, and set strategies to adjust the trigger conditions, specifically divided into high-risk batches, reproducible conditions and high fault severity; 2) Based on the causal paths in the knowledge graph, recommended test adjustment actions are divided into: a. Query the testable metrics corresponding to the root cause of the failure; b. Adjust the parameters of the existing test; c. Prioritize the test items related to the fault in the test sequence; d. Add specific temperature points (preset temperature points) to the test plan for specialized testing; 3) Modify the test configuration section of the description file of the same model board based on the reasoning results, including adding test items, modifying the parameters of existing test items, and updating parallelFlag and resource requirements. The updated board description file is pushed to the test scheduler of the test system.
[0127] This application embodiment also provides an adaptive testing device for multiple models of test boards, including a test motherboard and a test instrument, and a test board fixture designed according to the test board. The test board fixture includes a test base plate and a detachable probe adapter board. The test base plate is fixedly installed on the test platform station. Universal positioning holes are provided at the four corners of the test base plate. A multi-row edge connector array is installed on the outside of the test base plate, and the pins of the multi-row edge connector array are connected to the test instrument.
[0128] The probe adapter board has a PCB board structure and is mounted on the top of the test base plate with positioning pins. The test board is placed on the top of the probe adapter board. The top of the test base plate has mounting screw holes and guide posts for crimping the test board. The bottom of the probe adapter board has a connector module that mates with the male and female of the multi-row edge connector array.
[0129] Specifically, as shown in the figure, Figure 3This is a schematic diagram of the overall structure of a board testing fixture provided in an embodiment of this application. Figure 4 This is a schematic diagram of the disassembled structure of a board test fixture provided in an embodiment of this application. Figure 5 This is a schematic diagram of an edge card socket type probe adapter board structure provided in an embodiment of this application. Figure 6 This is a schematic diagram of a probe array type probe adapter board structure provided in an embodiment of this application. Figure 7 This is a schematic diagram of a dedicated socket-type probe adapter board provided in an embodiment of this application.
[0130] Among them, some pins of the multi-row edge connector array 3 are connected to the channel of an oscilloscope or other signal source through a coaxial cable, some pins are connected to the output of a programmable power supply through a power line, some pins are directly connected to the general-purpose input / output (I / O) port of the FPGA controller or a high-speed serial transceiver, and some pins are used to transmit clock, trigger and other synchronization signals; A test board 4 is placed on the top surface of the probe adapter board 102. The following components are arranged according to the interface type of the test board 4, including: 1) Edge card socket: According to Figure 5 As shown, if test board 4 is a high-speed peripheral component interconnect express (PCIe) card with a gold finger interface, then solder an edge connector socket that matches the gold fingers of the card.
[0131] 2) Probe array: based on Figure 6 As shown, if test board 4 is a test point on the PCB, a row of spring pins is installed as a probe structure, and the probe is pressed directly onto the test pad of test board 4. The selection of the probe (including tip shape and spring force) needs to be determined according to the test point type (including pad and via). 3) Dedicated socket: according to Figure 7 As shown, for CPUs or chips packaged in a Ball Grid Array (BGA) package, a press-fit professional test socket is installed.
[0132] The steps for automatically identifying the board model and version using a board-level management chip include: 1) Establishing an access path: The test controller establishes a communication link with the Baseboard Management Controller (BMC) on the board through the system management bus; 2) The test system sends a read command to the predefined register address of the BMC; 3) After the raw data is read is checked by Cyclic Redundancy Check (CRC), it is assembled into a standard identification code and passed to the database loading module as a query key.
[0133] The steps for dynamically loading the corresponding board description file from the central database are as follows: 1) Database Design: Create a table named "boardprofiles" (board description file) in the central database. Its fields include: Boardid: Identifier string; profilejson: Complete board description file content; version: Configuration file version; lastupdated: Last update timestamp.
[0134] 2) A two-level caching strategy is adopted, including: Level 1 cache (local memory): Uses a remote dictionary server (Redis) to store the recently used board configurations and sets a time to live (TTL).
[0135] Second-level cache (distributed cache): For scenarios with multiple test workstations sharing a Redis cluster, when one workstation loads a new board configuration, other workstations can directly retrieve it from Redis.
[0136] 3) When the production line switches batches, the system can push the description files of the next batch of boards from the database to the local cache of each test station in advance according to the production plan.
[0137] The modeling process for sequential decision problems includes: 1) Select the next test to be executed from the remaining test items, including the currently executed test items, their results, and the remaining test items to be executed; 2) If the selected test item fails, a high positive reward will be given; if the test item passes, a small negative reward or zero reward will be given; if the total execution time exceeds the threshold, a penalty will be given.
[0138] For new test boards without historical data, a random test vector generation strategy is used to generate a batch of test vectors with high coverage but low cost, filtering out most easily detectable faults. Then, targeted testing is used to cover the remaining faults. The final generated test vector set includes: 1) Mandatory test items: These are forcibly specified by the rule engine; 2) Preferred Recommendations: Filtered by vector similarity matching; 3) Dynamic sorting: The execution order is determined by the reinforcement learning model to ensure that faults are detected as quickly as possible.
[0139] 4) Random supplementary items: covering areas with unknown risks.
[0140] Entities and relationships are extracted from various data sources to populate the knowledge graph. These data sources include: 1. Structured data 1) Historical Fault Record Table: The generated fault code JSON records are directly mapped to graph nodes; 2) Repair work order system: contains information such as root cause analysis, repair operations, and replacement parts filled in by engineers; 3) Bill of Materials (BOM) and Computer-Aided Design (CAD) data: provide the physical connection relationships between components.
[0141] 2. Semi-structured and unstructured data 1) Repair manual; 2) Post-mortem notes; 3) On-site repair log.
[0142] 3. Extraction based on rules and templates For well-formatted work order data, create a template to extract the fault phenomenon → cause → solution triplet.
[0143] 4. Automated extraction based on Large Language Model (LLM) Employing prompting engineering techniques such as the CRISPE framework, LLM is enabled to automatically identify entities and relationships from unstructured text.
[0144] 5. Feature Extraction of Engineering Data Fault features are extracted from sensor time-series data and associated with equipment module faults, and then incorporated into a knowledge graph.
[0145] The process of storing and reasoning about the graph includes: 1. Graph storage: Choose a graph database to store the constructed knowledge graph. Graph databases natively support complex entity-relationship queries.
[0146] 2. Reasoning ability: 1) Define business rules, and use SPARQL to query and match the rule conditions to trigger alerts or suggestions.
[0147] 2) Starting from the fault code, traverse the graph to find the shortest cause-solution path, identify frequently occurring fault patterns, discover hidden correlations, match new faults with historical fault cases based on similarity, and recommend the most similar root causes and solutions.
[0148] 3) Entities and relationships are mapped to vectors through knowledge graph embedding, and neural networks are used for link prediction and root cause inference.
[0149] 4) The knowledge graph is combined with the large language model to form the GraphRetrieval-Augmented Generation (GraphRAG) architecture. When a new fault occurs, the system retrieves relevant subgraphs from the graph as context input LLM and generates accurate diagnostic suggestions.
[0150] Establish a dynamic learning mechanism to dynamically adjust the weights of each path in the knowledge graph based on user feedback. For newly added fault types or root causes discovered for the first time, add them to the knowledge graph in the form of new entities and relationships.
[0151] 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.
[0152] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above-described test method embodiments.
[0153] 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 test method embodiments when run.
[0154] 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.
[0155] 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 test method embodiments.
[0156] 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 test method embodiments.
[0157] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be executed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-a-chip (SoC), a complex programmable logic device (CPLD), a microprocessor (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or one or more combinations thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.
[0158] 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.
[0159] The foregoing has provided a detailed description of a 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 embodiments above are merely for the purpose of helping to 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 test method characterized by, include: The corresponding board configuration information is loaded according to the identification information of the board to be tested. The board configuration information includes the test items corresponding to the board to be tested and the parallel attributes of the test items. Based on the parallel attributes, determine the parallelizable test tasks and serial test tasks in the test items, and divide the parallelizable test tasks into multiple test batches, wherein there are no resource conflicts between the parallelizable test tasks in the same test batch; Based on the multiple test batches and the serial test tasks, a parallel test script is generated, the parallel test script is executed, and test data is collected in real time. Anomaly analysis is performed on the test data to obtain structured fault codes. Based on the structured fault codes, the test strategies for other boards are adjusted. The other boards are boards of the same type as the board under test.
2. The test method of claim 1, wherein, The step of loading the corresponding board configuration information based on the identification information of the board to be tested includes: Send a read command to the predefined register address of the management chip on the board under test to obtain the original identification data returned by the management chip; The original identification data is subjected to cyclic redundancy check, and the original identification data that passes the check is assembled into a standard identification code according to a preset format. The standard identification code is used as the identification information of the board to be tested. Using the identification information as the query key, search the preset configuration database for the board description file that matches the identification information; Based on the board description file, construct the board configuration information, which includes the test items and the parallel attributes corresponding to each test item.
3. The test method of claim 1, wherein, The board configuration information is constructed based on a preset information model and a board description file. The preset information model includes static design information, dynamic specification information, test requirement information, and historical experience information. The construction methods for the board description file include: Extract first information, including netlist, component reference numbers and interface package information, from the board design file corresponding to the board to be tested; The bill of materials is parsed to identify the chip model, and the data definition and parameter information of the board under test are retrieved based on the chip model. The first information, the data definition and parameter information, the dynamic specification information, and the test requirement information are integrated to generate the board description file. The board description file is used to record the test items, the parameters corresponding to each test item, the parallel attributes, and the resource requirements.
4. The test method of claim 3, wherein, The method further includes: The test items to be executed are selected by matching the interface information in the board description file with the target interface field of each test case in the preset test case library. The key information in the board description file is concatenated into a text description, and a board description vector is generated by a pre-trained language model. A test case description vector is generated based on each test case in the preset test case library, and the vector similarity between the board description vector and each test case description vector is calculated. The test items are sorted in descending order of vector similarity, and a preset number of test items at the top of the sort are selected as recommended test items. Using minimizing the total testing time as the sequence decision objective, a preset machine learning model is used to determine the execution order of the test items to be executed and the recommended test items, thus obtaining a test item sequence; The test item sequence is determined as the test item in the board configuration information.
5. The test method of claim 1, wherein, The step of determining the parallelizable test tasks and serial test tasks in the test item based on the parallel attribute includes: Iterate through each test item in the board configuration information and obtain the parallel attributes of each test item; In response to the parallel attribute indication of the target test item allowing parallel execution, the target test item is determined as a parallelizable test task, wherein the target test item is any test item in the board configuration information; In response to the target test item's parallel attribute indicating that parallel execution is not allowed or the parallel attribute is missing, the target test item is determined to be a serial test task.
6. The test method of claim 1, wherein, The step of dividing the parallelizable test task into multiple test batches includes: Based on the board resources required by each parallelizable test task during the test, a resource requirement set is constructed for each parallelizable test task. Perform an intersection operation on the resource requirement set of the first parallelizable test task and the resource requirement set of the second parallelizable test task to obtain the intersection operation result, wherein the first parallelizable test task and the second parallelizable test task are any two parallelizable test tasks. In response to the intersection operation result being empty, it is determined that the first parallelizable test task and the second parallelizable test task have no resource conflict. Parallelizable test tasks without resource conflicts are merged into the same test batch, while parallelizable test tasks with resource conflicts are divided into different test batches.
7. The test method of claim 1, wherein, The step of generating parallel test scripts based on the multiple test batches and the serial test tasks, executing the parallel test scripts, and collecting test data in real time includes: Create a corresponding script execution block for each test batch, and add parallel execution instructions for each parallelizable test task within the corresponding test batch to each script execution block; The script execution blocks corresponding to each test batch are combined in a preset order, and the execution instructions of the serial test task are added to the combined script execution blocks to generate the parallel test script; Start the parallel test script, execute the parallelizable test task in parallel in each test batch, and execute the serial test task sequentially after all test batches have been executed. During the execution of each test task, the test signals returned by the board under test are collected, the test signals are converted from analog to digital and stored as the test data, and the test data includes a timestamp, board identifier, test item identifier and batch number label.
8. The test method of claim 1, wherein, The anomaly analysis based on the test data to obtain structured fault codes includes: The test data is compared with the corresponding preset standard results to obtain the comparison results; In response to the comparison result exceeding a preset deviation range, the test item exceeding the preset deviation range is marked as an abnormal test item; The log data in the test data is clustered into templates using a log parsing algorithm. Unknown templates in the templates are identified as abnormal records. The sensor data stream in the test data is detected for abnormal fluctuations using a time series model to determine abnormal data streams. Extract the features of the abnormal test items, the abnormal records, and the abnormal data stream to obtain abnormal features; A hierarchical coding method is used to generate fault codes based on the abnormal characteristics. The fault codes are then bound to the board description file, test execution context, and environmental conditions to generate the structured fault codes.
9. The test method according to claim 1, characterized in that, The adjustment of testing strategies for other boards based on the structured fault codes includes: The structured fault codes are associated with historical fault data, root cause analysis results, and maintenance plans to construct and update a knowledge graph; Based on the updated knowledge graph, query the board model, test conditions and component batches related to the anomaly, and recommend test adjustment actions based on the causal paths in the knowledge graph; Modify the test configuration in the board description file of the other boards according to the recommended test adjustment actions, and push the updated board description file to the test scheduler; The test adjustment actions include at least one of the following: adjusting the parameters of existing tests, advancing the priority of abnormality-related test items in the test sequence, and adding special tests with preset temperature points to the test plan.
10. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the test method as described in any one of claims 1 to 9.
