WO2021146906A1 - Test scenario simulation method and apparatus, computer device, and storage medium - Google Patents

Test scenario simulation method and apparatus, computer device, and storage medium Download PDF

Info

Publication number
WO2021146906A1
WO2021146906A1 PCT/CN2020/073476 CN2020073476W WO2021146906A1 WO 2021146906 A1 WO2021146906 A1 WO 2021146906A1 CN 2020073476 W CN2020073476 W CN 2020073476W WO 2021146906 A1 WO2021146906 A1 WO 2021146906A1
Authority
WO
WIPO (PCT)
Prior art keywords
field
target
feature
fields
feature information
Prior art date
Application number
PCT/CN2020/073476
Other languages
French (fr)
Chinese (zh)
Inventor
刘宇辰
Original Assignee
深圳元戎启行科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳元戎启行科技有限公司 filed Critical 深圳元戎启行科技有限公司
Priority to CN202080003153.5A priority Critical patent/CN113498511A/en
Priority to PCT/CN2020/073476 priority patent/WO2021146906A1/en
Publication of WO2021146906A1 publication Critical patent/WO2021146906A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B17/00Systems involving the use of models or simulators of said systems
    • G05B17/02Systems involving the use of models or simulators of said systems electric
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content

Definitions

  • the target field of each object is determined from the field template according to the characteristic information corresponding to each object, and the target field of each object is assigned according to the characteristic information corresponding to each object, including:
  • the feature field that fails to match is used as the update candidate field
  • 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 at a certain moment and state, and objects that change or do not change regularly.
  • Objects that react to the surroundings according to the road at a certain moment and state include but are not limited to pedestrians, bicycles, small vehicles, large vehicles, etc.
  • Objects that change or do not change regularly include, but are not limited to, roadblocks, traffic lights, traffic signs, etc.
  • the corresponding field template can be set according to the scene type, thereby improving the specificity of the field template. Since the feature attributes of objects in multiple scenes of the same type are more similar, and the feature attributes of objects in different types of scenes are less similar, 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 have a school as a label. When the test scene is the school end scene of elementary school A, a field template labeled with the school can be obtained to simulate the test scene.
  • the above test scenario simulation method is to obtain the feature information corresponding to each object in the test scenario; obtain the field template, which 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 determine the target field of each object from the field template according to the The feature information corresponding to the object is assigned to the target field of each object; the target code corresponding to the target field of each object is generated according to the target field of each object after the assignment, and the simulation model corresponding to each object is generated according to the target code corresponding to each object; The simulation model corresponding to each object establishes the simulation scene corresponding to the test scene.
  • the field template includes multiple candidate fields, and each candidate field has a corresponding code.
  • the unsupervised training adopts a bottom-up training method.
  • a single layer of neurons can be constructed layer by layer, including an input layer, an output layer, and multiple hidden layers.
  • the input layer is at the bottom, and the input variable of the input layer is the feature information of the object.
  • the output layer is at the top, and the output variables of the output layer are the feature field and feature field value 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 wake-sleep algorithm for parameter tuning, and only adjust one layer at a time, adjusting layer by layer. In unsupervised training, no expected output is needed.
  • the simulation scene establishing module 508 is used to establish a simulation scene corresponding to the test scene according to the simulation model corresponding to each object.
  • the function corresponding to the object can be realized by assigning the value of the target field, and the target code is automatically generated according to the target field, and then the simulation model corresponding to the object is obtained without changing the code, and Redundant codes are reduced, code maintenance is reduced, and code generation efficiency is improved.

Abstract

A test scenario simulation method, comprising: acquiring feature information corresponding to each object in a test scenario; acquiring a field template, the field template comprising a plurality of candidate fields; on the basis of the feature information corresponding to each object, determining a target field of each object from the field template and, on the basis of the feature information corresponding to each object, assigning a value to the target field of each object; on the basis of the target field of each object after value assignment, generating target code corresponding to the target field of each object and, on the basis of the target code corresponding to each object, generating a simulation model corresponding to each object; and, on the basis of the simulation model corresponding to each object, establishing a simulation scenario corresponding to the test scenario.

Description

