Method and system for generating autonomous accompanying test case

By analyzing the initial scene population using the fitness proxy model, the autonomous companion test cases are generated, which solves the problems of high testing costs and poor coverage in the existing technology, and improves the comprehensiveness and effectiveness of the test.

CN120045453AActive Publication Date: 2025-05-27WUHAN UNIV OF TECH
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510028123.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-05-27
Estimated Expiration
2045-01-08

AI Technical Summary

Technical Problem

The existing technology relies on actual sea trial experiments to test the ship's autonomous navigation function, which is expensive and difficult to cover all possible situations, and the comprehensiveness and effectiveness of the test are not good.

Method used

By obtaining the initial scene population and scene element data of the trained fitness agent model, autonomous companion scenario, the scene element fitness data output from the fitness agent model is used to perform population optimal solution analysis on the initial scene population and generate target test cases.

Benefits of technology

It improves the comprehensiveness and effectiveness of ship autonomous navigation testing, reduces testing costs, and can generate more challenging test cases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045453A_ABST
    Figure CN120045453A_ABST
Patent Text Reader

Abstract

The invention discloses an autonomous accompanying test case generation method and system, and the method comprises the steps: obtaining a trained fitness agent model, an initial scene population of an autonomous accompanying scene, and scene element data corresponding to the initial scene population; inputting the scene element data into the trained fitness agent model for fitness prediction to obtain scene element fitness data output by the trained fitness agent model, the scene element fitness data comprising a plurality of intermediate element fitness; performing population optimal solution analysis on the initial scene population according to the fitness of all the intermediate elements to obtain a target optimal solution set; and performing test case generation on the target optimal solution set to obtain a target test case of the autonomous accompanying scene. The method can provide an autonomous accompanying test case, and the autonomous accompanying test case can effectively improve the comprehensiveness and effect of the ship autonomous accompanying test and reduce the test cost. The invention relates to the technical field of intelligent ships.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent ships, and in particular to a method and system for generating test cases for autonomous escorting. Background Art

[0002] The autonomous escort function of a ship refers to the ability of the escort system to autonomously identify a target and control the ship to approach or follow the target until it safely berths alongside the target. In order to verify the effectiveness and reliability of the autonomous escort function, the testing of the ship's autonomous escort function has become one of the key concerns.

[0003] Currently, the prior art usually relies on the actual sea trial experiment of the ship to test the autonomous escort function of the ship. This method requires relatively high costs and it is difficult to cover all possible situations, resulting in poor comprehensiveness and effectiveness of the testing.

[0004] Therefore, the problems existing in the prior art still need to be solved and optimized urgently. Summary of the Invention

[0005] The purpose of the present invention is to solve at least to a certain extent one of the technical problems existing in the related art.

[0006] To this end, an object of an embodiment of the present invention is to provide a method, system, device and medium for generating test cases for autonomous escorting. Among them, the method can provide a test case for autonomous escorting, which can effectively improve the comprehensiveness and effectiveness of the ship's autonomous escort test and reduce the test cost.

[0007] In order to achieve the above technical purpose, the technical solutions adopted in the embodiments of the present application include:

[0008] In the first aspect, the embodiments of the present application provide a method for generating test cases for autonomous escorting, including:

[0009] Obtaining a trained fitness proxy model, an initial scenario population of the autonomous escort scenario, and scenario element data corresponding to the initial scenario population;

[0010] Inputting the scenario element data into the trained fitness proxy model for fitness prediction to obtain scenario element fitness data output by the trained fitness proxy model. The scenario element fitness data includes a number of intermediate element fitnesses, and each intermediate element fitness is the scenario element fitness of the corresponding population individual in the initial scenario population;

[0011] Performing population optimal solution analysis on the initial scenario population according to all the intermediate element fitnesses to obtain a target optimal solution set;

[0012] Generate test cases for the target optimal solution set to obtain the target test cases for the autonomous escort scenario.

[0013] In addition, according to the method of the above embodiments of the present application, the following additional technical features may also be included:

[0014] Further, in an embodiment of the present application, the obtaining of the trained fitness surrogate model includes:

[0015] Obtain the set of composition element ranges and the preset element combination intensity of the autonomous escort scenario, as well as the first element fitness function corresponding to the set of composition element ranges;

[0016] According to the element combination intensity, perform element combination on the set of composition element ranges to obtain a basic scenario data set;

[0017] According to the first element fitness function, perform test simulation on the basic scenario data set to obtain an element fitness data set corresponding to the basic scenario data set;

[0018] According to the basic scenario data set and the element fitness data set, perform model training on the initialized fitness surrogate model to obtain the trained fitness model.

[0019] Further, in an embodiment of the present application, the performing of population optimal solution analysis on the initial scenario population according to all the intermediate element fitnesses to obtain the target optimal solution set includes:

[0020] According to all the intermediate element fitnesses, perform individual rank classification on each population individual in the initial scenario population to obtain an individual rank corresponding to each population individual;

[0021] According to all the individual ranks, perform individual position update on the initial scenario population to obtain a first intermediate scenario population;

[0022] According to the initial scenario population, perform population merging analysis on the first intermediate scenario population to obtain a second intermediate scenario population and the population fitness data of the second intermediate scenario population;

[0023] According to the population fitness data, perform sorting analysis on the second intermediate scenario population to obtain the target optimal solution set.

[0024] Further, in an embodiment of the present application, the performing of individual rank classification on each population individual in the initial scenario population according to all the intermediate element fitnesses to obtain an individual rank corresponding to each population individual includes:

[0025] Obtain a preset domination count threshold;

[0026] Obtain a number of intermediate individuals and the current individual level, where the intermediate individuals are unclassified population individuals in the initial scenario population corresponding to the current individual level;

[0027] Perform domination classification on all the intermediate individuals according to all the intermediate element fitnesses to obtain a domination count corresponding to each intermediate individual;

[0028] Perform threshold comparison on all the domination counts according to the domination count threshold to obtain a first threshold comparison result corresponding to each intermediate individual;

[0029] If the first threshold comparison result is that the domination count is less than or equal to the domination count threshold, then determine the current individual level as the individual level of the intermediate individual corresponding to the first threshold comparison result.

[0030] Further, in an embodiment of the present application, the updating the individual positions of the initial scenario population according to all the individual levels to obtain a first intermediate scenario population includes:

[0031] Obtain a preset search dynamic threshold;

[0032] Perform individual screening on the initial scenario population according to all the individual levels to obtain an individual intermediate set corresponding to each individual level;

[0033] Calculate the crowding distance for all the individual intermediate sets to obtain a target crowding distance corresponding to each individual intermediate set;

[0034] Generate a position update vector for all the target crowding distances according to the search dynamic threshold to obtain a target update vector corresponding to each target crowding distance;

