Optimal test sequence generation method based on fault combination and redundancy deletion
By building a fault testing model and genetic algorithm to train the optimal neural network, the optimal test sequence of complex systems is generated, and the problems of long operation time and low efficiency in the existing technology are solved, and efficient test sequence generation is achieved.
Patent Information
- Application Number
- CN202510536935.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-08-08
AI Technical Summary
When generating test strategies for complex equipment systems, the prior art has problems such as long operation time, large differences between the results and the optimal solution, and low testing efficiency, especially in large-scale systems, which are difficult to generate efficient test sequences.
Build a fault testing model, determine the minimum retention matrix and deletion criteria, use genetic algorithm to train the optimal neural network parameters, generate test sequences through the neural network, and realize the evaluation and deletion of redundant sets in the failure combination process, and generate the optimal test sequence.
It significantly reduces the search space, improves the computing efficiency, realizes accurate identification and deletion of redundant sets, ensures the accuracy and computing efficiency of diagnostic strategies, and is suitable for large-scale systems to generate test sequences.
Smart Images

Figure CN120448268A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of complex system testability design, and more specifically, relates to an optimal test sequence generation method based on fault combination and redundancy deletion. Background Art
[0002] Testability refers to a design feature that enables equipment to accurately and promptly determine whether its status is normal and effectively isolate its internal faults. As a crucial component of testability, an optimal test strategy can enhance the system's testability and improve the efficiency of fault isolation. The multi-signal flow graph model based on AND / OR graphs describes the correlation between faults and tests based on the signal flow in the system. While approaching the system's actual physical structure, it reduces modeling difficulty and improves the efficiency of test strategy generation. It is widely used in the test strategy generation process for complex equipment systems. However, with the development and innovation of technology, the number of testing methods has increased, the classification of fault modes has continued to refine, and the complexity of weapon equipment systems has gradually increased. The NP-hard problems caused by large-scale systems mean that most existing methods require extremely long computational times when generating test strategies. The results also have a large cost deviation from the optimal solution, resulting in low test efficiency.
[0003] There are numerous methods for generating test strategies based on multi-signal flow graphs, which can be categorized into three types based on the direction of fault tree generation. Top-down generation methods use heuristic functions to select the current test when expanding each non-leaf node of the fault tree. Some methods also rely on backtracking to correct test costs. However, their application in complex equipment systems is often limited by the randomness of some heuristic functions and the large number of computations required in the backtracking process. Horizontal generation methods prioritize isolating faults with high probability of occurrence, disregarding inter-fault correlations when generating their independent test sequences, ultimately integrating them horizontally to form a complete fault tree. Bottom-up methods start from the leaf nodes (single faults) of the fault tree and combine various fault sets in a cost-minimizing manner until the root node (the complete set of faults) is generated. This method requires extensive enumeration operations. Most of these methods are not suitable for generating test strategies for complex equipment systems. Summary of the Invention
[0004] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a method for generating an optimal test sequence based on fault combination and redundancy deletion, so as to generate an optimal test sequence based on the minimum cost combination of faults.
[0005] To achieve the above-mentioned object of the invention, the present invention provides a method for generating an optimal test sequence based on fault combination and redundancy removal, characterized by comprising the following steps:
[0006] (1) Construct fault test model H;
[0007] (2) Determine the unknown minimum retention matrix R and deletion criterion U;
[0008] (3) Use genetic algorithm to train the optimal neural network parameters;
[0009] (4) Generate a test sequence of test samples through the optimal neural network;
[0010] The object of the invention of the present invention is achieved like this:
[0011] The present invention is based on an optimal test sequence generation method for fault combination and redundancy deletion. First, a fault test model of the system is constructed. Based on the fault test model, a minimum retention matrix for deletion execution and a deletion criterion are estimated. Neural network parameters are used as individuals in a genetic algorithm. In a bottom-up generation algorithm, the neural network completes the evaluation and deletion of redundant sets existing in the fault combination process, thereby obtaining the fitness value of the current individual. Finally, the trained optimal neural network is applied to test samples to realize test sequence generation for complex systems.
[0012] At the same time, the optimal test sequence generation method based on fault combination and redundancy deletion of the present invention also has the following beneficial effects:
[0013] (1) The present invention optimizes and trains the neural network parameters by introducing a genetic algorithm, constructing a deletion strategy with optimal performance. The generated neural network has good generalization ability, can be trained on small-scale samples, and then applied to large-scale test samples, and has good adaptability and versatility.
[0014] (2) The present invention applies the optimal neural network structure obtained through training to the traditional bottom-up combined fault generation test sequence process, which can realize the evaluation of the fault set, thereby realizing the accurate identification and deletion of the redundant set; compared with the traditional bottom-up generation method, while ensuring relatively good calculation results, it significantly reduces the search space and improves the overall computational efficiency of the algorithm.
[0015] (3) The present invention combines the distribution characteristics of the fault test model and adopts the Monte Carlo simulation method to estimate the deletion range and implementation conditions of subsets of different sizes, and then controls the deletion process, thereby effectively avoiding the mistaken deletion of key fault sets and taking into account both computational efficiency and the accuracy of the diagnostic strategy. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a flow chart of the optimal test sequence generation method based on fault combination and redundancy deletion of the present invention;
[0017] Figure 2 It is a schematic diagram of the D matrix of a dual-channel MIMO system;
[0018] Figure 3 is a schematic diagram of the generated test sequence; DETAILED DESCRIPTION
[0019] The following describes the specific embodiments of the present invention in conjunction with the accompanying drawings so that those skilled in the art can better understand the present invention. It should be noted that in the following description, when detailed descriptions of known functions and designs may dilute the main content of the present invention, such descriptions will be omitted here.
[0020] Example
[0021] Figure 1 This is a flow chart of the optimal test sequence generation method based on fault combination and redundancy deletion of the present invention.
[0022] In this embodiment, if Figure 1 As shown, the present invention provides an optimal test sequence generation method based on fault combination and redundancy deletion, comprising the following steps:
[0023] (1) Construct fault test model H;
[0024] H={S,T,P,C,D}
[0025] Among them, S represents the various fault sets that occur in the system under test, S={s1,s2,…,s i ,…,s m}, s i represents the i-th fault; T represents all available test sets of the system to be tested, T={t1,t2,…,t j ,…,t n}, t j represents the jth available test; P represents the prior probability set of a certain failure of the system under test, P={p1,p2,…,p i ,…,p m}, p i Indicates a fault i The prior probability of T; C represents the test cost set corresponding to T, C = {c1, c2, ..., c j ,…,c n}, c j Indicates test t j The cost; D is the fault dependency matrix, specifically expressed as:
[0026]
[0027] Among them, d ij Indicates fault i In available test t j Test information under d ij =0 or dij =1, when d ij = 0, indicating that a fault has occurred in the system under test i Failed to pass the availability test t j Detected; when d ij =1, indicating that a fault occurs in the system under test i When it can pass the availability test t j Detected;
[0028] In this example, the D matrix of a dual-channel MIMO system is used as a test sample. The D matrix of a dual-channel MIMO system is as follows: Figure 2 , its scale is m=73, n=50;
[0029] (2) Determine the unknown minimum retention matrix R and deletion criterion U;
[0030] (2.1) Set the loop variable t, t = 1, 2, ..., m-1, and initialize t = 1;
[0031] (2.2) Initialize a 1×m-1 dimensional vector num1(0) = {m, 0, ..., 0}; initialize a 1×m-1 dimensional deletion criterion U = {1, 1, ..., 1}; initialize an unknown minimum retention matrix R:
[0032]
[0033] Among them, r t,t Represents the element in the tth row and tth column of the matrix R. The values of the right elements above the diagonal of the matrix R are unknown, and the values of the left elements below the diagonal are all 0;
[0034] (2.3) At the tth iteration, the vector num1(t-1) is updated using the tth column element of the matrix R;
[0035] num1(t)=num1(t-1)·(r 1,t ,r 2,t ,…,r t,t ,0,…,0) T
[0036] Wherein, the superscript T indicates transposition;
[0037] (2.4), estimate num1(t);
[0038]
[0039] Among them, l is the loop variable;
[0040] (2.5) Construct a system of equations about R based on the estimated num1(t):
[0041]
[0042] Here, g is the loop variable, and b is the set constant term. Since this constant term is only a proportional term, its value can be selected to simplify the calculation of the equation system. In this example, it is set to 1. num2(t) is a 1×m-1 dimensional vector that satisfies:
[0043]
[0044] in,
[0045] (2.6) Determine whether the tth element in the deletion criterion U is equal to 1. If the tth element is equal to 1, go to step (2.7); otherwise, jump to step (2.9);
[0046] (2.7), calculate the time quantities time1(t) and time2(t);
[0047]
[0048] Among them, Δ1 is any q in the subsequent enumeration operation x With q t-x Combine and generate q in the least cost way t Unit calculation amount;
[0049]
[0050] Among them, Δ2 is the statistical q t The unit calculation amount of the eigenvalue of , for this dual-channel MIMO system, is taken as Δ1 / Δ2=0.1492.
[0051] (2.8) Determine the size of time1(t) and time2(t). If time1(t) < time2(t), set the tth to m-1th elements in the deletion criterion U to 0, and then go to step (2.9);
[0052] (2.9) Determine whether the loop variable t has reached the maximum value m-1. If t < m-1, set t = t + 1 and return to step (2.2); otherwise, go to step (2.10);
[0053] (2.10), construct the following system of equations:
[0054] r t,t ·r t,t+1 ·…·r t,m-1 num2(t)=θ·best(t)
[0055] Among them, θ is the set margin parameter, best(t) is the random partition process of the fault set through Monte Carlo simulation to form q t the number of
[0056] (2.11), combine the equations established in steps (2.5) and (2.10) and solve them to obtain the values of each element in the minimum retention matrix R;
[0057] (3) Use genetic algorithm to train the optimal neural network parameters;
[0058] (3.1) Initialize a genetic population containing num individuals, where each individual is a set of weights and bias parameters of a neural network. To reduce the search space of the genetic algorithm, a single hidden layer neural network with 8 neurons is selected in this example; set the number of genetic algorithm generations gen, and initialize gen = 1; set the optimal individual in the genetic population, and initialize it to empty;
[0059] (3.2) Based on the bottom-up generation method, the fitness value of each individual is calculated by genetic algorithm:
[0060] (3.2.1) Set loop variable t = 1, 2, 3, ..., m-1;
[0061] (3.2.2) Let t = 1 and initialize a 1×m-dimensional state vector Among them, the uth element Corresponding fault collection information:
[0062]
[0063] Among them, α1 indicates that a fault s is included u Fault set, tt1 represents fault s u Test information under all tests, Indicates a fault u The prior probability of Indicates test failures u the price;
[0064] (3.2.3), when the loop iterates t times, t≥2, from the known state set {Q1,Q2,…,Q t-1}Select the state vector Q x With Q t-x , 1≤x<t;
[0065] (3.2.4), from the state vector Q x , Q t-x Select an element from each of them and record it as q x With q t-x , and satisfy q x With qt-x The corresponding α x With α t-x The elements do not overlap, and then determine whether there is an available test t with the minimum cost among the available tests. j , t j satisfy:
[0066]
[0067] Among them, tt x,j Indicates q x All faults in the available test t j Common testing information under;
[0068] If there is no t j , then go to step (3.2.5), otherwise go to step (3.2.6);
[0069] (3.2.5) Judge Q x With Q t-x Check if all the combinations of elements in the function are complete. If so, go to step (3.2.8); otherwise, go to the next step. x With q t-x and return to step (3.2.4);
[0070] (3.2.6), using q x ,q t-x Generate state vector Q t The new element q in t :q t =β(q x +q t-x |t j ), β represents the fault combination operation function; then calculate q t Related attributes of
[0071]
[0072] Among them, tt t,j for tt t The jth element in α t represents a fault set containing t faults;
[0073] (3.2.7), query state vector Q t Does element q already exist in t , if it exists, keep the smaller cost(q t ) value of q t ; If it does not exist, then the element q t Store as a new element in Q t , and count the new element q t The characteristic values of include: p(qt )、cost(q t ), and remove q from S t The cost of the subset formed after ;
[0074] (3.2.8) Output the state vector Q after t loop iterations t ;
[0075] (3.2.9) Determine whether the tth element in the deletion criterion U is equal to 1. If the tth element is equal to 1, proceed to step (3.2.10); otherwise, jump to step (3.2.11);
[0076] (3.2.10), through the neural network ANN to the currently known {Q1,…,Q t-1 ,Q t} to delete:
[0077] (3.2.10.1) Set loop variables l = 1, 2, ..., t, and initialize l = 1;
[0078] (3.2.10.2), the state vector Q l The characteristic values of all elements in the input neural network ANN, so as to predict the score of each element, sort all the scores in descending order, and retain the top r l,t elements, and the pruned state vector Q is obtained l ;
[0079] (3.2.10.3) Determine whether the current loop variable l has reached the maximum value t. If so, proceed to step (3.2.11); otherwise, set l = l + 1 and return to step (3.2.10.2);
[0080] (3.2.11), save the state set {Q1,…,Q t-1 ,Q t}, and then determine whether t = m-1. If so, proceed to step (3.2.12); otherwise, set t = t+1 and return to step (3.2.3);
[0081] (3.2.12), according to the state set {Q1, Q2…, Q m-1 Generate state vector Q m ;
[0082] From the state vector Q x , Q m-x Select an element from each of them and record it as q x With q m-x , and satisfy q x With q m-x The corresponding α xWith α m-x The elements do not overlap, 1≤x<m; then determine whether there is an available test t with the minimum cost among the available tests j , t j satisfy:
[0083]
[0084] If there is no t j , then go to step (3.2.13), otherwise go to step (3.2.14);
[0085] (3.2.13), judge Q x With Q m-x Check if all the combinations of elements in the function are complete. If so, go to step (3.2.16); otherwise, go to the next step. x With q m-x and return to step (3.2.12);
[0086] (3.2.14), using q x ,q m-x Generate state vector Q m The new element q in m :q m =β(q x +q m-x |t j ), then calculate q m Cost: cost(q m )=c j +[p(q x )·cost(q x )+p(q m-x )·cost(q m-x )] / [p(q x )+p(q m-x )];
[0087] (3.2.15), query state vector Q m Does element q already exist in m , if it exists, keep the smaller cost(q m ) value of q m ; If it does not exist, then the element q m Store as a new element in Q m ;
[0088] (3.2.16), output state vector Q m , Q m Middle Q mThe cost is taken as the fitness value of the current individual; the fitness value of the current individual is compared with the fitness value of the previous individual, and the individual with the smaller fitness value is selected as the optimal individual in the genetic population;
[0089] (3.3) Switch to the next individual in the genetic population, and then repeat step (3.2) until num individuals in the genetic population are traversed;
[0090] (3.4) Switch to the next iteration of the genetic population, and then repeat steps (3.2) to (3.3) until the number of generations set by the genetic algorithm is reached. After the genetic algorithm iteration stops, the neural network parameters are updated through the optimal individual finally obtained from the genetic population to obtain the optimal neural network after training;
[0091] (4) Generate a test sequence of test samples through the optimal neural network:
[0092] (4.1) Execute step (2) to generate the minimum retention matrix R and the deletion criterion U of the test sample {S, T, P, C, D}. The calculation results are U = {1, 1, 1, 1, 1, 1, 0, …, 0}, that is, it is only necessary to selectively delete all state elements after each state Q1 to Q7 is generated;
[0093] (4.2) Under the optimal neural network parameters, execute steps (3.2.1) to (3.2.12) to generate a network containing only a single element q m State vector Q m ;
[0094] (4.3),Backtracing the fault combination process to generate test sequences;
[0095] (4.3.1) Initialize the m×n dimensional test sequence matrix TS;
[0096] (4.3.2), with q m As the initial backtracking node, q m The corresponding minimum cost test t j Add the test sequence matrix TS; then determine the composition q m Q x With q m-x , if q x With q m-x If all faults are single faults, the backtracking is terminated and the test sequence matrix TS is output;
[0097] If q x If it is a single fault, then q x The branch backtracking terminates; q m-x If it is not a single fault, q m-x The corresponding minimum cost test t jAdd the test sequence matrix TS, and then continue to judge the composition q m-x The two branches of q m-x If all lower-level branches have single faults, the backtracking is terminated and the test sequence matrix TS is output;
[0098] If q m-x For a single fault, q x If it is not a single fault, then q m-x The branch backtracking terminates, q x The branch is backtracked according to the above method until q x If all the lower branches of are single faults, the backtracking is terminated and the test sequence matrix TS is output. The obtained TS is as follows Figure 3 As shown, blank elements have been hidden in the figure.
[0099] Examples
[0100] In order to illustrate the technical effect of the present invention, a certain type of four-channel MIMO terminal platform was used to verify the present invention. The system includes a total of 73 faults and 50 different tests. Its dependency matrix, the comprehensive cost of each test, and the probability of fault occurrence are shown in the figure. This example uses four algorithms for analogy experiments. The references of each algorithm are shown in Table 1: Methods 1 and 2 are both top-down methods for generating decision trees, which are backtracked in the form of quantum genetic algorithm and heuristic particle swarm algorithm respectively, and both set the population size to 200 and the number of iterations to 200; Method 3 is a method for generating decision trees horizontally; Method 4 is a method for generating decision trees from the bottom up. The expected cost and the time for test sequence generation are used as the performance evaluation criteria, and the results are compared in Table 2. Among them, the operation time of this method is the time it takes for the optimal deletion action obtained through training to be applied to the system.
[0101] Table 1 is the citation list;
[0102] Table 2 is the performance evaluation table of each algorithm generating solution set;
[0103]
[0104] Table 1
[0105]
[0106] Table 2
[0107] In summary, compared to other algorithms, this method achieves the optimal expected test cost with less computation time. In practical applications, fault tree generation must be completed before the system is put into operation. This higher testing efficiency allows the system to quickly diagnose faults while it is still in operation. Therefore, this method is particularly suitable for generating test sequences for large-scale systems.
[0108] Although the above describes the illustrative specific embodiments of the present invention to facilitate understanding of the present invention by those skilled in the art, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the appended claims, these changes are obvious, and all inventions and creations using the concepts of the present invention are protected.
Claims
1. A method for generating an optimal test sequence based on fault combination and redundancy elimination, characterized in that: The following steps are involved: (1) Construct fault test model H; H={S,T,P,C,D} Among them, S represents the various fault sets that occur in the system under test, S={s1,s2,…,s i ,…,s m }, s i represents the i-th fault; T represents all available test sets of the system to be tested, T={t1,t2,…,t j ,…,t n }, t j represents the jth available test; P represents the prior probability set of a certain failure of the system under test, P={p1,p2,…,p i ,…,p m }, p i Indicates a fault i The prior probability of T; C represents the test cost set corresponding to T, C = {c1, c2, ..., c j ,…,c n }, c j Indicates test t j The cost; D is the fault dependency matrix, specifically expressed as: Among them, d ij Indicates fault i In available test t j Test information under d ij =0 or d ij =1, when d ij = 0, indicating that a fault has occurred in the system under test i Failed to pass the availability test t j Detected; when d ij =1, indicating that a fault occurs in the system under test i When it can pass the availability test t j Detected; (2) Determine the unknown minimum retention matrix R and deletion criterion U; (2.1) Set the loop variable t, t = 1, 2, ..., m-1, and initialize t = 1; (2.2) Initialize a 1×m-1 dimensional vector num1(0) = {m, 0, ..., 0}; initialize a 1×m-1 dimensional deletion criterion U = {1, 1, ..., 1}; initialize an unknown minimum retention matrix R: Among them, r t,t Represents the element in the tth row and tth column of the matrix R. The values of the right elements above the diagonal of the matrix R are unknown, and the values of the left elements below the diagonal are all 0; (2.3) At the tth iteration, the vector num1(t-1) is updated using the tth column element of the matrix R; num1(t)=num1(t-1)·(r 1,t ,r 2,t ,…,r t,t ,0,…,0) T Wherein, the superscript T indicates transposition; (2.4), estimate num1(t); Among them, l is the loop variable; (2.5) Construct a system of equations about R based on the estimated num1(t): Where g is the loop variable, b is the set constant term, and num2(t) is a 1×m-1 dimensional vector that satisfies: in, (2.6) Determine whether the tth element in the deletion criterion U is equal to 1. If the tth element is equal to 1, go to step (2.7); otherwise, jump to step (2.9); (2.7), calculate the time quantities time1(t) and time2(t); Among them, Δ1 is any q in the subsequent enumeration operation x With q t-x Combine and generate q in the least cost way t Unit calculation amount; Among them, Δ2 is the statistical q t The unit calculation amount of the eigenvalue of ; (2.8) Determine the size of time1(t) and time2(t). If time1(t) < time2(t), set the tth to m-1th elements in the deletion criterion U to 0, and then go to step (2.9); (2.9) Determine whether the loop variable t has reached the maximum value m-1. If t < m-1, set t = t + 1 and return to step (2.2); otherwise, go to step (2.10); (2.10), construct the following system of equations: r t,t ·r t,t+1 ·…·r t,m-1 ·num2(t)=θ·best(t) Among them, θ is the set margin parameter, best(t) is the random partition process of the fault set through Monte Carlo simulation to form q t the number of (2.11), combine the equations established in steps (2.5) and (2.10) and solve them to obtain the values of each element in the minimum retention matrix R; (3) Use genetic algorithm to train the optimal neural network parameters; (3.1) Initialize a genetic population containing num individuals, where each individual is a set of weights and bias parameters of the neural network; set the number of genetic algorithm generations gen, and initialize gen = 1; set the optimal individual in the genetic population, and initialize it to empty; (3.2) Calculate the fitness value of each individual through genetic algorithm: (3.2.1) Set loop variable t = 1, 2, 3, ..., m-1; (3.2.2) Let t = 1 and initialize a 1×m-dimensional state vector Among them, the uth element Corresponding fault collection information: Among them, α1 indicates that a fault s is included u Fault set, tt1 represents fault s u Test information under all tests, Indicates a fault u The prior probability of Indicates test failures u the price; (3.2.3), when the loop iterates t times, t≥2, from the known state set {Q1,Q2,…,Q t-1 }Select the state vector Q x With Q t-x , 1≤x<t; (3.2.4), from the state vector Q x , Q t-x Select an element from each of them and record it as q x With q t-x , and satisfy q x With q t-x The corresponding α x With α t-x The elements do not overlap, and then determine whether there is an available test t with the minimum cost among the available tests. j , t j satisfy: Among them, tt x,j Indicates q x All faults in the available test t j Common testing information under; If there is no t j , then go to step (3.2.5), otherwise go to step (3.2.6); (3.2.5) Judge Q x With Q t-x Check if all the combinations of elements in the function are complete. If so, go to step (3.2.8); otherwise, go to the next step. x With q t-x and return to step (3.2.4); (3.2.6), using q x ,q t-x Generate state vector Q t The new element q in t :q t =β(q x +q t-x |t j ), β represents the fault combination operation function; then calculate q t Related attributes of Among them, tt t,j for tt t The jth element in α t represents a fault set containing t faults; (3.2.7), query state vector Q t Does element q already exist in t , if it exists, keep the smaller cost(q t ) value of q t ; If it does not exist, then the element q t Store as a new element in Q t , and count the new element q t The characteristic values of include: p(q t )、cost(q t ), and remove q from S t The cost of the subset formed after ; (3.2.8) Output the state vector Q after t loop iterations t ; (3.2.9) Determine whether the tth element in the deletion criterion U is equal to 1. If the tth element is equal to 1, proceed to step (3.2.10); otherwise, jump to step (3.2.11); (3.2.10), through the neural network ANN to the currently known {Q1,…,Q t-1 ,Q t } to delete: (3.2.10.1) Set loop variables l = 1, 2, ..., t, and initialize l = 1; (3.2.10.2), the state vector Q l The characteristic values of all elements in the input neural network ANN, so as to predict the score of each element, sort all the scores in descending order, and retain the top r l,t elements, and the pruned state vector Q is obtained l ; (3.2.10.3) Determine whether the current loop variable l has reached the maximum value t. If so, proceed to step (3.2.11); otherwise, set l = l + 1 and return to step (3.2.10.2); (3.2.11), save the state set {Q1,…,Q t-1 ,Q t }, and then determine whether t = m-1. If so, proceed to step (3.2.12); otherwise, set t = t+1 and return to step (3.2.3); (3.2.12), according to the state set {Q1, Q2…, Q m-1 Generate state vector Q m ; From the state vector Q x , Q m-x Select an element from each of them and record it as q x With q m-x , and satisfy q x With q m-x The corresponding α x With α m-x The elements do not overlap, 1≤x<m; then determine whether there is an available test t with the minimum cost among the available tests j , t j satisfy: If there is no t j , then go to step (3.2.13), otherwise go to step (3.2.14); (3.2.13), judge Q x With Q m-x Check if all the combinations of elements in the function are complete. If so, go to step (3.2.16); otherwise, go to the next step. x With q m-x and return to step (3.2.12); (3.2.14), using q x ,q m-x Generate state vector Q m The new element q in m :q m =β(q x +q m-x |t j ), then calculate q m Cost: cost(q m )=c j +[p(q x )·cost(q x )+p(q m-x )·cost(q m-x )] / [p(q x )+p(q m-x )]; (3.2.15), query state vector Q m Does element q already exist in m , if it exists, keep the smaller cost(q m ) value of q m ; If it does not exist, then the element q m Store as a new element in Q m ; (3.2.16), output state vector Q m , Q m Middle Q m The cost is taken as the fitness value of the current individual; the fitness value of the current individual is compared with the fitness value of the previous individual, and the individual with the smaller fitness value is selected as the optimal individual in the genetic population; (3.3) Switch to the next individual in the genetic population, and then repeat step (3.2) until num individuals in the genetic population are traversed; (3.4) Switch to the next iteration of the genetic population, and then repeat steps (3.2) to (3.3) until the number of generations set by the genetic algorithm is reached. After the genetic algorithm iteration stops, the neural network parameters are updated through the optimal individual finally obtained from the genetic population to obtain the optimal neural network after training; (4) Generate a test sequence of test samples through the optimal neural network; (4.1) Execute step (2) to generate the minimum retention matrix R and deletion criterion U of the test sample {S, T, P, C, D}; (4.2) Under the optimal neural network parameters, execute steps (3.2.1) to (3.2.12) to generate a network containing only a single element q m State vector Q m ; (4.3),Backtracing the fault combination process to generate test sequences; (4.3.1) Initialize the m×n dimensional test sequence matrix TS; (4.3.2), with q m As the initial backtracking node, q m The corresponding minimum cost test t j Add the test sequence matrix TS; then determine the composition q m Q x With q m-x , if q x With q m-x If all faults are single faults, the backtracking is terminated and the test sequence matrix TS is output; If q x If it is a single fault, then q x The branch backtracking terminates; q m-x If it is not a single fault, q m-x The corresponding minimum cost test t j Add the test sequence matrix TS, and then continue to judge the composition q m-x The two branches of q m-x If all lower-level branches have single faults, the backtracking is terminated and the test sequence matrix TS is output; If q m-x For a single fault, q x If it is not a single fault, then q m-x The branch backtracking terminates, q x The branch is backtracked according to the above method until q x If all lower-level branches have single faults, the backtracking is terminated and the test sequence matrix TS is output.