Priority testing method for UAV system based on small sample priority testing

Through the small sample priority testing method, small sample test data is used to prioritize the test data of the UAV system, and fault feature extraction and priority sorting are used to solve the problem of determining the priority of the test data of the UAV system, and the testing efficiency and fault detection rate are improved.

CN119046796BActive Publication Date: 2025-04-04SHANDONG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411523429.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-04-04
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

In system-level testing of drone systems, how to effectively determine which test data should be tested first, especially when resources and time are limited, ensuring that potential failures can be detected to the greatest extent possible.

Method used

Through the small sample priority testing method, the previous small sample test data is used as prior knowledge and is used to prioritize the actual test data. Specific steps include reading and parsing data protocol frames, selecting test values, generating combined test data, performing small sample tests, fault-sensitive combination extraction and fault degree calculation, and establishing a wide-core convolutional neural network model for fault feature extraction and priority sorting.

Benefits of technology

It has achieved the improvement of the efficiency and effectiveness of UAV system testing within limited resources and time, significantly improved the fault detection rate, and ensured the safety and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046796B_ABST
    Figure CN119046796B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of flight system testing technology, and specifically relates to a method for testing a priority of an unmanned aerial vehicle system under a small sample priority test, the steps of which include reading and parsing a data protocol frame received by a component to be tested from other components in the unmanned aerial vehicle system; selecting a test value for each element; generating combined test data by step search according to the selected test value of each element; randomly selecting 10% of the test data from the generated combined test data for testing; extracting fault-sensitive combinations and calculating fault degrees based on test response results; extracting fault features; and performing coarse priority sorting on the test data during the operation of the unmanned aerial vehicle system through a wide-core convolutional neural network model, and then performing fine priority sorting on the test data by fault-sensitive matching. The present invention can use the test data of a small sample in the early stage as prior knowledge for the priority sorting of actual test data, thereby realizing priority testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of flight system testing, and in particular relates to a method for testing the priority of an unmanned aerial vehicle system under a small sample priority test. Background Art

[0002] In recent years, with the rapid improvement of science and technology, drones have made great progress, with richer functions, better performance and wider applications. Due to their long working time, long flight distance and no need to carry personnel, they are widely used in various fields.

[0003] In the process of performing tasks, drones need various components to work together, and a large amount of real-time data is transmitted between various components. The functions and reliability of each component are extremely high. Once a slight error occurs in one party, it will affect the normal operation of the entire system and even cause an accident in the drone system. In order to ensure the functional correctness and operational reliability of each component of the drone, each component needs to be tested at the system level to ensure the correctness of its function and performance, so that it can be used in the drone system with confidence.

[0004] In order to ensure the comprehensiveness of the test, system-level testing usually requires generating full-factor coverage or high-coverage test data based on the interface protocol of the component to be tested. However, the amount of such high-coverage test data is usually huge, and it is difficult to obtain all the tests in actual testing. Therefore, a method is needed to determine which test data should be tested first. This method of determining the order in which test data is executed is called priority testing technology. The purpose of priority testing technology is to ensure that test data that is most likely to discover potential faults can be executed first. In this way, even if all possible situations cannot be tested, the chances of discovering problems can be maximized. Therefore, a strategy or method is needed to determine the priority of testing in order to improve the efficiency and effectiveness of testing within limited resources and time. Summary of the invention

[0005] In view of the above deficiencies in the prior art, the purpose of the present invention is to provide a UAV system priority testing method under small sample priority testing, which can use the test data of the previous small sample as prior knowledge for the priority sorting of the actual test data, thereby realizing priority testing.

[0006] To achieve the above purpose, the technical solution adopted by the present invention is a UAV system priority testing method under a small sample priority test, comprising the following steps:

[0007] S1. For the component to be tested in the UAV system, read and parse the data protocol frame received by the component to be tested from other components; each data protocol frame contains 6 kinds of description information, namely element name, value range, resolution, unit, data type and word length, where the element name contains element 1 to element k;

[0008] S2. Select test values ​​for each element: perform data sampling, use the equivalence class partitioning method and boundary value analysis method in black box testing theory to model the element values ​​and discretize the sampling points;

[0009] S3. Based on the test value of each selected element, a step search is used to generate combined test data, and the test data covers all test value combinations of any p elements, 1≤p≤k;

[0010] S4. Randomly select 10% of the test data from the generated combined test data for testing, where the 10% of the test data is the small sample test data. Send the small sample test data to the component under test through the serial port, and collect the test response results of the component under test through the serial port.

[0011] S5. Based on the test response results, extract fault-sensitive combinations and calculate fault degrees;

