Simulation method, simulation computer device and computer readable storage medium
By adjusting the calculation time of calculation steps in the simulator, comparing simulation performance, and outputting optimization suggestions, the problem of difficult resource allocation in the autonomous driving system is solved, system performance is improved, and R&D resources are saved.
Patent Information
- Application Number
- CN202110559453.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-21
- Publication Date
- 2024-08-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When existing robots and autonomous driving systems have limited computing resources, it is a difficult problem to effectively allocate resources and human resources to improve system response speed and overall performance, and it is difficult to judge in advance the impact of resource allocation on system performance.
By conducting multiple simulation tests in a completely deterministic simulator, we compare the impact of calculation time adjustments of different calculation steps on system performance, and output optimization suggestions, including hardware performance optimization, algorithm simplification, computing resource adjustment or code optimization, to help Experimenters quickly find the pain points of the system and optimize resource allocation.
It can quickly find the computing resources and R&D optimization focus of the system, save R&D human resources and time, contribute to effective optimization planning, and improve the overall performance of autonomous vehicles or robots.
Smart Images

Figure CN113177266B
Abstract
Description
Technical Field
[0001] The present application relates to the field of simulation testing, and in particular to a simulation method, a simulation computer device, and a computer-readable storage medium. Background Art
[0002] Existing robotics and autonomous driving systems usually include multiple modules, such as positioning, perception, prediction, decision-making, planning, and control. Each calculation step takes a certain amount of time to calculate. The calculation speed of each calculation step determines the response speed of the entire system. If the system is too slow to respond and the calculation takes too long, even if the AI algorithm is smart, it may lead to poor overall AI performance.
[0003] However, in actual situations, the calculation speed of each step is determined by factors such as computing resources, algorithm complexity, and code optimization. The computing resources of the overall system are limited, which leads to the need to find a balance between the resource requirements of each step module. Improvements in algorithm complexity and code optimization require a lot of R&D time; and the same R&D time can be spent on different steps and modules to achieve improvements. In actual situations, with limited computing resources and R&D human resources, how to allocate computing resources and human resources for R&D is an important and difficult issue. And whether each possible degree of acceleration will change the overall performance of the system is very difficult to judge in advance before the improvement is completed. Summary of the invention
[0004] In a first aspect, an embodiment of the present application provides a simulation method, the simulation method comprising:
[0005] Performing a first simulation on the plurality of calculation steps to obtain a first simulation performance;
[0006] Obtaining the original calculation time of each of the calculation steps;
[0007] Modifying original calculation time of one or more calculation steps of the multiple calculation steps to obtain adjusted calculation time of the one or more calculation steps;
[0008] Performing a second simulation on the plurality of calculation steps to obtain a second simulation performance;
[0009] comparing the first simulated performance and the second simulated performance;
[0010] When the second simulation performance is better than the first simulation performance, output a first optimization suggestion, wherein the first optimization suggestion is whether it is necessary to perform research and development optimization on the one or more calculation steps, and the research and development optimization is one or more measures of hardware performance optimization, algorithm simplification and improvement, computing resource acceleration and enlargement, or code optimization;
[0011] When the second simulation performance is inferior to the first simulation performance, a second optimization suggestion is output, where the second optimization suggestion is whether to transfer computing resources of the one or more computing steps.
[0012] In a second aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the storage medium is used to store a simulation program, and the simulation program is executed by a processor to implement the simulation method as described above.
[0013] In a third aspect, an embodiment of the present application provides a simulation computer device for autonomous driving or robotics, the simulation computer device comprising:
[0014] a memory for storing a computer executable program; and
[0015] A processor is used to execute the executable program to implement the simulation method as described above.
[0016] The above simulation method and simulation computer device, in a simulator with complete determinism, the experimenter directly specifies to modify the original calculation time of one or more calculation steps in the multiple calculation steps, calculates the simulation performance after the calculation time is modified, compares the simulation performance before the modification and the simulation performance after the modification, and obtains the optimization of the one or more calculation steps. It can quickly find the pain points of the system, and need to allocate more computing resources or more R&D forces to improve, saving R&D human resources and R&D time, and helping experimenters to effectively optimize the project. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.
[0018] Figure 1 A flowchart of a simulation method provided in an embodiment of the present application.
[0019] Figure 2 A schematic diagram of general calculation steps for the simulation test provided in an embodiment of the present application.
[0020] Figure 3 This is a flowchart of the first embodiment of the simulation method provided in the embodiment of the present application.
[0021] Figure 4 This is a flowchart of a second embodiment of the simulation method provided in an embodiment of the present application.
[0022] Figure 5 A schematic diagram of the internal structure of a simulation computer device provided in an embodiment of the present application.
[0023] Figure 6 A schematic diagram of a simulation performance visualization provided in an embodiment of the present application.
[0024] Figure 7 A schematic diagram of a computer-readable storage medium provided in accordance with an embodiment of the present application.
[0025] Figure 8 A schematic diagram of a scenario in which a pedestrian suddenly appears in front of the autonomous driving vehicle provided in an embodiment of the present application.
[0026] Fig. 9 This is a schematic diagram of a simulation of a scenario in which a pedestrian suddenly appears in front of the autonomous driving vehicle in an embodiment of the present application.
[0027] Fig.10 A schematic diagram of the calculation time consumed for each calculation step before adjustment provided in an embodiment of the present application.
[0028] Fig.11 A schematic diagram of the calculation time consumed for each calculation step after adjustment provided in an embodiment of the present application.
[0029] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0031] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate. In other words, the described embodiments are implemented according to a sequence other than that illustrated or described herein. In addition, the terms "including" and "having" and any of their variations may also include other content. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to only those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] It should be noted that the descriptions involving "first", "second", etc. in this application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0033] In a fully deterministic simulator, we can allow experimenters to directly specify the computing time required for each step. A fully deterministic simulator can accurately reproduce the same input in the same scenario.
[0034] Please refer to Figure 1 , which is a flow chart of the simulation method provided in an embodiment of the present application, and the simulation method includes the following steps.
[0035] Step S101, perform a first simulation on the plurality of calculation steps to obtain a first simulation performance. The first simulation is a scenario that the autonomous driving vehicle may encounter in actual driving, including one or more of traffic light recognition, lane line recognition, obstacle recognition, path planning, vehicle speed, and vehicle acceleration. The first simulation performance is a simulation result of the autonomous driving vehicle being simulated in the simulator and displayed through visualization processing. Please refer to Figure 6, the first simulation performance can be displayed visually, and the first simulation performance is 3. Specifically, according to the data generated by the autonomous driving vehicle in the simulation test, the data generated in the simulation test is scored by the scoring rules to obtain the simulation results, and then the simulation results are visualized according to the display rules, and finally the first simulation performance is obtained. The scoring rules include but are not limited to safety standards for indicating the safety of the driving behavior of the autonomous driving vehicle, compliance standards for indicating whether the driving behavior of the autonomous driving vehicle complies with traffic rules, comfort standards for indicating the somatosensory comfort of riding in the autonomous driving vehicle, truth standards for indicating whether the preset behavior is met, and staged status standards for indicating the intermediate results generated by each simulation module, etc. For example, in a scene where there are pedestrians crossing the road in front of the autonomous driving vehicle, if the autonomous driving vehicle takes emergency braking measures when it is 5 meters away from the pedestrian, the braking distance is too short at this time, and the passengers are uncomfortable to ride, and taking emergency braking will get a lower score. If the autonomous driving vehicle is an autonomous driving vehicle that brakes slowly at 20 meters away from the pedestrian, it can avoid hitting the pedestrian and the rear-end collision of the rear vehicle, while ensuring the riding comfort of the passengers, and the driving behavior of taking slow braking will get a high score.
[0036] Specifically, for the simulator, the simulation instructions issued by the experimenter need to be coordinated with multiple calculation steps in the simulator so that the simulator can achieve the corresponding simulation purpose, that is, a simulation instruction needs to be split into multiple calculation steps to be executed separately. For example, when the experimenter sends an instruction for the autonomous driving vehicle to turn left to the simulator through the user terminal device, it may be necessary to go through the positioning, perception, planning, decision-making, control and other calculation steps in the simulator to achieve the purpose of making the autonomous driving vehicle turn left. At this time, the simulation instruction for turning left needs to be divided into the calculation steps of obtaining the current positioning information of the autonomous driving vehicle, obtaining the perception data of the surrounding environment of the autonomous driving vehicle, planning the left turn route according to the positioning information and perception data, and controlling the driving of the autonomous driving vehicle according to the left turn route. Please refer to Figure 2, which is a schematic diagram of the general calculation steps of the simulation test. For example, when the simulator executes a simulation instruction to turn left, the simulator consumes 50ms to execute positioning calculation step 1, wherein positioning calculation step 1 is to obtain the current positioning information of the autonomous driving vehicle. The simulator consumes 100ms to execute perception calculation step 2, wherein perception calculation step 2 is to obtain perception data of the surrounding environment of the autonomous driving vehicle. The simulator consumes 150ms to execute planning calculation step 3, wherein planning calculation step 3 is to plan a left turn route based on the positioning information and perception data, and there are one or more left turn routes. The simulator consumes 100ms to execute decision calculation step 4, wherein decision calculation step 4 is to select an optimal left turn route from one or more left turn routes generated by planning calculation step 3. The simulator consumes 100ms to execute control calculation step 5, wherein control calculation step 5 is to control the driving of the autonomous driving vehicle according to the optimal left turn route selected in decision calculation step 4.
[0037] Step S102, obtaining the original calculation time of each calculation step. Specifically, the simulator needs to split a simulation instruction into multiple calculation steps to execute separately, and the calculation time of each calculation step can be obtained. Figure 2 For example, it takes 50ms for the simulator to execute positioning calculation step 1, so the original calculation time of positioning calculation step 1 is 50ms; it takes 100ms for the simulator to execute perception calculation step 2, so the original calculation time of perception calculation step 2 is 100ms; it takes 150ms for the simulator to execute planning calculation step 3, so the original calculation time of planning calculation step 3 is 150ms; it takes 100ms for the simulator to execute decision calculation step 4, so the original calculation time of decision calculation step 4 is 100ms; it takes 100ms for the simulator to execute control calculation step 5, so the original calculation time of control calculation step 5 is 100ms.
[0038] Step S103, modify the original calculation time of one or more calculation steps in the multiple calculation steps to obtain the adjusted calculation time of the one or more calculation steps. Specifically, the experimenter can modify the original calculation time of one or more calculation steps in the simulator to obtain the adjusted calculation time of one or more calculation steps, and the modified adjusted calculation time can be longer or shorter than the original calculation time. The experimenter can achieve the purpose of modifying the original calculation time of one or more calculation steps in the multiple calculation steps by adjusting the calculation resources, hardware, etc. of the calculation steps in the simulator. Please refer to Figure 2For example, the original calculation time of the positioning calculation step 1 is 50ms and the original calculation time of the planning calculation step 3 is 100ms; the original calculation time of the positioning calculation step 1 and the planning calculation step 3 is modified, and the modified adjusted calculation time is 30ms and 200ms. The adjusted calculation time of the positioning calculation step 1 is 30ms by increasing the computing resources. The adjusted calculation time of the planning calculation step 3 should be 200ms by reducing the computing resources and using hardware with lower performance.
[0039] Step S104, performing a second simulation on the multiple calculation steps to obtain a second simulation performance. Specifically, the multiple calculation steps are re-simulated and tested in the simulator according to the adjusted calculation time obtained in step S103. Among them, the second simulation is a scene that the autonomous driving vehicle may encounter in actual driving, including one or more of traffic light recognition, lane line recognition, obstacle recognition, path planning, vehicle speed, and vehicle acceleration. Among them, the second simulation performance is the simulation result of the autonomous driving vehicle being simulated and tested in the simulator and displayed through visualization. Specifically, the scene data of the first simulation and the second simulation remain unchanged. The scene data includes but is not limited to virtual data, real data collected during road testing of the autonomous driving vehicle, and a combination of virtual data and real data. Among them, the virtual data is the data generated by the virtual scene in the simulation system.
[0040] Step S105, compare the first simulation performance and the second simulation performance. For example, compare the first simulation performance and the second simulation performance of the left turn simulation test performed by the simulator. The first simulation performance and the second simulation performance can be processed by visualization software, and can be processed by bar charts, curve charts, line charts, scatter plots, histograms, box plots, etc. Figure 2 3D color matrix, 3D color matrix, pie chart, bar chart Figure 1 The simulation results can be outputted in a visual way in one or more forms to obtain a comparison chart. This makes it easier and quicker to understand the advantages and disadvantages of the first simulation performance and the second simulation performance, and compare the simulation performance with better performance. For example, please refer to Figure 6 , the first simulation shows 3, and the second simulation shows 9.
[0041] Step S106, when the second simulation performance is better than the first simulation performance, output a first optimization suggestion, wherein the first optimization suggestion is whether it is necessary to perform R&D optimization on the one or more calculation steps, and the R&D optimization is one or more measures of hardware performance optimization, algorithm simplification and improvement, acceleration and increase of computing resources, or code optimization.
[0042] Specifically, when the adjusted calculation time is shorter than the original calculation time, and the difference between the second simulation performance and the first simulation performance is greater than a first preset value, the first optimization suggestion that the one or more calculation steps need to be optimized is output. Figure 8 In the scenario where a pedestrian suddenly crosses the road in front of the autonomous vehicle, the original calculation time of perception calculation step 2 is 200ms, the original calculation time of planning calculation step 3 is 200ms, the original calculation time of decision calculation step 4 is 200ms, and the original calculation time of control calculation step 5 is 200ms. After shortening the calculation time, the adjusted calculation time of perception calculation step 2 is 100ms, the adjusted calculation time of planning calculation step 3 is 100ms, the adjusted calculation time of decision calculation step 4 is 50ms, and the adjusted calculation time of control calculation step 5 is 50ms. In the first simulation of this scenario, the autonomous vehicle took emergency braking at a close distance to the pedestrian due to its long reaction time. Although it can avoid hitting the pedestrian, the braking distance is short, the autonomous vehicle shakes obviously back and forth, and the passengers have a bad riding experience. According to the scoring rules, the first simulation performance is 3. In the second simulation, the calculation time of perception calculation step 2, planning calculation step 3, decision calculation step 4 and control calculation step 5 was shortened. The autonomous driving vehicle can react quickly when pedestrians are detected and use slow braking at a long distance, which can avoid hitting pedestrians and rear-end collisions with the following vehicles, while ensuring the riding comfort of passengers. According to the scoring rules, the second simulation performance is 8. At this time, the second simulation performance is better than the first simulation performance, and the difference between the second simulation performance and the first simulation performance is 5, which is greater than the first preset value 3, indicating that the calculation speed of one or more steps is a pain point, and it is necessary to develop and optimize the one or more calculation steps.
[0043] Specifically, when the adjusted calculation time is shorter than the original calculation time, and the difference between the second simulation performance and the first simulation performance is less than a first preset value, the first optimization suggestion is outputted without the need to perform R&D optimization on the one or more calculation steps.
[0044] For example, in the simulation scenario of traffic light recognition of an autonomous vehicle, the autonomous vehicle needs to obtain the current position of the autonomous vehicle through positioning calculation step 1, and then obtain the image data of the traffic light through perception calculation step 2. Secondly, the decision calculation step 5 is used to identify the current position of the autonomous vehicle, the high-definition map and the image data of the traffic light. In the first simulation of this scenario, the original calculation time of the decision calculation step is 100ms; in the second simulation, the adjustment calculation time of the decision calculation step is modified to 50ms, and the first simulation performance is 7 and the second simulation performance is 8. In both simulation tests, the autonomous vehicle can accurately identify the state of the traffic light, and the reaction speed is in milliseconds. In this scenario, the impact on the performance of the two simulations is not significant. The performance of the first simulation is 7, and the performance of the second simulation is 8. The first preset value is 3. The difference between the two simulation performances is 1, which is less than the first preset value 3. This shows that improving the speed of one or more calculation steps will not improve the performance of the autonomous vehicle much, so there is no need to develop and optimize the one or more calculation steps.
[0045] The above method shortens the calculation time of one or more calculation steps in the simulator and compares the simulation performance before and after shortening. If after shortening one or more calculation steps, the second simulation performance is better than the first simulation performance, and the difference between the second simulation performance and the first simulation performance is greater than the first preset value, it means that the speed of the one or more calculation steps is improved, which is of great help to improve the performance of the autonomous driving vehicle. The one or more calculation steps are the pain points of the autonomous driving vehicle or robot, and the one or more calculation steps can be given priority in research and development. If after shortening one or more calculation steps, the second simulation performance is better than the first simulation performance, and the difference between the second simulation performance and the first simulation performance is less than the first preset value, it means that even if the speed of the one or more calculation steps is improved, the overall performance of the autonomous driving vehicle or robot is not significantly improved, and it is not worth spending research and development resources to improve the speed of the one or more calculation steps, which helps the experimenters to plan the project effectively.
[0046] Step S107: when the second simulation performance is inferior to the first simulation performance, output a second optimization suggestion, the second optimization suggestion being whether to transfer computing resources of the one or more computing steps.
[0047] Specifically, when the adjusted calculation time is longer than the original calculation time, and the difference between the first simulation performance and the second simulation performance is greater than a second preset value, the second optimization suggestion for not transferring the computing resources of the one or more calculation steps is output. In the simulation test, the calculation time of one or more calculation steps is extended. For example, in a simulation scenario when there is an obstacle ahead of the driving direction of the autonomous driving vehicle, the autonomous driving vehicle is completed through positioning calculation step 1, perception calculation step 2, planning calculation step 3, decision calculation step 4, control calculation step 5 and other steps. Fig.10 Before adjustment, the original calculation time of the positioning calculation step 1 is 50ms, the original calculation time of the perception calculation step 2 is 50ms, the original calculation time of the planning calculation step 3 is 50ms, the original calculation time of the decision calculation step 4 is 50ms, and the original calculation time of the control calculation step 5 is 50ms. The total calculation time of the first simulation is 250ms. Fig.11 , the adjusted calculation time of perception calculation step 2 is 100ms, the adjusted calculation time of planning calculation step 3 is 100ms, the adjusted calculation time of decision calculation step 4 is 100ms, and the adjusted calculation time of control calculation step 5 is 100ms. The total calculation time of the second simulation is 450ms. In the first simulation of this scenario, the autonomous driving vehicle reacts quickly when it detects an obstacle, and can use slow braking or slow lane change at a long distance, which can avoid hitting the obstacle and ensure the riding comfort of passengers. According to the scoring rules, the first simulation is 8. In the second simulation, because the calculation time of the four calculation steps is extended, the autonomous driving vehicle reacts slower when it detects an obstacle, and then adopts tense braking or emergency lane change to avoid. When the emergency lane change is made, the wheel presses the solid line of the lane, which does not meet the compliance standards of traffic regulations and leads to a poor riding experience for passengers. According to the scoring rules, the second simulation is 3. The experimenter sets the second preset value to 4. The difference between the first simulation and the second simulation is 5, which is greater than the second preset value 4, indicating that the speed of one or more calculation steps will affect the performance of the autonomous driving vehicle, and the computing resources of the one or more calculation steps will not be transferred.
[0048] Specifically, when the adjusted calculation time is longer than the original calculation time, and the difference between the first simulation performance and the second simulation performance is less than a second preset value, the second optimization suggestion for transferring the computing resources of the one or more computing steps is output. For example, in the straight-driving simulation scenario of an autonomous driving vehicle, the calculation time of the positioning calculation step 1 is extended, and the second simulation performance does not change significantly from the first simulation performance. Among them, if the first simulation performance is 8 and the second simulation performance is 7, it is considered that the difference between the second simulation performance and the first simulation performance is 1, which is less than the second preset value of 4. This indicates that the speed of the positioning calculation step 1 has slowed down, which has little effect on the performance of the autonomous driving vehicle, and the computing resources of the positioning calculation step 1 can be transferred to other calculation steps.
[0049] The above method extends the calculation time of one or more calculation steps in the simulator, and compares the simulation performance before and after the extension. If the second simulation performance is worse than the first simulation performance after extending one or more calculation steps, it means that if the one or more calculation steps are reduced, the performance of the autonomous driving vehicle or robot will be reduced, and the computing resources of the one or more calculation steps cannot be transferred to other calculation steps. If the second simulation performance does not change significantly from the first simulation performance after extending one or more calculation steps, it means that the computing resources of the one or more calculation steps are in excess, and using fewer computing resources will not affect the performance of the autonomous driving vehicle or robot, and the computing resources can be transferred to other calculation steps.
[0050] In the above embodiment, by obtaining the first simulation performance of the simulator under normal conditions, modifying the calculation time of one or more calculation steps, obtaining the second simulation performance of the simulator, and comparing the first simulation performance with the second simulation performance, the calculation steps that need to be optimized can be found out, and the calculation steps that need to be optimized are optimized, which greatly improves the performance of the entire autonomous driving vehicle or robot. The research and development optimization of this calculation step should be increased. It is possible to quickly find the pain points of autonomous driving vehicles or robots, and to allocate more computing resources or more R&D forces for improvement, saving R&D human resources and R&D time, and helping experimenters to effectively optimize the project.
[0051] Please refer to Figure 3 , which is a flowchart of the first embodiment of the simulation method provided in the embodiments of the present application.
[0052] Step S201, modifying the calculation time of one or more calculation steps in the multiple calculation steps to a limit calculation time, wherein the limit calculation time is the calculation time of the one or more calculation steps under the condition of providing optimal hardware resources. Specifically, providing the optimal hardware resources to the one or more calculation steps, and reducing the calculation time of the one or more calculation steps to the shortest under the condition of the optimal hardware resources.
[0053] Step S202, simulating the one or more calculation steps to obtain a third simulation performance. Specifically, the simulator performs simulation testing according to the simulation instruction of the experimenter to obtain the third simulation performance.
[0054] Step S203, determining whether the third simulation performance is greater than a preset performance value. Specifically, the experimenter may set a preset performance value.
[0055] Step S204: When the third simulation performance is greater than the preset performance value, output the first optimization suggestion that does not require research and optimization of the one or more calculation steps. Specifically, when the third simulation performance value is 8 and the preset performance value is 7, the third simulation performance value is greater than the preset performance value. This indicates that the Ai algorithm capability of the autonomous driving vehicle is sufficient and does not require research and optimization.
[0056] In the above embodiment, if the simulator makes the calculation time of one or more calculation steps the limit calculation time, and the autonomous driving vehicle or robot can achieve the preset simulation performance, it means that the existing algorithm capability of the autonomous driving vehicle or robot is sufficient. It is not necessary to perform one or more of code optimization or algorithm simplification and improvement on this step.
[0057] Please refer to Figure 4 , which is a flowchart of the second embodiment of the simulation method provided in the embodiment of the present application.
[0058] Step S301, randomly or regularly adjusting the calculation speed of the one or more calculation steps. Specifically, the calculation speed of the one or more calculation steps may be randomly or regularly adjusted.
[0059] Step S302, multiple simulations are performed on the multiple calculation steps to obtain multiple simulation performances. Specifically, each time the calculation speed of one or more calculation steps is adjusted, a simulation is performed to finally obtain multiple simulation performances.
[0060] Step S303, determining whether there is a simulation performance in the multiple simulations whose difference with another simulation is greater than a third preset value. Specifically, by calculating the difference between the multiple simulation performances and comparing them with the preset third preset value.
[0061] Step S304: when there is no difference between the performance of one simulation and another simulation in the multiple simulations that is greater than the third preset value, output the first optimization suggestion that does not require R&D optimization of the one or more calculation steps. For example, if the third preset value is 3 and there is no difference between the performance of one simulation and another simulation that is greater than the third preset value 3, it means that the stability of the autonomous driving system of the autonomous driving vehicle is very good, and there is no need to R&D optimize the one or more calculation steps.
[0062] Please see Figure 5 , which is a schematic diagram of the internal structure of the simulation computer device provided in the embodiment of the present application. The simulation computer device 200 is used for simulation, and the simulation computer device 200 includes a memory 202 and a processor 201. The memory 202 is used to store a computer executable program, and the processor 201 is used to execute the executable program to implement the simulation method provided in the above embodiment.
[0063] In some embodiments, the processor 201 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor or other data processing chip, and is used to run the computer executable program stored in the memory 202. Specifically, the processor 201 executes the executable program to implement the above-mentioned simulation method.
[0064] The memory 202 includes at least one type of readable storage medium, which includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 202 can be an internal storage unit of the simulation computer device 200, such as a hard disk of the simulation computer device 200. In other embodiments, the memory 202 can also be an external storage device of the simulation computer device 200, such as a plug-in hard disk equipped on the simulation computer device 200, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the memory 202 can also include both an internal storage unit of the simulation computer device 200 and an external storage device. The memory 202 can not only be used to store application software and various types of data installed in the simulation computer device 200, such as the code of the simulation method for realizing automatic driving, but also can be used to temporarily store data that has been output or is to be output.
[0065] The simulated computer device 200 also includes a bus 203. The bus 203 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0066] Furthermore, the simulation computer device 200 may also include a display component 204. The display component 204 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display component 204 may also be appropriately referred to as a display device or a display unit, which is used to display information processed in the simulation computer device 200 and to display a visual user interface.
[0067] Furthermore, the simulated computer device 200 may also include a communication component 205. The communication component 205 may optionally include a wired communication component and / or a wireless communication component (such as a WI-FI communication component, a Bluetooth communication component, etc.), which is generally used to establish a communication connection between the simulated computer device 200 and other simulated computer devices.
[0068] Figure 5 Only a simulation computer device 200 having some components and a simulation method for implementing the autonomous driving of the figure is shown. It can be understood by those skilled in the art that Figure 5 The illustrated structure does not constitute a limitation on the simulation computer device 200 , and may include fewer or more components than illustrated, or may combine certain components, or may have different component arrangements.
[0069] The computer program product includes one or more computer instructions. When the computer program instruction is loaded and executed on a computer, a process or function according to an embodiment of the present application is generated in whole or in part. The simulation computer device can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instruction can be stored in a computer-readable storage medium, or transmitted from a computer-readable storage medium to another computer-readable storage medium, for example, the computer instruction can be transmitted from a website site, a computer, a server, or a data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server, a data center, etc. that includes one or more available media integration. The available medium can be a magnetic medium, (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state hard disk Solid State Disk (SSD)) etc.
[0070] Please see Figure 7 , which is a schematic diagram of a computer-readable storage medium provided in an embodiment of the present application. Storage medium 300 is used to store a simulation program.
[0071] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0072] 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. For example, the device embodiments described above are only schematic. For example, the division of the unit is only a logical function division. There may be other division methods in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0073] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0074] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0075] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a simulated computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only storage medium (ROM, Read-Only Memory), random access storage medium (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0076] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A simulation method, applied to a fully deterministic simulator, comprising a plurality of calculation steps, It is characterized in that The simulation method comprises: Performing a first simulation on the plurality of calculation steps to obtain a first simulation performance; Obtaining the original calculation time of each of the calculation steps; Modifying original calculation time of one or more calculation steps of the multiple calculation steps to obtain adjusted calculation time of the one or more calculation steps; Performing a second simulation on the plurality of calculation steps to obtain a second simulation performance; comparing the first simulated performance and the second simulated performance; When the second simulation performance is better than the first simulation performance, output a first optimization suggestion, wherein the first optimization suggestion is whether it is necessary to perform research and development optimization on the one or more calculation steps, and the research and development optimization is one or more measures of hardware performance optimization, algorithm simplification and improvement, computing resource acceleration and enlargement, or code optimization; When the second simulation performance is inferior to the first simulation performance, a second optimization suggestion is output, and the second optimization suggestion is whether to transfer the computing resources of the one or more computing steps; wherein, when the computing resources of the one or more computing steps are in excess, the computing resources are transferred to other computing steps.
2. The simulation method according to claim 1, It is characterized in that When the second simulation performance is better than the first simulation performance, outputting a first optimization suggestion specifically includes: When the adjusted calculation time is shorter than the original calculation time, and the difference between the second simulation performance and the first simulation performance is greater than a first preset value, the first optimization suggestion requiring R&D optimization of the one or more calculation steps is output.
3. The simulation method according to claim 1, It is characterized in that When the second simulation performance is better than the first simulation performance, outputting a first optimization suggestion specifically includes: When the adjusted calculation time is shorter than the original calculation time and the difference between the second simulation performance and the first simulation performance is less than a first preset value, the first optimization suggestion is outputted without the need to perform R&D optimization on the one or more calculation steps.
4. The simulation method according to claim 1, It is characterized in that When the second simulation performance is inferior to the first simulation performance, outputting a second optimization suggestion specifically includes: When the adjusted calculation time is longer than the original calculation time and the difference between the first simulation performance and the second simulation performance is greater than a second preset value, the second optimization suggestion is outputted which does not require transferring the calculation resources of the one or more calculation steps.
5. The simulation method according to claim 1, It is characterized in that When the second simulation performance is inferior to the first simulation performance, outputting a second optimization suggestion specifically includes: When the adjusted calculation time is longer than the original calculation time and the difference between the first simulation performance and the second simulation performance is less than a second preset value, the second optimization suggestion for transferring the calculation resources of the one or more calculation steps is output.
6. The simulation method according to claim 1, It is characterized in that The simulation method further comprises: Modifying the computing time of one or more computing steps among the multiple computing steps to a limit computing time, wherein the limit computing time is the computing time of the one or more computing steps under the condition of providing optimal hardware resources; simulating the one or more calculation steps to obtain a third simulation representation; determining whether the third simulation performance is greater than a preset performance value; When the third simulation performance is greater than a preset performance value, the first optimization suggestion is outputted, which does not require R&D optimization of the one or more calculation steps.
7. The simulation method according to claim 1, It is characterized in that The simulation method further comprises: Randomly or regularly adjusting the calculation speed of the one or more calculation steps; Performing multiple simulations on the multiple calculation steps to obtain multiple simulation performances; Determining whether there is a difference between a subsequent simulation performance and a previous simulation performance in the multiple simulations that is greater than a third preset value; When there is no difference between the performance of a subsequent simulation and that of a previous simulation in the multiple simulations that is greater than a third preset value, the first optimization suggestion is outputted, which does not require R&D optimization of the one or more calculation steps.
8. A computer-readable storage medium, It is characterized in that The storage medium is used to store a simulation program, and the simulation program is executed by a processor to implement the simulation method according to any one of claims 1 to 7.
9. A simulated computer device, It is characterized in that The computer device comprises: a memory for storing a computer executable program; and A processor, wherein the processor is used to execute the executable program to implement the simulation method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Evaluation method and system of automatic driving algorithm
CN111859597A
Simulation test method and device of automatic driving system and storage medium
CN112364439A