[0035] Perform position movement update on the initial scenario population according to all the target update vectors to obtain the first intermediate scenario population.

[0036] Further, in an embodiment of the present application, generating a position update vector for the target crowding distance according to the search dynamic threshold to obtain a target update vector corresponding to the target crowding distance includes:

[0037] Obtain a first random number;

[0038] Compare the search dynamic threshold and the first random number to obtain a second threshold comparison result;

[0039] If the second threshold comparison result is that the first random number is greater than the search dynamic threshold, globally update the target crowding distance to obtain the target update vector; or, if the second threshold comparison result is that the first random number is less than or equal to the search dynamic threshold, locally update the target crowding distance to obtain the target update vector.

[0040] Further, in an embodiment of the present application, the globally updating the target crowding distance to obtain the target update vector includes:

[0041] Obtain a second random number and a preset first search optimization threshold;

[0042] Compare the second random number with the first search optimization threshold to obtain a third threshold comparison result;

[0043] If the third threshold comparison result is that the second random number is greater than the first search optimization threshold, update the target crowding distance by position vector division to obtain the target update vector; or, if the third threshold comparison result is that the second random number is less than or equal to the first search optimization threshold, update the target crowding distance by position vector multiplication to obtain the target update vector;

[0044] The locally updating the target crowding distance to obtain the target update vector includes:

[0045] Obtain a third random number and a preset second search optimization threshold;

[0046] Compare the third random number with the second search optimization threshold to obtain a fourth threshold comparison result;

[0047] If the fourth threshold comparison result is that the third random number is greater than the second search optimization threshold, update the target crowding distance by position vector subtraction to obtain the target update vector; or, if the fourth threshold comparison result is that the third random number is less than or equal to the second search optimization threshold, update the target crowding distance by position vector addition to obtain the target update vector.

[0048] Further, in an embodiment of the present application, the performing population merging analysis on the first intermediate scenario population according to the initial scenario population to obtain a second intermediate scenario population and the population fitness data of the second intermediate scenario population includes:

[0049] Obtain a second factor fitness function;

[0050] Merge the population of the first intermediate scenario population according to the initial scenario population to obtain the second intermediate scenario population;

[0051] Perform individual fitness analysis on the second intermediate scenario population according to the second factor fitness function to obtain the population fitness data.

[0052] Further, in an embodiment of the present application, the sorting analysis of the second intermediate scenario population according to the population fitness data to obtain the target optimal solution set includes:

[0053] Obtain a preset population optimization threshold, archive threshold, and individual threshold;

[0054] Obtain the current population optimization round and the first intermediate optimal solution data set corresponding to the current population optimization round;

[0055] Perform individual ranking on the second intermediate scenario population according to the population fitness data to obtain a number of individual ranking sets, and the individual ranks corresponding to each individual ranking set are different;

[0056] Perform the first optimal solution update on the first intermediate optimal solution data set according to the archive threshold and all the individual ranking sets to obtain the second intermediate optimal solution data set;

[0057] Compare the current population optimization round with the population optimization threshold to obtain the fifth threshold comparison result;

[0058] If the fifth threshold comparison result is that the current population optimization round is less than the population optimization threshold, then update the round of the current population optimization round, update the first intermediate optimal solution data set according to the second intermediate optimal solution data set, and update the initial scenario population according to the individual threshold and the second intermediate optimal solution data set, and then return to execute the step of obtaining the initial scenario population of the autonomous escort scenario and the scenario element data corresponding to the initial scenario population; or, if the fifth threshold comparison result is that the current population optimization round is greater than or equal to the population optimization threshold, then determine the second intermediate optimal solution data set as the target optimal solution set.

[0059] Second, an embodiment of the present application provides a generation system for autonomous escort test cases, including:

[0060] A first processing unit for obtaining a trained fitness proxy model, an initial scenario population of an autonomous escort scenario, and scenario element data corresponding to the initial scenario population;

[0061] A second processing unit, configured to input the scene element data into the trained fitness surrogate model for fitness prediction, so as to obtain scene element fitness data output by the trained fitness surrogate model, where the scene element fitness data includes a plurality of intermediate element fitnesses, and each intermediate element fitness is the scene element fitness of the corresponding population individual in the initial scene population;

[0062] A third processing unit, configured to perform population optimal solution analysis on the initial scene population according to all the intermediate element fitnesses to obtain a target optimal solution set;

[0063] A fourth processing unit, configured to generate test cases for the target optimal solution set to obtain target test cases for the autonomous escort scene.

[0064] In a third aspect, an embodiment of the present application further provides an electronic device, including:

[0065] At least one processor;

[0066] At least one memory, configured to store at least one program;

[0067] When the at least one program is executed by the at least one processor, the at least one processor implements the method in the first aspect above.

[0068] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, in which a program executable by a processor is stored, and the program executable by the processor is used to implement the method in the first aspect above when executed by the processor.

[0069] The advantages and beneficial effects of the present application will be partially given in the following description, partially become obvious from the following description, or be understood through the practice of the present application:

[0070] A method and system for generating test cases for autonomous escort, in which the method obtains a trained fitness surrogate model, an initial scenario population of an autonomous escort scenario, and scenario element data corresponding to the initial scenario population; inputs the scenario element data into the trained fitness surrogate model for fitness prediction to obtain scenario element fitness data output by the trained fitness surrogate model, where the scenario element fitness data includes a number of intermediate element fitnesses, and each intermediate element fitness is the scenario element fitness of the corresponding population individual in the initial scenario population; performs population optimal solution analysis on the initial scenario population according to all the intermediate element fitnesses to obtain a target optimal solution set; and generates test cases from the target optimal solution set to obtain the target test cases of the autonomous escort scenario. Based on the scenario element fitness data output by the fitness surrogate model, the method performs population optimal solution analysis on the initial scenario population, which can generate more challenging test cases for autonomous escort, thereby increasing the number of complex test scenarios that the ship's autonomous escort function can encounter, facilitating improving the comprehensiveness and effectiveness of autonomous escort testing, and reducing the cost of autonomous escort testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following introduces the relevant technical solution drawings in the embodiments of the present application or the prior art. It should be understood that the drawings introduced below are only for conveniently and clearly expressing some embodiments of the technical solutions in the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative efforts.

[0072] Figure 1 It is a schematic flowchart of a method for generating test cases for autonomous escort provided by an embodiment of the present application;

[0073] Figure 2 It is a schematic framework diagram of a system for generating test cases for autonomous escort provided by an embodiment of the present application;

[0074] Figure 3 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0075] Embodiments of the present application will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary and are only used to explain the present application and should not be construed as a limitation of the present application. For the step numbers in the following embodiments, they are only set for the convenience of explanation and illustration, and no limitation is imposed on the order between the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.