[0012] S6. Establish a wide-core convolutional neural network model including a wide-core convolutional layer to extract fault features;

[0013] S7. The wide-core convolutional neural network model is used to perform coarse priority sorting on the test data during the operation of the UAV system, and then fine priority sorting is performed on it by fault-sensitive matching to complete the priority assignment of the test data.

[0014] As a preferred solution of the present invention, in the above S1, in the UAV system, various components communicate in real time through a data frame protocol, and the data protocol frame is a data unit encapsulated by the data frame protocol;

[0015] The element name describes the characteristics and properties of each element, including frame header, frame length, frame identifier, element 1-element k, spare, frame count and checksum, where the first two elements are the frame header, which is used to describe the unique starting information of this data protocol frame; the frame length is used to identify the total length of the data protocol frame; the frame identifier identifies the uniqueness of the data protocol frame; element 1-element k are physical quantities with practical significance; the frame count records the number of frames of the data protocol frame starting from 1; the checksum is used to check the data protocol frame;

[0016] The value range describes the actual value range of each element;

[0017] Resolution indicates the actual physical resolution of the element, that is, the physical meaning when the element value is "1";

[0018] The data type indicates the variable type of the element in physical memory, where UINT8 indicates unsigned 8-bit integer data, UINT16 indicates unsigned 16-bit integer data, UINT32 indicates unsigned 32-bit integer data, and INT16 indicates signed 16-bit integer data;

[0019] The word length corresponds to the data type one by one. Once the data type is parsed, the word length is automatically assigned.

[0020] As a preferred solution of the present invention, in S2, five equivalence classes are designed by using the equivalence class division method, namely, upper limit equivalence class, median equivalence class, lower limit equivalence class, out-of-bounds equivalence class and limit equivalence class;

[0021] For the upper limit equivalence class, median equivalence class, and lower limit equivalence class, in addition to selecting the upper limit, median, and lower limit, "upper limit +", "upper limit -", "median value +", "median value -", "lower limit +", and "lower limit -" are selected according to the boundary value analysis method;

[0022] For the out-of-bounds equivalence class, only "upper out-of-bounds" and "lower out-of-bounds" are selected, and similarly for the limit equivalence class, "upper limit" and "lower limit" are selected;

[0023] When selecting a test value for each element, the upper and lower limits of the element test value in the data protocol frame are its valid range limits, the valid interval is set as the difference between the upper limit and the lower limit, and the median is the midpoint of the valid interval; "upper limit +" is equal to the upper limit plus 20% of the valid interval, and "upper limit -" is equal to the upper limit minus 20% of the valid interval; the same applies to the lower limit and the median; "upper limit" is selected as half of the sum of the upper limit and the upper limit +, and "lower limit" is selected as half of the sum of the lower limit and the lower limit -; for the limit value, the word length corresponding to the element in the data protocol frame is used to represent it, and the limit value is the maximum positive number or the minimum negative number corresponding to the element word length.

[0024] As a preferred embodiment of the present invention, in S2, when selecting a test value for each element, other test values ​​of each element are further selected by single value addition, multi-value stepwise addition, random addition or function addition;

[0025] When adding multiple values ​​in steps, set the initial value, end value and step value; when adding randomly, set the random range; when adding functions, set the function expression, value range and step value.

[0026] As a preferred solution of the present invention, in S3, the number of elements is k, and each element has n i For element i, its test value set vi Expressed as , where 1≤i≤k, That is, the test values ​​corresponding to element i;

[0027] Use step search to generate combined test data. The steps are as follows:

[0028] S31, randomly generate M vectors, denoted as , where 1≤j≤M; The dimension is k, each dimension corresponds to v i A test value randomly selected from ;

[0029] S32, select The vector with the largest fitness value is recorded as ; The fitness value is defined as the number of uncovered test value combinations that cover any p elements;

[0030] S33, perform iterative update, generate a random number q in [0, 1], if q>0.15, update according to formula (1):

[0031] (1);

[0032] In the formula, , are respectively the tth and t+1th iterations , is the tth iteration , C j is a random number between [0, 1], so that Towards Direction search;

[0033] If q≤0.15, update according to formula (2):

[0034] (2);

[0035] In the formula, is a random vector at the tth iteration;

[0036] After updating, from Select the vector with the largest fitness value as ;

[0037] S34, execute the iterative update of S33 Z times, and then update the Output as a combined test data;

[0038] S35. Re-execute S31-S34 until all test value combinations of any p elements in all data protocol frames have been covered by an output combined test data.

[0039] As a preferred solution of the present invention, the value of M is 50 and the value of Z is 800.

