A method and system for generating autonomous companion test cases

By generating autonomous escort test cases using an adaptive proxy model, the problems of high cost and incomplete testing in existing technologies are solved, achieving more challenging and comprehensive testing results.

CN120045453BActive Publication Date: 2025-12-16WUHAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies rely on actual sea trials to test autonomous escort capabilities, which is costly and cannot cover all possible situations, resulting in incomplete and ineffective testing.

Method used

An adaptive proxy model is used to generate autonomous escort test cases. By performing individual level classification, position update and sorting analysis on the initial scene population, more challenging test cases are generated.

Benefits of technology

This improved the comprehensiveness and effectiveness of autonomous escort testing while reducing testing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045453B_ABST
    Figure CN120045453B_ABST
Patent Text Reader

Abstract

The application discloses a kind of self-aid navigation test case generation method and system, wherein the method obtains trained fitness proxy model, initial scene population of self-aid navigation scene and the scene element data corresponding to initial scene population;Scene element data is input into trained fitness proxy model to carry out fitness prediction, obtain the scene element fitness data output by trained fitness proxy model, and scene element fitness data includes several intermediate element fitness;According to all intermediate element fitness, population optimal solution analysis is carried out on initial scene population, and target optimal solution set is obtained;Target optimal solution set is tested to generate test cases, and target test cases of self-aid navigation scene are obtained.The method can provide a kind of self-aid navigation test case, which can effectively improve the comprehensiveness and effect of ship self-aid navigation test, and reduce test cost.The application relates to the technical field of intelligent ship.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent ships, and in particular to a method and system for generating autonomous escort test cases. BACKGROUND

[0002] The autonomous escort function of a ship refers to the ability of an escort system to autonomously identify a target and control the ship to approach or follow the target until it is safe and close to the target. In order to verify the effectiveness and reliability of the autonomous escort function, testing of the autonomous escort function of a ship has become one of the focuses of attention.

[0003] Currently, existing technologies usually rely on actual sea trial experiments of a ship to test the autonomous escort function of the ship. This method requires high costs and is difficult to cover all possible situations, and the comprehensiveness and effectiveness of the test are not good.

[0004] Therefore, the problems of the prior art need to be solved and optimized. SUMMARY

[0005] The present application aims to at least partially solve one of the technical problems in the related art.

[0006] To this end, an object of an embodiment of the present application is to provide a method, system, device and medium for generating autonomous escort test cases, wherein the method can provide an autonomous escort test case that can effectively improve the comprehensiveness and effectiveness of ship autonomous escort testing and reduce testing costs.

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

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

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

[0010] inputting the scene element data into the trained fitness proxy model for fitness prediction to obtain scene element fitness data output by the trained fitness proxy model, wherein the scene element fitness data includes a plurality of intermediate element fitnesses, and each intermediate element fitness is a scene element fitness of a corresponding population individual in the initial scene population;

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

[0012] The target optimal solution set is subjected to test case generation, and a target test case of the autonomous companion navigation scene is obtained.

[0013] In addition, the method according to the above-mentioned embodiments of the application can further have the following additional technical features:

[0014] Further, in an embodiment of the application, the obtaining of the trained fitness agent model comprises:

[0015] obtaining a constituent element range set of the autonomous companion navigation scene and a preset element combination strength, and a first element fitness function corresponding to the constituent element range set;

[0016] performing element combination on the constituent element range set according to the element combination strength, to obtain a basic scene data set;

[0017] performing test simulation on the basic scene data set according to the first element fitness function, to obtain an element fitness data set corresponding to the basic scene data set;

[0018] performing model training on an initialized fitness agent model according to the basic scene data set and the element fitness data set, to obtain the trained fitness model.

[0019] Further, in an embodiment of the application, the population optimal solution analysis on the initial scene population according to all the intermediate element fitnesses comprises:

[0020] performing individual rank classification on each of the population individuals in the initial scene population according to all the intermediate element fitnesses, to obtain an individual rank corresponding to each of the population individuals;

[0021] performing individual position update on the initial scene population according to all the individual ranks, to obtain a first intermediate scene population;

[0022] performing population merging analysis on the first intermediate scene population according to the initial scene population, to obtain a second intermediate scene population and population fitness data of the second intermediate scene population;

[0023] performing sorting analysis on the second intermediate scene population according to the population fitness data, to obtain the target optimal solution set.

[0024] Further, in an embodiment of the application, the individual rank classification on each of the population individuals in the initial scene population according to all the intermediate element fitnesses comprises:

[0025] obtaining a preset dominated number threshold value;

[0026] obtaining a plurality of intermediate individuals and a current individual level, the intermediate individuals being unclassified population individuals in the initial scene population corresponding to the current individual level;

[0027] dominated classification is performed on all the intermediate individuals according to the fitness of all the intermediate elements, to obtain a dominated count corresponding to each of the intermediate individuals;

[0028] threshold value comparison is performed on all the dominated counts according to the dominated number threshold value, to obtain a first threshold value comparison result corresponding to each of the intermediate individuals;

[0029] if the first threshold value comparison result is that the dominated count is less than or equal to the dominated number threshold value, the current individual level is determined as the individual level of the intermediate individual corresponding to the first threshold value comparison result.

[0030] Further, in an embodiment of the present application, the individual position updating of the initial scene population according to all the individual levels to obtain the first intermediate scene population comprises:

[0031] obtaining a preset search dynamic threshold value;

[0032] individual screening is performed on the initial scene population according to all the individual levels, to obtain an individual intermediate set corresponding to each of the individual levels;

[0033] crowding distance calculation is performed on all the individual intermediate sets, to obtain a target crowding distance corresponding to each of the individual intermediate sets;

[0034] position updating vector generation is performed on all the target crowding distances according to the search dynamic threshold value, to obtain a target updating vector corresponding to each of the target crowding distances;

