A method and apparatus for testing spatial coverage
By calculating the coverage of autonomous driving simulation scenarios and using the Lipschitz coefficient and significance level to determine the coverage of simulation scenarios, the problem of the inability to calculate coverage in existing technologies is solved, thus improving simulation efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING SAIMO TECH CO LTD
- Filing Date
- 2023-04-11
- Publication Date
- 2026-06-12
AI Technical Summary
Existing technologies cannot calculate the coverage of autonomous driving simulation scenarios for the test space, making it impossible for users to determine whether to add simulation scenarios, thus affecting simulation efficiency.
By determining the target space of the first scenario parameter vector that has been simulated in the test space and the second simulation scenario parameters that have not been simulated, the coverage of the first simulation scenario to the test space is calculated based on the number of parameters of the second simulation scenario. The estimated value of the simulation scenario coverage is determined using the Lipschitz coefficient and the significance level.
It improves simulation efficiency, helps users determine whether additional simulation scenarios are needed, and avoids unnecessary repetitive simulations.
Smart Images

Figure CN116484596B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of autonomous driving technology, and in particular to a method and apparatus for calculating test space coverage. Background Technology
[0002] In existing technologies, when simulating various scenarios for autonomous driving, only the results of each simulation can be obtained, without determining the coverage of each simulation scenario within the test space. The test space consists of continuously distributed scenarios. Consequently, users cannot determine whether the simulation results of each scenario encompass the simulation results of all scenarios within the test space. This necessitates simulating as many scenarios as possible within the test space, reducing simulation efficiency. Summary of the Invention
[0003] In view of this, the purpose of this application is to provide at least one method and apparatus for calculating test space coverage. By determining the target space of the first scene parameter vector that has been simulated in the test space and the second simulation scene parameters that have not been simulated in the test space, the coverage of the first simulation scene to the test space is calculated based on the number of second simulation scene parameters belonging to the target space. This solves the technical problem in the prior art that the coverage of the simulated scene to the test space cannot be calculated, which makes it impossible for users to determine whether to add simulation scenes. This achieves the technical effect of improving simulation efficiency.
[0004] This application mainly includes the following aspects:
[0005] In a first aspect, embodiments of this application provide a method for calculating test space coverage. The method includes: obtaining a first scene parameter vector, a simulation result value, and a preset threshold corresponding to the simulation result value for each first simulation scenario in the test space; and obtaining a second scene parameter vector for a second simulation scenario in the test space, wherein the first simulation scenario is a scenario that has been simulated in the test space, and the second simulation scenario is a scenario that follows a joint distribution function of the test space; determining a target space corresponding to each first simulation scenario based on the preset threshold, each first scene parameter vector, and the simulation result value; and calculating an estimated coverage value of the first simulation scenario to the test space based on the number of second scene parameter vectors belonging to the target space.
[0006] Optionally, obtaining the second scene parameter vector of the second simulation scenario in the test space includes: randomly generating random numbers corresponding to each scene parameter in the joint distribution function; substituting the random number of any first scene parameter in each scene parameter into the inverse function of the marginal distribution function of the first scene parameter to determine the parameter value of the first scene parameter; taking any scene parameter other than the first scene parameter as the second scene parameter, and determining the conditional distribution function corresponding to the parameter values of the second scene parameter and all first scene parameters; substituting the random number corresponding to the second scene parameter into the inverse function of the conditional distribution function corresponding to the second scene parameter to determine the parameter value of the second scene parameter; taking the second scene parameter as the new first scene parameter, and jumping to taking any scene parameter other than the first scene parameter as the second scene parameter to continue execution until the parameter values of all scene parameters in the joint distribution function are determined.
[0007] Optionally, determining the target space corresponding to each first simulation scenario based on the preset threshold, each first scenario parameter vector, and simulation result value includes: calculating the Lipschitz coefficient based on the scenario parameter vector and simulation result value of each first simulation scenario; determining the difference between the simulation result value of each first simulation scenario and the preset threshold; using the ratio of the difference to the Lipschitz coefficient for each first simulation scenario as the target space radius corresponding to that first simulation scenario; and determining the target space corresponding to that first simulation scenario based on the scenario parameter vector and space radius of each first simulation scenario.
[0008] Optionally, the Lipschitz coefficient is calculated based on the scene parameter vector and simulation result value of each first simulation scenario, including: combining the first simulation scenarios in pairs to obtain multiple simulation scenario groups; for each simulation scenario group, the absolute value of the difference between the simulation result values of the two first simulation scenarios in the simulation scenario group is compared with the distance between the scene parameter vectors of the two first simulation scenarios, and the ratio is used as the coefficient of the simulation scenario group; the maximum value among the coefficients of the multiple simulation scenario groups is used as the Lipschitz coefficient.
[0009] Optionally, calculating the coverage estimate of the first simulation scene to the test space based on the number of second scene parameter vectors belonging to the target space includes: comparing the number of second scene parameter vectors belonging to the target space with the total number of second scene parameter vectors, and using the ratio as the coverage estimate of the first simulation scene to the test space.
[0010] Optionally, the method further includes: obtaining a user-set significance level; determining the amount of change of the first simulation scenario on the test space at the significance level based on the significance level and the coverage estimate; adding the coverage estimate to the amount of change as the upper limit of the confidence interval, and subtracting the coverage estimate from the amount of change as the lower limit of the confidence interval.
[0011] Optionally, determining the change of the first simulation scenario in the test space at the said significance level, based on the significance level and the coverage estimate, includes:
[0012] The change is calculated using the following formula:
[0013]
[0014] In the above formula, Δp refers to the change, α refers to the significance level, and Z... α This refers to the quantile of the standard normal distribution corresponding to a significance level of α. This refers to the coverage estimate, and n refers to the total number of parameter vectors for the second scene.
[0015] Secondly, embodiments of this application also provide a test space coverage calculation device, the device comprising: an acquisition module, configured to acquire a first scene parameter vector, a simulation result value, and a preset threshold corresponding to the simulation result value for each first simulation scenario in the test space, and to acquire a second scene parameter vector for a second simulation scenario in the test space, wherein the first simulation scenario is a scenario that has been simulated in the test space, and the second simulation scenario is a scenario that follows a joint distribution function of the test space; a determination module, configured to determine a target space corresponding to each first simulation scenario based on the preset threshold, each first scene parameter vector, and the simulation result value; and a calculation module, configured to calculate an estimated coverage value of the first simulation scenario for the test space based on the number of second scene parameter vectors belonging to the target space.
[0016] Thirdly, embodiments of this application also provide 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 is running, the processor communicates with the memory via the bus. The machine-readable instructions are executed by the processor to perform the steps of the test space coverage calculation method described in the first aspect or any possible implementation of the first aspect.
[0017] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the test space coverage calculation method described in the first aspect or any possible implementation of the first aspect.
[0018] This application provides a method and apparatus for calculating test space coverage. The method includes: acquiring a first scene parameter vector, a simulation result value, and a preset threshold corresponding to the simulation result value for each first simulation scenario in the test space; and acquiring a second scene parameter vector for a second simulation scenario in the test space, wherein the first simulation scenario is a scenario that has been simulated in the test space, and the second simulation scenario is a scenario that follows a joint distribution function of the test space; determining a target space corresponding to each first simulation scenario based on the preset threshold, each first scene parameter vector, and the simulation result value; and calculating an estimated coverage value of the first simulation scenario for the test space based on the number of second scene parameter vectors belonging to the target space. By determining the target space belonging to the first scene parameter vectors that have been simulated in the test space and the parameters of the second simulation scenarios that have not been simulated in the test space, and calculating the coverage of the first simulation scenario for the test space based on the number of second simulation scenario parameters belonging to the target space, this method solves the technical problem in the prior art where the inability to calculate the coverage of simulated scenarios for the test space leads to the user's inability to determine whether to add simulation scenarios, thus achieving the technical effect of improving simulation efficiency.
[0019] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 A flowchart illustrating a method for calculating test space coverage provided in an embodiment of this application is shown.
[0022] Figure 2 A flowchart is shown for another method for calculating test space coverage provided in an embodiment of this application.
[0023] Figure 3 A functional block diagram of a computing device for testing spatial coverage provided in an embodiment of this application is shown.
[0024] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0026] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically 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 the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0027] In existing technologies, users cannot calculate the coverage of the simulation scene to the test space, and therefore cannot know whether to add simulation scenes. As a result, users can only simulate the simulation scenes in the test space more often, which leads to too many simulations and affects simulation efficiency.
[0028] Based on this, this application provides a method and apparatus for calculating test space coverage. By determining the target space of the first scenario parameter vector that has been simulated in the test space and the second simulation scenario parameters that have not been simulated in the test space, the coverage of the first simulation scenario to the test space is calculated based on the number of second simulation scenario parameters belonging to the target space. This solves the technical problem in the prior art where the coverage of simulated scenarios to the test space cannot be calculated, leading to the user's inability to determine whether to add simulation scenarios, thus achieving the technical effect of improving simulation efficiency. Specifically:
[0029] Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for calculating test space coverage provided in an embodiment of this application. Figure 1 As shown in the embodiments of this application, the method for calculating test space coverage includes the following steps:
[0030] S101: Obtain the first scene parameter vector, simulation result value, and preset threshold corresponding to the simulation result value for each first simulation scenario in the test space, and obtain the second scene parameter vector for the second simulation scenario in the test space.
[0031] The test space is a space composed of parameters from various scenarios within a simulation environment. The coverage of the test space by a specific set of simulation scenarios indicates whether that set of simulation scenarios can effectively represent the simulation environments within the test space. Determining the coverage of the test space through simulation results means using the simulation results of the simulation scenarios to evaluate whether the set of simulation scenarios can represent the test space, especially whether it can represent all the failure scenarios within the test space.
[0032] The first simulation scenario is a scenario that has been simulated in the test space, and the second simulation scenario is a scenario that follows the joint distribution function of the test space.
[0033] The simulation scenarios include: maintaining a certain distance from the vehicle in front while following it, the vehicle in front suddenly changing lanes; encountering an intersection with a red traffic light; and encountering pedestrians or animals crossing the road. Scenario parameters include: initial distance to the vehicle in front, driving speed, and driving acceleration, among other parameters for autonomous driving simulation.
[0034] The simulation result value refers to the result obtained after simulating the scenario. If the simulation scenario involves following a vehicle at a certain distance when the vehicle in front suddenly changes lanes, the simulation result value is the distance from the vehicle in front at which the vehicle stops. The preset threshold for the simulation result value is 5 meters from the vehicle in front. If the simulation result value for a certain scenario is less than 5 meters from the vehicle in front, the simulation scenario is considered to have failed. If the simulation result value for a certain scenario is greater than 5 meters from the vehicle in front, the simulation scenario is considered to have succeeded. If the simulation result value for a certain scenario is 5 meters from the vehicle in front, the simulation scenario is considered to be on the boundary between success and failure. The first simulation scenarios in this application are not on the boundary between success and failure. The simulation result value of a simulation scenario on the boundary between success and failure is equal to the preset threshold corresponding to that simulation result value.
[0035] For example, a certain number of simulation scenarios are obtained where the vehicle in front suddenly changes lanes while the driver is following the vehicle at a certain distance. The first scenario parameter vector and simulation result value for each simulation scenario are also obtained. A preset threshold corresponding to the simulation result value is determined: the vehicle stops when the distance to the vehicle in front is 5 meters.
[0036] If the number of scene parameters in the simulation scene is d, then the scene parameter vector of the simulation scene is composed of each scene parameter, and the dimension of the scene parameter vector of the simulation scene is d-dimensional.
[0037] The step of obtaining the second scene parameter vector of the second simulation scenario in the test space includes: randomly generating random numbers corresponding to each scene parameter in the joint distribution function; substituting the random number of any first scene parameter in each scene parameter into the inverse function of the marginal distribution function of the first scene parameter to determine the parameter value of the first scene parameter; taking any scene parameter other than the first scene parameter as the second scene parameter, and determining the conditional distribution function corresponding to the parameter values of the second scene parameter and all first scene parameters; substituting the random number corresponding to the second scene parameter into the inverse function of the conditional distribution function corresponding to the second scene parameter to determine the parameter value of the second scene parameter; taking the second scene parameter as the new first scene parameter, and jumping to taking any scene parameter other than the first scene parameter as the second scene parameter to continue execution until the parameter values of all scene parameters in the joint distribution function are determined.
[0038] The scene parameters of the test space are X1, X2, ..., X. d There are d scene parameters, and each scene parameter in the test space is continuous. Randomly generate uniformly distributed random numbers between [0,1] for each scene parameter, where the random numbers are U1 for X1, U2 for X2, ..., X... d Corresponding U d Then, in the test space, {X1≤x1}, {X2≤x2}, ..., {X... d ≤x d The probability of sending simultaneously is F(x1, x2, ..., x). d )=P(X1≤x1,X2≤x2,…,X d ≤x d ) is the joint distribution function of the test space.
[0039] Randomly select one scene parameter from all scene parameters in the second scene parameter vector as the first scene parameter. If the first scene parameter is X1, determine the marginal distribution function F1(·) corresponding to the first scene parameter X1, and then determine the inverse function of F1(·). Substitute U1 From x1 is the parameter value corresponding to X1. A scene parameter is randomly selected from the scene parameters other than the first scene parameter X1 as the second scene parameter. If the second scene parameter is X2, determine the conditional distribution function of the second scene parameter X2 when the parameter value of the first scene parameter is X1. Then determine inverse function Substitute U2 From Using the second scene parameter as the new first scene parameter, select the second scene parameter again from the scene parameters excluding X1 and X2. If the second scene parameter is X3, re-execute the marginal distribution function corresponding to the second scene parameter X3 when the parameter value corresponding to X1 is x1 and the parameter value corresponding to X2 is x2. Continue this process to determine the parameter values for all scene parameters. Obtain the second scene parameter vector If the parameters of each scene in the test space are independent of each other, then By repeating the above steps multiple times, multiple second scene parameter vectors can be obtained, each of which corresponds to a point in the test space.
[0040] S102: Determine the target space corresponding to each first simulation scenario based on the preset threshold, the parameter vector of each first scenario, and the simulation result value.
[0041] The target space corresponding to the first simulation scenario can be understood as the spatial range represented by the first simulation scenario.
[0042] The step of determining the target space corresponding to each first simulation scenario based on the preset threshold, each first scenario parameter vector, and simulation result value includes: calculating the Lipschitz coefficient based on the scenario parameter vector and simulation result value of each first simulation scenario; determining the difference between the simulation result value of each first simulation scenario and the preset threshold; taking the ratio of the absolute value of the difference corresponding to each first simulation scenario to the Lipschitz coefficient as the target space radius corresponding to the first simulation scenario; and determining the target space corresponding to the first simulation scenario based on the scenario parameter vector and space radius of each first simulation scenario.
[0043] The step of calculating the Lipschitz coefficient based on the scene parameter vector and simulation result value of each first simulation scenario includes: combining the first simulation scenarios in pairs to obtain multiple simulation scenario groups; for each simulation scenario group, comparing the absolute value of the difference between the simulation result values of the two first simulation scenarios in the simulation scenario group with the distance between the scene parameter vectors of the two first simulation scenarios, and using the ratio as the coefficient of the simulation scenario group; and taking the maximum value among the coefficients of the multiple simulation scenario groups as the Lipschitz coefficient.
[0044] If the i-th first scene parameter vector is The simulation result value corresponding to the first scenario parameter vector is This application assumes that any two first scene parameter vectors in the test space satisfy Lipschitz continuity, i.e. Where λ is the Lipschitz coefficient.
[0045] Furthermore, the Lipschitz coefficients are determined as follows:
[0046]
[0047] In formula (1), λ refers to the Lipschitz coefficient, and N refers to the total number of parameter vectors in the first scene. This refers to the a-th first scene parameter vector. This refers to the b-th first scene parameter vector. This refers to the simulation result value corresponding to the a-th parameter vector of the first scene. This refers to the simulation result value corresponding to the b-th parameter vector of the first scenario. It refers to and The distance between them.
[0048] For any first scene parameter vector The corresponding target space can be represented by sphere B. i Indicates. Sphere B i The center of the sphere is the parameter vector of the first scene. The corresponding point in the test space. Therefore, sphere B. i The vector representation of any point in is: In other words, sphere B i The distance between any point in the middle and the center of the sphere is less than that of sphere B. i The radius r of sphere B. i The formula for calculating the radius is: T refers to the preset threshold corresponding to the simulation result value. Furthermore, corresponding and The difference satisfies the following inequality: Right now Using the properties of triangle inequalities, Therefore That is, in B i Any point in it has Since the first simulation scenarios in this application are not simulation scenarios located at the success and failure boundary, i.e. Using the intermediate value theorem for continuous functions, and Same sign. Furthermore, any first scene parameter vector... The corresponding target space can be represented by sphere B. i Indicates. Sphere B i The spatial radius is
[0049] In other words, if autonomous driving simulation is performed on sphere B i The behavior of any point in the middle is equivalent to that on sphere B i First scene parameter vector of the sphere's center The performance on the above, that is, if the autonomous driving simulation in the first scene parameter vector If the simulation fails, then on sphere B... i Simulation execution will fail at any point within the simulation; if the autonomous driving simulation is in the first scene parameter vector If the simulation executes successfully, then on sphere B... i Simulation execution will succeed at any point within the simulation.
[0050] S103: Calculate the coverage estimate of the first simulation scene to the test space based on the number of second scene parameter vectors belonging to the target space.
[0051] The step of calculating the coverage estimate of the first simulation scene to the test space based on the number of second scene parameter vectors belonging to the target space includes: comparing the number of second scene parameter vectors belonging to the target space with the total number of second scene parameter vectors, and using the ratio as the coverage estimate of the first simulation scene to the test space. This represents the coverage estimate. The total number of second-scene parameter vectors can be set relatively large, thus obtaining a larger number of second-scene parameter vectors.
[0052] In other words, determine the target space corresponding to each first scene parameter vector; for each second scene parameter vector, determine whether the second scene parameter vector belongs to the target space corresponding to any first scene parameter vector; if the second scene parameter vector belongs to the target space corresponding to any first scene parameter vector, then the second scene parameter vector is considered to belong to the target space.
[0053] Furthermore, users can determine whether to add simulation scenarios based on the coverage estimate. If the coverage estimate is greater than or equal to the preset coverage, no simulation scenario needs to be added; if the coverage estimate is less than the preset coverage, a simulation scenario needs to be added.
[0054] Please see Figure 2 , Figure 2 A flowchart illustrating another method for calculating test space coverage provided in an embodiment of this application. Figure 2 As shown in the embodiments of this application, the method for calculating test space coverage includes the following steps:
[0055] S201: Obtain the salience level set by the user.
[0056] The significance level is the probability that the simulation of any scenario parameter vector in the test space might fail when the simulation scenario fails.
[0057] S202: Based on the significance level and coverage estimate, determine the amount of change of the test space of the first simulation scenario at the significance level.
[0058] Determining the change in the test space of the first simulation scenario at the significance level based on the significance level and the coverage estimate includes:
[0059] The change is calculated using the following formula:
[0060]
[0061] In formula (2), Δp refers to the amount of change, α refers to the significance level, and Z... α This refers to the quantile of the standard normal distribution corresponding to a significance level of α. This refers to the coverage estimate, and n refers to the total number of parameter vectors for the second scene.
[0062] S203: The upper limit of the confidence interval is the sum of the coverage estimate and the change, and the lower limit of the confidence interval is the difference between the coverage estimate and the change.
[0063] In other words, the confidence interval is The confidence interval is the confidence interval of the first simulation scenario with respect to the test space.
[0064] Based on the same application concept, this application also provides a test space coverage calculation device corresponding to the test space coverage calculation method provided in the above embodiments. Since the principle of the device in this application is similar to the test space coverage calculation method in the above embodiments of this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0065] like Figure 3 As shown, Figure 3 This is a functional block diagram of a computing device for testing spatial coverage provided in an embodiment of this application. The computing device 10 for testing spatial coverage includes: an acquisition module 101, a determination module 102, and a calculation module 103.
[0066] The acquisition module 101 is used to acquire the first scenario parameter vector, simulation result value and preset threshold corresponding to the simulation result value for each first simulation scenario in the test space, and to acquire the second scenario parameter vector for the second simulation scenario in the test space. The first simulation scenario is a scenario that has been simulated in the test space, and the second simulation scenario is a scenario that follows the joint distribution function of the test space.
[0067] The determining module 102 is used to determine the target space corresponding to each first simulation scenario based on the preset threshold, each first scenario parameter vector, and the simulation result value;
[0068] The calculation module 103 is used to calculate the coverage estimate of the first simulation scene on the test space based on the number of second scene parameter vectors belonging to the target space.
[0069] Based on the same application concept, see [link / reference] Figure 4 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this 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 is running, the processor 201 and the memory 202 communicate through the bus 203. When the machine-readable instructions are run by the processor 201, the steps of the test space coverage calculation method described in any of the above embodiments are executed.
[0070] Specifically, when the machine-readable instructions are executed by the processor 201, they can perform the following processing: obtaining a first scene parameter vector, a simulation result value, and a preset threshold corresponding to the simulation result value for each first simulation scenario in the test space; and obtaining a second scene parameter vector for a second simulation scenario in the test space, wherein the first simulation scenario is a scenario that has been simulated in the test space, and the second simulation scenario is a scenario that follows the joint distribution function of the test space; determining a target space corresponding to each first simulation scenario based on the preset threshold, each first scene parameter vector, and the simulation result value; and calculating an estimated coverage value of the first simulation scenario to the test space based on the number of second scene parameter vectors belonging to the target space.
[0071] Based on the same concept, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when run by a processor, executes the steps of the test space coverage calculation method provided in the above embodiments.
[0072] Specifically, the storage medium can be a general-purpose storage medium, such as a portable disk or hard disk. When the computer program on the storage medium is run, it can execute the above-mentioned method for calculating the test space coverage. By determining the target space of the first scenario parameter vector that has been simulated in the test space and the second simulation scenario parameters that have not been simulated in the test space, the coverage of the first simulation scenario to the test space is calculated based on the number of second simulation scenario parameters belonging to the target space. This solves the technical problem in the prior art that the coverage of the simulated scenario to the test space cannot be calculated, which makes it impossible for users to determine whether to add simulation scenarios. This achieves the technical effect of improving simulation efficiency.
[0073] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this 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 units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0074] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0075] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0076] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0077] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for calculating the coverage of a test space, characterized in that, The method includes: Obtain the first scenario parameter vector, simulation result value, and preset threshold corresponding to the simulation result value for each first simulation scenario in the test space; and obtain the second scenario parameter vector for the second simulation scenario in the test space. The first simulation scenario is a scenario that has been simulated in the test space, and the second simulation scenario is a scenario that follows the joint distribution function of the test space. Based on the preset threshold, each first scenario parameter vector, and the simulation result value, the target space corresponding to each first simulation scenario is determined; Based on the number of second scene parameter vectors belonging to the target space, calculate the estimated coverage of the first simulation scene to the test space.
2. The method according to claim 1, characterized in that, The step of obtaining the second scene parameter vector of the second simulation scene in the test space includes: Randomly generate random numbers corresponding to each scene parameter in the joint distribution function; Substitute the random number of any first scene parameter in each scene parameter into the inverse function of the marginal distribution function of the first scene parameter to determine the parameter value of the first scene parameter. Take any scene parameter other than the first scene parameter as the second scene parameter, and determine the conditional distribution function corresponding to the parameter values of the second scene parameter and all the first scene parameters. Substitute the random number corresponding to the second scene parameter into the inverse function of the conditional distribution function corresponding to the second scene parameter to determine the parameter value of the second scene parameter; The second scene parameter is used as the new first scene parameter, and execution continues by using any scene parameter other than the first scene parameter as the second scene parameter until the parameter values of all scene parameters in the joint distribution function are determined.
3. The method according to claim 1, characterized in that, The step of determining the target space corresponding to each first simulation scenario based on the preset threshold, each first scenario parameter vector, and simulation result value includes: Based on the scene parameter vector and simulation result value of each first simulation scenario, the Lipschitz coefficient is calculated; Determine the difference between the simulation result value of each first simulation scenario and the preset threshold; The ratio of the difference corresponding to each first simulation scenario to the Lipschitz coefficient is used as the target spatial radius corresponding to that first simulation scenario; Based on the scene parameter vector and spatial radius of each first simulation scene, the target space corresponding to that first simulation scene is determined.
4. The method according to claim 3, characterized in that, The calculation of the Lipschitz coefficient based on the scene parameter vector and simulation result value of each first simulation scenario includes: The first simulation scenario is combined in pairs to obtain multiple simulation scenario groups; For each simulation scenario group in the multiple simulation scenario groups, the absolute value of the difference between the simulation result values of the two first simulation scenarios in the simulation scenario group is compared with the distance between the scenario parameter vectors of the two first simulation scenarios, and the ratio is used as the coefficient of the simulation scenario group. The maximum value among the coefficients of the multiple simulation scenario groups is taken as the Lipschitz coefficient.
5. The method according to claim 1, characterized in that, The step of calculating the coverage estimate of the first simulation scene to the test space based on the number of second scene parameter vectors belonging to the target space includes: The number of second scene parameter vectors belonging to the target space is compared with the total number of second scene parameter vectors, and the ratio is used as the estimated coverage value of the first simulation scene to the test space.
6. The method according to claim 1, characterized in that, The method further includes: Obtain the salience level set by the user; Based on the significance level and the coverage estimate, determine the amount of change of the first simulation scenario in the test space at the significance level; The coverage estimate is added to the change amount to obtain the upper limit of the confidence interval, and the coverage estimate is subtracted from the change amount to obtain the lower limit of the confidence interval.
7. The method according to claim 6, characterized in that, Determining the change in the test space of the first simulation scenario at the significance level based on the significance level and the coverage estimate includes: The change is calculated using the following formula: In the above formula, Δp refers to the change, α refers to the significance level, and Z... α This refers to the quantile of the standard normal distribution corresponding to a significance level of α. This refers to the coverage estimate, and n refers to the total number of parameter vectors for the second scene.
8. A computing device for testing spatial coverage, characterized in that, The device includes: The acquisition module is used to acquire the first scenario parameter vector, simulation result value and preset threshold corresponding to the simulation result value for each first simulation scenario in the test space, and to acquire the second scenario parameter vector for the second simulation scenario in the test space. The first simulation scenario is a scenario that has been simulated in the test space, and the second simulation scenario is a scenario that follows the joint distribution function of the test space. The determination module is used to determine the target space corresponding to each first simulation scenario based on the preset threshold, each first scenario parameter vector, and the simulation result value; The calculation module is used to calculate the coverage estimate of the first simulation scene on the test space based on the number of second scene parameter vectors belonging to the target space.
9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. The machine-readable instructions are executed by the processor to perform the steps of the test space coverage calculation method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the method for calculating test space coverage as described in any one of claims 1 to 7.