[0040] As a preferred solution of the present invention, in S5, the steps of extracting fault sensitive combinations and calculating fault degrees are as follows:

[0041] S51, assuming that the test data set P is a test data set that does not cause the failure of the component to be tested, and the test data set Q is a test data set that causes the failure of the component to be tested; that is, , x represents a test data in P, which does not test the fault of the unit under test UUT, indicating true; , y represents a test data in Q, which tests the failure of the component under test, which is expressed as false;

[0042] S52, assume that there are b combinations of elements that cause failure of the component under test during actual operation, extract all value combinations of any b elements in Q, and set is a test value combination of elements of length b, where and are not equal to each other, indicating that d b Each data in comes from a different element (that is, each data Respectively from elements), then all test value combinations of length b in Q Expressed as ;

[0043] Similarly, all test value combinations of length b in P Expressed as ;

[0044] S53, due to the failure of the component under test b From Q, not from P, remember and , is the total d that causes the failure of the component under test b A collection of is any test data in P and ≠x;

[0045] S54, from Extract the test value involved in the i-th element, expressed as , 1≤i≤k, for The combined test values ​​of all the i-th elements contained in Indicates the test value containing the i-th element For i ;

[0046] S55. Definition H i is the health value of the test value involved in the i-th element, expressed as ; is the corresponding test value s i The health value is expressed as:

[0047] (3);

[0048] In the formula, Indicates i In the D b The number of times it appears in is the sum of the combined test data;

[0049] S56. For any s of any element i i , its test value includes two types, one is appearing in The health value in the test value is greater than 0, and the other is not The health value in is equal to the test value of 0, at this time:

[0050] (4);

[0051] S57. Expand the dimension of b elements to k, that is, , the corresponding test value on dimension i comes from the i-th element, d k Health value The sum of the health values ​​in each dimension is expressed as:

[0052] (5);

[0053] In the formula, That is, the health value of the test value corresponding to dimension i, d k That is, a combination of element test values ​​of length k.

[0054] As a preferred embodiment of the present invention, in the S6, the wide-core convolutional neural network model includes 10 layers, the first layer is 4 wide-core convolutional layers, the second layer is a splicing layer, splicing the outputs from the 4 wide-core convolutional layers, the third layer is a convolutional layer, the fourth layer is a maximum pooling layer, the fifth layer is a convolutional layer, the sixth layer is a maximum pooling layer, the seventh layer is a convolutional layer, the eighth layer is a maximum pooling layer, the ninth layer is a flattening layer, and the tenth layer is a fully connected layer.

[0055] As a preferred embodiment of the present invention, the input of the wide-core convolutional neural network model is d k The output is a classification value, which corresponds to the two types of whether the fault will occur. The lengths of the kernel functions of the four wide-kernel convolutional layers are k-b+1, kb-1, kb-3 and kb-5, respectively, where kb-5 is greater than 0.

[0056] As a preferred embodiment of the present invention, in the above S7, the specific process of assigning the priority of the test data is as follows: the remaining 90% of the test data is used for secondary testing, each test data first passes through the wide-core convolutional neural network model to obtain an identification of whether it will cause a fault, and according to the identification, the priority of the test data that will cause the fault of the component to be tested is higher than the priority of the test data that will not cause the fault of the component to be tested, thereby dividing the test data into two parts, one with high priority and the other with low priority;

[0057] Furthermore, for the two parts of test data, the health value of each test data is calculated separately, that is, sensitive matching is performed. After that, the high priority part is given priority from large to small according to the health value of each test data, and the low priority part is also given priority from large to small according to the health value of each test data, but the priority of the high priority part is always greater than that of the low priority part;

[0058] At this point, the priorities of all test data are assigned. During testing, the test is performed based on the priority level to ensure that the most faults of the components under test are discovered using the least test data.

[0059] The algorithm involved in the present invention can be executed by an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the above algorithm calculation is implemented by executing the software by the processor.

[0060] The beneficial effects of the present invention are:

[0061] The present invention proposes a priority test method for an unmanned aerial vehicle system, which can use the test data of a small sample in the early stage as prior knowledge for the priority sorting of the actual test data, thereby realizing the priority test. First, the fault-sensitive combination is extracted from the result of the small sample test, and the fault degree of the fault-sensitive combination is further calculated; secondly, a wide-core convolutional layer is used to extract a wide range of fault features, and then a wide-core convolutional neural network model is established; finally, the test data is firstly coarsely prioritized by the wide-core convolutional neural network model, and then finely prioritized by fault-sensitive matching. The present invention has important practical significance for improving the safety and reliability of the unmanned aerial vehicle system. The method can achieve very good test results and be applied in actual testing of components such as radio altimeters, inertial navigation units, atmospheric machines, attitude reference systems and GPS in unmanned aerial vehicle systems.