测试场景仿真方法、装置、计算机设备和存储介质Test scene simulation method, device, computer equipment and storage medium 技术领域Technical field
本申请涉及自动驾驶技术领域,特别是涉及一种测试场景仿真方法、装置、计算机设备和存储介质。This application relates to the field of automatic driving technology, and in particular to a test scenario simulation method, device, computer equipment, and storage medium.
背景技术Background technique
随着车辆控制技术的发展,出现了无人驾驶技术。无人驾驶技术是基于无人驾驶算法自动规划无人车的行车路线,并基于行车路线对无人车进行控制,使得无人车能够达到预定目标地点。而无人驾驶算法的测试评估主要是基于对真实测试场景的模拟。With the development of vehicle control technology, unmanned driving technology has emerged. Unmanned driving technology is to automatically plan the driving route of the unmanned vehicle based on the unmanned driving algorithm, and control the unmanned vehicle based on the driving route, so that the unmanned vehicle can reach the predetermined target location. The test and evaluation of unmanned driving algorithms is mainly based on the simulation of real test scenarios.
现有的真实测试场景仿真方法往往是将现实生活中会在道路上出现的物体分类,如:轿车,卡车,自行车,行人等,根据各个类别物体的功能编写相应的代码来模拟仿真各个物体。然而,不同类别物体会存在相同的功能,因此不同类别物体之间存在大量的重复代码,导致生成代码效率低。The existing simulation methods of real test scenes often classify objects that appear on the road in real life, such as cars, trucks, bicycles, pedestrians, etc., and write corresponding codes to simulate and simulate each object according to the function of each type of object. However, different types of objects have the same function, so there are a lot of repeated codes between different types of objects, resulting in low code generation efficiency.
发明内容Summary of the invention
本申请提供的各种实施例,提供一种测试场景仿真方法、装置、计算机设备和存储介质。所述技术方案如下:The various embodiments provided in this application provide a test scenario simulation method, device, computer equipment, and storage medium. The technical solution is as follows:
一种测试场景仿真方法,包括:A simulation method for test scenarios, including:
获取测试场景中各个物体对应的特征信息;Obtain feature information corresponding to each object in the test scene;
获取字段模板,字段模板包括多个候选字段;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 a value to the target field of each object according to the feature information corresponding to each object;
根据赋值后的各个物体的目标字段生成各个物体的目标字段对应的目标代码,根据各个物体对应的目标代码生成各个物体对应的仿真模型;Generate the target code corresponding to the target field of each object according to the target field of each object after assignment, and generate the simulation model corresponding to each object according to the target code corresponding to each object;
根据各个物体对应的仿真模型建立测试场景对应的仿真场景。The simulation scene corresponding to the test scene is established according to the simulation model corresponding to each object.
在其中一个实施例中,获取字段模板之前,还包括:In one of the embodiments, before obtaining the field template, the method further includes:
获取历史仿真数据,从历史仿真数据中提取各个历史仿真模型的字段,得到各个历史 仿真模型对应的字段集合;分别获取各个历史仿真模型对应的字段集合中的字段;统计各个字段的重复率;根据重复率大于预设阈值的字段组成字段模板。Obtain historical simulation data, extract the fields of each historical simulation model from the historical simulation data, and obtain the field set corresponding to each historical simulation model; obtain the fields in the field set corresponding to each historical simulation model; calculate the repetition rate of each field; The fields whose repetition rate is greater than the preset threshold constitute a field template.
在其中一个实施例中,根据各个物体对应的特征信息从字段模板中确定各个物体的目标字段,根据各个物体对应的特征信息对各个物体的目标字段进行赋值,包括:In one of the embodiments, the target field of each object is determined from the field template according to the characteristic information corresponding to each object, and the target field of each object is assigned according to the characteristic information corresponding to each object, including:
根据各个物体对应的特征信息确定各个物体对应的特征字段和特征字段值;将字段模板中的候选字段与各个物体对应的特征字段进行匹配;当匹配成功时,将与各个物体对应的特征字段匹配成功的候选字段作为各个物体的目标字段;根据各个物体对应的特征字段值对各个物体的目标字段进行赋值。Determine the feature field and feature field value corresponding to each object according to the feature information corresponding to each object; match the candidate field in the field template with the feature field corresponding to each object; when the matching is successful, match the feature field corresponding to each object The successful candidate field is used as the target field of each object; the target field of each object is assigned according to the characteristic field value corresponding to each object.
在其中一个实施例中,还包括:In one of the embodiments, it further includes:
当匹配失败时,将匹配失败的特征字段作为更新候选字段;When the matching fails, the feature field that fails to match is used as the update candidate field;
将更新候选字段添加至字段模板。Add the update candidate field to the field template.
在其中一个实施例中,根据各个物体对应的特征信息确定各个物体对应的特征字段和特征字段值之前,还包括:In one of the embodiments, 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:
将各个物体对应的特征信息输入预先训练好的深度学习神经网络,输出各个物体对应的特征字段和特征字段值。The feature information corresponding to each object is input into the pre-trained deep learning neural network, and the feature field and feature field value corresponding to each object are output.
在其中一个实施例中,将各个物体对应的特征信息输入预先训练好的深度学习神经网络之前,还包括:In one of the embodiments, before inputting the feature information corresponding to each object into the pre-trained deep learning neural network, the method further includes:
获取物体样本数据;根据物体样本数据获取样本物体的特征信息、字段和字段值对深度学习神经网络进行训练。Obtain object sample data; obtain the feature information, fields and field values of the sample objects according to the object sample data to train the deep learning neural network.
在其中一个实施例中,根据物体样本数据获取样本物体的特征信息、字段和字段值对深度学习神经网络进行训练,包括:In one of the embodiments, acquiring the feature information, fields, and field values of the sample objects according to the object sample data to train the deep learning neural network includes:
根据物体样本数据获取物体的特征信息,将物体的特征信息输入到深度学习神经网络中进行无监督训练;从物体样本数据中获取与样本物体的特征信息对应的字段和字段值,将获取的样本物体的特征信息作为深度学习神经网络的输入数据,将获取的字段和字段值作为深度学习神经网络的预期输出,对深度学习神经网络进行有监督训练。Obtain the 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; obtain the field and field value corresponding to the feature information of the sample object from the object sample data, and use the obtained sample The feature information of the object is used as the input data of the deep learning neural network, 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 training.
一种测试场景仿真装置,包括:A test scenario simulation device, including:
获取模块,用于获取测试场景中各个物体对应的特征信息;获取字段模板,字段模板包括多个候选字段;The obtaining module is used to obtain characteristic information corresponding to each object in the test scene; obtain a field template, which includes multiple candidate fields;
目标字段确定模块,用于根据各个物体对应的特征信息从字段模板中确定各个物体的 目标字段,根据各个物体对应的特征信息对所述各个物体的目标字段进行赋值;The target field determination module is configured 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;
仿真模型生成模块,用于根据赋值后的各个物体的目标字段生成各个物体的目标字段对应的目标代码,根据各个物体对应的目标代码生成各个物体对应的仿真模型;The simulation model generation module is used to generate the target code corresponding to the target field of each object according to the target field of each object after the assignment, and generate the 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 model corresponding to each object.
一方面,提供了一种计算机设备,所述计算机设备包括处理器和存储器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:In one aspect, a computer device is provided. The computer device includes a processor and a memory, and computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by the processor, the processor Perform the following steps:
获取测试场景中各个物体对应的特征信息;Obtain feature information corresponding to each object in the test scene;
获取字段模板,字段模板包括多个候选字段;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 a value to the target field of each object according to the feature information corresponding to each object;
根据赋值后的各个物体的目标字段生成各个物体的目标字段对应的目标代码,根据各个物体对应的目标代码生成各个物体对应的仿真模型;Generate the target code corresponding to the target field of each object according to the target field of each object after assignment, and generate the simulation model corresponding to each object according to the target code corresponding to each object;
根据各个物体对应的仿真模型建立测试场景对应的仿真场景。The simulation scene corresponding to the test scene is established according to the simulation model corresponding to each object.
一方面,提供了一个或多个存储有计算机可读指令的非易失性存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:In one aspect, one or more non-volatile storage media storing computer-readable instructions are provided. When the computer-readable instructions are executed by one or more processors, the one or more processors perform the following step:
获取测试场景中各个物体对应的特征信息;Obtain feature information corresponding to each object in the test scene;
获取字段模板,字段模板包括多个候选字段;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 a value to the target field of each object according to the feature information corresponding to each object;
根据赋值后的各个物体的目标字段生成各个物体的目标字段对应的目标代码,根据各个物体对应的目标代码生成各个物体对应的仿真模型;Generate the target code corresponding to the target field of each object according to the target field of each object after assignment, and generate the simulation model corresponding to each object according to the target code corresponding to each object;
根据各个物体对应的仿真模型建立测试场景对应的仿真场景。The simulation scene corresponding to the test scene is established according to the simulation model corresponding to each object.
上述测试场景仿真方法、装置、计算机设备和存储介质,通过获取测试场景中各个物体对应的特征信息;获取字段模板,字段模板包括多个候选字段;根据各个物体对应的特征信息从字段模板中确定各个物体的目标字段,根据各个物体对应的特征信息对各个物体的目标字段进行赋值;根据赋值后的各个物体的目标字段生成各个物体的目标字段对应的 目标代码,根据各个物体对应的目标代码生成各个物体对应的仿真模型;根据各个物体对应的仿真模型建立测试场景对应的仿真场景。这样,字段模板包括多个候选字段,每个候选字段存在对应的代码。由于物体对应的特征信息可以表示物体对应的功能,因此通过对目标字段的赋值可以实现物体对应的功能,根据目标字段自动生成目标代码,进而得到物体对应的仿真模型,无需对代码进行改动,且减少了冗余代码,减少了对代码的维护,提高了代码生成效率。The above-mentioned test scene simulation method, device, computer equipment and storage medium obtain the characteristic information corresponding to each object in the test scene; obtain a field template, which includes multiple candidate fields; determine from the field template according to the characteristic information corresponding to each object The target field of each object is assigned to the target field of each object according to the characteristic information corresponding to each object; the target code corresponding to the target field of each object is generated according to the target field of each object after the assignment, and the target code corresponding to each object is generated The simulation model corresponding to each object; the simulation scene corresponding to the test scene is established 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 indicate the function corresponding to the object, the function corresponding to the object can be realized by assigning the value of the target field, and the target code is automatically generated according to the target field, and then the simulation model corresponding to the object is obtained without changing the code, and Redundant codes are reduced, code maintenance is reduced, and code generation efficiency is improved.
附图说明Description of the drawings
为了更好地描述和说明这里公开的那些申请的实施例和/或示例,可以参考一幅或多幅附图。用于描述附图的附加细节或示例不应当被认为是对所公开的发明、目前描述的实施例和/或示例以及目前理解的这些申请的最佳模式中的任何一者的范围的限制。In order to better describe and illustrate the embodiments and/or examples of those applications disclosed herein, one or more drawings may be referred to. 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 currently described embodiments and/or examples, and the best mode of these applications currently understood.
图1为一个实施例中测试场景仿真方法的应用环境示意图。Fig. 1 is a schematic diagram of an application environment of a test scenario simulation method in an embodiment.
图2为一个实施例中测试场景仿真方法的流程示意图。Fig. 2 is a schematic flowchart of a test scenario simulation method in an embodiment.
图3为一个实施例中根据各个物体对应的特征信息从字段模板中确定各个物体的目标字段,根据各个物体对应的特征信息对所述各个物体的目标字段进行赋值的步骤的流程示意图。FIG. 3 is a flow diagram 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 the target field of each object according to the characteristic information corresponding to each object in an embodiment.
图4为另一个实施例中测试场景仿真方法的流程示意图。Fig. 4 is a schematic flowchart of a test scenario simulation method in another embodiment.
图5为一个实施例中测试场景仿真装置的结构框图Figure 5 is a structural block diagram of a test scenario simulation device in an embodiment
图6为一个实施例中服务器的内部结构示意图。Fig. 6 is a schematic diagram of the internal structure of the server in an embodiment.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions, and advantages of this application clearer and clearer, the following further describes the application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not used to limit the present application.
可以理解,本申请实施例中所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一控件称为第二控件,第一控件和第二控件两者都是控件,但其不是同一控件。It can be 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 the first element from another element. For example, without departing from the scope of the present application, the first control may be referred to as the second control, and both the first control and the second control are controls, but they are not the same control.
图1为一个实施例中测试场景仿真方法的应用环境图。如图1所示,该应用环境包括终端102和服务器104,其中终端102具体可以是台式终端或移动终端,移动终端具体可 以是手机、平板电脑、笔记本电脑等中的至少一种。服务器104可以是单个服务器也可以是服务器集群,终端102和服务器104通过网络进行通信。Fig. 1 is an application environment diagram of a test scenario simulation method in an embodiment. As shown in FIG. 1, the application environment includes a terminal 102 and a server 104. 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, and a notebook computer. The server 104 may be a single server or a server cluster, and the terminal 102 and the server 104 communicate through a network.
具体地,服务器104从终端102上获取测试场景中各个物体对应的特征信息。服务器104获取字段模板,字段模板包括多个候选字段,根据各个物体对应的特征信息从字段模板中确定各个物体的目标字段,根据各个物体对应的特征信息对各个物体的目标字段进行赋值。服务器104根据赋值后的各个物体的目标字段生成各个物体的目标字段对应的目标代码,根据各个物体对应的目标代码生成各个物体对应的仿真模型,根据各个物体对应的仿真模型建立测试场景对应的仿真场景。Specifically, the server 104 obtains the characteristic 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 the target field of each object according to the feature information corresponding to each object. The server 104 generates the target code corresponding to the target field of each object according to the assigned target field of each object, generates the simulation model corresponding to each object according to the target code corresponding to each object, and establishes the simulation corresponding to the test scene according to the simulation model corresponding to each object Scenes.
可以理解,上述应用场景仅是一种示例,并不构成对本申请数据处理方法的限制,例如,本申请提供的数据处理方法还可以是在终端中执行的。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 this application. For example, the data processing method provided by this application may also be executed in a terminal.
图2为一个实施例中测试场景仿真方法的流程图。如图2所示,一种测试场景仿真方法,以应用于图1中的服务器上为例进行说明,具体包括:Fig. 2 is a flowchart of a test scenario simulation method in an embodiment. As shown in Fig. 2, a test scenario simulation method, which is applied to the server in Fig. 1 as an example, is described, which specifically includes:
S202,获取测试场景中各个物体对应的特征信息。S202: Acquire feature information corresponding to each object in the test scene.
其中,测试场景是自动驾驶汽车运行过程中的某一段时间内周围物体、环境状态的集合。自动驾驶汽车在不同测试场景中行驶可以测试自动驾驶算法的稳健性。测试场景可以是真实场景,也可以是虚拟的极端场景。测试场景包括但不限于学校场景、行人密集场景、农村场景、隧道场景、交叉场景(如T形交叉场景、十字交叉场景和环形交叉场景)等。极端场景可以是极端天气场景、极端灾害场景等,也可以是包括行为异常的物体的场景。Among them, the test scenario is a collection of surrounding objects and environmental states during a certain period of time during the operation of the autonomous vehicle. Self-driving cars driving in different test scenarios can test the robustness of the self-driving algorithm. The test scene can be a real scene or a virtual extreme scene. Test scenes include, but are not limited to, school scenes, dense pedestrian scenes, rural scenes, tunnel scenes, cross scenes (such as T-shaped cross scenes, cross scenes, and roundabout scenes). The extreme scene may be an extreme weather scene, an extreme disaster scene, etc., or a scene including objects with abnormal behaviors.
物体是根据时间进程或事件进程表现出相应特性或执行相应操作的物质。物体包括但不限于可以根据道路在某一时刻与状态的情况对周围作出反应的物体和规律变化或不变化的物体等。根据道路在某一时刻与状态的情况对周围作出反应的物体包括但不限于行人、自行车、小型机动车、大型机动车等。规律变化或不变化的物体包括但不限于路障、红绿灯、交通指示牌等。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 at a certain moment and state, and objects that change or do not change regularly. Objects that react to the surroundings according to the road at a certain moment and state include but are not limited to pedestrians, bicycles, small vehicles, large vehicles, etc. Objects that change or do not change regularly include, but are not limited to, roadblocks, traffic lights, traffic signs, etc.
特征信息是用于描述物体特征和属性的信息。特征信息包括但不限于物体的行为描述、物体的位置描述、物体的形状描述等。例如,人行横道信号灯的特征信息可以为:坐标(x1,y1,z1),高2m,红灯以1HZ闪烁15s后切换为绿灯,绿灯以1HZ闪烁15s后切换为红灯。自行车的特征信息可以为:坐标(x2,y2,z2),车身长1.7m,宽0.7m,高1.0m,速度为16km/h。Feature information is information used to describe the features and attributes of an object. The feature information includes, but is not limited to, the description of the behavior of the object, the description of the position of the object, the description of the shape of the object, and so on. For example, the characteristic information of a pedestrian crossing signal light can be: coordinates (x1, y1, z1), height 2m, red light flashes at 1HZ for 15s and then switches to green light, and green light flashes at 1HZ for 15s and then switches to red light. The characteristic information of the bicycle may be: coordinates (x2, y2, z2), the body length is 1.7m, the width is 0.7m, the height is 1.0m, and the speed is 16km/h.
具体地,服务器可以从终端获取测试场景中各个物体的特征信息。例如,当测试场景为真实场景时,服务器可以接收自动驾驶汽车的传感器上传的传感器数据,根据传感器数 据确定真实场景中各个物体的特征信息。当测试场景为极端场景时,用户可以在终端输入极端场景中各个物体的特征信息,终端再将极端场景中各个物体的特征信息发送至服务器。Specifically, the server may obtain the characteristic 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 sensors of an autonomous vehicle, and determine the characteristic 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 characteristic information of each object in the extreme scene at the terminal, and the terminal sends the characteristic information of each object in the extreme scene to the server.
在一个实施例中,自动驾驶汽车携带各种传感器,例如激光雷达、毫米波雷达和摄像机等。传感器数据可以包括摄像头采集的图片,服务器接收到图片后,对图片进行识别,可以识别到图片中物体的形状和结构。例如,根据图片可以识别到周围的车辆、行人、道路标线、交通标志文字、交通信号灯等。传感器数据还可以包括激光雷达采集的数据。激光雷达采集的数据可以对摄像头采集的图片起辅助作用,从而得到各个物体距离激光雷达的距离和各个物体的运动速度。结合高精度地图和各种传感器采集的数据可以确定真实场景中各个物体的特征信息。In one embodiment, the self-driving car carries various sensors, such as lidar, millimeter wave radar, and cameras. The sensor data can include pictures collected by a camera. After receiving the pictures, the server recognizes the pictures, and the shape and structure of the objects in the pictures can be recognized. For example, the surrounding vehicles, pedestrians, road markings, traffic sign text, traffic lights, etc. can be identified based on the picture. Sensor data can also include data collected by lidar. The data collected by the lidar can assist the pictures collected by the camera, so as to obtain the distance of each object from the lidar and the movement speed of each object. Combining the high-precision map and the data collected by various sensors can determine the characteristic information of each object in the real scene.
S204,获取字段模板,字段模板包括多个候选字段。S204: Obtain a field template, where the field template includes multiple candidate fields.
其中,字段模板是一个由多个候选字段组成的模板。每个候选字段对应的字段值默认为空。候选字段是用来确定物体某一功能以及功能表达情况的关键字,如ID(Identity Document,身份标识号),Size(大小),Velocity(速度)等。根据具体功能所需要的描述维度、方式的不同,候选字段需要填写的内容也不同。根据填写相应字段值的候选字段可以实现相应的功能,仿真具有该相应功能的物体。Among them, the 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 certain function of an object and its expression, such as ID (Identity Document), Size, Velocity, etc. According to the different description dimensions and methods required by specific functions, the content that needs to be filled in the candidate fields is also different. The corresponding function can be realized according to the candidate field filled in the corresponding field value, and the object with the corresponding function can be simulated.
具体地,服务器存储有字段模板,字段模板包括多个预设的候选字段,每个候选字段均提供了一个空白默认值。每个候选字段均为可选填字段,因此该字段模板具有高度可拓展性。Specifically, the server stores a field template, the field template includes a plurality of preset candidate fields, and each candidate field provides a blank default value. Each candidate field is optional, so the field template is highly extensible.
在一个实施例中,可以根据路测数据设置字段模板中的候选字段。自动驾驶汽车携带各种传感器,例如激光雷达、毫米波雷达和摄像机等。因此,自动驾驶汽车在路测时,通过传感器可以得到各种传感器数据,组成路测数据。根据路测数据可以确定多个字段,将该多个字段作为候选字段,组成字段模板。In an embodiment, the candidate fields in the field template can be set according to the drive test data. Self-driving cars carry various sensors, such as lidar, millimeter-wave radar, and cameras. Therefore, during the road test of an autonomous vehicle, various sensor data can be obtained through sensors to form the road test data. According to the drive test data, multiple fields can be determined, and the multiple fields are used as candidate fields to form a field template.
在一个实施例中,可以根据历史仿真数据设置字段模板中的候选字段。历史仿真数据包括多个历史仿真模型。根据各个历史仿真模型可以确定各个历史仿真模型对应的字段集合。可以将各个字段集合中包括的字段作为候选字段,组成字段模板,提高字段模板的适用性和全面性。也可以统计所有字段集合中字段的重复率,根据重复率从大到小对所有字段进行排序。滤除重复率靠后的字段,也就是,滤除使用率不高的字段,将重复率靠前的字段作为候选字段,组成字段模板,从而可以节约服务器资源。In one embodiment, the candidate fields in the field template can be set according to historical simulation data. The historical simulation data includes multiple historical simulation models. According to each historical simulation model, the field set corresponding to each historical simulation model can be determined. The fields included in each field set can be used as candidate fields to form a field template, which improves the applicability and comprehensiveness of the field template. It is also possible to count the repetition rate of the fields in all the field sets, and sort all the fields according to the repetition rate from large to small. Filter out fields with lower repetition rate, that is, filter out fields with low usage rate, and use fields with higher repetition rate as candidate fields to form a field template, which can save server resources.
在一个实施例中,可以根据场景类型设置对应的字段模板,从而提高字段模板的专用性。由于同一类型的多个场景中物体的特征属性相似性较大,不同类型的场景中物体的特 征属性相似性较小,因此可以根据场景类型设置对应的字段模板。例如,学校类型的场景对应一个字段模板,该字段模板可以以学校作为标签。当测试场景为A小学放学场景时,可以获取以学校为标签的字段模板仿真该测试场景。In an embodiment, the corresponding field template can be set according to the scene type, thereby improving the specificity of the field template. Since the feature attributes of objects in multiple scenes of the same type are more similar, and the feature attributes of objects in different types of scenes are less similar, 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 have a school as a label. When the test scene is the school end scene of elementary school A, a field template labeled with the school can be obtained to simulate the test scene.
S206,根据各个物体对应的特征信息从字段模板中确定各个物体的目标字段,根据各个物体对应的特征信息对各个物体的目标字段进行赋值。S206: 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.
具体地,服务器可以根据各个物体对应的特征信息确定各个物体对应的特征字段和特征字段值。进而,服务器可以根据特征字段在字段模板中查找与特征字段相同的候选字段,将查找到的候选字段作为该特征字段对应的物体的目标字段,根据该特征字段对应的特征字段值为目标字段赋值。例如,当人行横道信号灯的特征信息为坐标(x1,y1,z1),红灯以1HZ闪烁15s后切换为绿灯,绿灯以1HZ闪烁15s后切换为红灯时,根据该特征信息可以确定人行横道信号灯的特征字段为坐标、颜色和切换频率。字段模板中存在坐标、颜色和切换频率字段。因此,该人行横道信号灯的目标字段为:坐标、颜色和切换频率,其中坐标对应的字段值为(x1,y1,z1),颜色对应的字段值为red、green,切换频率对应的字段值为1。Specifically, the server may determine the feature field and feature field value corresponding to each object according to the feature information corresponding to each object. Furthermore, the server can search for candidate fields that are the same as the feature field in the field template according to the feature field, use the found candidate field as the target field of the object corresponding to the feature field, and assign a value to the target field according to the feature field value corresponding to the feature field. . For example, when the characteristic information of the crosswalk signal light is the coordinates (x1, y1, z1), the red light flashes at 1HZ for 15s and then switches to green light, and the green light flashes at 1HZ for 15s and then switches to red. The characteristic fields are coordinates, color, and switching frequency. Coordinate, color, and switching frequency fields exist in the field template. Therefore, the target fields of the crosswalk 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, green, and the field value corresponding to the switching frequency is 1. .
在一个实施例中,当字段模板中查找不到与特征字段匹配的候选字段时,可以将该特征字段作为新的候选字段添加到字段模板中。In an embodiment, when a candidate field matching the characteristic field cannot be found in the field template, the characteristic field may be added to the field template as a new candidate field.
在一个实施例中,可以根据预先训练好的深度学习神经网络确定物体的特征信息对应的特征字段和特征字段值。将物体的特征信息输入预先训练好的深度学习神经网络,预先训练好的深度学习神经网络输出该特征信息对应的特征字段和特征字段值。In an 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.
在一个实施例中,当测试场景为真实场景时,可以通过路测数据确定物体对应的特征字段和特征字段值。In one embodiment, when the test scene is a real scene, the characteristic field and characteristic field value corresponding to the object can be determined through the drive test data.
S208,根据赋值后的各个物体的目标字段生成各个物体的目标字段对应的目标代码,根据各个物体对应的目标代码生成各个物体对应的仿真模型。S208: 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.
具体地,目标字段是遵循格式规范的定义。当根据物体的特征信息对物体对应的目标字段赋值后,可以根据目标字段的格式规范生成对应的目标代码,运行该目标代码即可生成该物体的仿真模型。Specifically, the target field follows the definition of the format specification. After assigning a value to the target field corresponding to the object according to the characteristic information of the object, the 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.
在一个实施例中,由于各个物体对应的仿真模型都是基于同一个字段模板,因此可以方便高效地管理仿真模型。由于基于同一个字段模板,各个仿真模型的底层实现完全相同,因此可以使用完全统一的数据结构进行读取、调用、赋值与保存。服务器可以对物体对应的每个目标字段进行依次读取,剔除所有只有空白默认值的字段,并将已经赋值的目标字 段根据目标字段对应的格式规范自动生成代码,进而得到不同的仿真模型。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. Because based on the same field template, the underlying implementation of each simulation model is exactly the same, so 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, eliminate all fields with blank default values, and automatically generate codes for the target fields that have been assigned according to the format specifications corresponding to the target fields, and then obtain different simulation models.
在一个实施例中,可以通过代码生成工具根据格式规范自动生成代码,即根据目标字段自动生成对应的目标代码。代码生成工具具备跨平台、跨语言、可移植的特点,无需用户编写,有效提高了代码生成效率。In one embodiment, the code generation tool can be used to automatically generate code according to the format specification, 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 users to write, which effectively improves the efficiency of code generation.
在一个实施例中,各个物体对应的目标字段可以包括名字字段。名字字段可以用于标识各个仿真模型对应的物体,以便区分不同物体对应的仿真模型。In an embodiment, the target field corresponding to each object may include a name field. The name field can be used to identify the object corresponding to each simulation model, so as to distinguish the simulation models corresponding to different objects.
S210,根据各个物体对应的仿真模型建立测试场景对应的仿真场景。S210: Establish a simulation scene corresponding to the test scene according to the simulation model corresponding to each object.
其中,仿真场景是以仿真的方式创造的一个实时反映物体变化与相互作用的多维虚拟世界,可以用于测试评估自动驾驶算法。通过仿真场景测试自动驾驶汽车,可以为自动驾驶汽车的现场测试提供方法和理论指导,可以提高现场测试的安全性。Among them, the simulation scene is a real-time multi-dimensional virtual world that reflects the changes and interactions of objects created by simulation, which can be used to test and evaluate automatic driving algorithms. Testing autonomous vehicles through simulation scenarios can provide methods and theoretical guidance for on-site testing of autonomous vehicles, and can improve the safety of on-site testing.
具体地,服务器根据仿真模型可以建立相应的仿真场景,例如仿真场景可以包括车道线、交通标识、人行道等静态物体对应的仿真模型,自行车、行人等动态物体对应的仿真模型。进一步地,自动驾驶算法可以根据仿真场景为自动驾驶汽车规划行驶路线,控制自动驾驶汽车在仿真场景中行驶。根据自动驾驶汽车实际行驶路线可以对自动驾驶算法进行可靠性评估。Specifically, the server may establish a corresponding simulation scene according to the simulation model. For example, the simulation scene may 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. Further, the autonomous driving algorithm can plan the driving route for the autonomous car according to the simulation scene, and control the autonomous driving car to drive in the simulation scene. According to the actual driving route of the autonomous vehicle, the reliability of the autonomous driving algorithm can be evaluated.
上述测试场景仿真方法,通过获取测试场景中各个物体对应的特征信息;获取字段模板,字段模板包括多个候选字段;根据各个物体对应的特征信息从字段模板中确定各个物体的目标字段,根据各个物体对应的特征信息对各个物体的目标字段进行赋值;根据赋值后的各个物体的目标字段生成各个物体的目标字段对应的目标代码,根据各个物体对应的目标代码生成各个物体对应的仿真模型;根据各个物体对应的仿真模型建立测试场景对应的仿真场景。这样,字段模板包括多个候选字段,每个候选字段存在对应的代码。由于物体对应的特征信息可以表示物体对应的功能,因此通过对目标字段的赋值可以实现物体对应的功能,根据目标字段自动生成目标代码,进而得到物体对应的仿真模型,无需对代码进行改动,且减少了冗余代码,减少了对代码的维护,提高了代码生成效率。The above test scenario simulation method is to obtain the feature information corresponding to each object in the test scenario; obtain the field template, which 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 determine the target field of each object from the field template according to the The feature information corresponding to the object is assigned to the target field of each object; the target code corresponding to the target field of each object is generated according to the target field of each object after the assignment, and the simulation model corresponding to each object is generated according to the target code corresponding to each object; The simulation model corresponding to each object establishes the simulation scene corresponding to the test scene. 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 indicate the function corresponding to the object, the function corresponding to the object can be realized by assigning the value of the target field, and the target code is automatically generated according to the target field, and then the simulation model corresponding to the object is obtained without changing the code, and Redundant codes are reduced, code maintenance is reduced, and code generation efficiency is improved.
在一个实施例中,S202之前,测试场景仿真方法还包括:获取历史仿真数据,从历史仿真数据中提取各个历史仿真模型的字段,得到各个历史仿真模型对应的字段集合;分别获取各个历史仿真模型对应的字段集合中的字段;统计各个字段的重复率;根据重复率大于预设阈值的字段组成字段模板。In one embodiment, before S202, the test scenario simulation method further includes: obtaining 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; obtaining each historical simulation model separately Corresponding fields in the field set; count the repetition rate of each field; compose a field template according to the fields whose repetition rate is greater than a preset threshold.
其中,重复率是指字段的重复次数与字段集合总数目的比值。预设阈值是预先设置的,可以是根据实际需求进行设置。Among them, 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 set in advance and can be set according to actual needs.
具体地,服务器可以从数据库中获取历史仿真数据,也可以从其他服务器获取历史仿真数据。历史仿真数据包括多个历史仿真场景,每个历史仿真场景包括多个历史仿真模型。由于历史仿真模型是根据至少一个字段生成的,因此服务器可以获取历史仿真模型对应的字段集合。每个历史仿真模型对应的字段集合包括至少一个字段。每个历史仿真模型之间可以包括相同的字段,也可以包括不同的字段。例如,历史仿真模型A对应的字段集合a包括字段1、字段2、字段3和字段4。历史仿真模型B对应的字段集合b包括字段1、字段2、字段5、字段6和字段7。服务器可以计算各个字段的重复率,比较各个字段的重复率与预设阈值的大小关系。当一个字段的重复率大于预设阈值时,将该字段作为字段模板的一个候选字段。将所有重复率大于预设阈值的字段作为候选字段,组成字段模板。,Specifically, the server may obtain historical simulation data from the database, or may obtain historical simulation data 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 the 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 can include the same field or different fields. For example, the field set a corresponding to the historical simulation model A includes field 1, field 2, field 3, and field 4. The field set b corresponding to the 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 relationship between the repetition rate of each field and the preset threshold. When the repetition rate of a field is greater than the preset threshold, the field is used as a candidate field of the field template. All fields with a repetition rate greater than a preset threshold are used as candidate fields to form a field template. ,
上述实施例中,通过获取历史仿真数据,从历史仿真数据中提取各个历史仿真模型的字段,得到各个历史仿真模型对应的字段集合;分别获取各个历史仿真模型对应的字段集合中的字段;统计各个字段的重复率;根据重复率大于预设阈值的字段组成字段模板。字段的重复率反映了该字段的重要性,将重要性较高的字段组成字段模板,提高了字段模板的集中性。此外,滤除重要性较低的字段,也可以节约服务器的存储资源。In the above embodiment, by obtaining historical simulation data, extracting the fields of each historical simulation model from the historical simulation data to obtain the field set corresponding to each historical simulation model; respectively obtaining the fields in the field set corresponding to each historical simulation model; The repetition rate of the field; the field template is composed according to the fields whose repetition rate is greater than the preset threshold. The repetition rate of a field reflects the importance of the field, and fields with higher importance are combined into a field template, which improves the concentration of the field template. In addition, filtering out less important fields can also save server storage resources.
如图3所示,在一个实施例中,S206包括:As shown in Figure 3, in one embodiment, S206 includes:
S302,根据各个物体对应的特征信息确定各个物体对应的特征字段和特征字段值。S302: Determine the feature field and feature field value corresponding to each object according to the feature information corresponding to each object.
S304,将字段模板中的候选字段与各个物体对应的特征字段进行匹配。S304: Match the candidate field in the field template with the feature field corresponding to each object.
S306,当匹配成功时,将与各个物体对应的特征字段匹配成功的候选字段作为各个物体的目标字段。S306: When the matching is successful, the candidate field that successfully matches the feature field corresponding to each object is used as the target field of each object.
S308,根据各个物体对应的特征字段值对各个物体的目标字段进行赋值。S308: Assign a value to the target field of each object according to the feature field value corresponding to each object.
具体地,服务器根据各个物体的特征信息可以确定各个物体对应的特征字段和特征字段值。当获取到特征字段后,可以在字段模板中查找与该特征字段相同的候选字段。当查找到该特征字段对应的候选字段时,该特征字段匹配成功。将该匹配成功的候选字段作为该特征字段对应的目标字段,也就是,将该候选字段作为该物体对应的目标字段。一个物体对应至少一个特征字段,当该物体对应的特征字段都匹配成功时,从字段模板中可以确定与该至少一个特征字段一一对应的目标字段。根据特征字段对应的特征字段值可以对该特征字段对应的目标字段进行赋值。Specifically, the server can determine the feature field and feature field value corresponding to each object according to the feature information of each object. When 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 candidate field that is successfully matched is used as the target field corresponding to the feature field, that is, the candidate field is used as the target field corresponding to the object. One object corresponds to at least one feature field. When the feature fields corresponding to the object are matched successfully, the target field corresponding to the at least one feature field can be determined from the field template. The target field corresponding to the characteristic field can be assigned a value according to the characteristic field value corresponding to the characteristic field.
在一个实施例中,S206还包括:当匹配失败时,将匹配失败的特征字段作为更新候选字段;将更新候选字段添加至字段模板。In an embodiment, S206 further includes: when the matching fails, the feature field that fails to match is used as the update candidate field; and the update candidate field is added to the field template.
具体地,当字段模板中查找不到与特征字段相同的候选字段时,该特征字段匹配失败。 将该匹配失败的特征字段作为新的候选字段,添加至字段模板中,得到更新后的字段模板。进而,包括该特征字段的物体可以从更新后的字段模板中确定对应的目标字段,根据目标字段生成对应的仿真模型。此外,新的候选字段不会对更新前的字段模板中的候选字段产生影响,新的候选字段对应的代码也不会对更新前的字段模板中的候选字段对应的代码产生影响。Specifically, when a candidate field that is the same as the feature field cannot be found in the field template, the feature field fails to match. The feature field that fails to match is used as a new candidate field and added to the field template to obtain an updated field template. Furthermore, the object including the characteristic field can determine the corresponding target field from the updated field template, and generate the corresponding simulation model according to 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.
在一个实施例中,S302包括:将各个物体对应的特征信息输入预先训练好的深度学习神经网络,输出各个物体对应的特征字段和特征字段值。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.
具体地,可以根据预先训练好的深度学习神经网络确定物体的特征信息对应的特征字段和特征字段值。对于预先训练好的深度学习神经网络,已经将物体的特征信息设置为深度学习神经网络的输入变量,将特征字段和特征字段值设置为深度学习神经网络的输出变量。因此,将获取到的物体的特征信息通过输入设备输入至预先训练好的深度学习神经网络中时,预先训练好的深度学习神经网络会计算并输出对应的物体的特征字段和特征字段值。Specifically, 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. 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 field and feature field value have been set as the output variable 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 field and feature field value of the corresponding object.
上述实施例中,通过对深度学习神经网络的运用,能够在获取到物体的特征信息的情况下,对物体的特征字段和特征字段值进行预测,进而为建立仿真模型提供数据支持。In the above embodiment, through the application of the deep learning neural network, the feature field and the feature field value of the object can be predicted when the feature information of the object is obtained, thereby providing data support for establishing a simulation model.
在一个实施例中,将各个物体对应的特征信息输入预先训练好的深度学习神经网络,输出各个物体对应的特征字段和特征字段值之前,包括:获取物体样本数据;根据物体样本数据获取样本物体的特征信息、字段和字段值对深度学习神经网络进行训练。In one embodiment, before inputting the feature information corresponding to each object into a pre-trained deep learning neural network, and outputting the feature field and feature field value corresponding to each object, it includes: obtaining object sample data; obtaining sample object according to the object sample data The feature information, fields and field values of the deep learning neural network are trained.
具体地,在数据库中,存储有多个物体样本数据,物体样本数据中包含了多个物体的特征信息、字段和字段值。在深度学习神经网络中,预先对深度学习神经网络的输入变量与输出变量进行了设置,将特征信息设置为深度学习神经网络的输入变量,将字段和字段值设置为深度学习神经网络的输出变量。因此将多个物体的特征信息以及字段和字段值分别作为深度学习神经网络的输入和预期输出,深度学习神经网络会根据多组数据进行训练。训练后的深度学习神经网络才能在使用时根据输入数据预测输出数据。对深度学习神经网络进行训练能使得获取到的预测结果更为准确。Specifically, in the database, multiple object sample data are stored, and the object sample data contains feature information, fields, and field values of multiple 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 variables 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, fields and field values of multiple objects are respectively used as the input and expected output of the deep learning neural network, and the deep learning neural network will be trained based on multiple sets of data. The trained deep learning neural network can predict the output data based on the input data when it is used. Training the deep learning neural network can make the obtained prediction results more accurate.
在一个实施例中,根据物体样本数据获取样本物体的特征信息、字段和字段值对深度学习神经网络进行训练,包括:根据物体样本数据获取物体的特征信息,将物体的特征信息输入到深度学习神经网络中进行无监督训练;从物体样本数据中获取与样本物体的特征信息对应的字段和字段值,将获取的样本物体的特征信息作为深度学习神经网络的输入数据,将获取的字段和字段值作为深度学习神经网络的预期输出,对深度学习神经网络进行 有监督训练。In one embodiment, acquiring the feature information, fields, and field values of the sample object according to the object sample data to train the deep learning neural network includes: acquiring the feature information of the object according to the object sample data, and inputting the feature information of the object into the deep learning Unsupervised training in the neural network; obtain the 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 the input data of the deep learning neural network, and use the obtained fields and fields The value is used as the expected output of the deep learning neural network for supervised training of the deep learning neural network.
具体地,将物体的特征信息值输入到深度学习神经网络对应的输入变量中进行无监督训练。在无监督训练后,再对深度学习神经网络进行有监督训练。进行有监督训练时,会将深度学习神经网络的输入变量与预期输出均提供完整。比如,将物体的特征信息作为深度学习神经网络的输入变量,将对应的字段和字段值作为深度学习神经网络的预期输出,对深度学习神经网络进行有监督训练。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 unsupervised training, the deep learning neural network is trained again. When conducting supervised training, the input variables and expected output of the deep learning neural network are provided intact. For example, the feature information of the object is used as the input variable of the deep learning neural network, the corresponding field and field value are used as the expected output of the deep learning neural network, and the deep learning neural network is supervised training.
物体样本数据中存储有多个物体的特征信息以及对应的字段和字段值,也就是物体样本数据中存储有多组物体数据,每组物体数据中的数据类型包括每个物体的特征信息,字段和字段值。但是,并不是每组物体数据都是完整的,可能存在有的物体数据中缺少字段和字段值,这部分缺少字段和字段值的物体数据可以用于对深度学习神经网络进行无监督训练,避免了数据的浪费。由于无监督训练先训练了深度学习神经网络的特征提取能力,在进行了无监督训练后再进行有监督训练也能提升深度学习神经网络的训练效果,提升了训练后的深度学习神经网络预测输出数据的准确度。The feature information of multiple objects and the corresponding fields and field values are stored in the object sample data, that is, multiple sets of object data are stored in the object sample data. The data type in each group of object data includes the feature information of each object, and the field And field value. However, not every set of object data is complete. There may be missing fields and field values in some object data. This part of the object data lacking fields and field values can be used for unsupervised training of deep learning neural networks to avoid The waste of data. Since unsupervised training first trains the feature extraction capabilities of deep learning neural networks, supervised training after unsupervised training can also improve the training effect of deep learning neural networks and improve the predictive output of deep learning neural networks after training. The accuracy of the data.
在一个实施例中,无监督训练采用的是自下而上的训练方式。可以逐层构建单层神经元,具体包括一层输入层、一层输出层和多层隐藏层。输入层在最下方,输入层的输入变量为物体的特征信息。输出层在最上方,输出层的输出变量为物体的特征字段和特征字段值。隐藏层位于输入层和输出层之间,隐藏层的层数可以根据实际需要设定。无监督训练是从输入层逐层训练得到输出层。每层可以采用wake-sleep算法进行参数调优,每次仅调整一层,逐层调整。无监督训练时,不需要预期输出,无监督训练的目的并不是为了预测输出,而是为了感知输入。对深度学习神经网络进行无监督训练后,再进行有监督训练。有监督训练采用的是自上而下的训练方式。在通过无监督训练得到各层神经元对应的参数的基础上,在输出层添加一个分类器,再通过完整物体数据的监督学习,利用梯度下降法微调各层神经元对应的参数。In one embodiment, the unsupervised training adopts a bottom-up training method. A single layer of neurons can be constructed layer by layer, including an input layer, an output layer, and multiple hidden layers. The input layer is at the bottom, and the input variable of the input layer is the feature information of the object. The output layer is at the top, and the output variables of the output layer are the feature field and feature field value 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 wake-sleep algorithm for parameter tuning, and only adjust one layer at a time, adjusting layer by layer. In unsupervised training, no expected output is needed. The purpose of unsupervised training is not to predict the output, but to perceive the input. After unsupervised training of deep learning neural network, supervised training is carried out. Supervised training uses a top-down training method. On the basis of obtaining the parameters corresponding to the neurons in each layer through unsupervised training, a classifier is added to the output layer, and then through the supervised learning of the complete object data, the gradient descent method is used to fine-tune the parameters corresponding to the neurons in each layer.
在一个具体的实施例中,如图4所示,提供了一种测试场景仿真方法,具体包括以下步骤:In a specific embodiment, as shown in FIG. 4, a test scenario simulation method is provided, which specifically includes the following steps:
S402,获取历史仿真数据,从历史仿真数据中提取各个历史仿真模型的字段,得到各个历史仿真模型对应的字段集合。S402: 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.
S404,分别获取各个历史仿真模型对应的字段集合中的字段。S404: Obtain respectively the fields in the field set corresponding to each historical simulation model.
S406,统计各个字段的重复率。S406: Count the repetition rate of each field.
S408,根据重复率大于预设阈值的字段组成字段模板。S408: Form a field template according to fields whose repetition rate is greater than a preset threshold.
S410,获取物体样本数据。S410: Obtain object sample data.
S412,根据物体样本数据获取物体的特征信息,将物体的特征信息输入到深度学习神经网络中进行无监督训练。S412: 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.
S416,从物体样本数据中获取与样本物体的特征信息对应的字段和字段值,将获取的样本物体的特征信息作为深度学习神经网络的输入数据,将获取的字段和字段值作为深度学习神经网络的预期输出,对深度学习神经网络进行有监督训练。S416: Obtain the 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 the input data of the deep learning neural network, and use the obtained fields and field values as the deep learning neural network The expected output of the deep learning neural network for supervised training.
S418,获取测试场景中各个物体对应的特征信息。S418: Acquire feature information corresponding to each object in the test scene.
S420,将各个物体对应的特征信息输入预先训练好的深度学习神经网络,输出各个物体对应的特征字段和特征字段值。S420: Input the feature information corresponding to each object into the pre-trained deep learning neural network, and output the feature field and feature field value corresponding to each object.
S422,将字段模板中的候选字段与各个物体对应的特征字段进行匹配。S422: Match the candidate field in the field template with the feature field corresponding to each object.
S424,当匹配成功时,将与各个物体对应的特征字段匹配成功的候选字段作为各个物体的目标字段。S424: When the matching is successful, the candidate field that successfully matches the feature field corresponding to each object is used as the target field of each object.
S426,根据各个物体对应的特征字段值对各个物体的目标字段进行赋值。S426: Assign a value to the target field of each object according to the feature field value corresponding to each object.
S428,根据赋值后的各个物体的目标字段生成各个物体的目标字段对应的目标代码,根据各个物体对应的目标代码生成各个物体对应的仿真模型。S428: 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.
S430,根据各个物体对应的仿真模型建立测试场景对应的仿真场景。S430: Establish a simulation scene corresponding to the test scene according to the simulation model corresponding to each object.
现阶段,仿真测试场景中的多个物体是使用多个容器来管理,每个容器存放某类特定物体,提高了预定义内存占用,增加了处理时的循环数与维护难度,在每次添加新物体时需要对载入后数据存储部分代码进行改动。或者,使用一个存放基类指针的容器来管理,其中的每个指针均指向一种继承类。仿真测试场景中的物体时,需要频繁地进行基类-继承类的类型转换,会面对指针越界、内存泄漏、运行时的不正确类型转换导致系统崩溃等问题。At this stage, multiple objects in the simulation test scene are managed by multiple containers. Each container stores a certain type of specific object, which increases the pre-defined memory usage, increases the number of cycles during processing and the difficulty of maintenance. New objects need to be modified after loading the data storage part of the code. Or, use a container to store pointers to the base class to manage, each of which points to an inherited class. When simulating objects in the test scene, frequent base class-inherited class type conversions are required, which will face problems such as pointer out-of-bounds, memory leaks, and system crashes caused by incorrect type conversions at runtime.
而采用本申请的测试场景仿真方法,统一使用一个存放字段模板的容器来管理。待仿真的每一个物体均为符合字段模板的实例,并通过对不同字段的赋值来实现不同的功能,未使用的字段会被默认留空。这样,即使在字段模板中添加了新字段,也无需对数据存储代码进行改动,也不会影响以往代码的正确性。同时,字段是以变量而非指针形式存储,有效减少了系统错误几率。However, the test scenario simulation method of this application is used to uniformly use a 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 realized by assigning values to different fields. Unused fields will be left blank by default. In this way, even if a new field is 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 instead of pointers, which effectively reduces the chance of system errors.
应该理解的是,虽然上述流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,上述流程图中的至少一 部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the above flowchart are displayed in sequence as indicated by the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless specifically stated 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 part of the steps in the above flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The order of execution is not necessarily performed sequentially, but may be performed alternately or alternately with other steps or at least a part of sub-steps or stages of other steps.
图5为一个实施例中测试场景仿真装置的结构框图。如图5所示,一种测试场景仿真装置,包括获取模块502、目标字段确定模块504、仿真模型生成模块506和仿真场景建立模块508。其中:Fig. 5 is a structural block diagram of a test scenario simulation device in an embodiment. As shown in FIG. 5, 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. in:
获取模块502,用于获取测试场景中各个物体对应的特征信息;获取字段模板,字段模板包括多个候选字段。The obtaining module 502 is configured to obtain feature information corresponding to each object in the test scene; obtain a field template, which includes a plurality of candidate fields.
目标字段确定模块504,用于根据各个物体对应的特征信息从所述字段模板中确定各个物体的目标字段,根据各个物体对应的特征信息对各个物体的目标字段进行赋值。The target field determination module 504 is configured 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.
仿真模型生成模块506,用于根据赋值后的各个物体的目标字段生成各个物体的目标字段对应的目标代码,根据各个物体对应的目标代码生成各个物体对应的仿真模型。The simulation model generation module 506 is configured to generate the target code corresponding to the target field of each object according to the assigned target field of each object, and generate the simulation model corresponding to each object according to the target code corresponding to each object.
仿真场景建立模块508,用于根据各个物体对应的仿真模型建立测试场景对应的仿真场景。The simulation scene establishing module 508 is used to establish a simulation scene corresponding to the test scene according to the simulation model corresponding to each object.
在一个实施例中,获取模块502还用于获取历史仿真数据,从历史仿真数据中提取各个历史仿真模型的字段,得到各个历史仿真模型对应的字段集合;分别获取各个历史仿真模型对应的字段集合中的字段;统计各个字段的重复率;根据重复率大于预设阈值的字段组成字段模板。In one embodiment, the obtaining module 502 is also used to obtain historical simulation data, extract the fields of each historical simulation model from the historical simulation data, and obtain the field set corresponding to each historical simulation model; respectively obtain the field set corresponding to each historical simulation model Count the repetition rate of each field; compose a field template according to the fields whose repetition rate is greater than a preset threshold.
在一个实施例中,目标字段确定模块504还用于根据各个物体对应的特征信息确定各个物体对应的特征字段和特征字段值;将字段模板中的候选字段与各个物体对应的特征字段进行匹配;当匹配成功时,将与各个物体对应的特征字段匹配成功的候选字段作为各个物体的目标字段;根据各个物体对应的特征字段值对各个物体的目标字段进行赋值。In one embodiment, the target field determination module 504 is further configured to determine the feature field and feature field value corresponding to each object according to the feature information corresponding to each object; match the candidate field in the field template with the feature field corresponding to each object; When the matching is successful, the candidate field that successfully matches the feature field corresponding to each object is used as the target field of each object; the target field of each object is assigned according to the value of the feature field corresponding to each object.
在一个实施例中,目标字段确定模块504还用于当匹配失败时,将匹配失败的特征字段作为更新候选字段;将更新候选字段添加至字段模板。In one embodiment, the target field determining module 504 is further configured to use the feature field that failed to match as an update candidate field when the matching fails; add the update candidate field to the field template.
在一个实施例中,目标字段确定模块504还用于将各个物体对应的特征信息输入预先训练好的深度学习神经网络,输出各个物体对应的特征字段和特征字段值。In an embodiment, the target field determination module 504 is further configured to 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.
在一个实施例中,目标字段确定模块504还用于获取物体样本数据;根据物体样本数据获取样本物体的特征信息、字段和字段值对深度学习神经网络进行训练。In an 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 objects according to the object sample data to train the deep learning neural network.
在一个实施例中,目标字段确定模块504还用于根据物体样本数据获取物体的特征信息,将物体的特征信息输入到深度学习神经网络中进行无监督训练;从物体样本数据中获取与样本物体的特征信息对应的字段和字段值,将获取的样本物体的特征信息作为深度学习神经网络的输入数据,将获取的字段和字段值作为深度学习神经网络的预期输出,对深度学习神经网络进行有监督训练。In one embodiment, the target field determination module 504 is also used to obtain the feature information of the object according to the sample data of the object, and input the feature information of the object into the deep learning neural network for unsupervised training; The field and field value corresponding to the feature information of the sample object are used as the input data of the deep learning neural network, and the obtained field and field value are used as the expected output of the deep learning neural network. Supervise training.
上述测试场景仿真装置,通过获取测试场景中各个物体对应的特征信息;获取字段模板,字段模板包括多个候选字段;根据各个物体对应的特征信息从字段模板中确定各个物体的目标字段,根据各个物体对应的特征信息对各个物体的目标字段进行赋值;根据赋值后的各个物体的目标字段生成各个物体的目标字段对应的目标代码,根据各个物体对应的目标代码生成各个物体对应的仿真模型;根据各个物体对应的仿真模型建立测试场景对应的仿真场景。这样,字段模板包括多个候选字段,每个候选字段存在对应的代码。由于物体对应的特征信息可以表示物体对应的功能,因此通过对目标字段的赋值可以实现物体对应的功能,根据目标字段自动生成目标代码,进而得到物体对应的仿真模型,无需对代码进行改动,且减少了冗余代码,减少了对代码的维护,提高了代码生成效率。The above-mentioned test scene simulation device obtains the characteristic 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 characteristic information corresponding to each object, and determines the target field of each object from the field template according to the The feature information corresponding to the object is assigned to the target field of each object; the target code corresponding to the target field of each object is generated according to the target field of each object after the assignment, and the simulation model corresponding to each object is generated according to the target code corresponding to each object; The simulation model corresponding to each object establishes the simulation scene corresponding to the test scene. 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 indicate the function corresponding to the object, the function corresponding to the object can be realized by assigning the value of the target field, and the target code is automatically generated according to the target field, and then the simulation model corresponding to the object is obtained without changing the code, and Redundant codes are reduced, code maintenance is reduced, and code generation efficiency is improved.
关于测试场景仿真装置的具体限定可以参见上文中对于测试场景仿真方法的限定,在此不再赘述。上述测试场景仿真装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the test scenario simulation device, please refer to the above limitation 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. The above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
在一些实施例中,提供了一种计算机设备,该计算机设备可以是图1中的服务器104,其内部结构图可以如图6所示。该计算机设备包括通过系统总线连接的处理器、存储器和网络接口。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种测试场景仿真方法。In some embodiments, a computer device is provided. The computer device may be the server 104 in FIG. 1, and its internal structure diagram may be as shown in FIG. 6. The computer equipment 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 calculation 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 computer programs 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. The computer program is executed by the processor to realize a test scenario simulation method.
本领域技术人员可以理解,图6中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 6 is only a block diagram of 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 Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
在一个实施例中,本申请提供的测试场景仿真装置可以实现为一种计算机程序的形式, 计算机程序可在如图6所示的计算机设备上运行。计算机设备的存储器中可存储组成该测试场景仿真装置的各个程序模块,比如,图5所示的获取模块、目标字段确定模块、仿真模型生成模块和仿真场景建立模块。各个程序模块构成的计算机程序使得处理器执行本说明书中描述的本申请各个实施例的测试场景仿真方法中的步骤。In an embodiment, the test scenario simulation device provided in this application may be implemented in the form of a computer program, and the computer program may run on the computer device as shown in FIG. 6. The memory of the computer device can store various program modules that make up the test scenario simulation device, such as the acquisition module, the target field determination module, the simulation model generation module, and the simulation scenario establishment module shown in FIG. 5. The computer program composed of each program module causes the processor to execute the steps in the test scenario simulation method of each embodiment of the present application described in this specification.
例如,图6所示的计算机设备可以通过如图5所示的测试场景仿真装置中的获取模块执行步骤S202。计算机设备可通过目标字段确定模块执行步骤S206。计算机设备可通过仿真模型生成模块执行步骤S208。计算机设备可通过仿真场景建立执行步骤S210。For example, the computer device shown in FIG. 6 may execute step S202 through the acquisition module in the test scenario simulation apparatus shown in FIG. 5. The computer device may execute step S206 through the target field determination module. The computer device may execute step S208 through the simulation model generation module. The computer device may establish and execute step S210 through a simulation scenario.
在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器存储有计算机程序,计算机程序被处理器执行时,使得处理器执行上述测试场景仿真方法的步骤。此处测试场景仿真方法的步骤可以是上述各个实施例的测试场景仿真方法中的步骤。In one embodiment, a computer device is provided, which includes a memory and a processor, and the memory stores a computer program. When the computer program is executed by the processor, the processor causes the processor to execute the steps of the test scenario simulation method. Here, the steps of the test scenario simulation method may be the steps in the test scenario simulation method of each of the foregoing embodiments.
在一个实施例中,提供了一种计算机可读存储介质,存储有计算机程序,计算机程序被处理器执行时,使得处理器执行上述测试场景仿真方法的步骤。此处测试场景仿真方法的步骤可以是上述各个实施例的测试场景仿真方法中的步骤。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 above-mentioned test scenario simulation method. Here, the steps of the test scenario simulation method may be the steps in the test scenario simulation method of each of the foregoing embodiments.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage. In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, or optical storage. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM may be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered as the range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范 围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the scope of the invention patent. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can be made, and these all fall within the protection scope of this application. Therefore, the scope of protection of the patent of this application shall be subject to the appended claims.