[0035] position moving updating is performed on the initial scene population according to all the target updating vectors, to obtain the first intermediate scene population.

[0036] Further, in an embodiment of the present application, the position updating vector generation is performed on the target crowding distance according to the search dynamic threshold value, to obtain a target updating vector corresponding to the target crowding distance, comprising:

[0037] obtaining a first random number;

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

[0039] If the second threshold comparison result is that the first random number is greater than the search dynamic threshold, a global position update is performed on the target crowded 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, a local position update is performed on the target crowded distance to obtain the target update vector.

[0040] Further, in an embodiment of the present application, the global position update performed on the target crowded distance to obtain the target update vector comprises:

[0041] A second random number and a preset first search optimization threshold are obtained.

[0042] The second random number and the first search optimization threshold are compared 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, a position vector division update is performed on the target crowded distance 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, a position vector multiplication update is performed on the target crowded distance to obtain the target update vector.

[0044] The local position update performed on the target crowded distance to obtain the target update vector comprises:

[0045] A third random number and a preset second search optimization threshold are obtained.

[0046] The third random number and the second search optimization threshold are compared 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, a position vector subtraction update is performed on the target crowded distance 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, a position vector addition update is performed on the target crowded distance to obtain the target update vector.

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

[0049] A second element fitness function is obtained.

[0050] According to the initial scene population, population merging is performed on the first intermediate scene population to obtain the second intermediate scene population.

[0051] According to the second element fitness function, individual fitness analysis is performed on the second intermediate scene population to obtain the population fitness data.

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

[0053] A preset population optimization threshold, an archive threshold and an individual threshold are obtained.

[0054] A current population optimization round and a first intermediate optimal solution data set corresponding to the current population optimization round are obtained.

[0055] According to the population fitness data, individual rank sorting is performed on the second intermediate scene population to obtain a plurality of individual sorting sets, and each individual sorting set corresponds to a different individual rank.

[0056] According to the archive threshold and all the individual sorting sets, first optimal solution updating is performed on the first intermediate optimal solution data set to obtain a second intermediate optimal solution data set.

[0057] The current population optimization round and the population optimization threshold are compared to obtain a 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 round updating is performed on the current population optimization round, updating is performed on the first intermediate optimal solution data set according to the second intermediate optimal solution data set, and updating is performed on the initial scene population 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 companion navigation scene and the scene element data corresponding to the initial scene population is executed. Or, if the fifth threshold comparison result 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.

[0059] In a second aspect, an embodiment of the present application provides a self- autonomous companion navigation test case generation system, comprising:

[0060] A first processing unit is configured to obtain a trained fitness proxy model, an initial scene population of an autonomous companion navigation scene and scene element data corresponding to the initial scene population.

[0061] a second processing unit, configured to input the scene element data into the trained fitness proxy model to perform fitness prediction, to obtain scene element fitness data output by the trained fitness proxy model, the scene element fitness data including a plurality of intermediate element fitnesses, each of the intermediate element fitnesses being a scene element fitness of a 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 perform test case generation on the target optimal solution set, to obtain a target test case of the autonomous companion scene.

[0064] In a third aspect, an electronic device is provided, and the electronic device includes:

[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 is caused to implement the method in the first aspect.

[0068] In a fourth aspect, a computer-readable storage medium is provided, and the computer-readable storage medium stores a program executable by a processor, and the program executable by the processor is used to implement the method in the first aspect when executed by the processor.

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

[0070] The method disclosed by the embodiment of the application comprises the following steps: obtaining a trained fitness agent model, an initial scene population of an autonomous escorting scene, and scene element data corresponding to the initial scene population; inputting the scene element data into the trained fitness agent model to perform fitness prediction, to obtain scene element fitness data output by the trained fitness agent model, wherein the scene element fitness data comprises a plurality of intermediate element fitnesses, and each intermediate element fitness is a scene element fitness of a corresponding population individual in the initial scene population; performing population optimal solution analysis on the initial scene population according to all the intermediate element fitnesses, 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 escorting scene. The method performs population optimal solution analysis on the initial scene population based on the scene element fitness data output by the fitness agent model, can generate more challenging autonomous escorting test cases, thereby increasing the number of complex test scenes that can be encountered by the autonomous escorting function of a ship, and is beneficial to improving the comprehensiveness and effect of autonomous escorting testing and reducing the cost of autonomous escorting testing. BRIEF DESCRIPTION OF DRAWINGS

[0071] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following introduces the drawings of the related technical solutions in the embodiments of the present application or the prior art. It should be understood that the drawings in the following introduction are only for the convenience of clearly expressing some embodiments in the technical solutions of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.

[0072] Figure 1 A flowchart of a self-adopting escorting test case generation method provided by the embodiment of the present application is shown in the figure.

[0073] Figure 2 A framework diagram of a self-adopting escorting test case generation system provided by the embodiment of the present application is shown in the figure.

[0074] Figure 3 A structural diagram of an electronic device provided by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0075] Embodiments of the present application are described below in detail with reference to the accompanying drawings, wherein the same or similar numerals represent the same or similar elements or elements having the same or similar functions throughout the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as a limitation on the present application. For the step numbers in the following embodiments, they are only set for the convenience of setting out the description, and the order between the steps is not limited in any way, and 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 one of ordinary skill in the art to which this application belongs. The terminology used in the specification herein is for describing the embodiments of the present application only and is not intended to limit the present application.

[0077] At present, the prior art usually relies on actual trial experiments of ships on the sea to test the autonomous escort function of the ship, and this method requires high cost and is difficult to cover all possible situations, and the comprehensiveness and effect of the test are poor.

[0078] Therefore, the embodiments of the present application provide a method and system for generating autonomous escort test cases, wherein the method is based on the scene element fitness data output by the fitness agent model to analyze the optimal solution of the initial scene population, and specifically by classifying the individual level, updating the individual position and sorting analysis of each population individual in the initial scene population, which helps to generate test cases for different optimization configurations of the autonomous escort function of the ship, thereby increasing the number of complex test scenarios that the autonomous escort function of the ship can encounter, and is beneficial to improving the comprehensiveness and effect of the autonomous escort test, and reducing the cost of the autonomous escort test.