[0062] The UAV system priority testing method of this invention has been successfully applied to the priority testing of many UAV systems and achieved good test results. Through priority testing, the test efficiency has been significantly improved and the fault detection rate has been guaranteed. This method will have great application and promotion value. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 It is a schematic diagram of the process of the present invention;

[0064] Figure 2 1 is a schematic diagram of data sampling for testing values ​​of data protocol frame elements in an embodiment of the present invention;

[0065] Figure 3 is a schematic diagram of the structure of a wide-core convolutional neural network model in an embodiment of the present invention;

[0066] Figure 4 Schematic diagram of the principle of a wide kernel convolutional layer in an embodiment of the present invention. DETAILED DESCRIPTION

[0067] The embodiments of the present invention are further described below in conjunction with the accompanying drawings:

[0068] like Figure 1 As shown, the UAV system priority testing method under the small sample priority test includes the following steps:

[0069] S1. For the component to be tested in the UAV system, read and parse the data protocol frame received by the component to be tested from other components; each data protocol frame contains 6 kinds of description information, namely element name, value range, resolution, unit, data type and word length, where the element name contains element 1 to element k;

[0070] S2. Select test values ​​for each element: perform data sampling, use the equivalence class partitioning method and boundary value analysis method in black box testing theory to model the element values ​​and discretize the sampling points;

[0071] S3. Based on the test value of each selected element, a step search is used to generate combined test data, and the test data covers all test value combinations of any p elements, 1≤p≤k;

[0072] S4. Randomly select 10% of the test data from the generated combined test data for testing, where the 10% of the test data is the small sample test data. Send the small sample test data to the component under test through the serial port, and collect the test response results of the component under test through the serial port.

[0073] S5. Based on the test response results, extract fault-sensitive combinations and calculate fault degrees;

[0074] S6. Establish a wide-core convolutional neural network model including a wide-core convolutional layer to extract fault features;

[0075] S7. The wide-core convolutional neural network model is used to perform coarse priority sorting on the test data during the operation of the UAV system, and then fine priority sorting is performed on it by fault-sensitive matching to complete the priority assignment of the test data.

[0076] In S1, in the UAV system, each component communicates in real time through a data frame protocol, and a data protocol frame is a data unit encapsulated by the data frame protocol;

[0077] The element name describes the characteristics and properties of each element, including frame header, frame length, frame identifier, element 1-element k, spare, frame count and checksum, where the first two elements are the frame header, which is used to describe the unique starting information of this data protocol frame; the frame length is used to identify the total length of the data protocol frame; the frame identifier identifies the uniqueness of the data protocol frame; element 1-element k are physical quantities with practical significance; the frame count records the number of frames of the data protocol frame starting from 1; the checksum is used to check the data protocol frame;

[0078] The value range describes the actual value range of each element, and this priority test method generates test data for each element based on it;

[0079] Resolution indicates the actual physical resolution of the element, that is, the physical meaning when the element value is "1";

[0080] The data type indicates the variable type of the element in physical memory, where UINT8 indicates unsigned 8-bit integer data, UINT16 indicates unsigned 16-bit integer data, UINT32 indicates unsigned 32-bit integer data, and INT16 indicates signed 16-bit integer data;

[0081] The word length corresponds to the data type one by one. Once the data type is parsed, the word length is automatically assigned.

[0082] The data protocol frame parsing process is to parse the elements one by one by the priority test method, and then store and display them after parsing. An exemplary data protocol frame is shown in Table 1, and the serial numbers in Table 1 are optional description information and are not required.

[0083] Table 1 Data protocol frame example

[0084]

[0085] In S2, the equivalence class division method is used to design five equivalence classes, namely, upper limit equivalence class, median equivalence class, lower limit equivalence class, out-of-bounds equivalence class, and limit equivalence class;

[0086] For the upper limit equivalence class, median equivalence class, and lower limit equivalence class, in addition to selecting the upper limit, median, and lower limit, "upper limit +", "upper limit -", "median value +", "median value -", "lower limit +", and "lower limit -" are selected according to the boundary value analysis method;

[0087] For the out-of-bounds equivalence class, only "upper out-of-bounds" and "lower out-of-bounds" are selected, and similarly for the limit equivalence class, "upper limit" and "lower limit" are selected;