Claims (16)

  1. 一种测试场景仿真方法,其特征在于,包括:A test scenario simulation method, which is characterized in that it includes:
    获取测试场景中各个物体对应的特征信息;Obtain feature information corresponding to each object in the test scene;
    获取字段模板,所述字段模板包括多个候选字段;Obtaining a field template, where the field template includes a plurality of candidate fields;
    根据各个物体对应的特征信息从所述字段模板中确定各个物体的目标字段,根据所述各个物体对应的特征信息对所述各个物体的目标字段进行赋值;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;
    根据赋值后的各个物体的目标字段生成所述各个物体的目标字段对应的目标代码,根据所述各个物体对应的目标代码生成所述各个物体对应的仿真模型;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;
    根据所述各个物体对应的仿真模型建立所述测试场景对应的仿真场景。The simulation scene corresponding to the test scene is established according to the simulation model corresponding to each object.
  2. 根据权利要求1所述的方法,其特征在于,所述获取字段模板之前,所述方法还包括:The method according to claim 1, wherein before said obtaining the field template, the method further comprises:
    获取历史仿真数据,从所述历史仿真数据中提取各个历史仿真模型的字段,得到各个历史仿真模型对应的字段集合;Acquiring historical simulation data, extracting the fields of each historical simulation model from the historical simulation data, and obtaining 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 formed according to the fields whose repetition rate is greater than the preset threshold.
  3. 根据权利要求1所述的方法,其特征在于,所述根据各个物体对应的特征信息从所述字段模板中确定各个物体的目标字段,根据所述各个物体对应的特征信息对所述各个物体的目标字段进行赋值,包括:The method according to claim 1, wherein the target field of each object is determined from the field template according to the characteristic information corresponding to each object, and the target field of each object is determined according to the characteristic information corresponding to each object. The target field is assigned, including:
    根据各个物体对应的特征信息确定各个物体对应的特征字段和特征字段值;Determine the feature field and feature field value corresponding to each object according to the feature information corresponding to each object;
    将所述字段模板中的候选字段与所述各个物体对应的特征字段进行匹配;Matching the candidate field in the field template with the feature field corresponding to each object;
    当匹配成功时,将与所述各个物体对应的特征字段匹配成功的候选字段作为所述各个物体的目标字段;When the matching is successful, use the candidate field that successfully matches the feature field corresponding to each object as the target field of each object;
    根据所述各个物体对应的特征字段值对所述各个物体的目标字段进行赋值。Assign a value to the target field of each object according to the characteristic field value corresponding to each object.
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:The method according to claim 3, wherein the method further comprises:
    当匹配失败时,将匹配失败的特征字段作为更新候选字段;When the matching fails, the feature field that fails to match is used as the update candidate field;
    将所述更新候选字段添加至所述字段模板。The update candidate field is added to the field template.
  5. 根据权利要求3所述的方法,其特征在于,所述根据各个物体对应的特征信息确定各个物体对应的特征字段和特征字段值之前,所述方法还包括:The method according to claim 3, characterized in that, before determining the characteristic field and the characteristic field value corresponding to each object according to the characteristic information corresponding to each object, the method further comprises:
    将各个物体对应的特征信息输入预先训练好的深度学习神经网络,输出所述各个物体对应的特征字段和特征字段值。The feature information corresponding to each object is input into a pre-trained deep learning neural network, and the feature field and feature field value corresponding to each object are output.
  6. 根据权利要求5所述的方法,其特征在于,所述将各个物体对应的特征信息输入预先训练好的深度学习神经网络之前,所述方法还包括:The method according to claim 5, characterized in that, before inputting the characteristic information corresponding to each object into a pre-trained deep learning neural network, the method further comprises:
    获取物体样本数据;Obtain object sample data;
    根据所述物体样本数据获取样本物体的特征信息、字段和字段值对深度学习神经网络进行训练。The feature information, fields, and field values of the sample objects are acquired according to the object sample data to train the deep learning neural network.
  7. 根据权利要求6所述的方法,其特征在于,所述根据所述物体样本数据获取样本物体的特征信息、字段和字段值对深度学习神经网络进行训练,包括:The method according to claim 6, wherein the acquiring feature information, fields, and field values of the sample objects according to the object sample data to train the deep learning neural network comprises:
    根据所述物体样本数据获取物体的特征信息,将所述物体的特征信息输入到所述深度学习神经网络中进行无监督训练;Acquiring feature information of the object according to the object sample data, and inputting the feature information of the object into the deep learning neural network for unsupervised training;
    从所述物体样本数据中获取与所述样本物体的特征信息对应的字段和字段值,将获取的所述样本物体的特征信息作为深度学习神经网络的输入数据,将获取的字段和字段值作为所述深度学习神经网络的预期输出,对所述深度学习神经网络进行有监督训练。Obtain the 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 the input data of the deep learning neural network, and use the obtained fields and field values as the input data of the deep learning neural network. The expected output of the deep learning neural network performs supervised training on the deep learning neural network.
  8. 一种测试场景仿真装置,其特征在于,包括:A test scenario simulation device, which is characterized in that it comprises:
    获取模块,用于获取测试场景中各个物体对应的特征信息;获取字段模板,所述字段模板包括多个候选字段;An obtaining module, used to obtain feature information corresponding to each object in the test scene; obtain a field template, the field template including a plurality of candidate fields;
    目标字段确定模块,用于根据各个物体对应的特征信息从所述字段模板中确定各个物体的目标字段,根据所述各个物体对应的特征信息对所述各个物体的目标字段进行赋值;The target field determination module is configured to determine the target field of each object from the field template according to the characteristic information corresponding to each object, and assign a value to the target field of each object according to the characteristic information corresponding to each object;
    仿真模型生成模块,用于根据赋值后的各个物体的目标字段生成所述各个物体的目标字段对应的目标代码,根据所述各个物体对应的目标代码生成所述各个物体对应的仿真模型;A simulation model generation module, configured 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 model corresponding to each object.
  9. 根据权利要求8所述的装置,其特征在于,所述获取模块还用于获取历史仿真数据,从所述历史仿真数据中提取各个历史仿真模型的字段,得到各个历史仿真模型对应的字段集合;分别获取各个历史仿真模型对应的字段集合中的字段;统计各个字段的重复率;根据重复率大于预设阈值的字段组成所述字段模板。8. The device according to claim 8, wherein the acquisition module is further configured to acquire historical simulation data, extract fields of each historical simulation model from the historical simulation data, and obtain a set of fields corresponding to each historical simulation model; The fields in the field set corresponding to each historical simulation model are respectively obtained; the repetition rate of each field is counted; the field template is formed according to the fields with the repetition rate greater than a preset threshold.
  10. 根据权利要求8所述的装置,其特征在于,所述目标字段确定模块还用于根据各 个物体对应的特征信息确定各个物体对应的特征字段和特征字段值;将所述字段模板中的候选字段与所述各个物体对应的特征字段进行匹配;当匹配成功时,将与所述各个物体对应的特征字段匹配成功的候选字段作为所述各个物体的目标字段;根据所述各个物体对应的特征字段值对所述各个物体的目标字段进行赋值。The device according to claim 8, wherein the target field determination module is further configured to determine the feature field and feature field value corresponding to each object according to the feature information corresponding to each object; Match the feature field corresponding to each object; when the matching is successful, use the candidate field that successfully matches the feature field corresponding to each object as the target field of each object; according to the feature field corresponding to each object The value is assigned to the target field of each object.
  11. 根据权利要求10所述的装置,其特征在于,所述目标字段确定模块还用于当匹配失败时,将匹配失败的特征字段作为更新候选字段;将所述更新候选字段添加至所述字段模板。The device according to claim 10, wherein the target field determining module is further configured to, when the matching fails, use the feature field of the matching failure as an update candidate field; and add the update candidate field to the field template .
  12. 根据权利要求10所述的装置,其特征在于,所述目标字段确定模块还用于将各个物体对应的特征信息输入预先训练好的深度学习神经网络,输出所述各个物体对应的特征字段和特征字段值。The device according to claim 10, wherein the target field determination module is further configured to input feature information corresponding to each object into a pre-trained deep learning neural network, and output feature fields and features corresponding to each object Field value.
  13. 根据权利要求12所述的装置,其特征在于,所述目标字段确定模块还用于获取物体样本数据;根据所述物体样本数据获取样本物体的特征信息、字段和字段值对深度学习神经网络进行训练。The device according to claim 12, wherein the target field determination module is further used to obtain object sample data; according to the object sample data to obtain feature information, fields, and field values of the sample object, perform a deep learning neural network Training.
  14. 根据权利要求12所述的装置,其特征在于,所述目标字段确定模块还用于根据所述物体样本数据获取物体的特征信息,将所述物体的特征信息输入到所述深度学习神经网络中进行无监督训练;从所述物体样本数据中获取与所述样本物体的特征信息对应的字段和字段值,将获取的所述样本物体的特征信息作为深度学习神经网络的输入数据,将获取的字段和字段值作为所述深度学习神经网络的预期输出,对所述深度学习神经网络进行有监督训练。The device according to claim 12, wherein the target field determination module is further configured 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 Perform unsupervised training; obtain fields and field values corresponding to the feature information of the sample object from the object sample data, and use the obtained feature information of the sample object as the input data of the deep learning neural network, and the obtained Fields and field values are used as expected outputs of the deep learning neural network, and supervised training is performed on the deep learning neural network.
  15. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至7中任一项所述方法的步骤。A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when the computer program is executed by the processor.
  16. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的方法的步骤。A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the method according to any one of claims 1 to 7 when the computer program is executed by a processor.