[0076] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0077] Currently, the prior art usually relies on the actual sea trial experiment of ships to test the ship's autonomous escort function. This method requires relatively high costs and it is difficult to cover all possible situations, resulting in poor comprehensiveness and effectiveness of the test.

[0078] In view of this, embodiments of the present invention provide a method and system for generating test cases for autonomous escort. Among them, the method performs an analysis of the optimal solution of the population on the initial scenario population based on the scenario element fitness data output by the fitness proxy model. Specifically, by classifying the individual levels, updating the individual positions, and performing sorting analysis on each population individual in the initial scenario population, it helps to generate test cases for different optimized configurations of the ship's autonomous escort function, thereby increasing the number of complex test scenarios that the ship's autonomous escort function can encounter, being conducive to improving the comprehensiveness and effectiveness of the autonomous escort test, and reducing the cost of the autonomous escort test.

[0079] Referring to Figure 1 , in the embodiments of the present application, a method for generating test cases for autonomous escort includes:

[0080] Step 110, obtaining a trained fitness proxy model, an initial scenario population of the autonomous escort scenario, and scenario element data corresponding to the initial scenario population;

[0081] In the embodiments of the present application, the fitness proxy model is used to predict and analyze the fitness value of the scenario element data; the autonomous escort scenario can be an escort scenario such as a tugboat; each population individual in the initial scenario population corresponds to a specific autonomous escort test scenario; the scenario element data is a set of multiple individual element data, and each individual element data is used to characterize the scenario parameters of the corresponding population individual.

[0082] Specifically, in the embodiment of the present application, taking the autonomous escort scenario where a tugboat realizes autonomous escort for a target ship as an example, for the individual element data, it includes the relative azimuth θ element data between the tugboat and the target ship, the relative distance D element data between the tugboat and the target ship, the relative course H element data between the tugboat and the target ship, the target ship speed V 1 element data, the tugboat speed V 2 element data, and the environmental element E data.

[0083] It can be understood that for different population individuals in the initial scenario population, the corresponding individual element data is also different. Specifically, it can be the relative azimuth θ, relative distance D, relative course H, target ship speed V 1 , tugboat speed V 2 and the environmental element E, etc. The specific data of at least one of the element data is different. For example, population individual a and population individual b are different population individuals, and the difference in their corresponding element data can be only the difference in the specific azimuth element data of the relative azimuth θ, or there can be differences in multiple element data such as the relative azimuth θ and relative distance D. The examples in the present application are only for illustration and do not limit the present application.

[0084] In some embodiments, step 110, obtaining the trained fitness surrogate model, includes:

[0085] A1. Obtaining the set of composition element ranges of the autonomous escort scenario, the preset element combination intensity, and the first element fitness function corresponding to the set of composition element ranges;

[0086] A2. According to the element combination intensity, performing element combination on the set of composition element ranges to obtain the basic scenario data set;

[0087] A3. According to the first element fitness function, performing test simulation on the basic scenario data set to obtain the element fitness data set corresponding to the basic scenario data set;

[0088] A4. According to the basic scenario data set and the element fitness data set, performing model training on the initialized fitness surrogate model to obtain the trained fitness model.

[0089] In the embodiment of the present application, the set of composition element ranges can be the set of element ranges of the aforementioned individual element data. Specifically, for the relative azimuth θ element data, its element value range is 0 to 360°; for the relative distance D element data, its element value range is 1 to 3 nautical miles; for the relative course H element data, its element value range is 0 to 360°; the target ship speed V 1 element data has an element value range of 6 to 8 knots, and the tugboat speed V 2The element value range of the element data is from 4 to 12 sections, and the element value range of the environmental element E is sea state levels 2 - 7. The specific range examples of various types of element data in this application are only for illustration and do not limit this application. For example, the element value range of the environmental element E can also be sea state levels 1 - 4, the tugboat speed V 2 Any one of the element value ranges of the element data being from 2 to 7 sections, etc.

[0090] It can be understood that the element combination strength is used to indicate generating a scenario dataset composed of all possible combinations between several different types of element data, and the specific value of this element combination strength can be set according to the actual situation. Specifically, if the element combination strength is 6, it can indicate generating all possible combinations between the relative azimuth θ, relative distance D, relative course H, target ship speed V 1 and the tugboat speed V 2 and the environmental elements. The first element fitness function obtains the scenario complexity of each scenario data, and this first element fitness function can include at least one of the cumulative course change fitness function, cumulative speed change fitness function, path length fitness function, task completion time fitness function, etc. For example, the first element fitness function can be the cumulative course change fitness function; or, the first element fitness function can be a combination of the cumulative course change fitness function and the cumulative speed change fitness function; or, the first element fitness function can be a combination of the cumulative course change fitness function, the cumulative speed change fitness function, the path length fitness function, and the task completion time fitness function.

[0091] Exemplarily, the cumulative course change fitness function can be expressed as:

[0092]

[0093] Where, is the fitness value of the cumulative course change; n is the total number of i; is the amplitude of the i-th course change;

[0094] The cumulative speed change fitness function can be expressed as:

[0095]

[0096] Where, V T is the fitness value of the cumulative speed change; ΔV i is the amplitude of the i-th speed change;

[0097] The path length fitness function can be expressed as:

[0098]

[0099] Among them, L is the path length fitness value; x i is the abscissa of the i-th path point on the escort path; x i-1 is the abscissa of the (i - 1)-th path point on the escort path; y i is the ordinate of the i-th path point on the escort path; y i-1 is the ordinate of the (i - 1)-th path point on the escort path;

[0100] The task completion time fitness function can be expressed as:

[0101] T = t end - t start

[0102] Among them, T is the task completion time fitness value; t end is the task end time of the tugboat's autonomous escort; t start is the task start time of the tugboat's autonomous escort.

[0103] It should be noted that the escort path in the embodiment of the present application can be the path taken by the tugboat to achieve the autonomous escort task of the target ship. Step A2 can first be to discretize the set of constituent element ranges to obtain an element discrete set. For example, the element value range of the relative azimuth θ can be discretized at an angle of 60°, resulting in discrete elements of relative azimuth such as 0°, 60°, 120°, 180°, 240°, and 300°; or, the relative distance D can be discretized at 0.5 nautical miles, and the remaining relative course H, target ship speed V 1 , tugboat speed V 2 and environmental elements E can be simply analogized in a similar manner to the foregoing content. In addition, the embodiment of the present application does not limit the discretization conditions for the ranges of various types of elements. For example, the element value range of the relative azimuth θ can also be discretized at angles such as 5°, 10°, 20°, etc., and the element value range of the target ship speed V 1 can be discretized at speeds such as 1 knot, 1.5 knots, 2 knots, etc. This application will not elaborate further here.