[0088] When selecting a test value for each element, the upper and lower limits of the element test value in the data protocol frame are the limits of its valid range. The valid interval is set as the difference between the upper and lower limits, and the median is the midpoint of the valid interval; "upper limit +" is equal to the upper limit plus 20% of the valid interval, and "upper limit -" is equal to the upper limit minus 20% of the valid interval; the same applies to the lower limit and the median; "upper limit" is selected as half of the sum of the upper limit and the upper limit +, and "lower limit" is selected as half of the sum of the lower limit and the lower limit -; for the limit value, the word length corresponding to the element in the data protocol frame is used to represent it, and the limit value is the maximum positive number or the minimum negative number corresponding to the element word length. Figure 2 As shown, for all values, the values ​​from the lower limit to the upper limit are valid values, the values ​​from the upper limit + to the upper limit are upper invalid values, and the values ​​from the lower limit to the lower limit - are lower invalid values.

[0089] In S2, when selecting a test value for each element, further selecting other test values ​​for each element by single value addition, multi-value step addition, random addition or function addition;

[0090] Among them, when adding multiple values ​​in steps, set the initial value, end value and step value; when adding randomly, set the random range; when adding functions, set the function expression, value range and step value. It supports single function expressions such as common exponential / logarithmic, polynomial, trigonometric functions, and combinations of multiple function expressions.

[0091] In S3, the number of elements is k, and each element has n i For element i, its test value set v i Expressed as , where 1≤i≤k, That is, the test values ​​corresponding to element i;

[0092] Use step search to generate combined test data. The steps are as follows:

[0093] S31, randomly generate M vectors, denoted as , where 1≤j≤M; The dimension is k, each dimension corresponds to v i A test value randomly selected from ;

[0094] S32, select The vector with the largest fitness value is recorded as ; The fitness value is defined as the number of uncovered test value combinations that cover any p elements;

[0095] Here, to make it easier to understand "the number of uncovered test value combinations that cover any p elements", an example is given below: suppose a function accepts 5 parameters, each with 3 possible values ​​(such as small / medium / large). Then, there are a total of 35=24335=243 different combinations of parameter values. If 200 of these combinations have been covered in the test, then the number of uncovered test value combinations that cover any p elements is the number of combinations of p parameters randomly selected from the remaining 43 combinations.

[0096] S33, perform iterative update, generate a random number q in [0, 1], if q>0.15, update according to formula (1):

[0097] (1);

[0098] In the formula, , are respectively the tth and t+1th iterations , is the tth iteration , C j is a random number between [0, 1], so that Towards Direction search;

[0099] If q≤0.15, update according to formula (2):

[0100] (2);

[0101] In the formula, is a random vector at the tth iteration;

[0102] After updating, from Select the vector with the largest fitness value as ;

[0103] S34, execute the iterative update of S33 Z times, and then update the Output as a combined test data;

[0104] S35, re-execute S31-S34 until all test value combinations of any p elements in all data protocol frames have been covered by an output combined test data. The value of M is 50, and the value of Z is 800.

[0105] In S4, an exemplary serial communication protocol parameter is shown in Table 2.

[0106] Table 2 Serial communication protocol parameter examples

[0107]

[0108] In S5, the steps of extracting fault sensitive combinations and calculating fault degrees are as follows:

[0109] S51, assuming that the test data set P is a test data set that does not cause the failure of the component to be tested, and the test data set Q is a test data set that causes the failure of the component to be tested; that is, , x represents a test data in P, which does not test the fault of the unit under test UUT, indicating true; , y represents a test data in Q, which tests the failure of the component under test, which is expressed as false;

[0110] S52, assume that there are b combinations of elements that cause failure of the component under test during actual operation, extract all value combinations of any b elements in Q, and set is a test value combination of elements of length b, where and are not equal to each other, indicating that d b Each data in comes from a different element, then all the test value combinations of length b in Q Expressed as ;

[0111] Similarly, all test value combinations of length b in P Expressed as ;

[0112] S53, due to the failure of the component under test bFrom Q, not from P, remember and , is the total d that causes the failure of the component under test b A collection of is any test data in P and ≠x;

[0113] S54, from Extract the test value involved in the i-th element, expressed as , 1≤i≤k, for The combined test values ​​of all the i-th elements contained in Indicates the test value containing the i-th element For i ;

[0114] S55. Definition H i is the health value of the test value involved in the i-th element, expressed as ; is the corresponding test value s i The health value is expressed as:

[0115] (3);

[0116] In the formula, Indicates i In the D b The number of times it appears in It is the sum of the combined test data; the smaller the health value, the lower the probability of causing a failure, otherwise the greater the probability of causing a failure;

