A prediction method and device for testing spatial coverage
By determining the scene parameter mapping value and preset missed probability of the simulation scene, the coverage of the simulation scene to the test space is estimated, which solves the problem of inability to evaluate coverage in the prior art and improves the simulation efficiency.
Patent Information
- Application Number
- CN202310383508.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-11
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2043-04-11
AI Technical Summary
In the prior art, it is impossible to accurately evaluate the coverage of the simulation scenario before simulating it, resulting in a large number of unnecessary simulations that need to be performed, affecting the simulation efficiency.
By obtaining the scene parameter mapping value and preset missed probability of the scene to be simulated, the preset space that meets the preset missed probability is determined, and the coverage of the test space is estimated based on the number of scenes to be simulated.
Effectively estimate the coverage of the simulation scene to the test space, reducing unnecessary simulation times and improving simulation efficiency.
Smart Images

Figure CN116306019B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of autonomous driving technology, and particularly to a method and device for predicting test space coverage. Background Art
[0002] For a discrete space, the coverage of a set of simulation scenarios can be simply defined as the cumulative probability of each simulation scenario belonging to the discrete space; for a continuous test space, the measure of discrete points in the continuous space is always 0, so the continuous space is often discretized. Generally, the test space is divided into multiple grids according to a specific step size, and the coverage of the test space is completed if there are simulation scenarios in each grid.
[0003] The above method results in the evaluation of coverage being affected by the division granularity. When the dimension of the test space is higher, if the granularity of each dimension is maintained, the number of grids increases exponentially, and thus the number of required simulation scenarios also increases exponentially. At the same time, the factors causing failures often do not depend on all parameters, but are determined by several parameters. Simply dividing the test space into multiple grids according to a specific step size, limited by the grid shape, it is impossible to effectively collect rectangular events determined by specific value ranges of only several parameters, and thus it is impossible to ensure that the simulation scenarios that will cause the vehicle at the system level under test to fail are collected. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide at least a method and device for predicting test space coverage. By determining the scene parameter mapping value of each simulation scenario to be simulated and a preset space located in the corresponding mapping space of the test space and meeting the preset undetected probability, and determining the coverage estimation value of multiple simulation scenarios to be simulated for the test space based on the number of simulation scenarios to be simulated belonging to the preset space, the technical problem in the prior art that the coverage of the selected simulation scenarios for the test space cannot be known before simulating the simulation scenarios, so that more simulation scenarios are required to achieve high coverage of the test space, resulting in more simulations to be executed, is solved, and the technical effect of affecting the simulation efficiency is achieved.
[0005] This application mainly includes the following aspects:
[0006] In a first aspect, an embodiment of the present application provides a method for predicting the coverage of a test space. The method includes: obtaining the scene parameter mapping value of each of a plurality of to-be-simulated scenarios located in the test space and the preset missed measurement probability of the plurality of to-be-simulated scenarios; the scene parameter mapping value refers to the value obtained by mapping the scene parameters to a preset interval, and the preset missed measurement probability refers to the probability allowing the plurality of to-be-simulated scenarios to be missed; determining a preset space located in the corresponding mapping space of the test space and meeting the preset missed measurement probability; determining the number of the to-be-simulated scenarios belonging to the preset space according to the scene parameter mapping value of each to-be-simulated scenario; and determining an estimated coverage value of the plurality of to-be-simulated scenarios for the test space according to the number of the to-be-simulated scenarios belonging to the preset space.
[0007] Optionally, obtaining the scene parameter mapping value of each of a plurality of to-be-simulated scenarios located in the test space includes: substituting the parameter value of any first scene parameter among all the scene parameters of each to-be-simulated scenario into the marginal distribution function corresponding to the first scene parameter to determine the scene parameter mapping value corresponding to the first scene parameter; taking any scene parameter other than the first scene parameter among all the scene parameters of each to-be-simulated scenario as a second scene parameter, and determining the conditional distribution function corresponding to the second scene parameter and the parameter values of all the first scene parameters; substituting the parameter value of the second scene parameter into the conditional distribution function corresponding to the second scene parameter to determine the scene parameter mapping value corresponding to the second scene parameter; taking the second scene parameter as the new first scene parameter, and jumping to continue executing with any scene parameter other than the first scene parameter among all the scene parameters of each to-be-simulated scenario as the second scene parameter until the scene parameter mapping value of each scene parameter among all the scene parameters of each to-be-simulated scenario is determined.
[0008] Optionally, determining a preset space located in the mapping space corresponding to the test space and meeting the preset missed detection probability includes: determining the mapping space corresponding to the test space, where the side lengths of each side of the mapping space are the same; randomly generating the ratio of the first side among each side of the preset space, where the first side is any one of each side, and the volume of the preset space is the preset missed detection probability; the side length of each side refers to the group distance of the scenario parameters corresponding to this side; determining the product of the ratios of all second sides except the first side according to the ratio of the first side and the preset missed detection probability; determining the side length of the first side and the product of the side lengths of all second sides according to the ratio of the first side, the product of the ratios of all second sides, and the volume product corresponding to the first side; taking any one of all second sides except the first side as the new first side, and jumping to randomly generate the ratio of the first side among each side of the preset space to continue execution until the last side of the preset space remains; taking the volume product corresponding to the penultimate side of the preset space as the side length of the last side of the preset space; determining the center point of the preset space according to the side length of the mapping space and the side length of each side in the preset space.
[0009] Optionally, determining the center point of the preset space according to the side length of the mapping space and the side length of each side in the preset space includes: for each side of the preset space, taking half of the side length of this side as the lower limit value of the center point coordinate interval of this side, and taking the side length of the mapping space minus half of the side length of this side as the upper limit value of the center point coordinate interval of this side; randomly selecting a coordinate in the center point coordinate interval corresponding to each side as the center point coordinate corresponding to this side; combining the center point coordinates corresponding to each side as the center point of the preset space.
[0010] Optionally, after determining the preset space located in the mapping space corresponding to the test space and meeting the preset missed detection probability, the method further includes: determining a first preset number of preset spaces and a preset coverage; determining whether each preset space in the first preset number of preset spaces contains at least one of the to-be-simulated scenarios; if each preset space in the first preset number of preset spaces contains at least one of the to-be-simulated scenarios, determining that the coverage estimation value of the multiple to-be-simulated scenarios is greater than or equal to the preset coverage; if any one of the first preset number of preset spaces does not contain the to-be-simulated scenario, determining that the coverage estimation value of the multiple to-be-simulated scenarios is less than the preset coverage.
[0011] Optionally, the first preset number is determined through the following steps: determining the significance level set by the user; determining the logarithm with the preset coverage as the base and the significance level as the exponent; rounding up the logarithm as the first preset number.
[0012] Optionally, according to the number of the to-be-simulated scenarios belonging to the preset space, determining an estimated coverage value of the multiple to-be-simulated scenarios for the test space includes: determining a second preset number of preset spaces; comparing the number of the to-be-simulated scenarios belonging to the preset space with the second preset number, and using the ratio as the estimated coverage value of the multiple to-be-simulated scenarios for the test space.
[0013] In a second aspect, an embodiment of the present application further provides a prediction device for the coverage of a test space. The device includes: an acquisition module, configured to acquire a scenario parameter mapping value of each to-be-simulated scenario among a plurality of to-be-simulated scenarios located in the test space and a preset miss detection probability of the multiple to-be-simulated scenarios; the scenario parameter mapping value refers to a value obtained by mapping a scenario parameter to a preset interval, and the preset miss detection probability refers to a probability that allows the multiple to-be-simulated scenarios to be missed; a first determination module, configured to determine a preset space that is located in the mapping space corresponding to the test space and meets the preset miss detection probability; a second determination module, configured to determine the number of the to-be-simulated scenarios belonging to the preset space according to the scenario parameter mapping value of each to-be-simulated scenario; and a third determination module, configured to determine an estimated coverage value of the multiple to-be-simulated scenarios for the test space according to the number of the to-be-simulated scenarios belonging to the preset space.
[0014] In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device runs, communication is performed between the processor and the memory through the bus. When the machine-readable instructions are run by the processor, the steps of the prediction method for the coverage of the test space described in the first aspect or any possible implementation manner in the first aspect are executed.
[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, the steps of the prediction method for the coverage of the test space described in the first aspect or any possible implementation manner in the first aspect are executed.
[0016] A method and apparatus for predicting the coverage of a test space provided by an embodiment of the present application, the method comprising: obtaining a scene parameter mapping value of each of a plurality of to-be-simulated scenarios located in the test space and a preset undetected probability of the plurality of to-be-simulated scenarios; the scene parameter mapping value refers to a value obtained by mapping a scene parameter to a preset interval, and the preset undetected probability refers to a probability allowing the plurality of to-be-simulated scenarios to be undetected; determining a preset space located in a mapping space corresponding to the test space and meeting the preset undetected probability; determining the number of the to-be-simulated scenarios belonging to the preset space according to the scene parameter mapping value of each to-be-simulated scenario; and determining an estimated coverage value of the plurality of to-be-simulated scenarios for the test space according to the number of the to-be-simulated scenarios belonging to the preset space. By determining the scene parameter mapping value of each to-be-simulated scenario and a preset space located in a mapping space corresponding to the test space and meeting the preset undetected probability, and determining the estimated coverage value of the plurality of to-be-simulated scenarios for the test space according to the number of to-be-simulated scenarios belonging to the preset space, the technical problem in the prior art that the coverage of the selected simulation scenario for the test space cannot be known before simulating the simulation scenario, so that a large number of simulation scenarios are required to achieve high coverage of the test space, resulting in a large number of simulations to be executed, is solved, and the technical effect of affecting the simulation efficiency is achieved.
[0017] To make the above objects, features, and advantages of the present application more obvious and understandable, the following specifically enumerates preferred embodiments and, in conjunction with the accompanying drawings, makes a detailed description as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] To more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0019] Figure 1 The flowchart of a method for predicting the coverage of a test space provided by an embodiment of the present application is shown.
[0020] Figure 2 The flowchart of another method for predicting the coverage of a test space provided by an embodiment of the present application is shown.
[0021] Figure 3 The functional module diagram of an apparatus for predicting the coverage of a test space provided by an embodiment of the present application is shown.
[0022] Figure 4 The structural schematic diagram of an electronic device provided by an embodiment of the present application is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0023] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. It should be understood that the accompanying drawings in this application are only for the purpose of illustration and description, and are not used to limit the protection scope of this application. In addition, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate the operations implemented according to some embodiments of this application. It should be understood that the operations in the flowchart may not be implemented in sequence, and steps without a logical context relationship may be reversed or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart or remove one or more operations from the flowchart under the guidance of the content of this application.
[0024] In addition, the described embodiments are only a part of the embodiments of this application, rather than all of the embodiments. The components of the embodiments of this application usually described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of this application to be protected, but only represents the selected embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative efforts belong to the protection scope of this application.
[0025] In the prior art, before performing autonomous driving simulation, it is impossible to calculate the coverage of the to-be-simulated scenario for the test space, so it is difficult to estimate whether the results obtained from the to-be-simulated scenario can represent the results of the test space. Furthermore, in order to make the results of the to-be-simulated scenario be able to sufficiently represent the test space, users will use as many scenarios in the test space as possible as the to-be-simulated scenarios, resulting in the need for users to perform multiple simulations, which affects the simulation efficiency.
[0026] Based on this, the embodiments of this application provide a method and device for predicting the coverage of a test space. By determining the scenario parameter mapping value of each to-be-simulated scenario and a preset space located in the corresponding mapping space of the test space and meeting the preset undetected probability, and based on the number of to-be-simulated scenarios belonging to the preset space, the coverage estimation value of multiple to-be-simulated scenarios for the test space is determined, solving the technical problem in the prior art that it is impossible to know the coverage of the selected simulation scenario for the test space before simulating the simulation scenario, so more simulation scenarios are required to achieve high coverage of the test space, resulting in the need to execute more simulations, and achieving the technical effect of affecting the simulation efficiency. Specifically as follows:
[0027] Please refer to Figure 1 , Figure 1 which is a flowchart of a method for predicting the coverage of a test space provided by the embodiments of this application. AsFigure 1 As shown in Figure 1 , the method for predicting the coverage of a test space provided by the embodiments of the present application includes the following steps:
[0028] S101: Obtain the scene parameter mapping value of each to-be-simulated scene among a plurality of to-be-simulated scenes located in the test space and the preset undetected probability of the plurality of to-be-simulated scenes.
[0029] The scene parameter mapping value refers to the value obtained by mapping the scene parameters to a preset interval, and the preset undetected probability refers to the probability that the plurality of to-be-simulated scenes are allowed to be undetected.
[0030] The test space refers to the space composed of various parameters in the logical scene. In the present application, the scene refers to the simulation scene of autonomous driving, and thus the parameters corresponding to the scene are scene parameters. The simulation scenes include: scenes for autonomous driving simulation such as when the vehicle in front suddenly changes lanes while following the vehicle in front at a certain distance, when encountering a crossroads during driving and the traffic signal is red, and when encountering pedestrians or animals crossing the road during driving. The scene parameters include: scene parameters for autonomous driving simulation such as the initial distance from the vehicle in front, driving speed, driving acceleration, etc.
[0031] That is to say, the random distribution of each scene parameter constitutes the test space. The coverage of the test space by a set of simulation scenes indicates whether the set of simulation scenes can effectively represent the test space.
[0032] The step of obtaining the scene parameter mapping value of each to-be-simulated scene among a plurality of to-be-simulated scenes located in the test space includes: substituting the parameter value of any one first scene parameter among all the scene parameters of each to-be-simulated scene into the marginal distribution function corresponding to the first scene parameter to determine the scene parameter mapping value corresponding to the first scene parameter; taking any one scene parameter other than the first scene parameter among all the scene parameters of each to-be-simulated scene as the second scene parameter, and determining the conditional distribution function corresponding to the second scene parameter and the parameter values of all the first scene parameters; substituting the parameter value of the second scene parameter into the conditional distribution function corresponding to the second scene parameter to determine the scene parameter mapping value corresponding to the second scene parameter; taking the second scene parameter as the new first scene parameter, and jumping to the step of taking any one scene parameter other than the first scene parameter among all the scene parameters of each to-be-simulated scene as the second scene parameter and continuing to execute until the scene parameter mapping value of each scene parameter among all the scene parameters of each to-be-simulated scene is determined.
[0033] That is to say, the joint distribution function of the test space is F(x1, x2,...x d )), x1, x2,...x dDenote the simulation scenarios corresponding to each point in the test space, that is, there are d parameters in total. Furthermore, the dimension of the test space is d-dimensional. That is to say, a specific simulation scenario S = (X1, X2,... X d ) follows the distribution of F(x1, x2,... X d ). Determine the mapping space U[0, 1] d , that is to say, each side of the mapping space corresponds to a scenario parameter. Thus, each scenario parameter in the mapping space is mapped to the interval [0, 1], and the side lengths of each side of the mapping space are the same. For each simulation scenario to be simulated, take any one of the scenario parameters of all the scenario parameters of the simulation scenario to be simulated as the first scenario parameter, and determine the marginal distribution function F1(·) of the first scenario parameter. If X1 is the first scenario parameter, substitute the parameter value of the first scenario parameter into F1(·) to obtain F1(X1) = U1, and take U1 as the mapping value corresponding to the first scenario parameter. Take any scenario parameter other than the first scenario parameter as the second scenario parameter. If X2 is the second scenario parameter, then determine F 2|1 (·|X1) as the conditional distribution function of the second scenario parameter when the parameter value of the first scenario parameter is X1. Substitute the parameter value X 2 of the second scenario parameter into F 2|1 (·|X1), to obtain F 2|1 (X2|X1) = U2, take U2 as the mapping value corresponding to the second scenario parameter, and take the second simulation scenario parameter as the new first simulation scenario parameter. And so on, determine the conditional distribution of any simulation scenario parameter X k under X1, X2,... X k-1 . Then, the point corresponding to S on U[0, 1] d is (U1, U2,... U d ), where U k satisfies: U1 = F1(X1), U k = F k|1,2...,k-1 (X k |X1, X2,... X k-1 ), 2 ≤ k ≤ d. If X1, X2,... X d are mutually independent, then U k = F k (X k ), 1 ≤ k ≤ d.
[0034] S102: Determine a preset space that is located in the mapping space corresponding to the test space and meets the preset missed detection probability.
[0035] The determining of the preset space that is located in the mapping space corresponding to the test space and meets the preset missed measurement probability includes: determining the mapping space corresponding to the test space, where the side lengths of each side of the mapping space are the same; randomly generating the ratio of the first side among each side of the preset space, where the first side is any one of each side, and the volume of the preset space is the preset missed measurement probability; the side length of each side refers to the group distance of the scenario parameters corresponding to that side; according to the ratio of the first side and the preset missed measurement probability, determining the product of the ratios of all the second sides except the first side; according to the ratio of the first side, the product of the ratios of all the second sides, and the product of the volume corresponding to the first side, determining the side length of the first side and the product of the side lengths of all the second sides; taking any one of the second sides except the first side as the new first side, jumping to randomly generate the ratio of the first side among each side of the preset space and continuing to execute until the last side of the preset space remains; taking the product of the volume corresponding to the penultimate side of the preset space as the side length of the last side of the preset space; according to the side length of the mapping space and the side lengths of each side in the preset space, determining the center point of the preset space.
[0036] The determining of the center point of the preset space according to the side length of the mapping space and the side lengths of each side in the preset space includes: for each side of the preset space, taking half of the side length of that side as the lower limit value of the center point coordinate interval of that side, and taking the side length of the mapping space minus half of the side length of that side as the upper limit value of the center point coordinate interval of that side; randomly selecting a coordinate in the center point coordinate interval corresponding to each side as the center point coordinate corresponding to that side; combining the center point coordinates corresponding to each side as the center point of the preset space.
[0037] Or rather, the preset missed measurement probability refers to the probability of allowing multiple scenarios to be simulated to miss the preset space.
[0038] That is to say, in the mapping space U[0, 1] d the basic idea of generating a preset space with a volume of γ (i.e., the preset missed measurement probability γ) is to first determine the ratio of each side of the preset space, then calculate the length of each side according to the product of each side being γ, and finally randomly generate the center of the preset space at an appropriate position, and the generated preset space should fall entirely within U[0, 1] d That is to say, the side lengths of the mapping space are all 1.
[0039] Exemplarily, the dimension of the preset space is d and the volume of the preset space is the preset missed detection probability γ, γ < 1, γ0 = γ. First, take any side of the preset space as the first side, and randomly generate the ratio of the first side on [0, 1], denoted as r1 ~ U(0, 1). That is, the random variable r1 follows a uniform distribution on the interval [0, 1]. Take all sides other than the first side as the second sides, determine the product of the ratios of all second sides, and denote the product of the ratios of all second sides as If d is 1, then Furthermore, calculate the side length of the first side through the following formula:
[0040]
[0041] In formula (1), p1 refers to the side length of the first side, r1 refers to the ratio of the first side, refers to the product of the ratios of all second sides other than the first side, and γ0 refers to the volume product corresponding to the first side, that is, the volume product corresponding to the first side is the preset missed detection probability.
[0042] Calculate the product of the side lengths of all second sides other than the first side through the following formula:
[0043]
[0044] In formula (2), γ1 refers to the product of the side lengths of all second sides other than the first side, r1 refers to the ratio of the first side, refers to the product of the ratios of all second sides other than the first side, and γ0 refers to the volume product corresponding to the first side, that is, the preset missed detection probability.
[0045] For all second sides p d other than the first side p1 and the last side p k , that is, 2 ≤ k ≤ d, determine the side length in the following way. r k ~ U(0, 1), r k refers to the ratio of the kth side or the ratio of any second side other than the first side. r k can be used as the new first side. refers to the product of the ratios of the remaining sides other than the first side to the kth side, or the product of the ratios of all second sides other than the first side. Calculate the side length of the kth side through the following formula:
[0046]
[0047] In formula (3), p k refers to the side length of the kth side, r kRefers to the ratio of the k-th side, Refers to the product of the ratios of the remaining sides except the 1st side to the k-th side, γ k-1 Refers to the product of volumes corresponding to the k-th side.
[0048] The product of volumes corresponding to the k-th side is calculated by the following formula:
[0049]
[0050] In formula (4), γ k Refers to the product of volumes corresponding to the k-th side.
[0051] The side length p of the last side d = γ d-1 .
[0052] For the center point (Z1, Z2,..., Z d ) of the preset space, where Furthermore, the range of this preset space is
[0053] S103: Determine the number of the to-be-simulated scenarios belonging to the preset space according to the scenario parameter mapping values of each to-be-simulated scenario.
[0054] That is to say, determine a second preset number of preset spaces, and determine the number of the to-be-simulated scenarios belonging to the second preset number of preset spaces. That is to say, for each to-be-simulated scenario, if the scenario parameter mapping value of this to-be-simulated scenario belongs to any one of the second preset number of preset spaces, then it is considered that this to-be-simulated scenario belongs to the preset space; if the scenario parameter mapping value of this to-be-simulated scenario does not belong to any one of the second preset number of preset spaces, then it is considered that this to-be-simulated scenario does not belong to the preset space.
[0055] S104: Determine the coverage estimation value of the multiple to-be-simulated scenarios for the test space according to the number of the to-be-simulated scenarios belonging to the preset space.
[0056] The determining the coverage estimation value of the multiple to-be-simulated scenarios for the test space according to the number of the to-be-simulated scenarios belonging to the preset space includes: determining a second preset number of preset spaces; taking the ratio of the number of the to-be-simulated scenarios belonging to the preset space to the second preset number as the coverage estimation value of the multiple to-be-simulated scenarios for the test space.
[0057] That is to say, the coverage estimation value is calculated by the following formula:
[0058]
[0059] In formula (5), refers to the coverage estimate value, n ′ refers to the number of the to-be-simulated scenarios belonging to the preset space, and n refers to the second preset quantity.
[0060] The method further includes: calculating a confidence interval of the plurality of to-be-simulated scenarios for the test space where α refers to the significance level, Z α refers to the (1 - α) quantile under the standard normal distribution, and n refers to the second preset quantity. The second preset quantity is set by the user and can be set to be relatively large.
[0061] The method further includes: determining whether the coverage estimate values of the plurality of to-be-simulated scenarios are greater than or equal to a preset coverage; if the coverage estimate values of the plurality of to-be-simulated scenarios are greater than or equal to the preset coverage, it is considered that the coverage of the plurality of to-be-simulated scenarios for the test space meets the requirements; if the coverage estimate values of the plurality of to-be-simulated scenarios are less than the preset coverage, it is considered that the coverage of the plurality of to-be-simulated scenarios for the test space does not meet the requirements.
[0062] Please refer to Figure 2 , Figure 2 which is a flowchart of another method for predicting the coverage of a test space provided by an embodiment of the present application. As Figure 2 shown, the method for predicting the coverage of a test space provided by an embodiment of the present application includes the following steps:
[0063] After determining the preset space located in the mapping space corresponding to the test space and meeting the preset missed detection probability, the method further includes:
[0064] S201: Determine a first preset quantity of preset spaces and a preset coverage.
[0065] That is to say, determine the preset coverage set by the user and determine a first preset quantity of preset spaces.
[0066] The first preset quantity is determined through the following steps: determining the significance level set by the user; determining the logarithm with the preset coverage as the base and the significance level as the exponent; rounding up the logarithm value as the first preset quantity.
[0067] Assume that the coverage of the plurality of to-be-simulated scenarios for the preset space with a probability greater than γ in the test space is p. Then, under the condition that all the generated M preset spaces are covered, the posterior density function of p is proportional to p M .
[0068] Therefore That is Among them, p0 refers to the preset coverage, and α refers to the significance level. That is to say, the value of M only depends on p0 and α, and has nothing to do with γ. For example, when the preset coverage p0 = 90% and the confidence level 1 - α = 99%, when the coverage p0 = 99% and the confidence level 1 - α = 99%,
[0069] Furthermore, the first preset quantity is determined by the following formula:
[0070]
[0071] In formula (6), M refers to the first preset quantity, p o refers to the preset coverage, and α refers to the significance level.
[0072] S202: Determine whether each of the preset spaces in the preset space of the first preset quantity contains at least one of the to-be-simulated scenarios.
[0073] That is to say, for each of the preset spaces in the preset space of the first preset quantity, determine whether the preset space contains at least one to-be-simulated scenario.
[0074] S203: Determine that the coverage estimate value of the multiple to-be-simulated scenarios is greater than or equal to the preset coverage.
[0075] If each of the preset spaces in the preset space of the first preset quantity contains at least one of the to-be-simulated scenarios, determine that the coverage estimate value of the multiple to-be-simulated scenarios is greater than or equal to the preset coverage, and further determine that the coverage of the multiple to-be-simulated scenarios for the test space meets the requirements.
[0076] S204: Determine that the coverage estimate value of the multiple to-be-simulated scenarios is less than the preset coverage.
[0077] If any one of the preset spaces in the preset space of the first preset quantity does not contain the to-be-simulated scenario, determine that the coverage estimate value of the multiple to-be-simulated scenarios is less than the preset coverage, and further determine that the coverage of the multiple to-be-simulated scenarios for the test space does not meet the requirements.
[0078] As Figure 3 shown, Figure 3 is a functional module of a prediction device for the coverage of a test space provided by an embodiment of the present application. The prediction device 10 for the coverage of a test space includes: an acquisition module 101, a first determination module 102, a second determination module 103, and a third determination module 104.
[0079] An acquisition module 101 is configured to acquire the scenario parameter mapping value of each to-be-simulated scenario among a plurality of to-be-simulated scenarios located in a test space and the preset missed detection probability of the plurality of to-be-simulated scenarios; the scenario parameter mapping value refers to the value obtained by mapping the scenario parameters to a preset interval, and the preset missed detection probability refers to the probability allowing the plurality of to-be-simulated scenarios to be missed detected.
[0080] A first determination module 102 is configured to determine a preset space that is located in the mapping space corresponding to the test space and meets the preset missed detection probability.
[0081] A second determination module 103 is configured to determine the number of to-be-simulated scenarios belonging to the preset space according to the scenario parameter mapping value of each to-be-simulated scenario.
[0082] A third determination module 104 is configured to determine an estimated coverage degree of the plurality of to-be-simulated scenarios for the test space according to the number of to-be-simulated scenarios belonging to the preset space.
[0083] Based on the same inventive concept, in an embodiment of the present application, there is also provided a prediction device for the coverage degree of a test space corresponding to the prediction method for the coverage degree of a test space provided in the above embodiment. Since the principle of solving problems by the device in the embodiment of the present application is similar to the prediction method for the coverage degree of a test space in the above embodiment of the present application, the implementation of the device can refer to the implementation of the method, and repeated parts will not be described again.
[0084] Based on the same inventive concept, refer to Figure 4 As shown, it is a schematic structural diagram of an electronic device provided in an embodiment of the present application. The electronic device 20 includes: a processor 201, a memory 202, and a bus 203. The memory 202 stores machine-readable instructions executable by the processor 201. When the electronic device 20 runs, communication is performed between the processor 201 and the memory 202 through the bus 203. When the machine-readable instructions are run by the processor 201, the steps of the prediction method for the coverage degree of a test space as described in any one of the above embodiments are executed.
[0085] Specifically, when the machine-readable instructions are executed by the processor 201, the following processing can be performed: acquiring the scenario parameter mapping value of each to-be-simulated scenario among a plurality of to-be-simulated scenarios located in a test space and the preset missed detection probability of the plurality of to-be-simulated scenarios; the scenario parameter mapping value refers to the value obtained by mapping the scenario parameters to a preset interval, and the preset missed detection probability refers to the probability allowing the plurality of to-be-simulated scenarios to be missed detected; determining a preset space that is located in the mapping space corresponding to the test space and meets the preset missed detection probability; determining the number of to-be-simulated scenarios belonging to the preset space according to the scenario parameter mapping value of each to-be-simulated scenario; determining an estimated coverage degree of the plurality of to-be-simulated scenarios for the test space according to the number of to-be-simulated scenarios belonging to the preset space.
[0086] Based on the same application concept, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of the method for predicting the test space coverage provided in the above embodiment.
[0087] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, it can execute the above method for predicting the test space coverage. By determining the scene parameter mapping value of each simulation scenario to be simulated and a preset space that is located in the corresponding mapping space of the test space and meets the preset missed test probability, and based on the number of simulation scenarios to be simulated belonging to the preset space, the coverage estimation value of the multiple simulation scenarios for the test space is determined, solving the technical problem in the prior art that the coverage of the selected simulation scenarios for the test space cannot be known before simulating the simulation scenarios, so that more simulation scenarios are required to achieve a high coverage of the test space, resulting in the need to execute more simulations, and achieving the technical effect of affecting the simulation efficiency.
[0088] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems and devices described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here. In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be in an electrical, mechanical or other forms.
[0089] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0090] In addition, in each embodiment of the present application, the functional units can be integrated into one processing unit, or each unit exists physically alone, or two or more units can be integrated into one unit.
[0091] When the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a 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 causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0092] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed by this application can easily think of changes or substitutions, which should all be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims
1. A prediction method for testing spatial coverage, characterized in that, The method includes: Obtaining the scene parameter mapping value of each to-be-simulated scene in multiple to-be-simulated scenes located in a test space and the preset undetected probability of the multiple to-be-simulated scenes; the scene parameter mapping value refers to the value obtained by mapping the scene parameters to a preset interval, and the preset undetected probability refers to the probability allowing the multiple to-be-simulated scenes to be undetected; Determining a preset space located in the corresponding mapping space of the test space and meeting the preset undetected probability; Determining the number of to-be-simulated scenes belonging to the preset space according to the scene parameter mapping value of each to-be-simulated scene; Determining an estimated coverage value of the multiple to-be-simulated scenes for the test space according to the number of to-be-simulated scenes belonging to the preset space.
2. The method according to claim 1, wherein The obtaining the scene parameter mapping value of each to-be-simulated scene in multiple to-be-simulated scenes located in a test space includes: Substituting the parameter value of any first scene parameter among all scene parameters of each to-be-simulated scene into the marginal distribution function corresponding to the first scene parameter to determine the scene parameter mapping value corresponding to the first scene parameter; Taking any one of the scene parameters other than the first scene parameter among all scene parameters of each to-be-simulated scene as a second scene parameter, and determining the conditional distribution function corresponding to the second scene parameter and the parameter values of all the first scene parameters; Substituting the parameter value of the second scene parameter into the conditional distribution function corresponding to the second scene parameter to determine the scene parameter mapping value corresponding to the second scene parameter; Taking the second scene parameter as the new first scene parameter, and jumping to the step of taking any one of the scene parameters other than the first scene parameter among all scene parameters of each to-be-simulated scene as the second scene parameter to continue execution until the scene parameter mapping value of each scene parameter among all scene parameters of each to-be-simulated scene is determined.
3. The method according to claim 1, wherein The determining a preset space located in the corresponding mapping space of the test space and meeting the preset undetected probability includes: Determining the mapping space corresponding to the test space, where the length of each side of the mapping space is the same; Randomly generating the ratio of the first side among each side of the preset space; the first side is any one of each side, and the volume of the preset space is the preset undetected probability; the length of each side refers to the group distance of the scene parameters corresponding to the side; Determining the product of the ratios of all second sides other than the first side according to the ratio of the first side and the preset undetected probability; Determining the product of the length of the first side and the lengths of all second sides according to the ratio of the first side, the product of the ratios of all second sides, and the product of the volume corresponding to the first side; Taking any one of all second sides other than the first side as the new first side, and jumping to the step of randomly generating the ratio of the first side among each side of the preset space to continue execution until the last side of the remaining preset space; Taking the product of the volume corresponding to the penultimate side of the preset space as the length of the last side of the preset space; Determining the center point of the preset space according to the length of the mapping space and the length of each side in the preset space.
4. The method according to claim 3, characterized in that, Determining the center point of the preset space according to the side length of the mapping space and the side length of each side in the preset space includes: For each side of the preset space, half of the side length of the side is used as the lower limit value of the center point coordinate interval of the side, and the side length of the mapping space minus half of the side length of the side is used as the upper limit value of the center point coordinate interval of the side; Randomly select a coordinate in the center point coordinate interval corresponding to each side as the center point coordinate corresponding to the side; Combine the center point coordinates corresponding to each side as the center point of the preset space.
5. The method according to any one of claims 1 to 3, characterized in that After determining the preset space that is located in the mapping space corresponding to the test space and meets the preset missed measurement probability, the method further includes: Determine a first preset number of preset spaces and a preset coverage; Determine whether each preset space in the first preset number of preset spaces contains at least one of the to-be-simulated scenarios; If each preset space in the first preset number of preset spaces contains at least one of the to-be-simulated scenarios, determine that the coverage estimation value of the multiple to-be-simulated scenarios is greater than or equal to the preset coverage; If any one of the first preset number of preset spaces does not contain the to-be-simulated scenario, determine that the coverage estimation value of the multiple to-be-simulated scenarios is less than the preset coverage.
6. The method according to claim 5, characterized in that, Determine the first preset number through the following steps: Determine the significance level set by the user; Determine the logarithm with the preset coverage as the base and the significance level as the exponent; Round up the logarithm value as the first preset number.
7. The method according to claim 1, characterized in that Determining the coverage estimation value of the multiple to-be-simulated scenarios for the test space according to the number of the to-be-simulated scenarios belonging to the preset space includes: Determine a second preset number of preset spaces; Take the ratio of the number of the to-be-simulated scenarios belonging to the preset space to the second preset number as the coverage estimation value of the multiple to-be-simulated scenarios for the test space.
8. A prediction device for testing spatial coverage, characterized in that, The device includes: An acquisition module, configured to acquire the scene parameter mapping value of each to-be-simulated scenario in a plurality of to-be-simulated scenarios located in a test space and the preset missed measurement probability of the plurality of to-be-simulated scenarios; the scene parameter mapping value refers to the value of the scene parameter mapped to a preset interval, and the preset missed measurement probability refers to the probability that the plurality of to-be-simulated scenarios are allowed to be missed; A first determination module, configured to determine a preset space that is located in the mapping space corresponding to the test space and meets the preset missed measurement probability; A second determination module, configured to determine the number of the to-be-simulated scenarios belonging to the preset space according to the scene parameter mapping value of each to-be-simulated scenario; A third determination module, configured to determine the coverage estimation value of the multiple to-be-simulated scenarios for the test space according to the number of the to-be-simulated scenarios belonging to the preset space.
9. An electronic device, characterized in that, Includes: A processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device runs, the processor communicates with the memory through the bus, and when the machine-readable instructions are run by the processor, the steps of the prediction method for testing space coverage according to any one of claims 1 to 7 are executed.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is run by a processor, the steps of the prediction method for testing space coverage according to any one of claims 1 to 7 are executed.
Citation Information
Patent Citations
Automatic driving simulation scene generation method and device, medium and electronic equipment
CN114546875A
Test scene construction method and device for self-driving automobile, and medium
CN115855531A