[0104] It is worth mentioning that after obtaining the element discrete set, based on the element combination strength, a combination testing tool (Pairwise Independent Combinatorial Testing, PICT) can be used to obtain all the elements to be tested and the possible values of each type of element, thereby obtaining several possible combinations. Each possible combination can be used as the scenario parameters of a test scenario, and a basic scenario data set can be constructed based on all the test scenarios.

[0105] It should be noted that step A3 can be to traverse and test each test scenario in the basic scenario dataset based on the first factor fitness function, so as to obtain the fitness value corresponding to each test scenario, and construct a factor fitness dataset according to all the obtained fitness values. Moreover, the fitness proxy model in the embodiments of the present application can be a multi-layer perceptron (MLP) neural network, which includes an input layer, two hidden layers and an output layer. Among them, the input parameters of the input layer can be 6-dimensional variables including the relative azimuth, relative distance, relative heading of the tugboat and the target ship, the speed of the target ship, the speed of the tugboat, and environmental factors; and the output of the output layer can be the cumulative change in heading and the cumulative change in speed, or the cumulative change in heading, the cumulative change in speed, the path length, and the task completion time, etc. The examples of the present application are only for illustration.

[0106] It should be added that step A4 can be to input each test scenario in the basic scenario dataset into the input layer of the fitness proxy model respectively, and perform abstraction and feature extraction on each test scenario through two hidden layers containing a certain number of neurons. The number of neurons in the first hidden layer can be 128, and the number of neurons in the second hidden layer can be 64; then, by measuring the difference degree between the predicted result output by the output layer and the fitness value of each factor type corresponding in the factor fitness dataset, the target loss value is obtained, and based on the obtained target loss value, the parameters of the initial fitness proxy model are updated by backpropagation, so as to obtain the trained fitness proxy model.

[0107] In addition, the embodiments of the present application do not limit the loss function used to determine the target loss value. For example, the mean squared error (MSE) loss function can be used to determine it. Specifically, the fitness value of each factor type corresponding in the factor fitness dataset can be used as the true label value, the predicted result output by the output layer can be used as the predicted value, and then the target loss value is obtained based on the mean squared error between the true label value and the predicted value.

[0108] Step 120: Input the scenario factor data into the trained fitness proxy model for fitness prediction to obtain the scenario factor fitness data output by the trained fitness proxy model. The scenario factor fitness data includes several intermediate factor fitnesses, and each intermediate factor fitness is the scenario factor fitness of the corresponding population individual in the initial scenario population;

[0109] In the embodiments of the present application, step 120 can be to input the individual factor data of each population individual in the initial scenario population into the trained fitness proxy model respectively, predict the intermediate factor fitness corresponding to the individual factor data of each population individual through the trained fitness proxy model, and construct the scenario factor fitness data based on all the intermediate factor fitnesses.

[0110] Step 130: Perform population optimal solution analysis on the initial scenario population according to all the intermediate element fitnesses to obtain a target optimal solution set.

[0111] In an embodiment of the present application, based on each intermediate element fitness, fitness optimization analysis can be respectively performed on the corresponding population individuals in the initial scenario population, so as to implement population optimal solution analysis on the initial scenario population and obtain a target optimal solution set. The target optimal solution set includes the scenario parameters of multiple population individuals, and each population individual is regarded as one of the target optimal solutions in the target optimal solution set.

[0112] In some embodiments, Step 130: Perform population optimal solution analysis on the initial scenario population according to all the intermediate element fitnesses to obtain a target optimal solution set, includes:

[0113] B1: Classify each population individual in the initial scenario population according to all the intermediate element fitnesses to obtain an individual rank corresponding to each population individual.

[0114] Further, Step B1: Classify each population individual in the initial scenario population according to all the intermediate element fitnesses to obtain an individual rank corresponding to each population individual, includes:

[0115] B11: Obtain a preset threshold of the number of dominated individuals.

[0116] B12: Obtain a number of intermediate individuals and the current individual rank. The intermediate individuals are the unclassified population individuals in the initial scenario population corresponding to the current individual rank.

[0117] B13: Perform domination classification on all the intermediate individuals according to all the intermediate element fitnesses to obtain a domination count corresponding to each intermediate individual.

[0118] B14: Compare all the domination counts with the threshold according to the threshold of the number of dominated individuals to obtain a first threshold comparison result corresponding to each intermediate individual.

[0119] B15: If the first threshold comparison result is that the domination count is less than or equal to the threshold of the number of dominated individuals, then determine the current individual rank as the individual rank of the intermediate individual corresponding to the first threshold comparison result.

[0120] In the embodiments of the present application, based on all intermediate element fitnesses, individual ranking classification can be performed on each population individual in the initial scenario population through a cyclic iteration manner, so as to obtain the individual ranking corresponding to each population individual. Specifically, for the first ranking classification round in the cyclic iteration process, the intermediate individual can be the population individual of the initial scenario population, and the current individual ranking can be the first individual ranking, which is the highest individual ranking; for the second and subsequent ranking classification rounds in the cyclic iteration process, the intermediate individual can be the remaining unclassified population individuals in the initial scenario population, and the current individual ranking is the individual ranking corresponding to the ranking classification round. For example, in the third ranking classification round, the current individual ranking is the third individual ranking; or, in the fifth ranking classification round, the current individual ranking is the fifth individual ranking.

[0121] It can be understood that for a certain intermediate individual, the intermediate element fitness can be regarded as the solution of the scenario parameters of the intermediate individual. Step B13 can be to compare the relationship between the intermediate element fitness of each intermediate individual and the intermediate element fitness of other intermediate individuals, so as to obtain the domination count of each intermediate individual. Specifically, for intermediate individual c and intermediate individual d, if the intermediate element fitness of intermediate individual c is better than the intermediate element fitness of intermediate individual d, it means that intermediate individual d is dominated by intermediate individual c, and one count in the domination count of intermediate individual d points to intermediate individual c.

[0122] It should be noted that since the intermediate element fitness output by the fitness proxy model may include at least one of the cumulative heading change fitness, cumulative speed change fitness, path length fitness, task completion time fitness, etc., in the embodiments of the present application, taking the intermediate element fitness including the cumulative heading change fitness and the cumulative speed change fitness as an example, if the cumulative heading change fitness of intermediate individual c is not worse than the cumulative heading change fitness of intermediate individual d, and the cumulative speed change fitness of intermediate individual c is not worse than the cumulative speed change fitness of intermediate individual d, and at the same time, intermediate individual c has at least one fitness target better than the fitness target of intermediate individual d, and this fitness target is the cumulative heading change fitness or the cumulative speed change fitness, it means that intermediate individual d is dominated by intermediate individual c. The same reasoning can be simply extended to other types of intermediate element fitnesses (such as combinations of cumulative heading change fitness, cumulative speed change fitness, path length fitness, and task completion time fitness), and the present application will not elaborate here.