[0117] S56. For any s of any element i i , its test value includes two types, one is appearing in The health value in the test value is greater than 0, and the other is not The health value in is equal to the test value of 0, at this time:

[0118] (4);

[0119] S57. Expand the dimension of b elements to k, that is, , the corresponding test value on dimension i comes from the i-th element, d k Health value The sum of the health values ​​in each dimension is expressed as:

[0120] (5);

[0121] In the formula, That is, the health value of the test value corresponding to dimension i, d k That is, a combination of element test values ​​of length k.

[0122] like Figure 3 As shown in Figure S6, the wide-core convolutional neural network model includes 10 layers. The first layer is 4 wide-core convolutional layers, the second layer is a concatenation layer, which concatenates the outputs from the 4 wide-core convolutional layers, the third layer is a convolutional layer, the fourth layer is a maximum pooling layer, the fifth layer is a convolutional layer, the sixth layer is a maximum pooling layer, the seventh layer is a convolutional layer, the eighth layer is a maximum pooling layer, the ninth layer is a flattening layer, and the tenth layer is a fully connected layer.

[0123] The input of the wide kernel convolutional neural network model is d k The output is a classification value, which corresponds to the two types of whether the fault will occur. The lengths (K) of the kernel functions of the four wide kernel convolutional layers are k-b+1, kb-1, kb-3 and kb-5, respectively, where kb-5 is greater than 0.

[0124] In S7, the specific process of completing the priority assignment of the test data is that the remaining 90% of the test data is used for secondary testing, and each test data first passes through the wide-core convolutional neural network model to obtain an identification of whether it will cause a fault. According to the identification, the priority of the test data that will cause the failure of the component to be tested is higher than the priority of the test data that will not cause the failure of the component to be tested. Thus, the test data is divided into two parts, one with high priority and the other with low priority;

[0125] Furthermore, for the two parts of test data, the health value of each test data is calculated separately, that is, sensitive matching is performed. After that, the high priority part is given priority from large to small according to the health value of each test data, and the low priority part is also given priority from large to small according to the health value of each test data, but the priority of the high priority part is always greater than that of the low priority part;

[0126] At this point, the priorities of all test data are assigned. During testing, the test is performed based on the priority level to ensure that the most faults of the components under test are discovered using the least test data.

[0127] The wide-core convolutional neural network model and the wide-core convolutional layer therein in this embodiment are further described as follows:

[0128] The width of the kernel function of the convolution layer of the traditional convolutional neural network is generally a typical value of 3, 5, 7, etc., which is less than 10. The present invention proposes to use a value with a width close to the length of the test data for feature extraction. The principle of the wide kernel convolution layer is as follows Figure 4 As shown, the test data is d k, there are a total of k elements. Given that the combination of elements that cause the fault may be any b, that is, the test data combination of these b elements constitutes a feature. In order to fully extract such features, the width of the kernel function needs to be set to be large enough to extract the feature of its combination in one convolution operation. If the test data is a test data combination covering any b elements, the length of the kernel function is k-b+1, which ensures that the number of remaining elements is less than b, and the feature is extracted as much as possible. Each convolution operation is performed by convolution operation of a convolution kernel with a length of k-b+1 and test data of the same length to obtain a convolution result. After the translation operation during the convolution layer calculation, the convolution kernel is sequentially convolved with the adjacent k-b+1 values ​​in the test data, and finally the output value after b convolution operations is obtained.

[0129] In order to fully extract features, the present invention proposes a wide-core convolutional neural network model. Since the length of the vector output by a single wide-core convolutional layer is a very small value, it is impossible to perform multi-layer convolution feature extraction. Therefore, the length of the output vector is first widened through multiple wide-core convolutional layers. Figure 3 As shown, for each test value d of the input k First, let it pass through four separate wide-core convolutional layers. The output vectors of these four wide-core convolutional layers are very short, and the length of the output vector is made appropriate by splicing. Then it passes through three groups of convolutional layers and maximum pooling layers to further extract features. The kernel function lengths of these three convolutional layers are common values ​​(the values ​​in the figure are b, 3, and 2). Finally, it passes through the flattening and fully connected layers to output a classification value, which corresponds to the two types of whether it will cause a fault.

Claims