[0079] Reference Figure 1 In the embodiments of the present application, a method for generating autonomous escort test cases comprises:

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

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

[0082] Specifically, the embodiment of the present application takes the autonomous escort scene as an example to realize autonomous escort of the target ship by the tugboat. For individual element data, it includes relative bearing θ element data between the tugboat and the target ship, relative distance D element data between the tugboat and the target ship, relative heading H element data between the tugboat and the target ship, target ship speed V1 element data, tugboat speed V2 element data and environmental element E data.

[0083] It can be understood that for different population individuals in the initial scene population, the individual element data corresponding thereto are also different, and specifically, the specific data of at least one of the relative bearing θ, the relative distance D, the relative heading H, the target ship speed V1, the tugboat speed V2 and the environmental element E can be different, for example, the population individual a and the population individual b are different population individuals, and the difference of the element data corresponding thereto can be only the difference of the specific bearing element data of the relative bearing θ, or the difference of the relative bearing θ, the relative distance D and other element data. The examples of the present application are only for illustration, and are not limiting to the present application.

[0084] In some embodiments, the step 110 of obtaining the trained fitness agent model comprises:

[0085] A1, obtaining a constituent element range set of the autonomous escort scene and a preset element combination strength, and a first element fitness function corresponding to the constituent element range set;

[0086] A2, according to the element combination strength, performing element combination on the constituent element range set to obtain a basic scene data set;

[0087] A3, according to the first element fitness function, performing test simulation on the basic scene data set to obtain an element fitness data set corresponding to the basic scene data set;

[0088] A4, according to the basic scene data set and the element fitness data set, performing model training on an initialized fitness agent model to obtain the trained fitness model.

[0089] In the embodiments of the present application, the element range set can be the element range set of the aforementioned individual element data. Specifically, for the relative position θ element data, the element value range is 0-360°; for the relative distance D element data, the element value range is 1-3 nautical miles; for the relative heading H element data, the element value range is 0-360°; for the target ship speed V1 element data, the element value range is 6-8 knots; for the tug speed V2 element data, the element value range is 4-12 knots; and for the environmental element E, the element value range is 2-7 sea states. The specific range examples of various types of element data are only illustrative and not limiting to the present application. For example, the element value range of the environmental element E can also be 1-4 sea states, and the element value range of the tug speed V2 element data can be 2-7 knots, etc.

[0090] It can be understood that the element combination strength is used to indicate the generation of a scenario data set composed of all possible combinations between several different types of element data, and the specific value of the element combination strength can be set according to actual conditions. Specifically, if the element combination strength is 6, it can be indicated that all possible combinations between the relative position θ, the relative distance D, the relative heading H, the target ship speed V1, the tug speed V2, and the environmental element are generated. The first element fitness function is obtained based on the scenario complexity of each scenario data, and the first element fitness function can include at least one of an accumulated heading change fitness function, an accumulated speed change fitness function, a path length fitness function, a task completion time fitness function, etc. For example, the first element fitness function can be the accumulated heading change fitness function; or the first element fitness function can be a combination of the accumulated heading change fitness function and the accumulated speed change fitness function; or the first element fitness function can be a combination of the accumulated heading change fitness function, the accumulated speed change fitness function, the path length fitness function, and the task completion time fitness function.

[0091] For example, the accumulated heading change fitness function can be expressed as:

[0092]

[0093] wherein, is the fitness value of the accumulated heading change; n is the total number of i; is the amplitude of the i th heading change;

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

[0095]

[0096] wherein, V T is the fitness value of the accumulated speed change; ΔV iis the amplitude of the i th speed change;

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

[0098]

[0099] where L is the path length fitness value; x i is the horizontal coordinate of the i th path point on the escort path; x i-1 is the horizontal coordinate of the i-1 th path point on the escort path; y i is the vertical coordinate of the i th path point on the escort path; y i-1 is the vertical coordinate 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] where T is the task completion time fitness value; t end is the end time of the task of autonomous escort by the tugboat; t start is the start time of the task of autonomous escort by the tugboat.

[0103] It should be noted that the escort path in the embodiments of the present application can be a path walked by the tugboat to achieve the task of autonomous escort of the target ship. Step A2 can first be element discretization on the constituent element range set, so as to obtain an element discrete set. For example, the element value range of the relative bearing θ can be discretized at an angle of 60° to obtain discrete elements of relative bearing of 0°, 60°, 120°, 180°, 240° and 300°. Alternatively, the relative distance D can be discretized at 0.5 nautical miles, and the remaining relative heading H, target ship speed V1, tugboat speed V2 and environmental element E are similar to the foregoing, and can be simply analogized. In addition, the discretization conditions of the range of each type of element in the embodiments of the present application are not limited, for example, the element value range of the relative bearing θ can also be discretized at an angle of 5°, 10°, 20°, the element value range of the target ship speed V1 can be discretized at a speed of 1 knot, 1.5 knots, 2 knots, and the present application will not be described here.

[0104] It is worth mentioning that after obtaining the discrete set of elements, all elements to be tested and possible values of each type of element can be obtained based on the element combination strength using a combination testing tool (Pairwise Independent Combinatorial Testing, PICT), so as to obtain a plurality of possible combinations, each possible combination can be used as a scene parameter of a test scene, and a basic scene dataset can be constructed based on all test scenes.

[0105] It is worth mentioning that step A3 can be based on the first element fitness function to perform traversal testing on each test scene in the basic scene dataset, so as to obtain a fitness value corresponding to each test scene, and an element fitness dataset can be constructed based on all obtained fitness values. In addition, the fitness proxy model in the embodiment 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. The input parameters of the input layer can be 6-dimensional variables including the relative bearing, relative distance, relative heading, target ship speed, tug speed and environmental elements. The output of the output layer can be the cumulative change of heading and speed, or the cumulative change of heading, speed, path length and task completion time, etc. The examples in the present application are only for illustration.