[0123] It is worth mentioning that the preset domination count threshold is used to represent the maximum domination count of intermediate individuals, and its specific value can be any one of 0, 1, 2, etc. In the embodiment of the present application, taking the domination count threshold as 0 as an example, for the domination count of a certain intermediate individual, the threshold comparison in step B14 can be to compare whether the domination count is less than or equal to 0, so as to obtain the first threshold comparison result of this intermediate individual. If the first threshold comparison result is that the domination count is less than or equal to 0, it means that there are no other intermediate individuals superior to this intermediate individual. At this time, the current individual level can be determined as the individual level of this intermediate individual; or, if the first threshold comparison result is that the domination count is greater than 0, it means that there are other intermediate individuals superior to this intermediate individual. At this time, this intermediate individual can be used as the intermediate individual in the next level classification round. The same applies to the other intermediate individuals, and it can be simply deduced by analogy. Also, after performing threshold comparisons on all intermediate individuals, the current individual level can be updated to obtain the updated individual level, and then based on this updated individual level and all the intermediate individuals classified into the next level classification round, return to execute step B12.

[0124] B2. According to all the individual levels, update the individual positions of the initial scenario population to obtain the first intermediate scenario population;

[0125] Further, the step B2. According to all the individual levels, update the individual positions of the initial scenario population to obtain the first intermediate scenario population includes:

[0126] B21. Obtain a preset search dynamic threshold;

[0127] B22. According to all the individual levels, screen the initial scenario population to obtain an individual intermediate set corresponding to each individual level;

[0128] B23. Calculate the crowding distance for all the individual intermediate sets to obtain a target crowding distance corresponding to each individual intermediate set;

[0129] In the embodiment of the present application, the position of the population individuals in the initial scenario population can be updated based on each individual level, and all the population individuals after position update are determined as the first intermediate scenario population. Specifically, the individual screening in step B22 can be to screen out the population individuals with the same individual level in the initial scenario population, so as to obtain the individual intermediate set, and the individual levels corresponding to each individual intermediate set are different.

[0130] It can be understood that for the intermediate set of individuals at a certain individual level, the crowding distance calculation in step B23 can adopt the Crowding distance assignment algorithm. Based on the intermediate element fitness corresponding to each population individual in the intermediate set of individuals, the crowding distance corresponding to each population individual in the intermediate set of individuals is calculated. Then, the largest crowding distance among all crowding distances is determined as the target crowding distance. Similarly, for the intermediate sets of individuals at other individual levels, it can be simply deduced by analogy, so as to obtain the target crowding distance corresponding to each intermediate set of individuals.

[0131] B24. Generate a position update vector for all the target crowding distances according to the search dynamic threshold, and obtain a target update vector corresponding to each target crowding distance;

[0132] Further, the step B24, generating a position update vector for the target crowding distance according to the search dynamic threshold to obtain a target update vector corresponding to the target crowding distance, includes:

[0133] B241. Obtain a first random number;

[0134] B242. Compare the search dynamic threshold with the first random number to obtain a second threshold comparison result;

[0135] In the embodiment of the present application, for the target crowding distance corresponding to the intermediate set of individuals at a certain individual level, in step B241, a randomly generated random number can be obtained and recorded as the first random number; then, compare the size relationship between the preset search dynamic threshold and the first random number. The search dynamic threshold is positively correlated with the current population optimization round of the initial scenario population, so as to obtain the second threshold comparison result. Specifically, the search dynamic threshold in the embodiment of the present application can be expressed as:

[0136]

[0137] where MOA is the search dynamic threshold; g is the current population optimization round of the initial scenario population; gmax is the population optimization threshold.

[0138] B243. If the second threshold comparison result is that the first random number is greater than the search dynamic threshold, perform a global position update on the target crowding distance to obtain the target update vector;

[0139] Further, the step B243, performing a global position update on the target crowding distance to obtain the target update vector, includes:

[0140] B2431. Obtain a second random number and a preset first search optimization threshold;

[0141] B2432. Compare the second random number with the first search optimization threshold to obtain a third threshold comparison result;

[0142] B2433. If the third threshold comparison result is that the second random number is greater than the first search optimization threshold, perform a position vector division update on the target crowding distance to obtain the target update vector;

[0143] Or, B2434. If the third threshold comparison result is that the second random number is less than or equal to the first search optimization threshold, perform a position vector multiplication update on the target crowding distance to obtain the target update vector.

[0144] In the embodiments of the present application, the second random number can be a randomly generated random number, and the first search optimization threshold can be a preset global search optimization threshold. If the second threshold comparison result is that the first random number is greater than the search dynamic threshold, the position of the target crowding distance can be updated through global search. Step B2432 can be to compare the magnitude relationship between the second random number and the first search optimization threshold to obtain the third threshold comparison result.

[0145] Specifically, if the third threshold comparison result is that the second random number is greater than the first search optimization threshold, the target update vector corresponding to the target crowding distance can be obtained through a division operation, and the target update vector can be expressed as:

[0146] X′ = Xbest ÷ (MOP + ∈) × ((UBj - LBj) × μ + LBj)

[0147] Wherein, X′ is the target update vector corresponding to the target crowding distance; Xbest is the target crowding distance; MOP is the data optimization probability; ∈ is a very small positive value; μ is a control term, and its value can be 0.5; UBj is the upper limit value of variable j, LBj is the lower limit value of variable j, and variable j can be any one of the relative azimuth, relative distance, relative course of the tugboat and the target ship, the speed of the target ship, the speed of the tugboat, and environmental elements, etc.

[0148] The data optimization probability can be expressed as:

[0149] MOP = 1 - (g ^ (1 / α)) / (gmax ^ (1 / α))

[0150] Wherein, α is a preset constant, and this constant can be any one of 3, 5, 7, etc.

[0151] Or, if the third threshold comparison result is that the second random number is less than or equal to the first search optimization threshold, the target update vector corresponding to the target crowding distance can be obtained through a multiplication operation, and the target update vector can be expressed as:

[0152] X′ = Xbest*(MOP)×((UBj - LBj)×μ + LBj)

[0153] Or, B244. If the second threshold comparison result is that the first random number is less than or equal to the search dynamic threshold, then perform a local position update on the target crowding distance to obtain the target update vector.

[0154] Further, the step B244 of performing a local position update on the target crowding distance to obtain the target update vector includes:

[0155] B2441. Obtain a third random number and a preset second search optimization threshold;

[0156] B2442. Compare the third random number and the second search optimization threshold to obtain a fourth threshold comparison result;

[0157] B2443. If the fourth threshold comparison result is that the third random number is greater than the second search optimization threshold, then perform a position vector subtraction update on the target crowding distance to obtain the target update vector;

