Automatic driving scene test case generation method and system based on complexity
By acquiring complexity data and using Bayesian theorem and kernel density estimation to generate test cases, the problems of low accuracy and efficiency in autonomous driving tests in existing technologies are solved, and more efficient and accurate autonomous driving tests are achieved.
Patent Information
- Application Number
- CN202210977515.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-15
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2042-08-15
AI Technical Summary
Existing autonomous driving test case generation methods do not consider complex traffic conditions and unexpected vehicle behaviors, resulting in poor test accuracy and low efficiency.
By acquiring target data, calculating complexity data, and using Bayesian theorem and kernel density estimation to generate test cases, including data classification, kernel density estimation, and test case generation modules, the test accuracy and efficiency are improved.
Improves the accuracy and efficiency of autonomous driving scenario testing, producing safer autonomous vehicles.
Smart Images

Figure CN115454018B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent driving, and particularly relates to a complexity-based automatic driving scene test case generation method and system. BACKGROUND
[0002] An automatic driving system refers to a system that helps people drive by machine and completely replaces human driving in special cases. The vehicle is controlled by the automatic driving system and can avoid the defects of human drivers in some cases. For the vehicle in the automatic driving system, a large number of automatic driving tests need to be carried out to ensure the safety of automatic driving. In addition to the stability of the automatic driving system itself, complex traffic conditions and unexpected behaviors of vehicles will affect the safety of automatic driving.
[0003] In the conventional test case, when writing the test case, a large number of test cases are generated by adjusting parameters, without considering complex traffic conditions and unexpected behaviors of vehicles and other complex scenes, so that the test accuracy of the generated test cases is poor. In addition, since the generation of the test case mostly needs to be manually adjusted by the staff, the staff needs to do a lot of repetitive work, which is time-consuming and laborious, so that the test efficiency is poor. SUMMARY
[0004] The present application provides a complexity-based automatic driving scene test case generation method and system to solve the defect that the test accuracy of the automatic driving scene is poor due to the generation of the test instance without considering the complexity in the prior art, and to improve the test efficiency and test accuracy.
[0005] The present application provides a complexity-based automatic driving scene test case generation method, comprising: obtaining target data; obtaining complexity data corresponding to the target data according to the target data; sorting the complexity data and classifying the sorted complexity data; based on the classified complexity data, converting the target data corresponding to the selected category of complexity data using Bayes' theorem to obtain discrete data; performing kernel density estimation on the discrete data to obtain test cases corresponding to the category complexity data.
[0006] According to the complexity-based automatic driving scene test case generation method provided by the present application, the kernel density estimation is performed on the discrete data to obtain test cases corresponding to the category complexity data, comprising: selecting a corresponding kernel function and bandwidth based on a preset kernel function selection rule and a bandwidth selection rule; performing kernel density estimation on the discrete data based on the kernel function and the bandwidth to obtain a density function corresponding to the category complexity data; and generating test cases corresponding to the category complexity data based on the density function.
[0007] According to the application, a complexity-based automatic driving scene test case generation method is provided, and the preset kernel function selection rule and bandwidth selection rule are used to select a corresponding kernel function and bandwidth, including: obtaining a bandwidth according to the number of discrete data, the dimension of the discrete data and the standard deviation of the discrete data; selecting a Gaussian kernel based on the kernel function selection rule, and obtaining a kernel function according to the bandwidth.
[0008] According to the application, a complexity-based automatic driving scene test case generation method is provided, and the target data is obtained, including: obtaining original data; and labeling the original data to obtain labeled data based on a variable parameter.
[0009] According to the application, a complexity-based automatic driving scene test case generation method is provided, and after the labeled data is obtained, the method further includes: performing interpolation processing on the labeled data to obtain common frequency time series data as target data; and / or performing smoothing processing on the labeled data.
[0010] According to the application, a complexity-based automatic driving scene test case generation method is provided, and after the target data is obtained, the method further includes: performing averaging on the target data based on a preset moving average window.
[0011] The application further provides a complexity-based automatic driving scene test case generation system, including: a data acquisition module for acquiring target data; a complexity acquisition module for obtaining complexity data corresponding to the target data according to the target data; a classification module for sorting the complexity data and classifying the sorted complexity data; a data conversion module for converting the target data corresponding to the selected category of complexity data based on the classified complexity data by using the Bayes theorem to obtain discrete data; and a test case generation module for performing kernel density estimation on the discrete data to obtain test cases corresponding to the category of complexity data.
[0012] The application further provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the complexity-based automatic driving scene test case generation method according to any of the above when executing the program.
[0013] The application further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and the computer program implements the steps of the complexity-based automatic driving scene test case generation method according to any of the above when executed by a processor.
[0014] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any of the complexity-based autonomous driving scenario test case generation methods described above.
[0015] The complexity-based autonomous driving scenario test case generation method and system provided by the present invention classify complexity data to facilitate data conversion of target data corresponding to data of different levels of complexity, and perform kernel density estimation on the converted data, thereby facilitating the generation of corresponding test cases according to different levels of complexity, improving test efficiency and accuracy, and helping to produce safer autonomous driving vehicles. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 1 is a flow chart of a complexity-based test case generation method for autonomous driving scenarios provided by the present invention;
[0018] Figure 2 Schematic diagram of the structure of the complexity-based autonomous driving scenario test case generation system provided by the present invention;
[0019] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0020] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0021] Figure 1 A flow chart of a complexity-based method for generating test cases for autonomous driving scenarios according to the present invention is shown. The method includes:
[0022] S11, acquiring target data;
[0023] S12, obtaining complexity data corresponding to the target data according to the target data;
[0024] S13, sorting the complexity data and classifying the sorted complexity data;
[0025] S14, based on the classified complexity data, using the Bayesian theorem to transform the target data corresponding to the complexity data of the selected category to obtain discrete data;
[0026] S15, perform kernel density estimation on discrete data to obtain test cases of corresponding category complexity data.
[0027] It should be noted that S1N in this specification does not represent the order of the complexity-based autonomous driving scenario test case generation method. The complexity-based autonomous driving scenario test case generation method of the present invention is described in detail below.
[0028] Step S11, acquiring target data.
[0029] It should be noted that in order to understand the impact of each variable parameter on the final complexity and generate test cases based on the impact relationship, the target data obtained should be simple and only change in the variable parameters, so as to facilitate the subsequent generation of more accurate test cases. Therefore, obtaining the target data includes: obtaining the original data; labeling the original data based on the variable parameters to obtain labeled data.
[0030] In this embodiment, the target data includes but is not limited to the position and heading information of the host vehicle in each sampling period, the speed and acceleration information of all moving targets, and the position and heading information relative to the host vehicle.
[0031] For example, the original data is represented as Where n represents the number of original data, and k represents the dimension of the original data. In an optional embodiment, when labeling the original data, it also includes: reducing the dimension of the original data, and the target data is represented as
[0032] In an optional embodiment, after obtaining the labeled data, the method further includes: interpolating the labeled data to obtain constant-frequency time series data as target data; and / or smoothing the labeled data. It should be noted that since some data may have high-frequency natural features, interpolation can be performed based on the nearest neighbor interpolation method so that the data appears as a constant-frequency time series. For example, the target data is represented as Close k to interpolate it and get in,
[0033] In an optional embodiment, since most of the information during driving comes from scene vision, and the visual sense cannot perceive information continuously, after obtaining the target data, the target data is averaged based on a preset moving average window. It should be noted that since human vision can perceive images with an interval of 13 milliseconds, for convenience, the length of the moving average window needs to be less than 13 milliseconds, for example, it can be set to 10 milliseconds, and the corresponding target data is represented as
[0034] Step S12: Obtain complexity data corresponding to the target data according to the target data.
[0035] In this embodiment, complexity data corresponding to the target data is obtained based on the target data, including: obtaining a first complexity based on the heading angle of the target vehicle relative to the main vehicle; obtaining a second complexity based on the speed, maximum speed and minimum speed of the target vehicle relative to the main vehicle; obtaining a third complexity based on the speed, maximum distance and minimum distance of the target vehicle relative to the main vehicle; obtaining a fourth complexity based on the deceleration of the main vehicle and the duration of the deceleration; and obtaining complexity data based on the first complexity, the second complexity, the third complexity, and the fourth complexity.
[0036] Complexity data is expressed as:
[0037]
[0038] Among them, θ represents the heading angle of the target vehicle relative to the main vehicle, v y represents the speed of the target vehicle relative to the host vehicle, d l represents the longitudinal distance of the target vehicle relative to the host vehicle, and dcc represents the deceleration of the host vehicle.
[0039] f(θ,v y ,d l )=f1(θ)·f2(v y )·f3(d l )
[0040] in:
[0041]
[0042] It should be noted that f1(θ) represents the first complexity. In addition, the closer the heading angle θ is to a right angle, the higher the complexity.
[0043]
[0044] Among them, f2(v y ) represents the second complexity, v maximum Indicates the maximum speed, vminimum It should be noted that when the speed of the main vehicle perpendicular to the lane is close to the maximum speed, the complexity is higher, and as v y The complexity increases sharply when approaching the maximum speed. In addition, the complexity increases as the speed decreases.
[0045]
[0046] Among them, f3(d l ) represents the third complexity, d l_maximum Indicates the maximum distance, d l_minimum Indicates the minimum distance. The closer the distance is to the minimum distance, the higher the complexity is, and the complexity rises sharply as the distance approaches the minimum distance.
[0047]
[0048] Among them, g(dcc) represents the fourth complexity, The average deceleration value of the host vehicle is Δt, and the duration of the deceleration is Δt. It should be noted that greater deceleration and longer duration of the host vehicle's deceleration indicate a stronger braking demand and a more complex scenario, reflecting the host vehicle's ability to control environmental complexity. Here, the deceleration value is more sensitive than the duration.
[0049] In an optional embodiment, after obtaining the complexity data corresponding to the target data, the method further includes: removing outlier data in the complexity data.
[0050] Step S13: sort the complexity data and classify the sorted complexity data.
[0051] In this embodiment, a binomial system can be used to simulate the distribution. For example, if the complexity is divided into three levels, a ratio of 1:2:1 can be used to classify the data. Similarly, as the number of categories increases, a higher binomial coefficient is used. It should be noted that the number of categories should match the number of data. For example, if there are n categories, each category should have data Based on the central limit theorem, the limit is taken as the normal distribution, that is, Among them, B(n,p) represents the quadratic distribution, where n represents the number of independent events and p represents the probability of an event occurring. 2 ) represents the normal distribution, where μ represents the mean and σ represents the standard deviation.
[0052] Similarly, for complexity data After classification, various types of complexity data are obtained, namely in,
[0053] In an optional embodiment, before step S14, the method further includes: making an unbiased assumption on the variable parameters, so as to regard all parameter combinations as having equal chances of occurring, thereby facilitating subsequent transformation of the data using the Bayesian theorem.
[0054] Step S14: Based on the classified complexity data, the target data corresponding to the complexity data of the selected category is converted using the Bayesian theorem to obtain discrete data.
[0055] In this embodiment, Bayes' theorem is expressed as:
[0056]
[0057] in,
[0058] It's important to note that once the complexity data category is determined, P(ranking) is a constant for all target data of that complexity level. Similarly, assuming that all target data with different parameter values are equally important before data analysis, P(parameters) is also a constant, independent of any other information. Combined with these assumptions, for complexity data of a known category, P(parameters│ranking) is proportional to P(ranking│parameters).
[0059] Therefore, by Bayes' theorem, we can directly Continuous, we get G, that is Thus we get G i ={(t1,t2,···,t m )|ranking=i}
[0060] Step S15: perform kernel density estimation on the discrete data to obtain test cases corresponding to the category complexity data.
[0061] In this embodiment, kernel density estimation is performed on discrete data to obtain test cases corresponding to the complexity data of the corresponding category, including: selecting a corresponding kernel function and bandwidth based on preset kernel function selection rules and bandwidth selection rules; performing kernel density estimation on the discrete data based on the kernel function and bandwidth to obtain a density function corresponding to the complexity data of the corresponding category; and generating a test case corresponding to the complexity data of the corresponding category based on the density function. Specifically:
[0062] First, based on the preset kernel function selection rules and bandwidth selection rules, the corresponding kernel function and bandwidth are selected. Specifically, the bandwidth is obtained according to the number of discrete data, the dimension of discrete data and the standard deviation of discrete data; based on the kernel function selection rules, a Gaussian kernel is selected, and the kernel function is obtained according to the bandwidth.
[0063] It should be noted that bandwidth is expressed as:
[0064]
[0065] Among them, h1 represents the bandwidth, n1 represents the number of discrete data, d1 represents the dimension of discrete data, and σ represents the standard deviation of discrete data.
[0066] The Gaussian kernel is selected based on the kernel function, which is expressed as:
[0067]
[0068] Where x represents the physical quantity of discrete data.
[0069] Secondly, according to the kernel function and bandwidth, kernel density estimation is performed on discrete data to obtain the density function.
[0070] It should be noted that the kernel density estimation is expressed as:
[0071]
[0072] Among them, n2 represents the size of the data set, d2 represents the dimension of the parameter space, K represents the kernel function, and h2 represents the bandwidth.
[0073] Then the kernel density estimation of discrete data can be performed accordingly to obtain the density function, which can be expressed as:
[0074]
[0075] Depend on It can be seen that Therefore Also available as G i The generating function of .
[0076] Finally, based on the density function, test cases are generated for the corresponding category complexity data. It should be noted that generating test cases for the corresponding category complexity data based on the density function includes: determining the number of cases required for each category complexity level based on the category of the complexity data; and randomly selecting the required number of test cases from the density function corresponding to each category complexity data. The parameter values of the generated test cases are the most likely instance parameter values for the corresponding complexity level.
[0077] In an optional embodiment, after obtaining the test case corresponding to the category complexity data, it also includes: using the test case to test, and recording the test results, and labeling the data, and using the labeled data, returning to step S11 to re-execute the above steps, so as to facilitate updating the model, so as to facilitate the subsequent generation of more accurate test case parameter values.
[0078] In summary, the embodiment of the present application classifies the complexity data, so as to facilitate data conversion of target data corresponding to different levels of complexity data, and kernel density estimation of the converted data, so as to facilitate generation of corresponding test cases according to different levels of complexity, improve test efficiency and accuracy, and help produce safer autonomous vehicles.
[0079] The complexity-based autonomous driving scene test case generation system provided by the present application is described below, and the complexity-based autonomous driving scene test case generation system described below can be correspondingly referred to the complexity-based autonomous driving scene test case generation method described above.
[0080] Figure 2 A structural schematic diagram of a complexity-based autonomous driving scene test case generation system is shown. The device comprises:
[0081] The data acquisition module 21 acquires target data.
[0082] The complexity acquisition module 22 obtains complexity data corresponding to the target data according to the target data.
[0083] The classification module 23 sorts the complexity data and classifies the sorted complexity data.
[0084] The data conversion module 24 converts the target data corresponding to the selected category of complexity data based on the classified complexity data using Bayes' theorem to obtain discrete data.
[0085] The test case generation module 25 performs kernel density estimation on the discrete data to obtain test cases corresponding to the complexity data of the category.
[0086] In this embodiment, in order to understand the influence of each variable parameter on the final complexity and generate test cases based on the influence relationship, the target data obtained should be simple and only vary in variable parameters, so as to facilitate subsequent generation of more accurate test cases. Therefore, the data acquisition module 21 comprises: a data acquisition unit that acquires original data; and a labeling unit that labels the original data based on variable parameters to obtain labeled data.
[0087] In an optional embodiment, the data acquisition module 21 further comprises a dimension reduction unit for reducing the dimension of the original data when labeling the original data.
[0088] In an optional embodiment, the data acquisition module 21 further comprises: an interpolation processing unit configured to perform interpolation processing on the labeled data to obtain constant-frequency time series data as the target data; and / or, the data acquisition module 21 further comprises: a smoothing processing unit configured to perform smoothing processing on the labeled data. It should be noted that since some data may have high-frequency natural characteristics, interpolation can be performed based on the nearest neighbor interpolation method to make the data present as constant-frequency time series.
[0089] In an optional embodiment, since most of the information during driving comes from scene vision, and the visual sense cannot continuously perceive information, the system further comprises: a data averaging module configured to average the target data based on a preset moving average window after obtaining the target data. It should be noted that since human vision can perceive images with an interval of 13 milliseconds, for convenience, the length of the moving average window needs to be less than 13 milliseconds, for example, it can be set to 10 milliseconds.
[0090] The complexity acquisition module 22 is configured to obtain complexity data based on the intersection angle between the host vehicle and the adjacent vehicle, the host vehicle speed, the host vehicle vertical lane direction position, the host vehicle driving orientation, the host vehicle acceleration, and the relative speed between the host vehicle and the adjacent vehicle.
[0091] Specifically, the complexity acquisition module 22 comprises: a first complexity acquisition unit configured to obtain a first complexity based on the heading angle of the target vehicle relative to the host vehicle; a second complexity acquisition unit configured to obtain a second complexity based on the speed, maximum speed, and minimum speed of the target vehicle relative to the host vehicle; a third complexity acquisition unit configured to obtain a third complexity based on the speed, maximum distance, and minimum distance of the target vehicle relative to the host vehicle; a fourth complexity acquisition unit configured to obtain a fourth complexity based on the deceleration of the host vehicle and the duration of the deceleration; and a comprehensive complexity acquisition unit configured to obtain the complexity data based on the first complexity, the second complexity, the third complexity, and the fourth complexity.
[0092] In an optional embodiment, the system further comprises: a data removal module configured to remove data that is out of the complexity data after obtaining the complexity data corresponding to the target data.
[0093] The classification module 23 comprises: a sorting unit configured to sort the complexity data; and a classification unit configured to classify the sorted complexity data. In this embodiment, a binomial system can be used to simulate distribution to classify the data. It should be noted that the number of categories should match the number of data.
[0094] In an optional embodiment, the system further comprises: an unbiased assumption module configured to make an unbiased assumption on the variable parameters to regard all parameter combinations as equal opportunities to appear, thereby facilitating subsequent transformation of the data using the Bayes theorem.
[0095] The test case generation module 25 includes: a selection unit, which selects the corresponding kernel function and bandwidth based on preset kernel function selection rules and bandwidth selection rules; a kernel density estimation unit, which performs kernel density estimation on discrete data according to the kernel function and bandwidth to obtain the density function of the corresponding category complexity data; and a test case generation unit, which generates test cases for the corresponding category complexity data according to the density function.
[0096] Specifically, the selection unit includes: a bandwidth selection subunit, which obtains the bandwidth according to the number of discrete data, the dimension of the discrete data and the standard deviation of the discrete data; a kernel function selection subunit, which selects a Gaussian kernel based on the kernel function selection rule and obtains the kernel function according to the bandwidth.
[0097] The test case generation unit includes: a quantity determination subunit, which determines the number of cases required for each category of complexity level according to the category of complexity data; and a test case generation subunit, which randomly extracts the above number of test cases from the density function corresponding to the complexity data of each category.
[0098] In an optional embodiment, the system further includes: an updating module, which, after obtaining the test case corresponding to the category complexity data, uses the test case to perform testing, records the test results, and labels the data, and uses the labeled data to return to step S11 and re-execute the above steps, thereby facilitating the update of the model to facilitate the subsequent generation of more accurate test case parameter values.
[0099] In summary, the embodiments of the present invention classify complexity data through a classification module, so that the data conversion module can perform data conversion on target data corresponding to data of different levels of complexity, and perform kernel density estimation on the converted data through a test case generation module, thereby facilitating the generation of corresponding test cases according to different levels of complexity, improving test efficiency and accuracy, and helping to produce safer self-driving cars.
[0100] Figure 3 An example of a physical structure diagram of an electronic device is shown below. Figure 3As shown, the electronic device may include: a processor 31, a communication interface 32, a memory 33, and a communication bus 34, wherein the processor 31, the communication interface 32, and the memory 33 communicate with each other via the communication bus 34. The processor 31 may call the logic instructions in the memory 33 to execute a complexity-based method for generating test cases for autonomous driving scenarios, the method comprising: obtaining target data; obtaining complexity data corresponding to the target data based on the target data; sorting the complexity data and classifying the sorted complexity data; based on the classified complexity data, converting the target data corresponding to the complexity data of the selected category using the Bayesian theorem to obtain discrete data; performing kernel density estimation on the discrete data to obtain test cases for the complexity data of the corresponding category.
[0101] In addition, the logic instructions in the above-mentioned memory 33 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling 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 described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0102] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the above-mentioned methods to perform a complexity-based autonomous driving scenario test case generation method, which includes: obtaining target data; obtaining complexity data corresponding to the target data based on the target data; sorting the complexity data and classifying the sorted complexity data; based on the classified complexity data, using Bayes' theorem to convert the target data corresponding to the complexity data of the selected category to obtain discrete data; performing kernel density estimation on the discrete data to obtain test cases for the corresponding category complexity data.
[0103] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the complexity-based autonomous driving scenario test case generation method provided by the above-mentioned methods, the method comprising: obtaining target data; obtaining complexity data corresponding to the target data based on the target data; sorting the complexity data and classifying the sorted complexity data; based on the classified complexity data, using Bayes' theorem to convert the target data corresponding to the complexity data of the selected category to obtain discrete data; performing kernel density estimation on the discrete data to obtain test cases for the corresponding category complexity data.
[0104] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0105] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0106] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A complexity-based test case generation method for autonomous driving scenarios, characterized in that: include: Get target data; Obtaining complexity data corresponding to the target data according to the target data; sorting the complexity data, and classifying the sorted complexity data; Based on the classified complexity data, the Bayesian theorem is used to transform the target data corresponding to the complexity data of the selected category to obtain discrete data; Performing kernel density estimation on the discrete data to obtain test cases corresponding to the category complexity data; The target data includes but is not limited to the position and heading information of the host vehicle in each sampling period, the speed and acceleration information of all moving targets, and the position and heading information relative to the host vehicle; According to the target data, complexity data corresponding to the target data is obtained, including: Based on the heading angle of the target vehicle relative to the host vehicle, the first complexity is obtained; Obtaining a second complexity based on the speed, maximum speed, and minimum speed of the target vehicle relative to the host vehicle; A third complexity is obtained based on the speed, maximum distance, and minimum distance of the target vehicle relative to the host vehicle; A fourth complexity is obtained based on the deceleration of the host vehicle and the duration of the deceleration; Obtaining complexity data based on the first complexity, the second complexity, the third complexity, and the fourth complexity; The complexity data is expressed as: Among them, θ represents the heading angle of the target vehicle relative to the main vehicle, v y represents the speed of the target vehicle relative to the host vehicle, d l It represents the longitudinal distance of the target vehicle relative to the host vehicle, and dcc represents the deceleration of the host vehicle; f(θ,v y ,d l )=f1(θ)·f2(v y )·f3(d l ) Where: f1(θ) represents the first complexity; Among them, f2(v y ) represents the second complexity, v maximum Indicates the maximum speed, v minimum Indicates the minimum speed; Among them, f3(d l ) represents the third complexity, d l_maximum Indicates the maximum distance, d l_minimum Indicates the minimum distance; Among them, g(dcc) represents the fourth complexity, is the average value of the main vehicle's deceleration, and Δt is the duration of the deceleration.
2. The complexity-based autonomous driving scenario test case generation method according to claim 1, characterized in that: Perform kernel density estimation on the discrete data to obtain test cases corresponding to the category complexity data, including: Select the corresponding kernel function and bandwidth based on the preset kernel function selection rules and bandwidth selection rules; Performing kernel density estimation on the discrete data according to the kernel function and the bandwidth to obtain a density function of the corresponding category complexity data; According to the density function, test cases corresponding to the category complexity data are generated.
3. The complexity-based test case generation method for autonomous driving scenarios according to claim 2, characterized in that: The selecting of the corresponding kernel function and bandwidth based on the preset kernel function selection rule and bandwidth selection rule includes: Obtaining a bandwidth according to the number of discrete data, the dimension of the discrete data, and the standard deviation of the discrete data; Based on the kernel function selection rule, a Gaussian kernel is selected, and the kernel function is obtained according to the bandwidth.
4. The complexity-based autonomous driving scenario test case generation method according to claim 1, characterized in that: The acquiring target data includes: Get the original data; The original data is labeled based on the variable parameters to obtain labeled data.
5. The complexity-based test case generation method for autonomous driving scenarios according to claim 4, characterized in that: After obtaining the labeled data, the method further includes: Performing interpolation processing on the labeled data to obtain constant frequency time series data as target data; and / or, The labeled data is smoothed.
6. The complexity-based autonomous driving scenario test case generation method according to claim 1, characterized in that: After acquiring the target data, the method further includes: The target data is averaged based on a preset moving average window.
7. A complexity-based autonomous driving scenario test case generation system, characterized by: include: Data acquisition module, acquires target data; A complexity acquisition module, which obtains complexity data corresponding to the target data according to the target data; A classification module, sorting the complexity data and classifying the sorted complexity data; The data conversion module converts the target data corresponding to the selected category of complexity data using Bayesian theorem based on the classified complexity data to obtain discrete data; A test case generation module performs kernel density estimation on the discrete data to obtain test cases corresponding to the category complexity data; The target data includes but is not limited to the position and heading information of the host vehicle in each sampling period, the speed and acceleration information of all moving targets, and the position and heading information relative to the host vehicle; The complexity acquisition module includes: A first complexity obtaining unit obtains a first complexity based on a heading angle of the target vehicle relative to the host vehicle; a second complexity obtaining unit, configured to obtain a second complexity based on a speed, a maximum speed, and a minimum speed of the target vehicle relative to the host vehicle; a third complexity obtaining unit, configured to obtain a third complexity based on a speed, a maximum distance, and a minimum distance of the target vehicle relative to the host vehicle; a fourth complexity obtaining unit, configured to obtain a fourth complexity based on the deceleration and the duration of the deceleration of the host vehicle; a comprehensive complexity acquisition unit, which obtains complexity data based on the first complexity, the second complexity, the third complexity, and the fourth complexity; The complexity data is expressed as: Among them, θ represents the heading angle of the target vehicle relative to the main vehicle, v y represents the speed of the target vehicle relative to the host vehicle, d l It represents the longitudinal distance of the target vehicle relative to the host vehicle, and dcc represents the deceleration of the host vehicle; f(θ,v y ,d l )=f1(θ)·f2(v y )·f3(d l ) Where: f1(θ) represents the first complexity; Among them, f2(v y ) represents the second complexity, v maximum Indicates the maximum speed, v minimum Indicates the minimum speed; Among them, f3(d l ) represents the third complexity, d l_maximum Indicates the maximum distance, d l_minimum Indicates the minimum distance; Among them, g(dcc) represents the fourth complexity, is the average value of the main vehicle's deceleration, and Δt is the duration of the deceleration.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the complexity-based autonomous driving scenario test case generation method as described in any one of claims 1 to 6 are implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the complexity-based autonomous driving scenario test case generation method as described in any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the complexity-based autonomous driving scenario test case generation method as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Automatic driving test case generation method and device, electronic equipment and storage medium
CN114815605A