[0106] It is necessary to supplement that step A4 can be that each test scene in the basic scene dataset is input into the input layer of the fitness proxy model, and each test scene is abstracted and feature extracted through two hidden layers containing a plurality 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, the target loss value is obtained by measuring the difference between the predicted results output by the output layer and the corresponding element type fitness values in the element fitness dataset, and the parameters of the initial fitness proxy model are updated by back propagation based on the obtained target loss value, so as to obtain the trained fitness proxy model.

[0107] In addition, the loss function used by the embodiment of the present application to determine the target loss value is not limited, for example, a mean squared error (MSE) loss function can be used to determine, specifically, the element type fitness values in the element fitness dataset can be used as the true label value, and the predicted results output by the output layer can be used as the predicted value, and then the target loss value can be obtained based on the mean squared error between the true label value and the predicted value.

[0108] Step 120, inputting the scene element data into the trained fitness proxy model for fitness prediction to obtain scene element fitness data output by the trained fitness proxy model, the scene element fitness data including a plurality of intermediate element fitnesses, each of the intermediate element fitnesses being a scene element fitness of a corresponding population individual in the initial scene population;

[0109] In the embodiments of the present application, step 120 can be that individual element data of each population individual of the initial scene population is respectively input into the trained fitness proxy model, an intermediate element fitness corresponding to the individual element data of each population individual is predicted by the trained fitness proxy model, and scene element fitness data is constructed based on all the intermediate element fitnesses.

[0110] Step 130, performing population optimal solution analysis on the initial scene population according to all the intermediate element fitnesses to obtain a target optimal solution set;

[0111] In the embodiments of the present application, the fitness optimization analysis can be performed on the corresponding population individual in the initial scene population based on each intermediate element fitness, so as to realize the population optimal solution analysis on the initial scene population and obtain the target optimal solution set, the target optimal solution set including scene parameters of a plurality of population individuals, and each population individual being regarded as one of the target optimal solutions in the target optimal solution set.

[0112] In some embodiments, the step 130 of performing population optimal solution analysis on the initial scene population according to all the intermediate element fitnesses to obtain a target optimal solution set includes:

[0113] B1, performing individual level classification on each of the population individuals in the initial scene population according to all the intermediate element fitnesses to obtain an individual level corresponding to each of the population individuals;

[0114] Further, the step B1 of performing individual level classification on each of the population individuals in the initial scene population according to all the intermediate element fitnesses to obtain an individual level corresponding to each of the population individuals includes:

[0115] B11, obtaining a preset dominated number threshold;

[0116] B12, obtaining a plurality of intermediate individuals and a current individual level, the intermediate individuals being unclassified population individuals in the initial scene population corresponding to the current individual level;

[0117] B13, performing domination classification on all the intermediate individuals according to all the intermediate element fitnesses to obtain a dominated count corresponding to each of the intermediate individuals;

[0118] B14. performing a threshold comparison on all of the dominated counts according to the dominated number threshold, to obtain a first threshold comparison result corresponding to each of the intermediate individuals;

[0119] B15. if the first threshold comparison result is that the dominated count is less than or equal to the dominated number threshold, determining the current individual level as an individual level of an intermediate individual corresponding to the first threshold comparison result.

[0120] In the embodiments of the present application, the individual level of each population individual in the initial scene population can be classified through a cyclic iteration manner based on all intermediate element fitnesses, so as to obtain an individual level corresponding to each population individual. Specifically, for a first level classification round in the cyclic iteration process, the intermediate individual can be a population individual of the initial scene population, and the current individual level can be a first individual level, which is the highest individual level. For a second and subsequent level classification round in the cyclic iteration process, the intermediate individual can be a remaining population individual of the initial scene population which has not been classified, and the current individual level is an individual level corresponding to the level classification round, for example, in a third level classification round, the current individual level is a third individual level, or in a fifth level classification round, the current individual level is a fifth individual level.

[0121] It can be understood that for a certain intermediate individual, the intermediate element fitness can be regarded as a solution of the scene parameter of the intermediate individual, and 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 dominated count of each intermediate individual. Specifically, for an intermediate individual c and an intermediate individual d, if the intermediate element fitness of the intermediate individual c is better than the intermediate element fitness of the intermediate individual d, it means that the intermediate individual d is dominated by the intermediate individual c, and one count in the dominated count of the intermediate individual d points to the intermediate individual c.

[0122] It should be noted that since the intermediate element fitness output by the fitness agent model can include at least one of the cumulative heading change fitness, the cumulative speed change fitness, the path length fitness and the task completion time fitness, the embodiment of the present application takes the case that the intermediate element fitness includes the cumulative heading change fitness and the cumulative speed change fitness as an example. If the cumulative heading change fitness of the intermediate individual c is not worse than the cumulative heading change fitness of the intermediate individual d, and the cumulative speed change fitness of the intermediate individual c is not worse than the cumulative speed change fitness of the intermediate individual d, and at the same time, the intermediate individual c has at least one fitness target better than the fitness target of the intermediate individual, the fitness target being the cumulative heading change fitness or the cumulative speed change fitness, it is indicated that the intermediate individual d is dominated by the intermediate individual c. The rest types of intermediate element fitness (such as the combination of the cumulative heading change fitness, the cumulative speed change fitness, the path length fitness and the task completion time fitness) can be simply analogized, and the present application will not be described here.