[0158] Or, B2444. If the fourth threshold comparison result is that the third random number is less than or equal to the second search optimization threshold, then perform a position vector addition update on the target crowding distance to obtain the target update vector.

[0159] In the embodiments of the present application, the third random number may be a randomly generated random number, and the second search optimization threshold may be a preset local search optimization threshold, and this second search optimization threshold may be the same as the aforementioned first search optimization threshold. If the second threshold comparison result is that the first random number is less than or equal to the search dynamic threshold, then local search can be used to perform a position update on the target crowding distance, and step B2432 may be to compare the magnitude relationship between the third random number and the second search optimization threshold to obtain a fourth threshold comparison result.

[0160] Specifically, if the fourth threshold comparison result is that the third random number is greater than the second search optimization threshold, then a subtraction operation can be used to obtain the target update vector corresponding to the target crowding distance, and this target update vector can be expressed as:

[0161] X′ = Xbest - (MOP)×((UBj - LBj)×μ + LBj)

[0162] Or, if the fourth threshold comparison result is that the third random number is less than or equal to the second search optimization threshold, then an addition operation can be used to obtain the target update vector corresponding to the target crowding distance, and this target update vector can be expressed as:

[0163] X′ = Xbest+(MOP)×((UBj - LBj)×μ + LBj)

[0164] B25. Update the position of the initial scenario population according to all the target update vectors to obtain the first intermediate scenario population.

[0165] In the embodiment of the present application, after obtaining the target update vectors corresponding to the target crowding distances of each individual level, the position of the corresponding population individuals in the initial scenario population can be updated based on each obtained target update vector to obtain the first intermediate scenario population. Specifically, for a certain target update vector, step B25 can first obtain the corresponding population individuals in the initial scenario population based on the individual level corresponding to the target update vector, and then use the target update vector to update the corresponding population individuals, so as to realize the position movement update of the population individuals of a specific individual level. The same applies to the remaining target update vectors. After the position movement updates of all the population individuals corresponding to the target update vectors are completed, the first intermediate scenario population is obtained.

[0166] B3. Perform population merging analysis on the first intermediate scenario population according to the initial scenario population to obtain the second intermediate scenario population and the population fitness data of the second intermediate scenario population;

[0167] Further, the step B3 of performing population merging analysis on the first intermediate scenario population according to the initial scenario population to obtain the second intermediate scenario population and the population fitness data of the second intermediate scenario population includes:

[0168] B31. Obtain the second factor fitness function;

[0169] B32. Perform population merging on the first intermediate scenario population according to the initial scenario population to obtain the second intermediate scenario population;

[0170] B33. Perform individual fitness analysis on the second intermediate scenario population according to the second factor fitness function to obtain the population fitness data.

[0171] In the embodiment of the present application, the second factor fitness function can be the same as the aforementioned first factor fitness function, and the difference in name is used to distinguish the usage stages of the factor fitness functions. Specifically, step B32 can be to merge the initial scenario population and the first intermediate scenario population to form the second intermediate scenario population; then, based on the second factor fitness function, obtain the factor fitness of each population individual in the second intermediate scenario population. Specifically, it can be the scenario parameters (such as relative azimuth θ, relative distance D, relative course H, target ship speed V 1 of tugboat speed V2 and environmental factor E), input it into the second factor fitness function to obtain the factor fitness corresponding to each population individual in the second intermediate scenario population, and then based on all the factor fitnesses, obtain the population fitness data of the second intermediate scenario population.

[0172] B4. According to the population fitness data, perform sorting analysis on the second intermediate scenario population to obtain the target optimal solution set.

[0173] Further, the step B4. According to the population fitness data, perform sorting analysis on the second intermediate scenario population to obtain the target optimal solution set includes:

[0174] B41. Obtain a preset population optimization threshold, archive threshold, and individual threshold;

[0175] B42. Obtain the current population optimization round and the first intermediate optimal solution data set corresponding to the current population optimization round;

[0176] B43. According to the population fitness data, perform individual ranking on the second intermediate scenario population to obtain several individual ranking sets, and the individual levels corresponding to each individual ranking set are different;

[0177] B44. According to the archive threshold and all the individual ranking sets, perform the first optimal solution update on the first intermediate optimal solution data set to obtain the second intermediate optimal solution data set;

[0178] B45. Compare the current population optimization round with the population optimization threshold to obtain the fifth threshold comparison result;

[0179] B46. If the fifth threshold comparison result is that the current population optimization round is less than the population optimization threshold, then perform round update on the current population optimization round, update the first intermediate optimal solution data set according to the second intermediate optimal solution data set, and update the initial scenario population according to the individual threshold and the second intermediate optimal solution data set, and then return to execute the step of obtaining the initial scenario population of the autonomous escort scenario and the scenario factor data corresponding to the initial scenario population;

[0180] Or, B47. If the fifth threshold comparison result is that the current population optimization round is greater than or equal to the population optimization threshold, then determine the second intermediate optimal solution data set as the target optimal solution set.

[0181] In the embodiments of the present application, the population optimization threshold may be the maximum number of rounds of population optimization, the archive threshold may be the maximum number of optimal solutions in the first intermediate optimal solution dataset, and the individual threshold may be the maximum number of individuals in the initial scenario population. The specific values of the population optimization threshold, the archive threshold, and the individual threshold can all be flexibly set according to the actual situation. Also, for the current round of population optimization, first, a first intermediate optimal solution dataset corresponding to the current round of population optimization can be obtained. Specifically, if the current round of population optimization is the first round of population optimization, the corresponding first intermediate optimal solution dataset may be a blank dataset; or, if the current round of population optimization is the second round or above of population optimization, the corresponding first intermediate optimal solution dataset may be the second intermediate optimal solution dataset obtained in the previous round of population optimization.

[0182] It can be understood that the individual ranking in step B43 can first be based on the fitness of each element in the population fitness data to classify each population individual in the second intermediate scenario population. The specific content of the classification is similar to that in step B1 mentioned above and can be simply deduced by analogy; then, based on the individual ranks corresponding to each population individual in the second intermediate scenario population, several individual ranking sets with different individual ranks are generated.

[0183] It should be noted that step B44 starts from the individual ranking set corresponding to the first individual rank (i.e., the highest individual rank), and updates the population individuals in the individual ranking set to the first intermediate optimal solution dataset in sequence until the population individuals in the first intermediate optimal solution dataset reach the archive threshold or all the population individuals in all the individual ranking sets have been processed, so as to obtain the second intermediate optimal solution dataset. Specifically, for the population individual e in a certain individual ranking set, if there are no other population individuals in the first intermediate optimal solution dataset that are dominated by the population individual e, then this population individual can be added and updated as an optimal solution to the first intermediate optimal solution dataset; or, if there are other population individuals in the first intermediate optimal solution dataset that are dominated by the population individual e, then the other population individuals in the first intermediate optimal solution dataset that are dominated by the population individual e can be removed, and then the population individual e can be added and updated as an optimal solution to the first intermediate optimal solution dataset, and the same applies to the rest.