PCT/CN2020/073476 2020-01-21 2020-01-21 Test scenario simulation method and apparatus, computer device, and storage medium WO2021146906A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080003153.5A CN113498511A (en) 2020-01-21 2020-01-21 Test scene simulation method and device, computer equipment and storage medium
PCT/CN2020/073476 WO2021146906A1 (en) 2020-01-21 2020-01-21 Test scenario simulation method and apparatus, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/073476 WO2021146906A1 (en) 2020-01-21 2020-01-21 Test scenario simulation method and apparatus, computer device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021146906A1 true WO2021146906A1 (en) 2021-07-29

Family

ID=76992629

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/073476 WO2021146906A1 (en) 2020-01-21 2020-01-21 Test scenario simulation method and apparatus, computer device, and storage medium

Country Status (2)

Country Link
CN (1) CN113498511A (en)
WO (1) WO2021146906A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115630106A (en) * 2022-10-28 2023-01-20 上海柯林布瑞信息技术有限公司 Multi-scene parameter receiving method and device based on universal format analysis
CN115830255A (en) * 2022-11-28 2023-03-21 北京百度网讯科技有限公司 Simulation scene generation method and device, electronic equipment and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115828638B (en) * 2023-01-09 2023-05-23 西安深信科创信息技术有限公司 Automatic driving test scene script generation method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106096192A (en) * 2016-06-27 2016-11-09 百度在线网络技术(北京)有限公司 The construction method of the test scene of a kind of automatic driving vehicle and device
CN109446371A (en) * 2018-11-09 2019-03-08 苏州清研精准汽车科技有限公司 A kind of intelligent automobile emulation testing scene library generating method and test macro and method
CN110502852A (en) * 2019-08-27 2019-11-26 上海汽车集团股份有限公司 A kind of generation method and generation system of automatic Pilot emulation testing scene
CN110597086A (en) * 2019-08-19 2019-12-20 深圳元戎启行科技有限公司 Simulation scene generation method and unmanned system test method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106096192A (en) * 2016-06-27 2016-11-09 百度在线网络技术(北京)有限公司 The construction method of the test scene of a kind of automatic driving vehicle and device
CN109446371A (en) * 2018-11-09 2019-03-08 苏州清研精准汽车科技有限公司 A kind of intelligent automobile emulation testing scene library generating method and test macro and method
CN110597086A (en) * 2019-08-19 2019-12-20 深圳元戎启行科技有限公司 Simulation scene generation method and unmanned system test method
CN110502852A (en) * 2019-08-27 2019-11-26 上海汽车集团股份有限公司 A kind of generation method and generation system of automatic Pilot emulation testing scene

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115630106A (en) * 2022-10-28 2023-01-20 上海柯林布瑞信息技术有限公司 Multi-scene parameter receiving method and device based on universal format analysis
CN115630106B (en) * 2022-10-28 2023-06-30 上海柯林布瑞信息技术有限公司 Multi-scene parameter receiving method and device based on general format analysis
CN115830255A (en) * 2022-11-28 2023-03-21 北京百度网讯科技有限公司 Simulation scene generation method and device, electronic equipment and storage medium
CN115830255B (en) * 2022-11-28 2023-11-21 北京百度网讯科技有限公司 Simulation scene generation method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113498511A (en) 2021-10-12