[0123] It is worth mentioning that the preset dominated number threshold value is used to represent the maximum dominated count of the intermediate individual, and the specific value thereof can be any one of 0, 1, 2, etc. The embodiment of the present application takes the case that the dominated number threshold value is 0 as an example. For the dominated count of a certain intermediate individual, the threshold value comparison of step B14 can be to compare whether the dominated count is less than or equal to 0, so as to obtain the first threshold value comparison result of the intermediate individual. If the first threshold value comparison result is that the dominated count is less than or equal to 0, it is indicated that there is no other intermediate individual better than the intermediate individual, and at this time, the current individual level can be determined as the individual level of the intermediate individual. Or, if the first threshold value comparison result is that the dominated count is greater than 0, it is indicated that there is other intermediate individual better than the intermediate individual, and at this time, the intermediate individual can be taken as the intermediate individual of the next level classification round. The rest intermediate individuals can be simply analogized. In addition, after the threshold value comparison is performed on all intermediate individuals, the current individual level can be updated to obtain the updated individual level, and then based on the updated individual level and all intermediate individuals classified into the next level classification round, step B12 is executed.

[0124] B2, updating the individual positions of the initial scene population according to all the individual levels to obtain a first intermediate scene population;

[0125] Further, the step B2 of updating the individual positions of the initial scene population according to all the individual levels to obtain a first intermediate scene population comprises:

[0126] B21, obtaining a preset search dynamic threshold value;

[0127] B22, performing individual screening on the initial scene population according to all the individual grades, to obtain an individual intermediate set corresponding to each of the individual grades;

[0128] B23, performing crowding distance calculation on all the individual intermediate sets, to obtain a target crowding distance corresponding to each of the individual intermediate sets;

[0129] In the embodiment of the present application, the population individuals of the initial scene population can be position updated based on each individual grade, and all the population individuals after position updating are determined as the first intermediate scene population. Specifically, the individual screening in step B22 can be screening the population individuals with the same individual grade in the initial scene population, so as to obtain the individual intermediate set, and the individual grades corresponding to each of the individual intermediate sets are different.

[0130] It can be understood that for the individual intermediate set of a certain individual grade, the crowding distance calculation in step B23 can be using the Crowding distance assignment algorithm to calculate the crowding distance corresponding to each population individual in the individual intermediate set based on the intermediate element fitness corresponding to each population individual in the individual intermediate set, and then determining the maximum crowding distance in all the crowding distances as the target crowding distance, and the individual intermediate sets of the remaining individual grades can be simply analogized to obtain the target crowding distance corresponding to each of the individual intermediate sets.

[0131] B24, generating a position updating vector for all the target crowding distances according to the search dynamic threshold, to obtain a target updating vector corresponding to each of the target crowding distances;

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

[0133] B241, obtaining a first random number;

[0134] B242, comparing the search dynamic threshold and 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 individual intermediate set of a certain individual grade, step B241 can be obtaining a randomly generated random number, and the random number is recorded as the first random number; then, comparing 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 scene population, so as to obtain the second threshold comparison result. Specifically, the search dynamic threshold in the embodiment of the present application can be represented as:

[0136]

[0137] wherein, MOA is a search dynamic threshold; g is a current population optimization round of an initial scene population; gmax is a population optimization threshold.

[0138] B243, if the second threshold comparison result is that the first random number is greater than the search dynamic threshold, performing global position update on the target congestion distance to obtain the target update vector;

[0139] Further, the step B243, performing global position update on the target congestion distance to obtain the target update vector, comprises:

[0140] B2431, obtaining a second random number and a preset first search optimization threshold;

[0141] B2432, comparing the second random number and 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, performing position vector division update on the target congestion distance to obtain the target update vector;

[0143] Alternatively, B2434, if the third threshold comparison result is that the second random number is less than or equal to the first search optimization threshold, performing position vector multiplication update on the target congestion 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 target congestion distance can be updated in position by global search, and the step B2432 can be to compare the size 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 congestion distance can be obtained by division operation, and the target update vector can be represented as:

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

[0147] Wherein, X' is a target update vector corresponding to the target congestion distance; Xbest is the target congestion distance; MOP is a data optimization probability; ∈ is a minimum positive value; μ is a control item, and the value thereof can be 0.5; UBj is an upper limit value of the variable j, LBj is a lower limit value of the variable j, and the variable j is any one of the relative bearing, the relative distance, the relative heading, the target ship speed, the tug speed and the environmental factors of the tug and the target ship.

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

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

[0150] Wherein, α is a pre-set constant, and the constant can be any one of 3, 5, 7, etc.

[0151] Alternatively, if the third threshold comparison result is that the second random number is less than or equal to the first search optimization threshold, a target update vector corresponding to the target congestion 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] Alternatively, in B244, if the second threshold comparison result is that the first random number is less than or equal to the search dynamic threshold, the target congestion distance is locally updated to obtain the target update vector.

[0154] Further, in B244, the target congestion distance is locally updated to obtain the target update vector, including:

[0155] B2441, a third random number and a pre-set second search optimization threshold are obtained;

[0156] B2442, the third random number and the second search optimization threshold are compared 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, the target congestion distance is updated by a position vector subtraction to obtain the target update vector;

[0158] Alternatively, B2444, if the fourth threshold comparison result is that the third random number is less than or equal to the second search optimization threshold, the target congestion distance is updated by a position vector addition to obtain the target update vector.

[0159] In the embodiments of the present application, the third random number can be a randomly generated random number, and the second search optimization threshold can be a preset local search optimization threshold, which can be the same as the 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, the target crowded distance can be updated in position by local search, and step B2432 can be to compare the size 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, the target update vector corresponding to the target crowded distance can be obtained by subtraction operation, and the target update vector can be represented as:

[0161] X' = Xbest- (MOP) x ((UBj-LBj) x μ+LBj)

[0162] Alternatively, if the fourth threshold comparison result is that the third random number is less than or equal to the second search optimization threshold, the target update vector corresponding to the target crowded distance can be obtained by addition operation, and the target update vector can be represented as:

[0163] X' = Xbest+ (MOP) x ((UBj-LBj) x μ+LBj)