[0184] It is worth mentioning that step B45 can be to compare the current population optimization round with the population optimization threshold. If the current population optimization round is less than the population optimization threshold, it means that the exit condition for population optimization is not met. At this time, the current population optimization round can be updated. Specifically, it can be an operation of adding 1 to the current population optimization round. At the same time, use the second intermediate optimal solution dataset to update the first intermediate optimal solution dataset, so that the second intermediate optimal solution dataset of the current population optimization round is used as the first intermediate optimal solution dataset of the next population optimization round. Additionally, based on the individual threshold, several population individuals equal to the individual threshold are selected from the second intermediate optimal solution dataset as the initial scenario population of the next population optimization round. Or, if the current population optimization round is greater than or equal to the population optimization threshold, it means that the exit condition for population optimization is met. At this time, each population individual in the second intermediate optimal solution dataset can be regarded as a target optimal solution, and thus a target optimal solution set can be obtained.

[0185] Step 140, generate test cases for the target optimal solution set to obtain the target test cases for the autonomous companion navigation scenario.

[0186] In the embodiments of the present application, each target optimal solution in the target optimal solution set can be regarded as a test scenario. Based on the scenario parameters of each target optimal solution, the test cases corresponding to each target optimal solution can be constructed, and thus the target test cases for the autonomous companion navigation scenario can be obtained.

[0187] Next, a system for generating autonomous companion navigation test cases proposed according to an embodiment of the present application will be described in detail with reference to the accompanying drawings.

[0188] Refer to Figure 2 , a system for generating autonomous companion navigation test cases proposed in the embodiments of the present application includes:

[0189] The first processing unit 101 is configured to obtain a trained fitness proxy model, an initial scenario population of the autonomous companion navigation scenario, and scenario element data corresponding to the initial scenario population;

[0190] The second processing unit 102 is configured to input the scenario element data into the trained fitness proxy model for fitness prediction to obtain scenario element fitness data output by the trained fitness proxy model. The scenario element fitness data includes several intermediate element fitnesses, and each intermediate element fitness is the scenario element fitness of the corresponding population individual in the initial scenario population;

[0191] The third processing unit 103 is configured to perform population optimal solution analysis on the initial scenario population according to all the intermediate element fitnesses to obtain a target optimal solution set;

[0192] The fourth processing unit 104 is configured to generate test cases for the target optimal solution set, so as to obtain the target test cases for the autonomous escort scenario.

[0193] It can be understood that the content in the above method embodiments is applicable to the system embodiments of the present application. The functions specifically implemented in the system embodiments of the present application are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0194] Referring to Figure 3 , an embodiment of the present application further provides an electronic device, including:

[0195] At least one processor 201;

[0196] At least one memory 202, configured to store at least one program;

[0197] When the at least one program is executed by the at least one processor 201, the at least one processor 201 implements the above method embodiments.

[0198] Similarly, it can be understood that the content in the above method embodiments is applicable to the device embodiments of the present application. The functions specifically implemented in the device embodiments of the present application are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0199] An embodiment of the present application further provides a computer-readable storage medium, in which a program executable by a processor 201 is stored. The program executable by the processor 201 is used to implement the above method embodiments when executed by the processor 201.

[0200] Similarly, the content in the above method embodiments is applicable to the computer-readable storage medium embodiments of the present application. The functions specifically implemented in the computer-readable storage medium embodiments of the present application are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0201] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order mentioned in the operation diagrams. For example, depending on the functions / operations involved, two consecutive blocks shown may actually be executed substantially simultaneously, or the blocks can sometimes be executed in the reverse order. In addition, the embodiments presented and described in the flowcharts of the present application are provided by way of example for the purpose of providing a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logical flows presented herein. Alternative embodiments are contemplated, in which the order of various operations is changed and the sub-operations described as part of a larger operation are executed independently.

[0202] In addition, although the present application has been described in the context of functional modules, it should be understood that, unless otherwise stated to the contrary, one or more of the functions and / or features may be integrated in a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It should also be understood that a detailed discussion of the actual implementation of each module is not necessary for understanding the present application. Rather, considering the attributes, functions, and internal relationships of the various functional modules in the devices disclosed herein, the actual implementation of the modules will be understood within the ordinary skills of an engineer. Therefore, those skilled in the art can implement the present application as set forth in the claims without undue experimentation. It should also be understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present application, which is determined by the full scope of the appended claims and their equivalents.

[0203] If a function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method according to an embodiment of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0204] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in conjunction with these instruction execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0205] More specific examples (nonexhaustive list) of computer-readable media include the following: an electrical connection (electronic device) having one or more wirings, a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable media can even be paper or other suitable media on which a program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or otherwise processing it as appropriate, and then storing it in a computer memory.

[0206] It should be understood that various parts of the present application can be implemented by hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: a discrete logic circuit having logic gate circuits for implementing logical functions on data signals, an application specific integrated circuit having appropriate combinational logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0207] In the foregoing description of the present specification, descriptions with reference to the terms "one embodiment / example", "another embodiment / example", or "certain embodiments / examples", etc., mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0208] Although the embodiments of the present application have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present application, and the scope of the present application is defined by the claims and their equivalents.

[0209] The above has specifically described the preferred embodiments of the present application, but the present application is not limited to the embodiments. Those skilled in the art can make various equivalent deformations or substitutions without departing from the spirit of the present application, and these equivalent deformations or substitutions are all included within the scope defined by the claims of the present application.

Claims

1. A method for generating an autonomous escort test case, characterized in that: include: Acquire a trained fitness proxy model, an initial scene population of an autonomous navigation scene, and scene element data corresponding to the initial scene population; Inputting the scene element data into the trained fitness proxy model for fitness prediction, obtaining scene element fitness data output by the trained fitness proxy model, wherein the scene element fitness data includes a plurality of intermediate element fitnesses, each of which is a scene element fitness of a corresponding population individual in the initial scene population; According to the fitness of all the intermediate elements, performing population optimal solution analysis on the initial scene population to obtain a target optimal solution set; Test cases are generated for the target optimal solution set to obtain target test cases for the autonomous escort scenario.

2. The method according to claim 1, characterized in that The step of obtaining a trained fitness proxy model includes: Acquire a range set of constituent elements of the autonomous escort scenario and a preset element combination strength, as well as a first element fitness function corresponding to the range set of constituent elements; Combining the elements of the component element range set according to the element combination strength to obtain a basic scene data set; According to the first element fitness function, test simulation is performed on the basic scene data set to obtain an element fitness data set corresponding to the basic scene data set; According to the basic scene data set and the element fitness data set, the initialized fitness proxy model is trained to obtain the trained fitness model.