Similar Documents

Publication Publication Date Title
KR102635987B1 (en) Method, apparatus, device and storage medium for training an image semantic segmentation network
WO2021146906A1 (en) Test scenario simulation method and apparatus, computer device, and storage medium
US20210101619A1 (en) Safe and scalable model for culturally sensitive driving by automated vehicles
CN111582189B (en) Traffic signal lamp identification method and device, vehicle-mounted control terminal and motor vehicle
CN113033029A (en) Automatic driving simulation method and device, electronic equipment and storage medium
WO2021249963A1 (en) Collecting and processing data from vehicles
US20220318464A1 (en) Machine Learning Data Augmentation for Simulation
CN113343461A (en) Simulation method and device for automatic driving vehicle, electronic equipment and storage medium
WO2022141858A1 (en) Pedestrian detection method and apparatus, electronic device, and storage medium
US11875680B2 (en) Systems and methods for augmenting perception data with supplemental information
CN115830399A (en) Classification model training method, apparatus, device, storage medium, and program product
Li A scenario-based development framework for autonomous driving
EP4174710A1 (en) Generating synthetic training data for perception machine learning models using simulated environments
Bai et al. Cyber mobility mirror for enabling cooperative driving automation: A co-simulation platform
CN113119996B (en) Trajectory prediction method and apparatus, electronic device and storage medium
CN115357500A (en) Test method, device, equipment and medium for automatic driving system
US20220406041A1 (en) Recognition model distribution system and updating method of recognition model
CN116718181B (en) Map generation method, map generation device, electronic equipment and storage medium
CN116935168B (en) Method, device, computer equipment and storage medium for target detection
CN116665157B (en) Road image processing method, device, computer equipment and storage medium
CN115408822A (en) Threshold-based scene generation method and device and storage medium
US20200310458A1 (en) Estimating a movement of a hybrid-behavior vehicle
Ramayee Design of Mobility Cyber Range and Vision-Based Adversarial Attacks on Camera Sensors in Autonomous Vehicles
CN116631215A (en) Parking and locating method for underground three-dimensional parking garage and electronic equipment
Leon-Vazquez et al. Human-Centric Smart Cities: A Digital Twin-Oriented Design of Interactive Autonomous Vehicles

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20915600

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20915600

Country of ref document: EP

Kind code of ref document: A1