1. UAV system priority testing method under small sample priority testing, characterized by The following steps are involved: S1. For the components to be tested in the UAV system, the data protocol frames received by the components to be tested from other components are read and parsed; each data protocol frame contains 6 kinds of description information, namely element name, value range, resolution, unit, data type and word length, where the element name contains element 1 to element k; element 1 to element k are physical quantities with practical significance that cause the failure of the components to be tested; the resolution represents the actual physical resolution of the element, that is, the physical meaning represented when the element value is "1"; S2. Select test values ​​for each element: perform data sampling, use the equivalence class partitioning method and boundary value analysis method in black box testing theory to model the element values ​​and discretize the sampling points; S3. Based on the test value of each selected element, a step search is used to generate combined test data, and the test data covers all test value combinations of any p elements, 1≤p≤k; S4. Randomly select 10% of the test data from the generated combined test data for testing, where the 10% of the test data is the small sample test data. Send the small sample test data to the component under test through the serial port, and collect the test response results of the component under test through the serial port. S5. Based on the test response results, fault-sensitive combination extraction and health value calculation are performed; S6. Establish a wide-core convolutional neural network model including a wide-core convolutional layer to extract fault features. The input of the wide-core convolutional neural network model is d k , the output is a classification value, which corresponds to the two types of whether it will cause a fault; S7. The test data of the UAV system during operation is roughly prioritized by the wide-core convolutional neural network model, and then finely prioritized by fault-sensitive matching to complete the priority assignment of the test data; the coarse priority is performed based on the output of the wide-core convolutional neural network model, and fault-sensitive matching refers to calculating the health value of each test data and sorting it; In the above S5, the steps of extracting the fault sensitive combination and calculating the health value are as follows: S51, assuming that the test data set P is a test data set that does not cause the failure of the component to be tested, and the test data set Q is a test data set that causes the failure of the component to be tested; that is, , x represents a test data in P, which does not test the fault of the unit under test UUT, indicating true; , y represents a test data in Q, which tests the failure of the component under test, which is expressed as false; S52, assume that there are b combinations of elements that cause failure of the component under test during actual operation, extract all value combinations of any b elements in Q, and set is a test value combination of elements of length b, where and are not equal to each other, indicating that d b Each data in comes from a different element, then all the test value combinations of length b in Q Expressed as ; Similarly, all test value combinations of length b in P Expressed as ; S53, due to the failure of the component under test b From Q, not from P, remember and , is the total d that causes the failure of the component under test b A collection of is any test data in P and ≠x; S54, from Extract the test value involved in the i-th element, expressed as , 1≤i≤k, for The combined test values ​​of all the i-th elements contained in Indicates the test value containing the i-th element For i ; S55. Definition H i is the health value of the test value involved in the i-th element, expressed as ; is the corresponding test value s i The health value is expressed as: (3); In the formula, Indicates i In the D b The number of times it appears in is the sum of the combined test data; S56. For any s of any element i i , its test value includes two types, one is appearing in The health value in the test value is greater than 0, and the other is not The health value in is equal to the test value of 0, at this time: (4); S57. Expand the dimension of b elements to k, that is, , the corresponding test value on dimension i comes from the i-th element, d k Health value The sum of the health values ​​in each dimension is expressed as: (5); In the formula, That is, the health value of the test value corresponding to dimension i, d k That is, a combination of element test values ​​of length k.

2. The UAV system priority testing method under the small sample priority test according to claim 1 is characterized by: In the above S1, in the UAV system, each component communicates in real time through a data frame protocol, and the data protocol frame is a data unit encapsulated by the data frame protocol; The element name describes the characteristics and properties of each element, including frame header, frame length, frame identifier, element 1-element k, spare, frame count and checksum, where the first two elements are the frame header, which is used to describe the unique starting information of this data protocol frame; the frame length is used to identify the total length of the data protocol frame; the frame identifier identifies the uniqueness of the data protocol frame; element 1-element k are physical quantities with practical significance; the frame count records the number of frames of the data protocol frame starting from 1; Checksum is used for checking data protocol frames; The value range describes the actual value range of each element; Resolution indicates the actual physical resolution of the element, that is, the physical meaning when the element value is "1"; The data type indicates the variable type of the element in physical memory, where UINT8 indicates unsigned 8-bit integer data, UINT16 indicates unsigned 16-bit integer data, UINT32 indicates unsigned 32-bit integer data, and INT16 indicates signed 16-bit integer data; The word length corresponds to the data type one by one. Once the data type is parsed, the word length is automatically assigned.