[0164] B25, according to all the target update vectors, the initial scene population is updated in position to obtain the first intermediate scene population.

[0165] In the embodiments of the present application, after obtaining the target update vector corresponding to the target crowded distance of each individual level, the corresponding population individual in the initial scene population can be updated in position based on each obtained target update vector to obtain the first intermediate scene population. Specifically, for a certain target update vector, step B25 can first obtain the corresponding population individual in the initial scene population based on the individual level corresponding to the target update vector, and then update the corresponding population individual using the target update vector to achieve the position update of the population individual of the specific individual level. The remaining target update vectors are the same, and after the population individuals corresponding to all target update vectors are updated in position, the first intermediate scene population is obtained.

[0166] B3, according to the initial scene population, the first intermediate scene population is analyzed to obtain the second intermediate scene population and the population fitness data of the second intermediate scene population;

[0167] Further, the step B3, population merging analysis is performed on the first intermediate scene population according to the initial scene population, to obtain a second intermediate scene population and population fitness data of the second intermediate scene population, including:

[0168] B31, obtaining a second element fitness function;

[0169] B32, population merging is performed on the first intermediate scene population according to the initial scene population, to obtain the second intermediate scene population;

[0170] B33, individual fitness analysis is performed on the second intermediate scene population according to the second element fitness function, to obtain the population fitness data.

[0171] In the embodiments of the present application, the second element fitness function can be the same as the first element fitness function described above, and the difference in name is used to distinguish the use stage of the element fitness function. Specifically, step B32 can be to merge the initial scene population and the first intermediate scene population, and form the second intermediate scene population; then, based on the second element fitness function, the element fitness of each population individual in the second intermediate scene population is obtained, which can specifically be that the scene parameters (such as relative position θ, relative distance D, relative heading H, target ship speed V1, tug speed V2 and environmental element E) of each population individual in the second intermediate scene population are input into the second element fitness function, so as to obtain the element fitness corresponding to each population individual in the second intermediate scene population, and then based on all the element fitness, the population fitness data of the second intermediate scene population is obtained.

[0172] B4, sorting analysis is performed on the second intermediate scene population according to the population fitness data, to obtain the target optimal solution set.

[0173] Further, the step B4, sorting analysis is performed on the second intermediate scene population according to the population fitness data, to obtain the target optimal solution set, including:

[0174] B41, obtaining a preset population optimization threshold, an archive threshold and an individual threshold;

[0175] B42, obtaining a current population optimization round and a first intermediate optimal solution data set corresponding to the current population optimization round;

[0176] B43, individual rank sorting is performed on the second intermediate scene population according to the population fitness data, to obtain a plurality of individual sorting sets, and each individual sorting set corresponds to a different individual rank;

[0177] B44, updating the first intermediate optimal solution dataset according to the archive threshold and all the individual ranking sets to obtain a second intermediate optimal solution dataset;

[0178] B45, comparing the current population optimization round with the population optimization threshold to obtain a 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, updating the current population optimization round, updating the first intermediate optimal solution dataset according to the second intermediate optimal solution dataset, and updating the initial scenario population according to the individual threshold and the second intermediate optimal solution dataset, and then returning to the step of obtaining the initial scenario population of the autonomous companion flight scenario and the scenario element data corresponding to the initial scenario population;

[0180] Alternatively, B47, if the fifth threshold comparison result is that the current population optimization round is greater than or equal to the population optimization threshold, determining the second intermediate optimal solution dataset as the target optimal solution set.

[0181] In the embodiments of the present application, the population optimization threshold can be the maximum round of population optimization, the archive threshold can be the maximum number of optimal solutions in the first intermediate optimal solution dataset, and the individual threshold can 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 be flexibly set according to actual conditions. In addition, for the current population optimization round, the first intermediate optimal solution dataset corresponding to the current population optimization round can be obtained first. Specifically, if the current population optimization round is the first population optimization, the corresponding first intermediate optimal solution dataset can be a blank dataset; or if the current population optimization round is the second and subsequent population optimization, the corresponding first intermediate optimal solution dataset can be the second intermediate optimal solution dataset obtained in the previous population optimization round.

[0182] It can be understood that the individual ranking in step B43 can first be based on each element fitness in the population fitness data to classify each population individual in the second intermediate scenario population by individual level, and the specific level classification content is similar to the foregoing step B1, which can be simply analogized; then based on the individual level corresponding to each population individual in the second intermediate scenario population, a plurality of individual ranking sets with different individual levels are generated.

[0183] It should be noted that step B44 starts from the individual ranking set corresponding to the first individual level (i.e., the highest individual level), and updates the population individuals in the individual ranking set to the first intermediate optimal solution data set in turn until the population individuals in the first intermediate optimal solution data set reach the archive threshold or all population individuals in the individual ranking set have been processed, so as to obtain the second intermediate optimal solution data set. Specifically, for a population individual e of an individual ranking set, if the first intermediate optimal solution data set does not have other population individuals dominated by the population individual e, the population individual can be added and updated to the first intermediate optimal solution data set as an optimal solution; or, if the first intermediate optimal solution data set has other population individuals dominated by the population individual e, the other population individuals dominated by the population individual e in the first intermediate optimal solution data set can be removed, and then the population individual e is added and updated to the first intermediate optimal solution data set as an optimal solution, and the rest is the same.

[0184] It is worth mentioning that step B45 can compare the size relationship between the current population optimization round and the population optimization threshold, and if the current population optimization round is less than the population optimization threshold, it means that the population optimization exit condition is not met, at this time the current population optimization round can be updated, specifically, the current population optimization round can be operated by 1; at the same time, the second intermediate optimal solution data set is used to update the first intermediate optimal solution data set, so that the second intermediate optimal solution data set of the current population optimization round is used as the first intermediate optimal solution data set of the next population optimization round; in addition, based on the individual threshold, a number of population individuals equal to the individual threshold are selected from the second intermediate optimal solution data set as the initial scene 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 population optimization exit condition is met, at this time each population individual in the second intermediate optimal solution data set can be regarded as a target optimal solution, so as to obtain a target optimal solution set.

