A method for generating intelligent driving test scenarios based on big data analysis
Through big data analysis and test scenario generation model, the problems of high cost of traditional testing methods and limited coverage of scenarios are solved, and efficient and safe generation of intelligent driving test scenarios are achieved.
Patent Information
- Application Number
- CN202411771780.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-12-04
AI Technical Summary
Traditional intelligent driving testing methods are costly, long time, and limited coverage scenarios, making it difficult to fully verify the various situations of autonomous driving vehicles on actual roads.
Through big data analysis, the driving scene image data is collected and preprocessed, the vehicle driving trajectory data is extracted, and the test scene generation model is constructed. The model parameters are optimized using improved slime mold algorithms to generate diverse and complex test scenarios.
It greatly improves testing efficiency and coverage, reduces testing costs, and ensures the reliability and safety of intelligent driving systems under a variety of conditions.
Smart Images

Figure CN119249918B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of driving test scenario generation, and in particular to an intelligent driving test scenario generation method based on big data analysis. Background Art
[0002] With the rapid development of intelligent driving technology, the testing and verification of autonomous vehicles has become increasingly important. Traditional testing methods mainly rely on actual road testing and closed field testing, but these methods have problems such as high cost, long time, and limited coverage of scenarios. Summary of the invention
[0003] In view of this, the present invention proposes a smart driving test scenario generation method based on big data analysis. By collecting and analyzing a large amount of driving data, more diverse and complex test scenarios are generated. These scenarios can more comprehensively cover various situations that autonomous driving vehicles may encounter on actual roads, greatly improving the test efficiency and coverage. It can not only improve the test efficiency and reduce the test cost, but also ensure the reliability and safety of the intelligent driving system under various conditions, providing strong support for the development and verification of intelligent driving technology.
[0004] To achieve the above object, the present invention provides a method for generating intelligent driving test scenarios based on big data analysis, comprising the following steps:
[0005] S1: collecting driving scene image data and preprocessing it to obtain preprocessed driving scene image data;
[0006] S2: Extracting the trajectory of the preprocessed driving scene image data to obtain vehicle driving trajectory data;
[0007] S3: constructing a test scenario generation model, wherein the test scenario generation model takes the extracted vehicle driving trajectory data as input and takes the generated driving test scenario as output, wherein sequential generation is an implementation method of the test scenario generation model;
[0008] S4: Optimizing and solving the model parameters of the constructed test scenario generation model, wherein the improved slime mold algorithm is an implementation method of the optimization solution;
[0009] S5: Generate a driving test scenario using the solved test scenario generation model.
[0010] As a further improvement method of the present invention:
[0011] Optionally, the step S1 of collecting vehicle driving scene image data and preprocessing the data includes:
[0012] Collect vehicle driving scene image data, where the vehicle driving scene image is a top view of the vehicle during driving, and the collected vehicle driving scene image data is:
[0013] ;
[0014] in:
[0015] Indicates the collected vehicle driving scene image data;
[0016] Represents N consecutive vehicle driving scene images;
[0017] Vehicle driving scene image data Preprocessing is performed, where the vehicle driving scene image The preprocessing process is:
[0018] S11: Vehicle driving scene image Any pixel in the grayscale processing, where the vehicle driving scene image The pixel at row x and column y The grayscale processing formula is:
[0019] ;
[0020] in:
[0021] In order, it represents pixels Color values in R, G, B color channels;
[0022] Represents pixels Gray value of
[0023] S12: Calculate and obtain the vehicle driving scene image The corresponding gradient image :
[0024] ;
[0025] ;
[0026] in:
[0027] Represents pixels The gradient value of the vehicle driving scene image, X represents the number of pixel rows, Y represents the number of pixel columns of the vehicle driving scene image, , ;
[0028] In matrix form with X rows and Y columns;
[0029] S13: Gradient image The pixel coordinates in are transformed into the world coordinate system, where the gradient image Medium pixel coordinates The representation in the world coordinate system is , Represents pixel coordinates Height in world coordinates;
[0030] S14: Constructing a pre-processed vehicle driving scene image :
[0031] ;
[0032] ;
[0033] in:
[0034] Represents the vehicle driving scene image The world coordinate position matrix corresponding to the pixel coordinates in .
[0035] Optionally, in step S13, the gradient image The pixel coordinates in are converted to the world coordinate system, including:
[0036] S131: Gradient image The pixel coordinates in are converted to the camera coordinate system, where the pixel coordinates The conversion result is:
[0037] ;
[0038] in:
[0039] Represents pixel coordinates The transformation result in the camera coordinate system;
[0040] , represents the internal parameters of the camera, Indicates the length of the horizontal focal length, Indicates the length of the vertical focal length, Indicates the horizontal coordinate of the center of the camera's photosensitive plate in the pixel coordinate system. Indicates the vertical coordinate of the center of the camera's photosensitive plate in the pixel coordinate system;
[0041] Represents the gradient image The depth information of the pixel in the xth row and yth column in the camera;
[0042] S132: Convert the coordinates in the camera coordinate system to the world coordinate system, where The conversion formula is:
[0043] ;
[0044] in:
[0045] represents the rotation matrix of the camera, Represents the camera's translation vector;
[0046] Representing coordinates The result of the transformation in the world coordinate system.
[0047] Optionally, in step S2, performing trajectory extraction on the preprocessed driving scene image data includes:
[0048] The trajectory is extracted from the preprocessed driving scene image data, where the preprocessed vehicle driving scene image The trajectory extraction process is as follows:
[0049] S21: Calculate the pre-processed vehicle driving scene image The key information of any pixel in The pixel at row x and column y The key information is:
[0050] ;
[0051] ;
[0052] in:
[0053] Represents pixels Key information:
[0054] Represents pixels The gradient direction of Represents the vehicle driving scene image In pixels Starting from The pixel values of the two pixels closest to each other are obtained by traversal. Represents the two pixels to pixels obtained by traversal distance;
[0055] S22: Mark pixels with key information higher than a preset threshold as edge pixels, where the edge pixels represent the preprocessed vehicle driving scene image. The outline of the vehicle and the outline of the road;
[0056] S23: Extract pixels whose height value is the ground height in the world coordinate system from edge pixels as the preprocessed vehicle driving scene image , and extract the neighboring pixels of the trajectory pixels, and mark the pixels whose gradient values are higher than the preset gradient threshold as trajectory pixels;
[0057] S24: taking the coordinates corresponding to the trajectory pixels as the pre-processed vehicle driving scene image The trajectory coordinates in the image constitute the pre-processed vehicle driving scene image. trajectories;
[0058] Integrate the trajectories of all pre-processed vehicle driving scene images into vehicle driving trajectory data .
[0059] Optionally, the vehicle driving trajectory data for:
[0060] ;
[0061] in:
[0062] It represents the vehicle driving trajectory and road trajectory corresponding to the n-th vehicle driving scene image, that is, the vehicle driving trajectory and road trajectory of the n-th driving section.
[0063] Optionally, constructing a test scenario generation model in step S3 includes:
[0064] Constructing a test scenario generation model, wherein the test scenario generation model takes the extracted vehicle driving trajectory data as input and the generated driving test scenario as output, wherein sequential generation is the implementation method of the test scenario generation model; the test scenario generation model includes a generation module and a test module, the generation module is used to generate a driving test scenario, and the test module is used to perform a driving safety test on the generated driving test scenario;
[0065] The generation module includes an input layer, a sequential feature generation layer, and a driving test scenario generation layer. The input layer is used to receive vehicle driving trajectory data. The sequential feature generation layer is used to extract sequential trajectory features based on trajectory data of continuous driving sections. The driving test scenario generation layer is used to map the sequential trajectory features into driving test scenarios, wherein the driving test scenarios are driving environment conditions during driving, including the number of vehicles on the road and the speed of the vehicles.
[0066] The test module includes an input layer, a scene feature extraction layer, and a driving safety calculation layer. The input layer is used to receive a driving test scene, the scene feature extraction layer is used to extract scene convolution features from the driving test scene, and the driving safety calculation layer is used to convert the scene convolution features into driving safety. In an embodiment of the present invention, the scene convolution feature is a convolution calculation result of the driving test scene, and the driving safety is a mapping value of the convolution calculation result based on an activation function.
[0067] Optionally, the step S4 includes optimizing and solving the constructed test scenario generation model, including:
[0068] The constructed test scenario generation model is optimized and solved, and the optimization and solving process is as follows:
[0069] S41: Initialize the model parameters of the test scenario generation model ,in Indicates the parameters of the generated module. Represents the parameters of the test module;
[0070] S42: Construct the training objective function of the test scene generation model:
[0071] ;
[0072] in:
[0073] Represents the training objective function of the test scene generation model, the training objective function Taking the model parameters as input, the driving safety of the generated driving test scenario is used as the training objective function value corresponding to the model parameters;
[0074] Indicates that based on parameters The generated modules are constructed. Indicates that based on parameters The test modules constructed;
[0075] Indicates the trajectory based on the vehicle and the road The generated driving test scenarios;
[0076] Represents a driving test scenario Driving safety;
[0077] S43: Model parameters The diffusion is U groups of slime mold individuals, where the diffusion formula of the u-th group of slime mold individuals is:
[0078] ;
[0079] in:
[0080] Indicates control parameters;
[0081] represents the L1 norm;
[0082] represents the parameter vector threshold;
[0083] Represents a vector whose elements are all 1 and whose length is consistent with the model parameters;
[0084] represents the uth group of slime mold individuals obtained by diffusion;
[0085] S44: Set the current iteration number of the slime mold individual to t, the initial value of t is 0, and the maximum iteration number is Max. Then the t-th iteration result of the u-th group of slime mold individuals is ;
[0086] S45: Iterate the slime mold individuals, where the iteration formula for the u-th group of slime mold individuals is:
[0087] ;
[0088] ;
[0089] ;
[0090] in:
[0091] It means that the U group of slime mold individuals obtained in the tth iteration are used as the input value of the training objective function, so that the training objective function reaches the largest slime mold individual. express The corresponding training objective function value is Indicates the training objective function value corresponding to the slime mold individual that makes the training objective function reach the minimum;
[0092] c represents a weight factor; in the embodiment of the present invention, c is set to 0.3;
[0093] represents the iteration weight of the tth iteration;
[0094] Represents slime mold individuals The objective function value weight of
[0095] represents an exponential function with a natural constant as base;
[0096] Represents a random number between -1 and 1;
[0097] represents any two groups of slime mold individuals among the U groups of slime mold individuals obtained in the t-th iteration;
[0098] S46: Let t = t + 1, return to step S45, until the maximum number of iterations is reached, and select the slime mold individual with the highest training function value from the U group of slime mold individuals obtained in the final iteration as the model parameter training result ,in , , represents the convolution matrix in the sequential feature generation layer, represents the mapping matrix in the driving test scenario generation layer, Represents the scene convolution features in the scene feature extraction layer.
[0099] Optionally, in step S5, generating a driving test scenario using a test scenario generation model includes:
[0100] The test scenario generation model obtained by solving the problem is used to generate a driving test scenario, wherein the generation process of the driving test scenario is as follows:
[0101] S51: The input layer in the generation module receives the vehicle driving trajectory data H;
[0102] S52: The sequential feature generation layer extracts the sequential trajectory features of each segment of vehicle trajectory and road trajectory based on the vehicle trajectory data H, where The corresponding sequential trajectory characteristics are:
[0103] ;
[0104] in:
[0105] express The corresponding sequential trajectory characteristics;
[0106] Represents the convolution matrix in the sequential feature generation layer;
[0107] S53: The driving test scenario generation layer maps the sequential trajectory features into driving test scenarios, where the sequential trajectory features The corresponding driving test scenarios are:
[0108] ;
[0109] in:
[0110] Sequential trajectory features Corresponding driving test scenarios;
[0111] Represents the mapping matrix in the driving test scenario generation layer;
[0112] Represents a pooling operation;
[0113] Represents an activation function; in the embodiment of the present invention, the selected activation function is the Softmax function.
[0114] In order to solve the above problem, the present invention provides an electronic device, the electronic device comprising:
[0115] A memory storing at least one instruction;
[0116] A communication interface for realizing electronic device communication; and a processor for executing instructions stored in the memory to realize the above-mentioned method for generating intelligent driving test scenarios based on big data analysis.
[0117] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned intelligent driving test scenario generation method based on big data analysis.
[0118] Compared with the prior art, the present invention proposes a method for generating intelligent driving test scenarios based on big data analysis, which has the following advantages:
[0119] First, this scheme uses a camera to collect a bird's-eye view of the vehicle while it is driving. Based on the gradient value and gradient direction of the pixels in the image and the gradient change information of the adjacent images, the edge pixels in the driving scene image are obtained, and the pixel coordinates are mapped to the world coordinate system. The trajectory pixels representing the vehicle's driving trajectory and road trajectory are extracted from the edge pixels, realizing lightweight road trajectory extraction based on the camera.
[0120] At the same time, this scheme constructs a test scenario generation model, in which the generation module is used to generate driving test scenarios, and the testing module is used to perform driving safety tests on the generated driving test scenarios, and optimize the model parameters to maximize driving safety. In the optimization process, the nonlinear iteration weights and training objective function value weights are integrated to perform multi-condition iteration on the model parameters. The iteration weights promote global search in the early iteration and local search in the late iteration. A multi-condition iteration method based on random individuals and optimal individuals is adopted to expand the search range, which is helpful to obtain the optimal model parameters and improve the driving safety of the generated driving test scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0121] Figure 1A schematic diagram of a flow chart of a method for generating intelligent driving test scenarios based on big data analysis provided by one embodiment of the present invention;
[0122] Figure 2 A schematic diagram of the structure of an electronic device for implementing a method for generating intelligent driving test scenarios based on big data analysis provided by an embodiment of the present invention;
[0123] In the figure: 1 electronic device, 10 processor, 11 memory, 12 program, 13 communication interface;
[0124] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0125] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0126] The embodiment of the present application provides a method for generating intelligent driving test scenarios based on big data analysis. The execution subject of the method for generating intelligent driving test scenarios based on big data analysis includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the method for generating intelligent driving test scenarios based on big data analysis can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0127] S1: collecting driving scene image data and performing preprocessing to obtain preprocessed driving scene image data.
[0128] The step S1 includes collecting vehicle driving scene image data and preprocessing the data, including:
[0129] Collect vehicle driving scene image data, where the vehicle driving scene image is a top view of the vehicle during driving, and the collected vehicle driving scene image data is:
[0130] ;
[0131] in:
[0132] Indicates the collected vehicle driving scene image data;
[0133] Represents N consecutive vehicle driving scene images;
[0134] Vehicle driving scene image data Preprocessing is performed, where the vehicle driving scene image The preprocessing process is:
[0135] S11: Vehicle driving scene image Any pixel in the grayscale processing, where the vehicle driving scene image The pixel at row x and column y The grayscale processing formula is:
[0136] ;
[0137] in:
[0138] In order, it represents pixels Color values in R, G, B color channels;
[0139] Represents pixels Gray value of
[0140] S12: Calculate and obtain the vehicle driving scene image The corresponding gradient image :
[0141] ;
[0142] ;
[0143] in:
[0144] Represents pixels The gradient value of the vehicle driving scene image, X represents the number of pixel rows, Y represents the number of pixel columns of the vehicle driving scene image, , ;
[0145] In matrix form with X rows and Y columns;
[0146] S13: Gradient image The pixel coordinates in are transformed into the world coordinate system, where the gradient image Medium pixel coordinates The representation in the world coordinate system is , Represents pixel coordinates Height in world coordinates;
[0147] S14: Constructing a pre-processed vehicle driving scene image :
[0148] ;
[0149] ;
[0150] in:
[0151] Represents the vehicle driving scene image The world coordinate position matrix corresponding to the pixel coordinates in .
[0152] In step S13, the gradient image The pixel coordinates in are converted to the world coordinate system, including:
[0153] S131: Gradient image The pixel coordinates in are converted to the camera coordinate system, where the pixel coordinates The conversion result is:
[0154] ;
[0155] in:
[0156] Represents pixel coordinates The transformation result in the camera coordinate system;
[0157] , represents the internal parameters of the camera, Indicates the length of the horizontal focal length, Indicates the length of the vertical focal length, Indicates the horizontal coordinate of the center of the camera's photosensitive plate in the pixel coordinate system. Indicates the vertical coordinate of the center of the camera's photosensitive plate in the pixel coordinate system;
[0158] Represents the gradient image The depth information of the pixel in the xth row and yth column in the camera;
[0159] S132: Convert the coordinates in the camera coordinate system to the world coordinate system, where The conversion formula is:
[0160] ;
[0161] in:
[0162] represents the rotation matrix of the camera, Represents the camera's translation vector;
[0163] Representing coordinates The result of the transformation in the world coordinate system.
[0164] S2: Extracting the trajectory of the preprocessed driving scene image data to obtain vehicle driving trajectory data.
[0165] In the step S2, the trajectory extraction is performed on the pre-processed driving scene image data, including:
[0166] The trajectory is extracted from the preprocessed driving scene image data, where the preprocessed vehicle driving scene image The trajectory extraction process is as follows:
[0167] S21: Calculate the pre-processed vehicle driving scene image The key information of any pixel in The pixel at row x and column y The key information is:
[0168] ;
[0169] ;
[0170] in:
[0171] Represents pixels Key information:
[0172] Represents pixels The gradient direction of Represents the vehicle driving scene image In pixels Starting from The pixel values of the two pixels closest to each other are obtained by traversal. Represents the two pixels to pixels obtained by traversal distance;
[0173] S22: Mark pixels with key information higher than a preset threshold as edge pixels, where the edge pixels represent the preprocessed vehicle driving scene image. The outline of the vehicle and the outline of the road;
[0174] S23: Extract pixels whose height value is the ground height in the world coordinate system from edge pixels as the preprocessed vehicle driving scene image , and extract the neighboring pixels of the trajectory pixels, and mark the pixels whose gradient values are higher than the preset gradient threshold as trajectory pixels;
[0175] S24: taking the coordinates corresponding to the trajectory pixels as the pre-processed vehicle driving scene image The trajectory coordinates in the image constitute the pre-processed vehicle driving scene image. trajectories;
[0176] Integrate the trajectories of all pre-processed vehicle driving scene images into vehicle driving trajectory data .
[0177] The vehicle driving trajectory data for:
[0178] ;
[0179] in:
[0180] It represents the vehicle driving trajectory and road trajectory corresponding to the n-th vehicle driving scene image, that is, the vehicle driving trajectory and road trajectory of the n-th driving section.
[0181] S3: Construct a test scenario generation model, wherein the test scenario generation model takes the extracted vehicle driving trajectory data as input and takes the generated driving test scenario as output.
[0182] The test scenario generation model is constructed in step S3, including:
[0183] Constructing a test scenario generation model, wherein the test scenario generation model takes the extracted vehicle driving trajectory data as input and the generated driving test scenario as output, wherein sequential generation is the implementation method of the test scenario generation model; the test scenario generation model includes a generation module and a test module, the generation module is used to generate a driving test scenario, and the test module is used to perform a driving safety test on the generated driving test scenario;
[0184] The generation module includes an input layer, a sequential feature generation layer, and a driving test scenario generation layer. The input layer is used to receive vehicle driving trajectory data. The sequential feature generation layer is used to extract sequential trajectory features based on trajectory data of continuous driving sections. The driving test scenario generation layer is used to map the sequential trajectory features into driving test scenarios, wherein the driving test scenarios are driving environment conditions during driving, including the number of vehicles on the road and the speed of the vehicles.
[0185] The test module includes an input layer, a scene feature extraction layer and a driving safety calculation layer. The input layer is used to receive the driving test scene, the scene feature extraction layer is used to extract scene convolution features from the driving test scene, and the driving safety calculation layer is used to convert the scene convolution features into driving safety.
[0186] S4: Optimize and solve the model parameters of the constructed test scenario generation model.
[0187] The step S4 optimizes and solves the constructed test scenario generation model, including:
[0188] The constructed test scenario generation model is optimized and solved, and the optimization and solving process is as follows:
[0189] S41: Initialize the model parameters of the test scenario generation model ,in Indicates the parameters of the generated module. Represents the parameters of the test module;
[0190] S42: Construct the training objective function of the test scene generation model:
[0191] ;
[0192] in:
[0193] Represents the training objective function of the test scene generation model, the training objective function Taking the model parameters as input, the driving safety of the generated driving test scenario is used as the training objective function value corresponding to the model parameters;
[0194] Indicates that based on parameters The generated modules are constructed. Indicates that based on parameters The test modules constructed;
[0195] Indicates the trajectory based on the vehicle and the road The generated driving test scenarios;
[0196] Represents a driving test scenario Driving safety;
[0197] S43: Model parameters The diffusion is U groups of slime mold individuals, where the diffusion formula of the u-th group of slime mold individuals is:
[0198] ;
[0199] in:
[0200] Indicates control parameters;
[0201] represents the L1 norm;
[0202] represents the parameter vector threshold;
[0203] Represents a vector whose elements are all 1 and whose length is consistent with the model parameters;
[0204] represents the uth group of slime mold individuals obtained by diffusion;
[0205] S44: Set the current iteration number of the slime mold individual to t, the initial value of t is 0, and the maximum iteration number is Max. Then the t-th iteration result of the u-th group of slime mold individuals is ;
[0206] S45: Iterate the slime mold individuals, where the iteration formula for the u-th group of slime mold individuals is:
[0207] ;
[0208] ;
[0209] ;
[0210] in:
[0211] It means that the U group of slime mold individuals obtained in the tth iteration are used as the input value of the training objective function, so that the training objective function reaches the largest slime mold individual. express The corresponding training objective function value is Indicates the training objective function value corresponding to the slime mold individual that makes the training objective function reach the minimum;
[0212] Represents slime mold individuals The objective function value weight of
[0213] c represents the weight factor;
[0214] represents the iteration weight of the tth iteration;
[0215] represents an exponential function with a natural constant as base;
[0216] Represents a random number between -1 and 1;
[0217] represents any two groups of slime mold individuals among the U groups of slime mold individuals obtained in the t-th iteration;
[0218] S46: Let t = t + 1, return to step S45, until the maximum number of iterations is reached, and select the slime mold individual with the highest training function value from the U group of slime mold individuals obtained in the final iteration as the model parameter training result ,in , , represents the convolution matrix in the sequential feature generation layer, represents the mapping matrix in the driving test scenario generation layer, Represents the scene convolution features in the scene feature extraction layer.
[0219] S5: Generate a driving test scenario using the solved test scenario generation model.
[0220] In step S5, the driving test scenario is generated by using the test scenario generation model, including:
[0221] The test scenario generation model obtained by solving the problem is used to generate a driving test scenario, wherein the generation process of the driving test scenario is as follows:
[0222] S51: The input layer in the generation module receives the vehicle driving trajectory data H;
[0223] S52: The sequential feature generation layer extracts the sequential trajectory features of each segment of vehicle trajectory and road trajectory based on the vehicle trajectory data H, where The corresponding sequential trajectory characteristics are:
[0224] ;
[0225] in:
[0226] express The corresponding sequential trajectory characteristics;
[0227] Represents the convolution matrix in the sequential feature generation layer;
[0228] S53: The driving test scenario generation layer maps the sequential trajectory features into driving test scenarios, where the sequential trajectory features The corresponding driving test scenarios are:
[0229] ;
[0230] in:
[0231] Sequential trajectory features Corresponding driving test scenarios;
[0232] Represents the mapping matrix in the driving test scenario generation layer;
[0233] Represents a pooling operation;
[0234] Represents an activation function; in the embodiment of the present invention, the selected activation function is the Softmax function.
[0235] like Figure 2, is a schematic diagram of the structure of an electronic device for implementing a method for generating intelligent driving test scenarios based on big data analysis provided by an embodiment of the present invention.
[0236] The electronic device 1 may include a processor 10 , a memory 11 , a communication interface 13 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10 , such as a program 12 .
[0237] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 may not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the program 12, etc., but also be used to temporarily store data that has been output or is to be output.
[0238] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (such as the program 12 for realizing intelligent driving test scene generation based on big data analysis), and calls data stored in the memory 11, so as to execute various functions of the electronic device 1 and process data.
[0239] The communication interface 13 may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices, and to achieve connection and communication between internal components of the electronic device.
[0240] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0241] Figure 2 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 2 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0242] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0243] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.
[0244] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0245] The program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:
[0246] Collecting driving scene image data and preprocessing it to obtain preprocessed driving scene image data;
[0247] Extracting the trajectory of the preprocessed driving scene image data to obtain vehicle driving trajectory data;
[0248] Build a test scenario generation model;
[0249] Optimize and solve the model parameters of the constructed test scenario generation model;
[0250] The solved test scenario generation model is used to generate a driving test scenario.
[0251] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figure 1 to Figure 2 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0252] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0253] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0254] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for generating intelligent driving test scenarios based on big data analysis, characterized in that: The method comprises: S1: collecting driving scene image data and preprocessing it to obtain preprocessed driving scene image data; S2: Extracting the trajectory of the preprocessed driving scene image data to obtain vehicle driving trajectory data; S3: constructing a test scenario generation model, wherein the test scenario generation model takes the extracted vehicle driving trajectory data as input and takes the generated driving test scenario as output; The test scenario generation model takes the extracted vehicle driving trajectory data as input and takes the generated driving test scenario as output; the test scenario generation model includes a generation module and a test module, the generation module is used to generate the driving test scenario, and the test module is used to perform a driving safety test on the generated driving test scenario; The generation module includes an input layer, a sequential feature generation layer, and a driving test scenario generation layer. The input layer is used to receive vehicle driving trajectory data. The sequential feature generation layer is used to extract sequential trajectory features based on trajectory data of continuous driving sections. The driving test scenario generation layer is used to map the sequential trajectory features into driving test scenarios, wherein the driving test scenarios are driving environment conditions during driving, including the number of vehicles on the road and the speed of the vehicles. The test module includes an input layer, a scene feature extraction layer, and a driving safety calculation layer. The input layer is used to receive the driving test scene, the scene feature extraction layer is used to extract scene convolution features from the driving test scene, and the driving safety calculation layer is used to convert the scene convolution features into driving safety. S4: Optimize and solve the model parameters of the constructed test scenario generation model; S5: Generate a driving test scenario using the solved test scenario generation model.
2. The method for generating intelligent driving test scenarios based on big data analysis according to claim 1, characterized in that: The step S1 includes collecting vehicle driving scene image data and preprocessing the data, including: Collect vehicle driving scene image data, where the vehicle driving scene image is a top view of the vehicle during driving, and the collected vehicle driving scene image data is: ; in: Indicates the collected vehicle driving scene image data; Represents N consecutive vehicle driving scene images; Vehicle driving scene image data Preprocessing is performed, where the vehicle driving scene image The preprocessing process is: S11: Vehicle driving scene image Any pixel in the grayscale processing, where the vehicle driving scene image The pixel at row x and column y The grayscale processing formula is: ; in: In order, it represents pixels Color values in R, G, B color channels; Represents pixels Gray value of S12: Calculate and obtain the vehicle driving scene image The corresponding gradient image : ; ; in: Represents pixels The gradient value of the vehicle driving scene image, X represents the number of pixel rows, Y represents the number of pixel columns of the vehicle driving scene image, , ; In matrix form with X rows and Y columns; S13: Gradient image The pixel coordinates in are transformed into the world coordinate system, where the gradient image Medium pixel coordinates The representation in the world coordinate system is , Represents pixel coordinates Height in world coordinates; S14: Constructing a pre-processed vehicle driving scene image : ; ; in: Represents the vehicle driving scene image The world coordinate position matrix corresponding to the pixel coordinates in .
3. The method for generating intelligent driving test scenarios based on big data analysis according to claim 2, characterized in that: In step S13, the gradient image The pixel coordinates in are converted to the world coordinate system, including: S131: Gradient image The pixel coordinates in are converted to the camera coordinate system, where the pixel coordinates The conversion result is: ; in: Represents pixel coordinates The transformation result in the camera coordinate system; , represents the internal parameters of the camera, Indicates the length of the horizontal focal length, Indicates the length of the vertical focal length, Indicates the horizontal coordinate of the center of the camera's photosensitive plate in the pixel coordinate system. Indicates the vertical coordinate of the center of the camera's photosensitive plate in the pixel coordinate system; Represents the gradient image The depth information of the pixel in the xth row and yth column in the camera; S132: Convert the coordinates in the camera coordinate system to the world coordinate system, where The conversion formula is: ; in: represents the rotation matrix of the camera, Represents the camera's translation vector; Representing coordinates The result of the transformation in the world coordinate system.
4. The method for generating intelligent driving test scenarios based on big data analysis according to claim 1, characterized in that: In the step S2, the trajectory extraction is performed on the pre-processed driving scene image data, including: The trajectory is extracted from the preprocessed driving scene image data, where the preprocessed vehicle driving scene image The trajectory extraction process is as follows: S21: Calculate the pre-processed vehicle driving scene image The key information of any pixel in The pixel at row x and column y The key information is: ; ; in: Represents pixels Key information: Represents pixels The gradient direction of Represents the vehicle driving scene image In pixels Starting from the direction The pixel values of the two pixels closest to each other are obtained by traversal. Represents the two pixels to pixels obtained by traversal distance; S22: Mark pixels with key information higher than a preset threshold as edge pixels, where the edge pixels represent the preprocessed vehicle driving scene image. The outline of the vehicle and the outline of the road; S23: Extract pixels whose height value is the ground height in the world coordinate system from edge pixels as the pre-processed vehicle driving scene image , and extract the neighboring pixels of the trajectory pixels, and mark the pixels whose gradient values are higher than the preset gradient threshold as trajectory pixels; S24: taking the coordinates corresponding to the trajectory pixels as the pre-processed vehicle driving scene image The trajectory coordinates in the image constitute the pre-processed vehicle driving scene image. trajectories; Integrate the trajectories of all pre-processed vehicle driving scene images into vehicle driving trajectory data .
5. The method for generating intelligent driving test scenarios based on big data analysis according to claim 4, characterized in that: The vehicle driving trajectory data for: ; in: It represents the vehicle driving trajectory and road trajectory corresponding to the n-th vehicle driving scene image, that is, the vehicle driving trajectory and road trajectory of the n-th driving section.
6. The method for generating intelligent driving test scenarios based on big data analysis according to claim 5, characterized in that: The step S4 optimizes and solves the constructed test scenario generation model, including: The constructed test scenario generation model is optimized and solved, and the optimization and solving process is as follows: S41: Initialize the model parameters of the test scenario generation model ,in Indicates the parameters of the generated module. Represents the parameters of the test module; S42: Construct the training objective function of the test scene generation model: ; in: Represents the training objective function of the test scene generation model, the training objective function Taking the model parameters as input, the driving safety of the generated driving test scenario is used as the training objective function value corresponding to the model parameters; Indicates that based on parameters The generated modules are constructed. Indicates that based on parameters The test modules constructed; Indicates the trajectory based on the vehicle and the road The generated driving test scenarios; Represents a driving test scenario Driving safety; S43: Model parameters The diffusion is U groups of slime mold individuals, where the diffusion formula of the u-th group of slime mold individuals is: ; in: Indicates control parameters; represents the L1 norm; represents the parameter vector threshold; Represents a vector whose elements are all 1 and whose length is consistent with the model parameters; represents the uth group of slime mold individuals obtained by diffusion; S44: Set the current iteration number of the slime mold individual to t, the initial value of t is 0, and the maximum iteration number is Max. Then the t-th iteration result of the u-th group of slime mold individuals is ; S45: Iterate the slime mold individuals; S46: Let t = t + 1, return to step S45, until the maximum number of iterations is reached, and select the slime mold individual with the highest training function value from the U group of slime mold individuals obtained in the final iteration as the model parameter training result ,in , , represents the convolution matrix in the sequential feature generation layer, represents the mapping matrix in the driving test scenario generation layer, Represents the scene convolution features in the scene feature extraction layer.
7. The method for generating intelligent driving test scenarios based on big data analysis according to claim 6, characterized in that: In step S5, the driving test scenario is generated by using the test scenario generation model, including: The test scenario generation model obtained by solving the problem is used to generate a driving test scenario, where the generation process of the driving test scenario is as follows: S51: The input layer in the generation module receives the vehicle driving trajectory data H; S52: The sequential feature generation layer extracts the sequential trajectory features of each segment of vehicle trajectory and road trajectory based on the vehicle trajectory data H, where The corresponding sequential trajectory characteristics are: ; in: express The corresponding sequential trajectory characteristics; Represents the convolution matrix in the sequential feature generation layer; S53: The driving test scenario generation layer maps the sequential trajectory features into driving test scenarios, where the sequential trajectory features The corresponding driving test scenarios are: ; in: Sequential trajectory features Corresponding driving test scenarios; Represents the mapping matrix in the driving test scenario generation layer; Represents a pooling operation; Represents the activation function.
Citation Information
Patent Citations
A virtual driving perception system based on VR technology and a scene generation method thereof
CN109003335A
Method for predicting driving danger scene based on motion contour semantic graph
CN111242015A