3. The method according to claim 1, characterized in that The method of performing population optimal solution analysis on the initial scene population according to the fitness of all the intermediate elements to obtain a target optimal solution set includes: According to the fitness of all the intermediate elements, each of the population individuals in the initial scene population is classified into individual grades to obtain an individual grade corresponding to each of the population individuals; According to all the individual levels, updating the individual positions of the initial scene population to obtain a first intermediate scene population; According to the initial scene population, performing population merging analysis on the first intermediate scene population to obtain population fitness data of the second intermediate scene population and the second intermediate scene population; According to the population fitness data, the second intermediate scene population is sorted and analyzed to obtain the target optimal solution set.

4. The method according to claim 3, characterized in that The step of classifying each of the population individuals in the initial scene population according to the fitness of all the intermediate elements to obtain an individual level corresponding to each of the population individuals includes: Obtaining a preset dominated number threshold; Acquire a number of intermediate individuals and a current individual level, wherein the intermediate individuals are unclassified population individuals in the initial scene population corresponding to the current individual level; According to the fitness of all the intermediate elements, all the intermediate individuals are classified as dominated, and the dominated count corresponding to each intermediate individual is obtained; According to the dominated number threshold, threshold comparison is performed on all the dominated counts to obtain a first threshold comparison result corresponding to each of the intermediate individuals; If the first threshold comparison result is that the dominated count is less than or equal to the dominated number threshold, the current individual level is determined as the individual level of the middle individual corresponding to the first threshold comparison result.

5. The method according to claim 3, characterized in that: The step of updating individual positions of the initial scene population according to all the individual levels to obtain a first intermediate scene population includes: Get the preset search dynamic threshold; According to all the individual levels, the initial scene population is screened individually to obtain an individual intermediate set corresponding to each individual level; Calculating the crowding distance of all the individual intermediate sets to obtain a target crowding distance corresponding to each individual intermediate set; Generating position update vectors for all the target crowding distances according to the search dynamic threshold, and obtaining a target update vector corresponding to each target crowding distance; The initial scene population is updated by position movement according to all the target update vectors to obtain the first intermediate scene population.

6. The method according to claim 5, characterized in that According to the search dynamic threshold, a position update vector is generated for the target crowding distance to obtain a target update vector corresponding to the target crowding distance, including: Get the first random number; Comparing the search dynamic threshold and the first random number to obtain a second threshold comparison result; If the second threshold comparison result is that the first random number is greater than the search dynamic threshold, the target crowding distance is globally updated to obtain the target update vector; or, if the second threshold comparison result is that the first random number is less than or equal to the search dynamic threshold, the target crowding distance is locally updated to obtain the target update vector.

7. The method according to claim 6, characterized in that The globally updating the target crowding distance to obtain the target update vector includes: Obtaining a second random number and a preset first search optimization threshold; Comparing the second random number with the first search optimization threshold to obtain a third threshold comparison result; If the third threshold comparison result is that the second random number is greater than the first search optimization threshold, the target crowding distance is updated by position vector division to obtain the target update vector; or, if the third threshold comparison result is that the second random number is less than or equal to the first search optimization threshold, the target crowding distance is updated by position vector multiplication to obtain the target update vector; The locally updating the target crowding distance to obtain the target update vector includes: Obtaining a third random number and a preset second search optimization threshold; Comparing the third random number with the second search optimization threshold to obtain a fourth threshold comparison result; If the result of the fourth threshold comparison is that the third random number is greater than the second search optimization threshold, the target crowding distance is updated by position vector subtraction to obtain the target update vector; or, if the result of the fourth threshold comparison is that the third random number is less than or equal to the second search optimization threshold, the target crowding distance is updated by position vector addition to obtain the target update vector.

8. The method according to claim 3, characterized in that The step of performing population merging analysis on the first intermediate scene population according to the initial scene population to obtain population fitness data of the second intermediate scene population and the second intermediate scene population includes: Obtain the second factor fitness function; According to the initial scene population, merging the first intermediate scene population to obtain the second intermediate scene population; According to the second factor fitness function, individual fitness analysis is performed on the second intermediate scene population to obtain the population fitness data.

9. The method according to claim 3, characterized in that: The step of performing sorting analysis on the second intermediate scene population according to the population fitness data to obtain the target optimal solution set includes: Get the preset population optimization threshold, archive threshold and individual threshold; Acquire a current population optimization round and a first intermediate optimal solution data set corresponding to the current population optimization round; According to the population fitness data, the second intermediate scene population is sorted by individual level to obtain a plurality of individual sorting sets, each of the individual sorting sets corresponding to an individual level is different; According to the archive threshold and all the individual sorting sets, updating the first intermediate optimal solution data set with a first optimal solution to obtain a second intermediate optimal solution data set; Comparing the current population optimization round with the population optimization threshold to obtain a fifth threshold comparison result; If the result of the fifth threshold comparison is that the current population optimization round is less than the population optimization threshold, the current population optimization round is updated, the first intermediate optimal solution data set is updated according to the second intermediate optimal solution data set, and the initial scene population is updated according to the individual threshold and the second intermediate optimal solution data set, and then the step of obtaining the initial scene population of the autonomous escort scene and the scene element data corresponding to the initial scene population is returned to execute; or, if the result of the fifth threshold comparison is that the current population optimization round is greater than or equal to the population optimization threshold, the second intermediate optimal solution data set is determined as the target optimal solution set.

10. A system for generating autonomous escort test cases, characterized in that: include: A first processing unit is used to obtain a trained fitness proxy model, an initial scene population of an autonomous escort scene, and scene element data corresponding to the initial scene population; A second processing unit is used to input the scene element data into the trained fitness proxy model to perform fitness prediction, and obtain the scene element fitness data output by the trained fitness proxy model, wherein the scene element fitness data includes a plurality of intermediate element fitnesses, each of which is the scene element fitness of a corresponding population individual in the initial scene population; A third processing unit is used to perform population optimal solution analysis on the initial scene population according to the fitness of all the intermediate elements to obtain a target optimal solution set; The fourth processing unit is used to generate test cases for the target optimal solution set to obtain target test cases for the autonomous escort scenario.

Citation Information

Patent Citations

  • Optimal solution determination method and system for engineering planning, equipment and medium

    CN110378513A

  • Multi-path coverage test method based on equilibrium optimization theory and grey prediction model

    CN116010291A

  • Flood control optimization scheduling method and device based on improved genetic algorithm

    CN117314057A

  • Method for generating test case by introducing annealing algorithm based on improved genetic algorithm

    CN118484386A

  • Test case generation method and device, computer equipment, readable storage medium and program product

    CN119201755A