Test scenario simulation method, device, computer equipment and storage medium
By obtaining and matching the feature information of objects in the test scenario, and using field templates to generate object codes, the problems of low code efficiency and many repetitive codes in the existing technology are solved, and efficient simulation model generation and maintenance are achieved.
Patent Information
- Application Number
- CN202080003153.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-01-21
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2040-01-21
AI Technical Summary
The existing real-life test scenario simulation methods have the same functions as objects of different categories, resulting in low code generation efficiency and a large number of duplicate codes, which increases the difficulty of code maintenance.
By obtaining the characteristic information of each object in the test scenario, using candidate fields in the field template for matching and assignment, the object code is generated and the simulation model is established, which reduces redundant code and maintenance requirements.
It realizes simulation models that generate different objects without changing existing code, improves code generation efficiency and reduces redundant code and maintenance costs.
Smart Images

Figure CN113498511B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of autonomous driving technology, and in particular to a test scenario simulation method, apparatus, computer equipment and storage medium. Background Art
[0002] With the development of vehicle control technology, unmanned driving technology has emerged. Unmanned driving technology automatically plans the driving route of unmanned vehicles based on unmanned driving algorithms, and controls the unmanned vehicles based on the driving routes so that the unmanned vehicles can reach the predetermined target location. The test evaluation of unmanned driving algorithms is mainly based on the simulation of real test scenarios.
[0003] Existing real test scenario simulation methods often classify objects that appear on the road in real life, such as cars, trucks, bicycles, pedestrians, etc., and write corresponding codes according to the functions of each category of objects to simulate each object. However, different categories of objects may have the same functions, so there is a large amount of duplicate code between different categories of objects, resulting in low efficiency in code generation. Summary of the invention
[0004] Various embodiments provided in this application provide a test scenario simulation method, apparatus, computer equipment and storage medium. The technical solution is as follows:
[0005] A test scenario simulation method, comprising:
[0006] Obtain feature information corresponding to each object in the test scene;
[0007] Get a field template, which includes multiple candidate fields;
[0008] Determine the target field of each object from the field template according to the feature information corresponding to each object, and assign a value to the target field of each object according to the feature information corresponding to each object;
[0009] Generate a target code corresponding to the target field of each object according to the assigned target field of each object, and generate a simulation model corresponding to each object according to the target code corresponding to each object;
[0010] A simulation scene corresponding to the test scene is established according to the simulation model corresponding to each object.
[0011] In one embodiment, before obtaining the field template, the method further includes:
[0012] Obtain historical simulation data, extract fields of each historical simulation model from the historical simulation data, and obtain a field set corresponding to each historical simulation model; respectively obtain fields in the field set corresponding to each historical simulation model; count the repetition rate of each field; and form a field template based on fields whose repetition rate is greater than a preset threshold.
[0013] In one embodiment, determining a target field of each object from a field template according to feature information corresponding to each object, and assigning a value to the target field of each object according to the feature information corresponding to each object includes:
[0014] Determine the feature fields and feature field values corresponding to each object based on the feature information corresponding to each object; match the candidate fields in the field template with the feature fields corresponding to each object; when the match is successful, use the candidate fields that successfully match the feature fields corresponding to each object as the target fields of each object; assign values to the target fields of each object based on the feature field values corresponding to each object.
[0015] In one embodiment, it also includes:
[0016] When the match fails, the feature field that failed to match is used as the candidate field for update;
[0017] Add the update candidate field to the field template.
[0018] In one embodiment, before determining the feature field and feature field value corresponding to each object according to the feature information corresponding to each object, the method further includes:
[0019] The feature information corresponding to each object is input into a pre-trained deep learning neural network, and the feature fields and feature field values corresponding to each object are output.
[0020] In one embodiment, before inputting the feature information corresponding to each object into the pre-trained deep learning neural network, the method further includes:
[0021] Obtain object sample data; obtain feature information, fields, and field values of the sample object according to the object sample data to train the deep learning neural network.
[0022] In one embodiment, acquiring feature information, fields, and field values of sample objects according to object sample data to train a deep learning neural network includes:
[0023] The characteristic information of the object is obtained according to the object sample data, and the characteristic information of the object is input into the deep learning neural network for unsupervised training; the fields and field values corresponding to the characteristic information of the sample object are obtained from the object sample data, the characteristic information of the sample object obtained is used as the input data of the deep learning neural network, and the obtained fields and field values are used as the expected output of the deep learning neural network, and the deep learning neural network is supervised.
[0024] A test scenario simulation device, comprising:
[0025] An acquisition module is used to acquire feature information corresponding to each object in the test scene; acquire a field template, the field template includes multiple candidate fields;
[0026] A target field determination module, used to determine the target field of each object from the field template according to the feature information corresponding to each object, and assign a value to the target field of each object according to the feature information corresponding to each object;
[0027] A simulation model generation module is used to generate a target code corresponding to the target field of each object according to the assigned target field of each object, and generate a simulation model corresponding to each object according to the target code corresponding to each object;
[0028] The simulation scene establishment module is used to establish a simulation scene corresponding to the test scene according to the simulation models corresponding to each object.
[0029] In one aspect, a computer device is provided, the computer device comprising a processor and a memory, the memory storing computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor performs the following steps:
[0030] Obtain feature information corresponding to each object in the test scene;
[0031] Get a field template, which includes multiple candidate fields;
[0032] Determine the target field of each object from the field template according to the feature information corresponding to each object, and assign a value to the target field of each object according to the feature information corresponding to each object;
[0033] Generate a target code corresponding to the target field of each object according to the assigned target field of each object, and generate a simulation model corresponding to each object according to the target code corresponding to each object;
[0034] A simulation scene corresponding to the test scene is established according to the simulation model corresponding to each object.
[0035] In one aspect, one or more non-volatile storage media storing computer-readable instructions are provided, wherein when the computer-readable instructions are executed by one or more processors, the one or more processors perform the following steps:
[0036] Obtain feature information corresponding to each object in the test scene;
[0037] Get a field template, which includes multiple candidate fields;
[0038] Determine the target field of each object from the field template according to the feature information corresponding to each object, and assign a value to the target field of each object according to the feature information corresponding to each object;
[0039] Generate a target code corresponding to the target field of each object according to the assigned target field of each object, and generate a simulation model corresponding to each object according to the target code corresponding to each object;
[0040] A simulation scene corresponding to the test scene is established according to the simulation model corresponding to each object.
[0041] The test scenario simulation method, device, computer equipment and storage medium described above obtain the feature information corresponding to each object in the test scenario; obtain a field template, the field template includes multiple candidate fields; determine the target field of each object from the field template according to the feature information corresponding to each object, and assign values to the target fields of each object according to the feature information corresponding to each object; generate target codes corresponding to the target fields of each object according to the assigned target fields of each object, and generate simulation models corresponding to each object according to the target codes corresponding to each object; and establish a simulation scenario corresponding to the test scenario according to the simulation model corresponding to each object. In this way, the field template includes multiple candidate fields, and each candidate field has a corresponding code. Since the feature information corresponding to the object can represent the function corresponding to the object, the function corresponding to the object can be realized by assigning values to the target field, and the target code is automatically generated according to the target field, thereby obtaining the simulation model corresponding to the object, without changing the code, reducing redundant code, reducing code maintenance, and improving code generation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to better describe and illustrate the embodiments and / or examples of those applications disclosed herein, reference may be made to one or more drawings. The additional details or examples used to describe the drawings should not be considered as limiting the scope of any of the disclosed inventions, the embodiments and / or examples currently described, and the best mode currently understood for these applications.
[0043] Figure 1 A schematic diagram of an application environment for a test scenario simulation method in an embodiment.
[0044] Figure 2 The figure is a flowchart of a test scenario simulation method in one embodiment.
[0045] Figure 3 It is a flowchart of the steps of determining the target field of each object from the field template according to the characteristic information corresponding to each object, and assigning a value to the target field of each object according to the characteristic information corresponding to each object in an embodiment.
[0046] Figure 4 It is a flowchart of a test scenario simulation method in another embodiment.
[0047] Figure 5 A structural block diagram of a test scene simulation device in an embodiment
[0048] Figure 6 FIG. 1 is a schematic diagram of the internal structure of a server in an embodiment. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution 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 used to limit the present application.
[0050] It is understood that the terms "first", "second", etc. used in the embodiments of the present application can be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of the present application, a first control can be called a second control, and both the first control and the second control are controls, but they are not the same control.
[0051] Figure 1 FIG. 1 is an application environment diagram of a test scenario simulation method in an embodiment. Figure 1 As shown, the application environment includes a terminal 102 and a server 104, wherein the terminal 102 may be a desktop terminal or a mobile terminal, and the mobile terminal may be at least one of a mobile phone, a tablet computer, a laptop computer, etc. The server 104 may be a single server or a server cluster, and the terminal 102 and the server 104 communicate through a network.
[0052] Specifically, the server 104 obtains the feature information corresponding to each object in the test scene from the terminal 102. The server 104 obtains a field template, which includes multiple candidate fields, determines the target field of each object from the field template according to the feature information corresponding to each object, and assigns a value to the target field of each object according to the feature information corresponding to each object. The server 104 generates a target code corresponding to the target field of each object according to the assigned target field of each object, generates a simulation model corresponding to each object according to the target code corresponding to each object, and establishes a simulation scene corresponding to the test scene according to the simulation model corresponding to each object.
[0053] It can be understood that the above application scenario is only an example and does not constitute a limitation on the data processing method of the present application. For example, the data processing method provided by the present application can also be executed in a terminal.
[0054] Figure 2 FIG. 1 is a flow chart of a test scenario simulation method in one embodiment. Figure 2 As shown, a test scenario simulation method is applied to Figure 1 The following is an example of a server in the example.
[0055] S202, obtaining feature information corresponding to each object in the test scene.
[0056] Among them, the test scenario is a collection of surrounding objects and environmental states within a certain period of time during the operation of the autonomous driving car. The autonomous driving car can test the robustness of the autonomous driving algorithm by driving in different test scenarios. The test scenario can be a real scenario or a virtual extreme scenario. The test scenario includes but is not limited to school scenarios, pedestrian-dense scenarios, rural scenarios, tunnel scenarios, intersection scenarios (such as T-shaped intersection scenarios, cross intersection scenarios, and roundabout intersection scenarios), etc. Extreme scenarios can be extreme weather scenarios, extreme disaster scenarios, etc., or scenarios that include objects with abnormal behavior.
[0057] Objects are substances that exhibit corresponding characteristics or perform corresponding operations according to the course of time or the course of events. Objects include, but are not limited to, objects that can react to the surroundings according to the road conditions at a certain time and state, and objects that change or do not change regularly. Objects that react to the surroundings according to the road conditions at a certain time and state include, but are not limited to, pedestrians, bicycles, small motor vehicles, large motor vehicles, etc. Objects that change or do not change regularly include, but are not limited to, roadblocks, traffic lights, traffic signs, etc.
[0058] Feature information is information used to describe the features and properties of an object. Feature information includes, but is not limited to, descriptions of the behavior of an object, the location of an object, and the shape of an object. For example, the feature information of a pedestrian crossing signal light can be: coordinates (x1, y1, z1), height 2m, red light flashes at 1HZ for 15s before switching to green light, green light flashes at 1HZ for 15s before switching to red light. The feature information of a bicycle can be: coordinates (x2, y2, z2), body length 1.7m, width 0.7m, height 1.0m, speed 16km / h.
[0059] Specifically, the server can obtain the feature information of each object in the test scene from the terminal. For example, when the test scene is a real scene, the server can receive sensor data uploaded by the sensor of the autonomous driving car, and determine the feature information of each object in the real scene based on the sensor data. When the test scene is an extreme scene, the user can input the feature information of each object in the extreme scene in the terminal, and the terminal will then send the feature information of each object in the extreme scene to the server.
[0060] In one embodiment, the self-driving car carries various sensors, such as laser radar, millimeter wave radar, and camera. Sensor data may include pictures collected by the camera. After receiving the pictures, the server recognizes the pictures and can identify the shape and structure of the objects in the pictures. For example, surrounding vehicles, pedestrians, road markings, traffic sign text, traffic lights, etc. can be identified based on the pictures. Sensor data may also include data collected by laser radar. The data collected by laser radar can assist the pictures collected by the camera, thereby obtaining the distance of each object from the laser radar and the movement speed of each object. The feature information of each object in the real scene can be determined by combining high-precision maps and data collected by various sensors.
[0061] S204, obtaining a field template, where the field template includes multiple candidate fields.
[0062] Among them, a field template is a template composed of multiple candidate fields. The field value corresponding to each candidate field is empty by default. Candidate fields are keywords used to determine a function of an object and the expression of the function, such as ID (Identity Document), Size, Velocity, etc. Depending on the description dimension and method required for the specific function, the content that needs to be filled in the candidate field is also different. According to the candidate field with the corresponding field value filled in, the corresponding function can be realized to simulate the object with the corresponding function.
[0063] Specifically, the server stores a field template, which includes a plurality of preset candidate fields, each of which provides a blank default value. Each candidate field is an optional field, so the field template is highly extensible.
[0064] In one embodiment, the candidate fields in the field template can be set according to the drive test data. The self-driving car carries various sensors, such as laser radar, millimeter wave radar, and camera. Therefore, when the self-driving car is on the road test, various sensor data can be obtained through the sensors to form the drive test data. According to the drive test data, multiple fields can be determined, and the multiple fields are used as candidate fields to form the field template.
[0065] In one embodiment, the candidate fields in the field template can be set according to the historical simulation data. The historical simulation data includes a plurality of historical simulation models. The field set corresponding to each historical simulation model can be determined according to each historical simulation model. The fields included in each field set can be used as candidate fields to form a field template, thereby improving the applicability and comprehensiveness of the field template. The repetition rate of the fields in all field sets can also be counted, and all fields can be sorted from large to small according to the repetition rate. The fields with the lower repetition rate are filtered out, that is, the fields with low usage rate are filtered out, and the fields with the higher repetition rate are used as candidate fields to form a field template, thereby saving server resources.
[0066] In one embodiment, a corresponding field template can be set according to the scene type, thereby improving the specificity of the field template. Since the similarity of the characteristic attributes of objects in multiple scenes of the same type is relatively large, and the similarity of the characteristic attributes of objects in different types of scenes is relatively small, the corresponding field template can be set according to the scene type. For example, a school-type scene corresponds to a field template, and the field template can be labeled with a school. When the test scene is a scene of primary school A after school, a field template with a school as a label can be obtained to simulate the test scene.
[0067] S206, determining the target field of each object from the field template according to the feature information corresponding to each object, and assigning a value to the target field of each object according to the feature information corresponding to each object.
[0068] Specifically, the server can determine the characteristic fields and characteristic field values corresponding to each object according to the characteristic information corresponding to each object. Furthermore, the server can search for the candidate fields that are the same as the characteristic fields in the field template according to the characteristic fields, use the found candidate fields as the target fields of the objects corresponding to the characteristic fields, and assign values to the target fields according to the characteristic field values corresponding to the characteristic fields. For example, when the characteristic information of the pedestrian crossing signal light is the coordinates (x1, y1, z1), the red light flashes at 1HZ for 15s and then switches to the green light, and the green light flashes at 1HZ for 15s and then switches to the red light, the characteristic fields of the pedestrian crossing signal light can be determined to be the coordinates, color, and switching frequency according to the characteristic information. There are coordinates, color, and switching frequency fields in the field template. Therefore, the target fields of the pedestrian crossing signal light are: coordinates, color, and switching frequency, where the field values corresponding to the coordinates are (x1, y1, z1), the field values corresponding to the colors are red and green, and the field value corresponding to the switching frequency is 1.
[0069] In one embodiment, when no candidate field matching the characteristic field is found in the field template, the characteristic field may be added to the field template as a new candidate field.
[0070] In one embodiment, the feature field and feature field value corresponding to the feature information of the object can be determined according to a pre-trained deep learning neural network. The feature information of the object is input into the pre-trained deep learning neural network, and the pre-trained deep learning neural network outputs the feature field and feature field value corresponding to the feature information.
[0071] In one embodiment, when the test scene is a real scene, the feature field and the feature field value corresponding to the object can be determined through the drive test data.
[0072] S208, generating a target code corresponding to the target field of each object according to the assigned target field of each object, and generating a simulation model corresponding to each object according to the target code corresponding to each object.
[0073] Specifically, the target field is defined in accordance with the format specification. After assigning a value to the target field corresponding to the object according to the characteristic information of the object, a corresponding target code can be generated according to the format specification of the target field, and the simulation model of the object can be generated by running the target code.
[0074] In one embodiment, since the simulation models corresponding to each object are based on the same field template, the simulation models can be managed conveniently and efficiently. Since the underlying implementations of each simulation model are exactly the same based on the same field template, a completely unified data structure can be used for reading, calling, assigning and saving. The server can read each target field corresponding to the object in turn, remove all fields with only blank default values, and automatically generate codes for the assigned target fields according to the format specifications corresponding to the target fields, thereby obtaining different simulation models.
[0075] In one embodiment, the code can be automatically generated according to the format specification by a code generation tool, that is, the corresponding target code is automatically generated according to the target field. The code generation tool has the characteristics of cross-platform, cross-language, and portability, and does not require user writing, which effectively improves the efficiency of code generation.
[0076] In one embodiment, the target field corresponding to each object may include a name field. The name field may be used to identify the object corresponding to each simulation model so as to distinguish the simulation models corresponding to different objects.
[0077] S210, establishing a simulation scene corresponding to the test scene according to the simulation models corresponding to the various objects.
[0078] Among them, the simulation scene is a multi-dimensional virtual world created by simulation to reflect the changes and interactions of objects in real time, which can be used to test and evaluate autonomous driving algorithms. Testing autonomous vehicles through simulation scenes can provide methods and theoretical guidance for field testing of autonomous vehicles, which can improve the safety of field testing.
[0079] Specifically, the server can establish a corresponding simulation scene based on the simulation model. For example, the simulation scene can include simulation models corresponding to static objects such as lane lines, traffic signs, and sidewalks, and simulation models corresponding to dynamic objects such as bicycles and pedestrians. Furthermore, the autonomous driving algorithm can plan a driving route for the autonomous driving car based on the simulation scene and control the autonomous driving car to drive in the simulation scene. The reliability of the autonomous driving algorithm can be evaluated based on the actual driving route of the autonomous driving car.
[0080] The test scenario simulation method is as follows: acquiring the feature information corresponding to each object in the test scenario; acquiring a field template, wherein the field template includes a plurality of candidate fields; determining the target field of each object from the field template according to the feature information corresponding to each object, and assigning a value to the target field of each object according to the feature information corresponding to each object; generating a target code corresponding to the target field of each object according to the assigned target field of each object, and generating a simulation model corresponding to each object according to the target code corresponding to each object; and establishing a simulation scenario corresponding to the test scenario according to the simulation model corresponding to each object. In this way, the field template includes a plurality of candidate fields, and each candidate field has a corresponding code. Since the feature information corresponding to the object can represent the function corresponding to the object, the function corresponding to the object can be realized by assigning a value to the target field, and the target code is automatically generated according to the target field, thereby obtaining the simulation model corresponding to the object, without changing the code, reducing redundant code, reducing code maintenance, and improving code generation efficiency.
[0081] In one embodiment, before S202, the test scenario simulation method also includes: obtaining historical simulation data, extracting fields of each historical simulation model from the historical simulation data, and obtaining a field set corresponding to each historical simulation model; respectively obtaining the fields in the field set corresponding to each historical simulation model; counting the repetition rate of each field; and forming a field template based on the fields whose repetition rate is greater than a preset threshold.
[0082] The repetition rate refers to the ratio of the number of repetitions of a field to the total number of field sets. The preset threshold is pre-set and can be set according to actual needs.
[0083] Specifically, the server can obtain historical simulation data from a database or from other servers. The historical simulation data includes multiple historical simulation scenarios, and each historical simulation scenario includes multiple historical simulation models. Since the historical simulation model is generated based on at least one field, the server can obtain a field set corresponding to the historical simulation model. The field set corresponding to each historical simulation model includes at least one field. Each historical simulation model may include the same fields or different fields. For example, the field set a corresponding to historical simulation model A includes field 1, field 2, field 3, and field 4. The field set b corresponding to historical simulation model B includes field 1, field 2, field 5, field 6, and field 7. The server can calculate the repetition rate of each field and compare the repetition rate of each field with the preset threshold. When the repetition rate of a field is greater than the preset threshold, the field is used as a candidate field for the field template. All fields with repetition rates greater than the preset threshold are used as candidate fields to form a field template. ,
[0084] In the above embodiment, by acquiring historical simulation data, extracting the fields of each historical simulation model from the historical simulation data, and obtaining the field set corresponding to each historical simulation model; respectively obtaining the fields in the field set corresponding to each historical simulation model; counting the repetition rate of each field; and forming a field template according to the fields whose repetition rate is greater than a preset threshold. The repetition rate of a field reflects the importance of the field, and forming a field template with fields of higher importance improves the centralization of the field template. In addition, filtering out fields of lower importance can also save the storage resources of the server.
[0085] like Figure 3 As shown, in one embodiment, S206 includes:
[0086] S302: Determine the feature field and feature field value corresponding to each object according to the feature information corresponding to each object.
[0087] S304: Match the candidate fields in the field template with the feature fields corresponding to each object.
[0088] S306, when the matching is successful, the candidate fields that successfully match the feature fields corresponding to the respective objects are used as the target fields of the respective objects.
[0089] S308, assigning a value to the target field of each object according to the characteristic field value corresponding to each object.
[0090] Specifically, the server can determine the characteristic fields and characteristic field values corresponding to each object based on the characteristic information of each object. After the characteristic field is obtained, the candidate field that is the same as the characteristic field can be searched in the field template. When the candidate field corresponding to the characteristic field is found, the characteristic field is matched successfully. The successfully matched candidate field is used as the target field corresponding to the characteristic field, that is, the candidate field is used as the target field corresponding to the object. An object corresponds to at least one characteristic field. When the characteristic fields corresponding to the object are all matched successfully, the target field corresponding to the at least one characteristic field can be determined from the field template. The target field corresponding to the characteristic field can be assigned a value based on the characteristic field value corresponding to the characteristic field.
[0091] In one embodiment, S206 further includes: when the matching fails, taking the feature field that fails to match as an update candidate field; and adding the update candidate field to the field template.
[0092] Specifically, when the field template cannot find a candidate field identical to the feature field, the feature field fails to match. The feature field that failed to match is added to the field template as a new candidate field to obtain an updated field template. Furthermore, the object including the feature field can determine the corresponding target field from the updated field template, and generate a corresponding simulation model based on the target field. In addition, the new candidate field will not affect the candidate field in the field template before the update, and the code corresponding to the new candidate field will not affect the code corresponding to the candidate field in the field template before the update.
[0093] In one embodiment, S302 includes: inputting feature information corresponding to each object into a pre-trained deep learning neural network, and outputting feature fields and feature field values corresponding to each object.
[0094] Specifically, the feature fields and feature field values corresponding to the feature information of the object can be determined according to the pre-trained deep learning neural network. For the pre-trained deep learning neural network, the feature information of the object has been set as the input variable of the deep learning neural network, and the feature fields and feature field values have been set as the output variables of the deep learning neural network. Therefore, when the acquired feature information of the object is input into the pre-trained deep learning neural network through the input device, the pre-trained deep learning neural network will calculate and output the feature fields and feature field values of the corresponding object.
[0095] In the above embodiment, by using a deep learning neural network, it is possible to predict the characteristic fields and characteristic field values of the object when the characteristic information of the object is obtained, thereby providing data support for establishing a simulation model.
[0096] In one embodiment, the feature information corresponding to each object is input into a pre-trained deep learning neural network, and before the feature fields and feature field values corresponding to each object are output, it includes: obtaining object sample data; obtaining the feature information, fields and field values of the sample objects according to the object sample data to train the deep learning neural network.
[0097] Specifically, a plurality of object sample data are stored in the database, and the object sample data includes feature information, fields, and field values of a plurality of objects. In the deep learning neural network, the input variables and output variables of the deep learning neural network are set in advance, the feature information is set as the input variable of the deep learning neural network, and the fields and field values are set as the output variables of the deep learning neural network. Therefore, the feature information of the plurality of objects and the fields and field values are used as the input and expected output of the deep learning neural network respectively, and the deep learning neural network is trained according to the plurality of sets of data. The trained deep learning neural network can predict the output data according to the input data when it is used. Training the deep learning neural network can make the obtained prediction results more accurate.
[0098] In one embodiment, feature information, fields, and field values of sample objects are obtained based on object sample data to train a deep learning neural network, including: obtaining feature information of the object based on the object sample data, and inputting the feature information of the object into the deep learning neural network for unsupervised training; obtaining fields and field values corresponding to the feature information of the sample object from the object sample data, using the obtained feature information of the sample object as input data of the deep learning neural network, using the obtained fields and field values as expected outputs of the deep learning neural network, and performing supervised training on the deep learning neural network.
[0099] Specifically, the feature information value of the object is input into the input variable corresponding to the deep learning neural network for unsupervised training. After the unsupervised training, the deep learning neural network is then subjected to supervised training. When conducting supervised training, the input variables and expected outputs of the deep learning neural network are provided complete. For example, the feature information of the object is used as the input variable of the deep learning neural network, and the corresponding fields and field values are used as the expected output of the deep learning neural network, and the deep learning neural network is subjected to supervised training.
[0100] The object sample data stores the feature information of multiple objects and the corresponding fields and field values, that is, the object sample data stores multiple sets of object data, and the data types in each set of object data include the feature information, fields, and field values of each object. However, not every set of object data is complete, and there may be object data that lacks fields and field values. This part of the object data that lacks fields and field values can be used for unsupervised training of deep learning neural networks, avoiding data waste. Since unsupervised training first trains the feature extraction ability of deep learning neural networks, supervised training after unsupervised training can also improve the training effect of deep learning neural networks and improve the accuracy of output data predicted by trained deep learning neural networks.
[0101] In one embodiment, unsupervised training adopts a bottom-up training method. A single layer of neurons can be constructed layer by layer, specifically including an input layer, an output layer and multiple hidden layers. The input layer is at the bottom, and the input variables of the input layer are the feature information of the object. The output layer is at the top, and the output variables of the output layer are the feature fields and feature field values of the object. The hidden layer is located between the input layer and the output layer, and the number of hidden layers can be set according to actual needs. Unsupervised training is to train the output layer layer by layer from the input layer. Each layer can use the wake-sleep algorithm for parameter tuning, and only one layer is adjusted at a time, layer by layer. During unsupervised training, there is no need for expected output. The purpose of unsupervised training is not to predict output, but to perceive input. After unsupervised training of the deep learning neural network, supervised training is performed. Supervised training adopts a top-down training method. On the basis of obtaining the parameters corresponding to each layer of neurons through unsupervised training, a classifier is added to the output layer, and then the parameters corresponding to each layer of neurons are fine-tuned using the gradient descent method through supervised learning of complete object data.
[0102] In a specific embodiment, Figure 4 As shown, a test scenario simulation method is provided, which specifically includes the following steps:
[0103] S402, acquiring historical simulation data, extracting fields of each historical simulation model from the historical simulation data, and obtaining a field set corresponding to each historical simulation model.
[0104] S404, respectively obtaining fields in a field set corresponding to each historical simulation model.
[0105] S406, counting the repetition rate of each field.
[0106] S408, forming a field template according to the fields whose repetition rate is greater than a preset threshold.
[0107] S410, obtaining object sample data.
[0108] S412, acquiring feature information of the object according to the object sample data, and inputting the feature information of the object into a deep learning neural network for unsupervised training.
[0109] S416, obtaining fields and field values corresponding to feature information of the sample object from the object sample data, using the obtained feature information of the sample object as input data of the deep learning neural network, using the obtained fields and field values as expected outputs of the deep learning neural network, and performing supervised training on the deep learning neural network.
[0110] S418, obtaining feature information corresponding to each object in the test scene.
[0111] S420, input the feature information corresponding to each object into a pre-trained deep learning neural network, and output the feature field and feature field value corresponding to each object.
[0112] S422, matching the candidate fields in the field template with the feature fields corresponding to each object.
[0113] S424, when the matching is successful, the candidate fields that successfully match the feature fields corresponding to the respective objects are used as the target fields of the respective objects.
[0114] S426, assigning values to the target fields of each object according to the characteristic field values corresponding to each object.
[0115] S428, generating a target code corresponding to the target field of each object according to the assigned target field of each object, and generating a simulation model corresponding to each object according to the target code corresponding to each object.
[0116] S430, establishing a simulation scene corresponding to the test scene according to the simulation models corresponding to the various objects.
[0117] At present, multiple objects in the simulation test scene are managed using multiple containers, each container stores a certain type of specific objects, which increases the predefined memory usage, increases the number of processing cycles and the difficulty of maintenance. Every time a new object is added, the code for storing the data after loading needs to be modified. Alternatively, a container for storing base class pointers is used for management, each of which points to an inherited class. When simulating objects in the test scene, it is necessary to frequently perform type conversions from base class to inherited class, which will face problems such as pointer out of bounds, memory leaks, and incorrect type conversions at runtime that lead to system crashes.
[0118] The test scenario simulation method of the present application uses a unified container for storing field templates for management. Each object to be simulated is an instance that conforms to the field template, and different functions are implemented by assigning values to different fields. Unused fields will be left blank by default. In this way, even if new fields are added to the field template, there is no need to change the data storage code, and it will not affect the correctness of the previous code. At the same time, the fields are stored in the form of variables rather than pointers, which effectively reduces the probability of system errors.
[0119] It should be understood that, although the various steps in the above-mentioned flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flow chart may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0120] Figure 5 FIG. 1 is a structural block diagram of a test scene simulation device in an embodiment. Figure 5 As shown, a test scenario simulation device includes an acquisition module 502, a target field determination module 504, a simulation model generation module 506 and a simulation scenario establishment module 508. Among them:
[0121] The acquisition module 502 is used to acquire feature information corresponding to each object in the test scene; and acquire a field template, where the field template includes multiple candidate fields.
[0122] The target field determination module 504 is used to determine the target field of each object from the field template according to the feature information corresponding to each object, and assign a value to the target field of each object according to the feature information corresponding to each object.
[0123] The simulation model generation module 506 is used to generate a target code corresponding to the target field of each object according to the assigned target field of each object, and to generate a simulation model corresponding to each object according to the target code corresponding to each object.
[0124] The simulation scene establishment module 508 is used to establish a simulation scene corresponding to the test scene according to the simulation models corresponding to each object.
[0125] In one embodiment, the acquisition module 502 is also used to acquire historical simulation data, extract the fields of each historical simulation model from the historical simulation data, and obtain a field set corresponding to each historical simulation model; respectively acquire the fields in the field set corresponding to each historical simulation model; count the repetition rate of each field; and form a field template based on the fields whose repetition rate is greater than a preset threshold.
[0126] In one embodiment, the target field determination module 504 is also used to determine the feature fields and feature field values corresponding to each object based on the feature information corresponding to each object; match the candidate fields in the field template with the feature fields corresponding to each object; when the match is successful, use the candidate fields that successfully match the feature fields corresponding to each object as the target fields of each object; and assign values to the target fields of each object based on the feature field values corresponding to each object.
[0127] In one embodiment, the target field determination module 504 is further configured to, when matching fails, use the feature field that failed to match as an update candidate field; and add the update candidate field to the field template.
[0128] In one embodiment, the target field determination module 504 is also used to input feature information corresponding to each object into a pre-trained deep learning neural network, and output feature fields and feature field values corresponding to each object.
[0129] In one embodiment, the target field determination module 504 is also used to obtain object sample data; obtain feature information, fields and field values of the sample object according to the object sample data to train the deep learning neural network.
[0130] In one embodiment, the target field determination module 504 is also used to obtain feature information of the object based on the object sample data, and input the feature information of the object into the deep learning neural network for unsupervised training; obtain fields and field values corresponding to the feature information of the sample object from the object sample data, use the obtained feature information of the sample object as input data of the deep learning neural network, use the obtained fields and field values as expected outputs of the deep learning neural network, and perform supervised training on the deep learning neural network.
[0131] The test scene simulation device described above obtains the feature information corresponding to each object in the test scene; obtains a field template, which includes multiple candidate fields; determines the target field of each object from the field template according to the feature information corresponding to each object, and assigns a value to the target field of each object according to the feature information corresponding to each object; generates a target code corresponding to the target field of each object according to the assigned target field of each object, and generates a simulation model corresponding to each object according to the target code corresponding to each object; and establishes a simulation scene corresponding to the test scene according to the simulation model corresponding to each object. In this way, the field template includes multiple candidate fields, and each candidate field has a corresponding code. Since the feature information corresponding to the object can represent the function corresponding to the object, the function corresponding to the object can be realized by assigning a value to the target field, and the target code is automatically generated according to the target field, thereby obtaining the simulation model corresponding to the object, without changing the code, reducing redundant code, reducing code maintenance, and improving code generation efficiency.
[0132] The specific definition of the test scenario simulation device can be found in the above definition of the test scenario simulation method, which will not be repeated here. Each module in the above test scenario simulation device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0133] In some embodiments, a computer device is provided, which may be Figure 1 The internal structure diagram of the server 104 in FIG. 1 may be as follows: Figure 6 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a test scenario simulation method is implemented.
[0134] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0135] In one embodiment, the test scenario simulation device provided by the present application can be implemented in the form of a computer program. Figure 6 The computer device shown in the figure is run. The memory of the computer device can store various program modules constituting the test scenario simulation device, such as: Figure 5 The acquisition module, target field determination module, simulation model generation module and simulation scenario establishment module shown in the figure. The computer program composed of each program module enables the processor to execute the steps in the test scenario simulation method of each embodiment of the present application described in this specification.
[0136] For example, Figure 6 The computer device shown can be Figure 5 The acquisition module in the test scenario simulation device shown executes step S202. The computer device can execute step S206 through the target field determination module. The computer device can execute step S208 through the simulation model generation module. The computer device can execute step S210 through the simulation scenario establishment.
[0137] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the test scenario simulation method described above. The steps of the test scenario simulation method here may be the steps of the test scenario simulation method described in the above embodiments.
[0138] In one embodiment, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the processor executes the steps of the test scenario simulation method described above. The steps of the test scenario simulation method here may be the steps of the test scenario simulation method described in the above embodiments.
[0139] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0140] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0141] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A test scenario simulation method, characterized in that: include: Obtain feature information corresponding to each object in the test scene; The test scenario is a collection of surrounding objects and environmental conditions during a certain period of time during the operation of the autonomous vehicle; Acquire a field template corresponding to the scenario type of the test scenario, wherein the field template includes a plurality of preset candidate fields; Input the feature information corresponding to each object into a pre-trained deep learning neural network, and output the feature fields and feature field values corresponding to each object; Matching the candidate fields in the field template with the feature fields corresponding to the respective objects; When the match is successful, the candidate field that successfully matches the feature field corresponding to each object is used as the target field of each object; Assigning a value to the target field of each object according to the characteristic field value corresponding to each object; Generate a target code corresponding to the target field of each object according to the assigned target field of each object, and generate a simulation model corresponding to each object according to the target code corresponding to each object; A simulation scene corresponding to the test scene is established according to the simulation models corresponding to the various objects.
2. The method according to claim 1, characterized in that Before obtaining the field template corresponding to the scenario type of the test scenario, the method further includes: Acquire historical simulation data, extract fields of each historical simulation model from the historical simulation data, and obtain a field set corresponding to each historical simulation model; Respectively obtain the fields in the field set corresponding to each historical simulation model; Count the repetition rate of each field; The field template is composed according to the fields whose repetition rate is greater than a preset threshold.
3. The method according to claim 1, characterized in that The test scenario includes a real scenario; the method further includes: The characteristic fields and characteristic field values corresponding to the various objects are determined through the road test data; the road test data includes various sensor data carried by the autonomous driving vehicle.
4. The method according to claim 1, characterized in that: The method further comprises: When the match fails, the feature field that failed to match is used as the candidate field for update; The update candidate field is added to the field template.
5. The method according to claim 1, characterized in that The simulation scenario is used to test and evaluate the reliability of the autonomous driving algorithm.
6. The method according to claim 1, characterized in that Before inputting the feature information corresponding to each object into the pre-trained deep learning neural network, the method further includes: Get object sample data; The feature information, fields and field values of the sample objects are obtained according to the object sample data to train the deep learning neural network.
7. The method according to claim 6, characterized in that The step of acquiring feature information, fields and field values of sample objects according to the object sample data to train the deep learning neural network includes: Acquire feature information of the object according to the object sample data, and input the feature information of the object into the deep learning neural network for unsupervised training; The fields and field values corresponding to the feature information of the sample object are obtained from the object sample data, the feature information of the sample object obtained is used as input data of a deep learning neural network, the fields and field values obtained are used as expected outputs of the deep learning neural network, and supervised training is performed on the deep learning neural network.
8. A test scenario simulation device, characterized in that: include: An acquisition module is used to obtain feature information corresponding to each object in the test scene; The test scenario is a collection of surrounding objects and environmental states within a certain period of time during the operation of the autonomous driving vehicle; obtaining a field template corresponding to the scenario type of the test scenario, wherein the field template includes a plurality of preset candidate fields; The target field determination module is used to input the feature information corresponding to each object into a pre-trained deep learning neural network, output the feature field and feature field value corresponding to each object; match the candidate field in the field template with the feature field corresponding to each object; when the match is successful, the candidate field that successfully matches the feature field corresponding to each object is used as the target field of each object; and assign a value to the target field of each object according to the feature field value corresponding to each object; A simulation model generation module, used to generate a target code corresponding to the target field of each object according to the assigned target field of each object, and generate a simulation model corresponding to each object according to the target code corresponding to each object; The simulation scene establishment module is used to establish a simulation scene corresponding to the test scene according to the simulation models corresponding to the various objects.
9. The device according to claim 8, characterized in that The acquisition module is also used to acquire historical simulation data, extract the fields of each historical simulation model from the historical simulation data, and obtain a field set corresponding to each historical simulation model; respectively acquire the fields in the field set corresponding to each historical simulation model; count the repetition rate of each field; and form the field template according to the fields whose repetition rate is greater than a preset threshold.
10. The device according to claim 8, characterized in that The test scenario includes a real scenario; the target field determination module is also used to determine the feature fields and feature field values corresponding to each object through road test data; the road test data includes various sensor data carried by the autonomous driving vehicle.
11. The device according to claim 8, characterized in that The target field determination module is also used to, when the matching fails, use the feature field that failed to match as an update candidate field; and add the update candidate field to the field template.
12. The device according to claim 8, characterized in that The target field determination module is also used to obtain object sample data; obtain feature information, fields and field values of the sample object according to the object sample data to train the deep learning neural network.
13. The device according to claim 12, characterized in that The target field determination module is also used to obtain feature information of the object according to the object sample data, and input the feature information of the object into the deep learning neural network for unsupervised training; The fields and field values corresponding to the feature information of the sample object are obtained from the object sample data, the feature information of the sample object obtained is used as input data of a deep learning neural network, the fields and field values obtained are used as expected outputs of the deep learning neural network, and supervised training is performed on the deep learning neural network.
14. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
An intelligent automobile simulation test scene library generation method, a test system and a test method
CN109446371A