[0185] Step 140, test case generation is performed on the target optimal solution set to obtain the target test case of the autonomous companion navigation scene.

[0186] In the embodiments of the present application, each target optimal solution in the target optimal solution set can be regarded as a test scene, and a test case corresponding to each target optimal solution can be constructed based on the scene parameters of each target optimal solution, so as to obtain the target test case of the autonomous companion navigation scene.

[0187] Hereinafter, a system for generating an autonomous companion navigation test case according to the embodiments of the present application is described in detail with reference to the accompanying drawings.

[0188] Referring to Figure 2 The system for generating an autonomous companion navigation test case according to the embodiments of the present application comprises:

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

[0190] The second processing unit 102 is configured to input the scene element data into the trained fitness proxy model to perform fitness prediction, and obtain scene element fitness data output by the trained fitness proxy model, the scene element fitness data including a plurality of intermediate element fitnesses, each of the intermediate element fitnesses being a scene element fitness of a corresponding population individual in the initial scene population.

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

[0192] The fourth processing unit 104 is configured to perform test case generation on the target optimal solution set, and obtain a target test case of the autonomous companion scene.

[0193] It can be understood that the contents in the above method embodiments are applicable to the present system embodiments, the present system embodiments specifically implement the functions of the above method embodiments, and achieve the same beneficial effects as the above method embodiments.

[0194] With reference to Figure 3 The present application embodiment further provides an electronic device, which comprises:

[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 contents in the above method embodiments are applicable to the present device embodiments, the present device embodiments specifically implement the functions of the above method embodiments, and achieve the same beneficial effects as the above method embodiments.

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

[0200] Similarly, the contents of the above method embodiments are applicable to the computer readable storage medium embodiments, the computer readable storage medium embodiments specifically implement the functions of the above method embodiments, and achieve the same beneficial effects as the above method embodiments.

[0201] In some alternative embodiments, the functions / operations mentioned in the block diagrams can not occur in the order mentioned in the operation diagrams. For example, depending on the functions / operations involved, two blocks shown in succession can actually be executed substantially concurrently with each other, or sometimes the blocks can be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of the present application are only provided as examples, and the purpose is to provide a more comprehensive understanding of the technology. The disclosed method is not limited to the operations and logical flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and in which sub-operations described as part of a larger operation are independently executed.

[0202] In addition, although the present application is 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 can be integrated in a single physical device and / or software module, or one or more functions and / or features can be implemented in separate physical devices or software modules. It can also be understood that a detailed discussion of the actual implementation of each module is unnecessary for an understanding of the present application. Rather, given the properties, functions and internal relationships of the various functional modules disclosed in the devices herein, the actual implementation of the module will be within the routine skill of the engineer, given the benefit of this disclosure. Therefore, a person skilled in the art can implement the present application as set forth in the claims without undue experimentation, using ordinary skill. It can also be understood that the disclosed specific concepts 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 the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part of the prior art that contributes to the technical solutions or the part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of the embodiments. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0204] The logic and / or steps represented in the flow diagrams or otherwise described herein, for example, can be embodied in non-transitory computer- readable media, executed by an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions, or in conjunction with which the instructions can be executed. In the context of this specification, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable medium can be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or propagation medium.

[0205] More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection (electronic) having one or more wires, a portable computer diskette (magnetic), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can also be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, for example, via an optical scanner, then compiled, interpreted, or otherwise processed, and stored in a computer memory in a form that is then employable by or in connection with an instruction execution system, apparatus, or device.

[0206] It should be understood that aspects of the present application can be implemented in hardware, software, firmware or combinations thereof. In the above described embodiments, the various steps or methods can be implemented in software or firmware that is stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any of the following technologies, or combinations thereof, can be used: a discrete logic circuit having logic gates for implementing logic functions upon data signals, an application specific integrated circuit having appropriate combinational logic gates, a programmable gate array (PGA), a field programmable gate array (FPGA), and / or the like.

[0207] In the above described description of the present specification, the description referring to the terms "one embodiment", "another embodiment", or "certain embodiments" or the like means that a specific feature, structure, material or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. The illustrative appearances of the above described terms in the description are not necessarily referred to the same embodiment or example throughout the specification. Moreover, the specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0208] While the embodiments of the present application have been shown and described, it is to be understood that the embodiments can be varied, modified, substituted and changed by those skilled in the art without departing from the principles and spirit of the present application, the scope of which is defined by the claims and their equivalents.

[0209] The above is a specific description of the preferred embodiments of the present application, but the present application is not limited to the embodiments, and those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present application, and these equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.

Claims

1. A method for generating autonomous companion test cases, the method comprising: receiving a test case; identifying a companion test case for the test case; and generating the companion test case based on the test case. The method comprises the following steps: obtaining a trained fitness agent model, an initial scene population of an autonomous companion navigation 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, wherein the scene element fitness data comprises a plurality of intermediate element fitnesses, and each intermediate element fitness is a scene element fitness of a corresponding population individual in the initial scene population; performing population optimal solution analysis on the initial scene population according to all the intermediate element fitnesses to obtain a target optimal solution set; generating a target test case of the autonomous companion navigation scene by performing test case generation on the target optimal solution set; the population optimal solution analysis on the initial scene population according to all the intermediate element fitnesses to obtain a target optimal solution set comprises: performing individual rank classification on each population individual in the initial scene population according to all the intermediate element fitnesses to obtain an individual rank corresponding to each population individual; performing individual position updating on the initial scene population according to all the individual ranks to obtain a first intermediate scene population; performing population merging analysis on the first intermediate scene population according to the initial scene population to obtain a second intermediate scene population and population fitness data of the second intermediate scene population; performing sorting analysis on the second intermediate scene population according to the population fitness data to obtain the target optimal solution set.