3. The UAV system priority testing method under small sample priority testing according to claim 1 is characterized in that: In the above S2, 5 equivalence classes are designed by using the equivalence class division method, namely, upper limit equivalence class, median equivalence class, lower limit equivalence class, out-of-bounds equivalence class and limit equivalence class; For the upper limit equivalence class, median equivalence class, and lower limit equivalence class, in addition to selecting the upper limit, median, and lower limit, "upper limit +", "upper limit -", "median value +", "median value -", "lower limit +", and "lower limit -" are selected according to the boundary value analysis method; For the out-of-bounds equivalence class, only "upper out-of-bounds" and "lower out-of-bounds" are selected, and similarly for the limit equivalence class, "upper limit" and "lower limit" are selected; When selecting a test value for each element, the upper and lower limits of the element test value in the data protocol frame are the valid range limits. The valid interval is set as the difference between the upper limit and the lower limit, and the median is the midpoint of the valid interval; "upper limit +" is equal to the upper limit plus 20% of the valid interval, and "upper limit -" is equal to the upper limit minus 20% of the valid interval; the same applies to the lower limit and the median; "upper limit" is selected as half of the sum of the upper limit and the upper limit +, and "lower limit" is selected as half of the sum of the lower limit and the lower limit -; for the limit value, the word length corresponding to the element in the data protocol frame is used to represent it, and the limit value is the maximum positive number or the minimum negative number corresponding to the element word length.

4. The UAV system priority testing method under the small sample priority test according to claim 3 is characterized in that: In the above S2, when selecting a test value for each element, further selecting other test values ​​for each element by single value addition, multi-value stepwise addition, random addition or function addition; When adding multiple values ​​in steps, set the initial value, end value and step value; when adding randomly, set the random range; when adding functions, set the function expression, value range and step value.

5. The UAV system priority testing method under small sample priority testing according to claim 1 is characterized in that: In S3, the number of elements is k, and each element has n i For element i, its test value set v i Expressed as , where 1≤i≤k, That is, the test values ​​corresponding to element i; Use step search to generate combined test data. The steps are as follows: S31, randomly generate M vectors, denoted as , where 1≤j≤M; The dimension is k, each dimension corresponds to v i A test value randomly selected from ; S32, select The vector with the largest fitness value is recorded as ; The fitness value is defined as the number of uncovered test value combinations that cover any p elements; S33, perform iterative update, generate a random number q in [0, 1], if q>0.15, update according to formula (1): (1); In the formula, , are respectively the tth and t+1th iterations , is the tth iteration , C j is a random number between [0, 1], so that Towards Direction search; If q≤0.15, update according to formula (2): (2); In the formula, is a random vector at the tth iteration; After updating, from Select the vector with the largest fitness value as ; S34, execute the iterative update of S33 Z times, and then update the Output as a combined test data; S35. Re-execute S31-S34 until all test value combinations of any p elements in all data protocol frames have been covered by an output combined test data.

6. The UAV system priority testing method under small sample priority testing according to claim 5 is characterized in that: The value of M is 50 and the value of Z is 800.

7. The UAV system priority testing method under small sample priority testing according to claim 1 is characterized in that: In the S6, the wide core convolutional neural network model includes 10 layers, the first layer is 4 wide core convolutional layers, the second layer is a splicing layer, splicing the outputs from the 4 wide core convolutional layers, the third layer is a convolutional layer, the fourth layer is a maximum pooling layer, the fifth layer is a convolutional layer, the sixth layer is a maximum pooling layer, the seventh layer is a convolutional layer, the eighth layer is a maximum pooling layer, the ninth layer is a flattening layer, and the tenth layer is a fully connected layer.

8. The method for testing the priority of UAV systems under the small sample priority test according to claim 7 is characterized in that: The lengths of the kernel functions of the four wide kernel convolutional layers are k-b+1, kb-1, kb-3 and kb-5, respectively, where kb-5 is greater than 0.

9. The UAV system priority testing method under small sample priority testing according to claim 1 is characterized in that: In the above S7, the specific process of assigning the priority of the test data is as follows: the remaining 90% of the test data is used for secondary testing, each test data first passes through the wide-core convolutional neural network model to obtain an identification of whether it will cause a fault, and according to the identification, the priority of the test data that will cause the fault of the component to be tested is higher than the priority of the test data that will not cause the fault of the component to be tested, thereby dividing the test data into two parts, one with high priority and the other with low priority; Furthermore, for the two parts of test data, the health value of each test data is calculated separately, that is, sensitive matching is performed. After that, the high priority part is given priority from large to small according to the health value of each test data, and the low priority part is also given priority from large to small according to the health value of each test data, but the priority of the high priority part is always greater than that of the low priority part; At this point, the priorities of all test data are assigned. During testing, the test is performed based on the priority level to ensure that the most faults of the components under test are discovered using the least test data.

Citation Information

Patent Citations

  • Embedded software test method based on combinatorial test

    CN103279415A

  • Industrial communication protocol test case priority ranking method based on multiple targets

    CN114448911A