Complex system optimal test strategy generation method based on sequential-parallel test mode
By adopting a test strategy generation method based on sequential-parallel testing mode in complex systems, the problem of difficult to shorten testing time in the prior art is solved, and more efficient fault diagnosis and system maintenance are achieved.
Patent Information
- Application Number
- CN202411859310.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-03-18
AI Technical Summary
The prior art is difficult to effectively shorten the test time required for fault diagnosis in complex systems, resulting in limited system maintenance and guaranteeability.
The optimal testing strategy generation method of complex systems based on the sequential-parallel testing mode is adopted. By building a fault testing model, dividing fault probability distribution categories and test time distribution categories, using particle swarm algorithm and a two-layer perceptron to fit the heuristic function, the test sequence is dynamically adjusted to generate the optimal sequential-parallel testing strategy.
It realizes shorter testing time in complex systems, improves the efficiency and accuracy of fault diagnosis, reduces testing costs, and ensures efficient fault isolation and diagnosis in complex testing environments.
Smart Images

Figure CN119645875A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of test strategy generation under a multi-signal flow graph model, and more specifically, relates to a method for generating an optimal test strategy for a complex system based on a sequential-parallel test mode. Background Art
[0002] Testability is a testing strategy that analyzes failure modes during the design phase, allowing the system to quickly and accurately monitor the status and isolate the nature of the failure. Its core task is to build an optimal testing strategy. It is of great significance to improve the system maintenance and support capabilities and reduce the cost of the entire life cycle. It is widely used in aerospace, communications, electronic equipment and other fields.
[0003] There are two main existing test modes: Sequential Test Mode (STM) and Parallel Test Mode (PTM). For complex systems, the sequential test mode is usually adopted due to its limited test resources. In 1995, Somnath Deb proposed a multi-signal flow graph model for the sequential test mode. By analyzing the correlation between faults and tests, a sequential test strategy (STS) with the shortest test time was constructed. The multi-signal flow graph model has low modeling complexity and is similar to the actual physical structure, so it has attracted the attention of researchers. However, this multi-signal flow graph model based on the sequential test mode ignores the potential of test parallelism, which makes it difficult to further shorten the test time and becomes a bottleneck for improving the maintainability and security of the system. 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 strategy for a complex system based on a sequential-parallel test mode, so as to reduce the test time required for fault diagnosis.
[0005] To achieve the above-mentioned object of the invention, the present invention provides a method for generating an optimal test strategy for a complex system based on a sequential-parallel test mode, which is characterized by comprising the following steps:
[0006] (1) Construct fault test model H:
[0007] H={S,T,D,P,C,Z}
[0008] Where S represents the potential fault set of the complex system to be tested, S = {s 1 ,s 2 ,...,s i ,...,s m},s irepresents the i-th fault state, the first fault state s 1 is fault-free, T represents the available test set of the complex system to be tested, T = {t 1 ,t 2 ,...,t j ,...,t n}, t j represents the jth available test, and D represents the fault dependency matrix, which is specifically expressed as:
[0009]
[0010] Among them, d ij Indicates fault status i In available test t j Test information under d ij =0 or d ij =1, if the fault state s i Can pass the availability test j Detected, d ij =1, otherwise d ij =0;
[0011] P is the prior probability set corresponding to the potential fault set S of the complex system to be tested, and the prior probability set P = {p 1 ,p 2 ,...,p i ,...,p m}, p i Indicates fault status d i The prior probability of C is the set of test times corresponding to the available test set T, C = {c 1 ,c 2 ,...,c j ,...,c n}, c j Indicates the available test t j The test time is, Z represents the set of available test groups or single available tests, Z = {z 1 ,z 2 ,...,z k ,...,z l}, z k represents the kth test group consisting of multiple available tests or a single available test that can be run simultaneously;
[0012] (2) Classification of fault probability distribution categories
[0013] 2.1) Establish a mixed distribution model dp of the prior probability set P
[0014] 2.2) According to the prior probability set P, the maximum likelihood estimation method is used to perform distribution fitting and determine the parameters in the mixed distribution model dp;
[0015] 2.3) Generate the category label for each fault state. The generation method is: if the fault state s i The prior probability p i According to the mixed distribution model dp, it is determined to belong to the e-th fault probability distribution category, which is the e-th type of fault, and the fault category label L i =e;
[0016] (3) Classify test time distribution categories
[0017] 3.1) Establish a mixed distribution model dc of the test time set C;
[0018] 3.2) According to the available test set T, the maximum likelihood estimation method is used to perform distribution fitting and determine the parameters in the mixed distribution model dc;
[0019] 3.3) Generate the category label I for each available test j , generated by: If the test t is available j The test time c j According to the mixed distribution model, dc belongs to the qth test time distribution category, which is the qth test time. Then the test time category label I j =q;
[0020] (4) Use particle swarm algorithm to obtain the optimal test strategy for complex systems
[0021] 4.1) Determine the maximum number of iterations IT and the total number of particles NUM;
[0022] 4.2) Randomly generate the weight matrix set family ANN for the first iteration (1) :
[0023]
[0024] in, The weight matrix set of the numth particle in the first iteration is: represents the weight matrix of the computational neural network between the input layer and the middle layer in the two-layer perceptron at the first iteration, Represents the weight matrix The movement speed of the first iteration, represents the weight matrix of the computational neural network between the middle layer and the output layer in the two-layer perceptron at the first iteration, Represents the weight matrix The movement speed of the first iteration, represents the bias matrix of the computational neural network between the input layer and the middle layer in the two-layer perceptron at the first iteration, Represents the bias matrix The movement speed of the first iteration, represents the bias matrix of the computational neural network between the middle layer and the output layer in the two-layer perceptron at the first iteration, Represents the bias matrix The movement speed of the first iteration;
[0025] 4.3) Initialize it = 1;
[0026] 4.4) Iteratively calculate the fitness of NUM particles
[0027] 4.4.1) Initialize num=1;
[0028] 4.4.2) Generate the decision tree of the numth particle in the itth iteration
[0029] 4.4.2.1) Initialize target = {S}, where target represents the set of nodes to be expanded. Initially, there is only one node to be expanded, i.e., the set of potential faults of the complex system to be tested S, and the corresponding test time set C(S) = C;
[0030] 4.4.2.2) Randomly select a node J to be expanded from the node set target, obtain the test time set C(J) of node J, and obtain the eigenvalue vector μ of node J J = {N dp ,N dc}:
[0031] N dp ={np 1 ,np 2 ,…,np e ,…}, where np e =|{s i |L i =e},s i ∈J|, that is, np e is the number of all fault states belonging to type e faults in node J;
[0032] N dc ={nc 1 ,nc 2 ,…,nc q ,…}, where nc q =|{t j |I j =q,t j ∈C(J)}|, that is, ncq is the number of available tests belonging to class q in the test time set C(J);
[0033] 4.4.2.3) Initialize k = 1;
[0034] 4.4.2.4) Get the kth test group or available test in set Z The eigenvalue vector λ k ={θ,ρ}:
[0035] Get the test group or available test z according to the test time set C(J) k Dynamic time collection of
[0036] Get the test group or available test z according to the fault dependency matrix D k The segmentation capability set in, Indicates the test time The ability to split node J:
[0037]
[0038] in, Represents the fault state s in node J i In the fault dependency matrix D, the kth u In the column The number of Represents the fault state s in node J i In the fault dependency matrix D, the kth u In the column The number of |J| represents the number of fault states in node J;
[0039] 4.4.2.5) The eigenvalue vector μ J and the eigenvalue vector λ k As the input of the two-layer perceptron, the output is η k :
[0040]
[0041] x is the independent variable of function σ. In the above formula, x is
[0042] 4.4.2.6), k=k+1, repeat steps 4.4.2.4)-step 4.4.2.5), traverse the set z, that is, {z 1 ,z 2 ,...,z k,...,z l}, until k = l;
[0043] 4.4.2.7) Compare the output η of the double-layer perceptron 1 ,η 2 ,...,η k ,...,η l , select the largest one, and its corresponding test group or available test is recorded as z best ;
[0044] 4.4.2.8) Use test groups or available tests best The first completed available test t α Expand node J and record the result as the sets right and left;
[0045] right={s i |s i ∈J,d ia =1}
[0046] left={s i |s i ∈J,d ia =0}
[0047] 4.4.2.9) Expand and modify the node set target: remove node J and add the sets right and left;
[0048] target=(target / J)∪{right}∪{left}
[0049] Among them, target / J means removing node J from the node set target;
[0050] In particular, if |right|=1, the node set target does not join the set right, and if |left|=1, the node set target does not join the set left;
[0051] Calculate the time it takes to expand node J as time J :
[0052]
[0053] 4.4.2.10) After a round of node expansion, the test time sets C(right) and C(left) are generated. The jth test time C(right) in the test time set C(right) is j and the jth test time C(left) in the test time set C(left) j for:
[0054]
[0055] Among them, C(J) j is the jth test time in the test time set C(J), c j1 is the first available test t completed in the test time set C(J) j1 The corresponding test time;
[0056] Repeat steps 4.4.2.2)-4.4.2.10) until the node set That is, the empty set. At this time, the expansion process of all nodes J and the set right and set left with only one fault state constitutes a decision tree
[0057] 4.4.3) Calculate the decision tree Fitness
[0058]
[0059] 4.4.4) num = num + 1, repeat steps 4.4.2) - 4.4.4) until num = NUM;
[0060] 4.5) According to the particle swarm update rule, use and the weight matrix set ANN of the it-th iteration (it) Generate the weight matrix family ANN for the it+1th iteration (it+1) ;
[0061] 4.6) it = it + 1, repeat steps 4.4) - 4.5) until it = IT, let fitness Decision Tree For fitness The corresponding decision tree is the optimal testing strategy for complex systems.
[0062] The object of the invention of the present invention is achieved in this way:
[0063] The optimal test strategy generation method for complex systems based on the sequential-parallel test mode of the present invention first constructs a fault test model, then divides the fault probability distribution category and the test time distribution category, and on this basis, uses the heuristic function to continuously expand the fault set to generate the optimal test strategy for the complex system, that is, to generate the optimal sequential-parallel test strategy (SPTS), wherein the heuristic function is fitted by a double-layer perceptron, and the weight matrix set of the double-layer perceptron is iteratively determined by a particle swarm algorithm. The present invention dynamically adjusts the test sequence in the test process, balances the test cost and accuracy, and improves the efficiency and accuracy of complex system fault diagnosis; at the same time, the present invention establishes a mixed distribution model, introduces a dynamic cost evaluation mechanism, and incorporates the test's ability to split the node to be expanded into the judgment basis, thereby realizing the generation of the optimal test strategy for different fault distributions, further improving the speed and accuracy of fault diagnosis, and ensuring efficient fault isolation and diagnosis in a complex test environment.
[0064] In summary, the present invention generalizes and improves the existing multi-signal flow graph model, and proposes a sequential-parallel test mode (SPTM) to generate an optimal sequential-parallel test strategy (SPTS). SPTM allows multiple tests that do not interfere with each other, do not conflict with test resources, or use the same source data to be performed simultaneously. SPTS has overall serial and local parallel characteristics, so the test time of SPTS is shorter than that of STS, reducing the test time required for fault diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 It is a flowchart of a specific implementation method of the method for generating an optimal test strategy for a complex system based on a sequential-parallel test mode of the present invention;
[0066] Figure 2 It is a fault dependency matrix and a test time-specific instance diagram;
[0067] Figure 3 It is a specific example diagram of the mixed distribution model dp of the prior probability set P;
[0068] Figure 4 It is a specific example diagram of the mixed distribution model dc of the test time set C;
[0069] Figure 5 yes Figure 1 Step S4 is to use the particle swarm algorithm to obtain the optimal test strategy for the complex system - a specific implementation flow chart;
[0070] Figure 6 yes Figure 5 Step S4.4 iteratively calculates the fitness of NUM particles A flow chart of a specific implementation method;
[0071] Figure 7 yes Figure 6 Step S4.4.2 generates the decision tree of the numth particle in the itth iteration A flow chart of a specific implementation method;
[0072] Figure 8 Is fitness The corresponding decision tree That is, the optimal test strategy for complex systems - a specific example diagram;
[0073] Fig. 9 The invention discloses an experimental model in which the optimal test strategy generation method for complex systems based on a sequential-parallel test mode is applied to a radar transmitter system. DETAILED DESCRIPTION
[0074] The specific implementation of the present invention is described below 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 the detailed description of known functions and designs may dilute the main content of the present invention, these descriptions will be omitted here.
[0075] Figure 1 It is a flowchart of a specific implementation method of the method for generating optimal test strategy for complex systems based on sequential-parallel test mode of the present invention.
[0076] In this embodiment, if Figure 1 As shown, the method for generating an optimal test strategy for a complex system based on a sequential-parallel test mode of the present invention comprises the following steps:
[0077] Step S1: Construct fault test model H
[0078] The fault test model H is:
[0079] H={S,T,D,P,C,Z}
[0080] Where S represents the potential fault set of the complex system to be tested, S = {s 1 ,s 2 ,...,s i ,...,s m},s i represents the i-th fault state, the first fault state s 1 is fault-free, T represents the available test set of the complex system to be tested, T = {t 1 ,t 2,...,t j ,...,t n}, t j represents the jth available test, and D represents the fault dependency matrix, which is specifically expressed as:
[0081]
[0082] Among them, d ij Indicates fault status i In available test t j Test information under d ij =0 or d ij =1, if the fault state s i Can pass the availability test j Detected, d ij =1, otherwise d ij =0.
[0083] P is the prior probability set corresponding to the potential fault set S of the complex system to be tested, and the prior probability set P = {p 1 ,p 2 ,...,p i ,...,p m}, p i Indicates fault status i The prior probability of C is the set of test times corresponding to the available test set T, C = {c 1 ,c 2 ,...,c j ,...,c n}, c j Indicates the available test t j The test time is, Z represents the set of available test groups or single available tests, Z = {z 1 ,z 2 ,...,z k ,...,z l}, z k Represents the kth test group of multiple available tests or a single available test that can be run simultaneously.
[0084] In this embodiment, m=7, n=7, the fault dependency matrix and the available test t j The test time c j like Figure 2 As shown, the test time unit is seconds. For the convenience of explanation, in the specific implementation process, the fault status data and the number of available tests of the complex system will be more.
[0085] Step S2: Classify the fault probability distribution categories
[0086] Step S2.1: Establish a mixed distribution model dp of the prior probability set P
[0087] The mixed distribution model dp of the prior probability set P is:
[0088]
[0089] The first type of fault state is no fault, and its occurrence probability is p 1 , which accounts for p in the mixed distribution
[0090] The second type of fault state is a more likely fault, and its prior probability follows a uniform distribution. The proportion p in the mixed distribution is α 2 The third category is a fault that is not likely to occur, and its prior probability follows a uniform distribution. The proportion p in the mixed distribution is α 3 The fourth and fifth categories represent fault groups with coupled relationships, and their occurrence probabilities follow the normal distribution N(μ 1 ,σ 1 )、N(μ 2 ,σ 2 ), and their proportion p in the mixed distribution is α 4 , α 5 , and so on, each normal distribution is independent of each other.
[0091] Step S2.2: Based on the prior probability set P, the maximum likelihood estimation method is used to perform distribution fitting and determine the parameters in the mixed distribution model dp, that is, {(μ 1 ,σ 1 ),(μ 2 ,σ 2 ),...,α 2 ,α 3 ,α 4 ,α 5 ,…}.
[0092] Step S2.3: Generate a category label for each fault state. The generation method is: if the fault state s i The prior probability p i According to the mixed distribution model dp, it is determined to belong to the e-th fault probability distribution category, which is the e-th type of fault, and the fault category label L i =e.
[0093] In this embodiment, if Figure 3 As shown in the figure, for the potential fault set S of the complex system to be tested, among the seven corresponding prior probabilities, p 1 ~p 1 , p 5 ~N(μ1 ,σ 1 ), the corresponding fault category label L 1 =1, L 3 ,L 6 =2, L 2 ,L 4 ,L 7 =3, L 5 =4. In the specific implementation process, the number of fault states of complex systems will be greater, and the number of fault probability distribution categories will also be greater. Here, for the convenience of explanation, the number of fault states m=7 and the number of fault probability distribution categories are 4.
[0094] Step S3: Divide the test time distribution categories
[0095] Step S3.1: Establish the mixed distribution model dc of the test time set C
[0096] The mixed distribution model dc of the test time set C is:
[0097]
[0098] in,
[0099] The first category test time follows the uniform distribution U(0,c max ), the proportion p in the mixed distribution is β 1 , the second category test time follows a uniform distribution The proportion p in the mixed distribution is β 2 , the third category test time follows a uniform distribution The proportion p in the mixed distribution is β 3 The fourth and fifth category test times represent tests that present a coupling relationship, and their occurrence probability follows the normal distribution N(μ′ 1 ,σ 1 ′)、N(μ ′ 2 ,σ 2 ′), and their proportion in the mixed distribution is β 4 , β 5 , and so on, each normal distribution is independent of each other.
[0100] Step S3.2: Based on the available test set T, the maximum likelihood estimation method is used to perform distribution fitting and determine the parameters in the mixed distribution model dc, that is, {(μ′ 1 ,σ 1 ′),(μ′ 2 ,σ′ 2 ),...,β 1 ,β 2 ,β 3 ,β4 ,β 5 ,…};
[0101] Step S3.3: Generate class labels I for each available test j , generated by: If the test t is available j The test time c j According to the mixed distribution model, dc belongs to the qth test time distribution category, which is the qth test time. Then the test time category label I j =q.
[0102] In this embodiment, if Figure 4 As shown, for the test time set C, among its 7 test times, c 1 ,c 4 ~U(0,c max ), c 3 ~N(μ′ 1 ,σ 1 ′), that is, the test time distribution category is 4, and the corresponding test time category label, I 1 ,I 4 =1,I 2 ,I 6 =2, I 5 ,I 7 =3, I 4 =1.
[0103] Step S4: Using particle swarm algorithm to obtain the optimal test strategy for complex systems
[0104] In this embodiment, if Figure 5 As shown in Figure 2, using the particle swarm algorithm to obtain the optimal test strategy for a complex system includes the following steps:
[0105] Step S4.1: Determine the maximum number of iterations IT and the total number of particles NUM. In this embodiment, the maximum number of iterations IT=100 and the total number of particles NUM=20.
[0106] Step S4.2: Randomly generate the weight matrix set family ANN for the first iteration (1) :
[0107]
[0108] in, The weight matrix set of the numth particle in the first iteration is: represents the weight matrix of the computational neural network between the input layer and the middle layer in the two-layer perceptron at the first iteration, Represents the weight matrix The movement speed of the first iteration, represents the weight matrix of the computational neural network between the middle layer and the output layer in the two-layer perceptron at the first iteration, Represents the weight matrix The movement speed of the first iteration, represents the bias matrix of the computational neural network between the input layer and the middle layer in the two-layer perceptron at the first iteration, Represents the bias matrix The movement speed of the first iteration, represents the bias matrix of the computational neural network between the middle layer and the output layer in the two-layer perceptron at the first iteration, Represents the bias matrix The movement speed for the first iteration.
[0109] Step S4.3: Initialize it=1.
[0110] Step S4.4: Iteratively calculate the fitness of NUM particles In this embodiment, if Figure 6 As shown, the following steps are included:
[0111] Step S4.4.1: Initialize num=1.
[0112] Step S4.4.2: Generate the decision tree of the numth particle in the itth iteration In this embodiment, if Figure 7 As shown, the following steps are included:
[0113] Step S4.4.2.1: Initialize target = {S}, where target represents the set of nodes to be expanded. Initially, there is only one node to be expanded, namely, the set of potential faults S of the complex system to be tested, and the corresponding test time set C(S) = C.
[0114] Step S4.4.2.2: Randomly select a node J to be expanded from the node set target, obtain the test time set C(J) of node J, and obtain the eigenvalue vector μ of node J J = {N dp ,N dc}:
[0115] N dp ={np 1 ,np 2 ,…,np e ,…}, where np e =|{s i |L i =e},s i ∈J|, that is, np e is the number of all fault states belonging to type e faults in node J;
[0116] N dc ={nc 1 ,nc 2 ,…,nc q ,…}, where nc q =|{t j |I j =q,t j ∈C(J)}|, that is, nc q is the number of available tests belonging to all q-type test times in the test time set C(J).
[0117] Step S4.4.2.3: Initialize k=1.
[0118] Step S4.4.2.4: Get the kth test group or available test in set Z The eigenvalue vector λ k ={θ,ρ}:
[0119] Get the test group or available test z according to the test time set C(J) k Dynamic time collection of
[0120] Get the test group or available test z according to the fault dependency matrix D k The segmentation capability set in, Indicates the test time The ability to split node J:
[0121]
[0122] in, Represents the fault state s in node J i In the fault dependency matrix D, the kth u In the column The number of Represents the fault state s in node J i In the fault dependency matrix D, the kth u In the column , and |J| represents the number of fault states in node J.
[0123] Step S4.4.2.5: Transform the eigenvalue vector μ J and the eigenvalue vector λ k As the input of the two-layer perceptron, the output is η k :
[0124]
[0125] x is the independent variable of function σ. In the above formula, x is
[0126] Step S4.4.2.6: k = k + 1, repeat steps S4.4.2.4-S4.4.2.5, traverse the set Z, that is, {z 1 ,z 2 ,...,z k ,...,z l}, until k=l.
[0127] Step S4.4.2.7: Compare the two-layer perceptron output η 1 ,η 2 ,...,η k ,...,η l , select the largest one, and its corresponding test group or available test is recorded as z best In this embodiment, Figure 8 As shown in the figure, for the potential fault set S of the node to be expanded, that is, the complex system to be tested, the test group or available test z best ={t 3 ,t 4 ,t 5}.
[0128] Step S4.4.2.8: Use the test group or available test z best The first completed available test t α Node J is expanded and the result is recorded as the set right and left. In this embodiment, the test group or available test z best ={t 3 ,t 4 ,t 5}The first available test t that completes 3 The node J, i.e., the potential fault set S of the complex system to be tested, is expanded.
[0129] right={s i |s i ∈J,d ia =1}
[0130] left={s i |s i ∈J,d ia =0}
[0131] like Figure 2 As shown, for the available test t 3 , d 33 ,d 53, d 73 is 1, therefore, right = {s 1 ,s2 ,s 4 ,s 6}, d 13 ,d 23, d 43 ,d 63 is 0, therefore, left={s 1 ,s 2 ,s 4 ,s 6}.
[0132] Step S4.4.2.9: Expand and modify the node set target: remove node J and add the sets right and left;
[0133] target=(target / J)∪{right}∪{left}
[0134] Among them, target / J means removing node J from the node set target;
[0135] In particular, if |right|=1, the node set target is not added to the set right, and if |left|=1, the node set target is not added to the set left.
[0136] Calculate the time it takes to expand node J as time J :
[0137]
[0138] Step S4.4.2.10: After a round of node expansion, test time sets C(right) and C(left) are generated, where the jth test time C(right) in the test time set C(right) is j and the jth test time C(left) in the test time set C(left) j for:
[0139]
[0140] Among them, C(J) j is the jth test time in the test time set C(J), c j1 is the first available test t completed in the test time set C(J) j1 The corresponding test time.
[0141] Repeat steps S4.4.2.2-S4.4.2.10 until the node set That is, the empty set. At this time, the expansion process of all nodes J and the set right and set left with only one fault state constitutes a decision tree
[0142] Step S4.4.3: Compute the decision tree Fitness
[0143]
[0144] Step S4.4.4: num = num + 1, repeat steps S4.4.2-S4.4.4 until num = NUM; Step S4.5: Update iterative weight matrix set ANN (it) For ANN (it+1)
[0145] According to the particle swarm update rule, using and the weight matrix set ANN of the it-th iteration (it) Generate the weight matrix family ANN for the it+1th iteration (it+1) ;
[0146] Step S4.6: it = it + 1, loop through steps S4.4-S4.5 until it = IT, and set the fitness Decision Tree For fitness The corresponding decision tree is the optimal test strategy for complex systems, and its time cost is is the optimal sequential-parallel testing strategy time.
[0147] Application examples:
[0148] The present invention is applied to radar transmitter systems, such as Fig. 9 As shown in Table 1, the radar transmitter system includes 34 modules and 85 fault types, 6 test points are introduced and 47 single tests are designed. The test time of the present invention is much shorter than that of the existing method, as shown in Table 1.
[0149] method The present invention SADPSO Rollout Growing QGA Test time (minutes) 14.47 21.67 16.42 64.42 44.76
[0150] Table 1
[0151] Although the above describes the illustrative specific embodiments of the present invention to facilitate those skilled in the art to understand the present invention, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations using the concept of the present invention are protected.
Claims
1. A method for generating optimal test strategy for complex systems based on sequential-parallel test mode, characterized in that: The following steps are involved: (1) Construct fault test model H: H={S,T,D,P,C,Z} Where S represents the potential fault set of the complex system to be tested, S = {s1,s2,...,s i ,...,s m },s i represents the i-th fault state, the first fault state s1 is no fault, T represents the available test set of the complex system to be tested, T = {t1, t2, ..., t j ,...,t n }, t j represents the jth available test, and D represents the fault dependency matrix, which is specifically expressed as: Among them, d ij Indicates fault status i In available test t j Test information below, d ij =0 or d ij =1, if the fault state s i Can pass the availability test j Detected, d ij =1, otherwise d ij =0; P is the prior probability set corresponding to the potential fault set S of the complex system to be tested, and the prior probability set P = {p1, p2, ..., p i ,...,p m }, p i Indicates fault status i The prior probability of C is the set of test times corresponding to the available test set T, C = {c1, c2, ..., c j ,...,c n }, c j Indicates the available test t j The test time is, Z represents the set of available test groups or single available tests, Z = {z1,z2,...,z k ,...,z l }, z k represents the kth test group consisting of multiple available tests or a single available test that can be run simultaneously; (2) Classification of fault probability distribution categories 2.1) Establish a mixed distribution model dp of the prior probability set P; 2.2) According to the prior probability set P, the maximum likelihood estimation method is used to perform distribution fitting and determine the parameters in the mixed distribution model dp; 2.3) Generate the category label for each fault state. The generation method is: if the fault state s i The prior probability p i According to the mixed distribution model dp, it is determined to belong to the e-th fault probability distribution category, which is the e-th type of fault, and the fault category label L i =e; (3) Classify test time distribution categories 3.1) Establish a mixed distribution model dc of the test time set C; 3.2) According to the available test set T, the maximum likelihood estimation method is used to perform distribution fitting and determine the parameters in the mixed distribution model dc, namely {(μ′1,σ1′),(μ′2,σ2′),...,β1,β2,β3,β4,β5,…}; 3.3) Generate the category label I for each available test j , generated by: If the test t is available j The test time c j According to the mixed distribution model, dc belongs to the qth test time distribution category, which is the qth test time. Then the test time category label I j =q; (4) Use particle swarm algorithm to obtain the optimal test strategy for complex systems 4.1) Determine the maximum number of iterations IT and the total number of particles NUM; 4.2) Randomly generate the weight matrix set family ANN for the first iteration (1) : in, The weight matrix set of the numth particle in the first iteration is: represents the weight matrix of the computational neural network between the input layer and the middle layer in the two-layer perceptron at the first iteration, Represents the weight matrix The movement speed of the first iteration, represents the weight matrix of the computational neural network between the middle layer and the output layer in the two-layer perceptron at the first iteration, Represents the weight matrix The movement speed of the first iteration, represents the bias matrix of the computational neural network between the input layer and the middle layer in the two-layer perceptron at the first iteration, Represents the bias matrix The movement speed of the first iteration, represents the bias matrix of the computational neural network between the middle layer and the output layer in the two-layer perceptron at the first iteration, Represents the bias matrix The movement speed of the first iteration; 4.3) Initialize it = 1; 4.4) Iteratively calculate the fitness of NUM particles i=1,2,…,NUM 4.4.1) Initialize num=1; 4.4.2) Generate the decision tree of the numth particle in the itth iteration 4.4.2.1) Initialize target = {S}, target represents the set of nodes to be expanded. Initially, there is only one node to be expanded, that is, the set of potential faults of the complex system to be tested S, and the corresponding test time set C(S) = C; 4.4.2.2) Randomly select a node J to be expanded from the node set target, obtain the test time set C(J) of node J, and obtain the eigenvalue vector μ of node J J = {N dp ,N dc }: N dp ={np1,np2,…,np e ,…}, where np e =|{s i |L i =e},s i ∈J|, that is, np e is the number of all fault states belonging to type e faults in node J; N dc ={nc1,nc2,…,nc q ,…}, where nc q =|{t j |I j =q,t j ∈C(J)}|, that is, nc q is the number of available tests belonging to class q in the test time set C(J); 4.4.2.3) Initialize k = 1; 4.4.2.4) Get the kth test group or available test in set Z The eigenvalue vector of Get the test group or available test z according to the test time set C(J) k Dynamic time collection of Get the test group or available test z according to the fault dependency matrix D k The segmentation capability set in, Indicates the test time The ability to split node J: in, Represents the fault state s in node J i In the fault dependency matrix D, the kth u In the column The number of Represents the fault state s in node J i In the fault dependency matrix D, the kth u In the column The number of |J| represents the number of fault states in node J; 4.4.2.5) The eigenvalue vector μ J and the eigenvalue vector λ k As the input of the two-layer perceptron, the output is η k : x is the independent variable of function σ. In the above formula, x is 4.4.2.6), k=k+1, repeat steps 4.4.2.4)-step 4.4.2.5), traverse the set Z, that is, {Z1, Z2, ..., Z k ,...,z l }, until k = l; 4.4.2.7) Compare the outputs of the two-layer perceptron η1,η2,...,η k ,...,η l , select the largest one, and its corresponding test group or available test is recorded as z best ; 4.4.2.8) Use test groups or available tests best The first completed available test t α Expand node J and record the result as the sets right and left; right={s i |s i ∈J,d ia =1} left={s i |s i ∈J,d ia =0} 4.4.2.9) Expand and modify the node set target: remove node J and add the sets right and left; target=(target / J)∪{right}∪{left} Among them, target / J means removing node J from the node set target; In particular, if |right|=1, the node set target does not join the set right, and if |left|=1, the node set target does not join the set left; Calculate the time it takes to expand node J as time J : 4.4.2.10) After a round of node expansion, the test time sets C(right) and C(left) are generated. The jth test time C(right) in the test time set C(right) is j and the jth test time C(left) in the test time set C(left) j for: Among them, C(J) j is the jth test time in the test time set C(J), c j1 is the first available test t completed in the test time set C(J) j1 The corresponding test time; Repeat steps 4.4.2.2)-4.4.2.10) until the node set That is, the empty set. At this time, the expansion process of all nodes J and the set right and set left with only one fault state constitutes a decision tree 4.4.3) Calculate the decision tree Fitness 4.4.4) num = num + 1, repeat steps 4.4.2) - 4.4.4) until num = NUM; 4.5) According to the particle swarm update rule, use and the weight matrix set ANN of the it-th iteration (it) Generate the weight matrix family ANN for the it+1th iteration (it+1) ; 4.6) it = it + 1, repeat steps 4.4) - 4.5) until it = IT, let the fitness Decision Tree For fitness The corresponding decision tree is the optimal testing strategy for complex systems.
2. The method for generating optimal test strategy for complex systems based on sequential-parallel test mode according to claim 1, characterized in that: The mixed distribution model dp in step 2.1) is: The first category of fault state is no fault, and its probability of occurrence is p1, and its proportion p in the mixed distribution is The second type of fault state is a more likely fault, and its prior probability follows a uniform distribution. The proportion p in the mixed distribution is α2, and the third category is a failure that is not likely to occur, and its prior probability follows a uniform distribution. The proportion p in the mixed distribution is α3. The fourth and fifth categories represent fault groups with coupled relationships, and their occurrence probabilities obey the normal distribution N(μ1,σ1) and N(μ2,σ2), respectively. The proportion p in the mixed distribution is α4 and α5, respectively. And so on. Each normal distribution is independent of each other.
3. The method for generating optimal test strategy for complex systems based on sequential-parallel test mode according to claim 1, characterized in that: The mixed distribution model dc in step 4.1) is: in, The first category test time follows the uniform distribution U(0,c max ), the proportion p in the mixed distribution is β1, and the test time of the second category follows a uniform distribution The proportion p in the mixed distribution is β2, and the test time of the third category follows a uniform distribution. The proportion p in the mixed distribution is β3. The fourth and fifth category test times represent tests that show a coupled relationship, and their occurrence probabilities obey the normal distribution N(μ′1,σ1′) and N(μ′2,σ2′). The proportion p in the mixed distribution is β4 and β5 respectively, and so on. Each normal distribution is independent of each other.