2. The method of claim 1, wherein, the obtaining of the trained fitness agent model comprises: obtaining a constituent element range set of the autonomous companion navigation scene, a preset element combination strength, and a first element fitness function corresponding to the constituent element range set; performing element combination on the constituent element range set according to the element combination strength to obtain a basic scene data set; performing test simulation on the basic scene data set according to the first element fitness function to obtain an element fitness data set corresponding to the basic scene data set; performing model training on an initialized fitness agent model according to the basic scene data set and the element fitness data set to obtain the trained fitness agent model.

3. The method of claim 1, wherein, the individual rank classification on each population individual in the initial scene population according to all the intermediate element fitnesses to obtain an individual rank corresponding to each population individual comprises: obtaining a preset dominated number threshold; obtaining a plurality of intermediate individuals and a current individual rank, wherein the intermediate individuals are unclassified population individuals in the initial scene population corresponding to the current individual rank; performing domination classification on all the intermediate individuals according to all the intermediate element fitnesses to obtain a dominated count corresponding to each intermediate individual; performing threshold comparison on all the dominated counts according to the dominated number threshold to obtain a first threshold comparison result corresponding to each intermediate individual; 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 intermediate individual corresponding to the first threshold comparison result.

4. The method of claim 1, wherein, The individual position updating of the initial scene population according to all the individual levels to obtain a first intermediate scene population comprises: obtaining a preset search dynamic threshold; performing individual screening on the initial scene population according to all the individual levels to obtain an individual intermediate set corresponding to each of the individual levels; performing crowded distance calculation on all the individual intermediate sets to obtain a target crowded distance corresponding to each of the individual intermediate sets; generating a position updating vector for all the target crowded distances according to the search dynamic threshold to obtain a target updating vector corresponding to each of the target crowded distances; performing position moving updating on the initial scene population according to all the target updating vectors to obtain the first intermediate scene population.

5. The method of claim 4, wherein, The generating of the position updating vector for the target crowded distance according to the search dynamic threshold to obtain the target updating vector corresponding to the target crowded distance comprises: obtaining a 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, performing global position updating on the target crowded distance to obtain the target updating vector, or if the second threshold comparison result is that the first random number is less than or equal to the search dynamic threshold, performing local position updating on the target crowded distance to obtain the target updating vector.

6. The method of claim 5, wherein, The global position updating of the target crowded distance to obtain the target updating vector comprises: obtaining a second random number and a preset first search optimization threshold; comparing the second random number and 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, performing position vector division updating on the target crowded distance to obtain the target updating 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, performing position vector multiplication updating on the target crowded distance to obtain the target updating vector. The local position updating of the target crowded distance to obtain the target updating vector comprises: obtaining a third random number and a preset second search optimization threshold; comparing the third random number and the second search optimization threshold to obtain a fourth threshold comparison result; if the fourth threshold comparison result is that the third random number is greater than the second search optimization threshold, performing position vector subtraction updating on the target crowded distance to obtain the target updating 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, performing position vector addition updating on the target crowded distance to obtain the target updating vector.

7. The method of claim 1, wherein, The population merging analysis is performed on the first intermediate scene population according to the initial scene population, to obtain a second intermediate scene population and population fitness data of the second intermediate scene population, including: obtaining a second element fitness function; performing population merging on the first intermediate scene population according to the initial scene population to obtain the second intermediate scene population; performing individual fitness analysis on the second intermediate scene population according to the second element fitness function to obtain the population fitness data.

8. The method of claim 1, wherein, The sorting analysis is performed on the second intermediate scene population according to the population fitness data to obtain the target optimal solution set, including: obtaining a preset population optimization threshold, an archive threshold and an individual threshold; obtaining a current population optimization round and a first intermediate optimal solution data set corresponding to the current population optimization round; performing individual rank sorting on the second intermediate scene population according to the population fitness data to obtain a plurality of individual sorting sets, each individual sorting set corresponding to a different individual rank; performing first optimal solution updating on the first intermediate optimal solution data set according to the archive threshold and all the individual sorting sets to obtain a second intermediate optimal solution data set; comparing the current population optimization round and the population optimization threshold to obtain a fifth threshold comparison result; if the fifth threshold comparison result is that the current population optimization round is less than the population optimization threshold, then performing round updating on the current population optimization round, updating the first intermediate optimal solution data set according to the second intermediate optimal solution data set, and updating the initial scene population according to the individual threshold and the second intermediate optimal solution data set, and then returning to the step of obtaining the initial scene population of the autonomous companion navigation scene and the scene element data corresponding to the initial scene 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 determining the second intermediate optimal solution data set as the target optimal solution set.

9. A system for autonomous companion test case generation, the system comprising: including: a first processing unit configured to obtain a trained fitness proxy model, an initial scene population of an autonomous companion navigation scene and scene element data corresponding to the initial scene population; a second processing unit configured to input the scene element data into the trained fitness proxy model for fitness prediction to obtain scene element fitness data output by the trained fitness proxy model, the scene element fitness data including a plurality of intermediate element fitnesses, each intermediate element fitness being a scene element fitness of a corresponding population individual in the initial scene population; 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; a fourth processing unit configured to generate a target test case for the autonomous companion navigation scene by testing the target optimal solution set; the population optimal solution analysis on the initial scene population according to all the intermediate element fitnesses to obtain a target optimal solution set, including: According to all the intermediate element fitness, individual rank classification is performed on each of the population individuals in the initial scene population, to obtain an individual rank corresponding to each of the population individuals; According to all the individual ranks, individual position updating is performed on the initial scene population, to obtain a first intermediate scene population; According to the initial scene population, population merging analysis is performed on the first intermediate scene population, to obtain a second intermediate scene population and population fitness data of the second intermediate scene population; According to the population fitness data, sorting analysis is performed on the second intermediate scene population, to obtain the target optimal solution set.

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