Traffic flow data derivation system and data derivation method
Through the traffic flow data derivation system, the deep convolutional generative adversarial network is used to generate data consistent with natural driving scenarios, which solves the problem of insufficient natural data and improves the efficiency and safety of autonomous driving testing, especially in SOTIF scene verification.
Patent Information
- Application Number
- CN202410601757.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-08-27
AI Technical Summary
Natural driving data is limited, making it difficult to meet the testing needs of autonomous vehicles for a large number of known and unknown hazardous scenarios in expected functional safety testing, resulting in high testing efficiency and cost.
Design a traffic flow data derivation system, including a data sampling module, a data generation adversarial network and an evaluation module. It generates labeled derivative data through a deep convolutional adversarial network, and adjusts the weights of the generator and discriminator through the optimization module to generate Traffic flow data consistent with natural driving scenarios.
The generated traffic flow scene data is highly consistent with the characteristics of natural driving scenes, enriches autonomous driving test scenarios, improves the efficiency of expected functional safety testing, and can effectively test known and unknown dangerous scenarios in SOTIF scene verification.
Smart Images

Figure CN118550821A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent driving technology, and in particular to a traffic flow data derivation system and a data derivation method. Background Art
[0002] At present, with the continuous development of the economy, the number of cars is increasing, and people have higher and higher demands for technologies such as assisted driving and autonomous driving. The testing and evaluation of autonomous driving vehicles is an important part of the research and development of autonomous driving technology. Among them, the scenario-based testing method has become an important part of autonomous driving vehicle testing with high testing efficiency, low testing cost and safe testing process. At present, scientific research institutions and scholars at home and abroad have carried out extensive research.
[0003] The data sources of autonomous driving test scenarios mainly come from three parts: real data, simulated data and expert experience. Among them, real data mainly includes natural driving data, accident data and closed vehicle test field test data, which can meet the testing needs of most autonomous driving vehicles. However, due to the limited natural data, in some test scenarios, such as the expected functional safety test, a large number of known dangerous scenarios and unknown dangerous scenarios need to be tested, so natural data cannot meet all test needs. Summary of the invention
[0004] The present invention discloses a traffic flow data derivation system and a data derivation method, which can generate a large amount of derivative data for optimizing automatic driving.
[0005] To achieve the above object, on the one hand, a traffic flow data derivation system is provided, the system comprising: a data sampling module, a data generation adversarial network and an evaluation module;
[0006] The data sampling module samples and preprocesses the driving data set;
[0007] The data generation adversarial network generates labeled derivative data based on the driving dataset;
[0008] The evaluation module evaluates the data generation adversarial network.
[0009] Furthermore, the data generation adversarial network includes: a generator and a discriminator;
[0010] The generator generates sample data given random noise;
[0011] The discriminator outputs the true sample probability according to the generated sample data.
[0012] Furthermore, the system also includes a generative adversarial network optimization module, which optimizes the data generative adversarial network and allocates weights of the generator and the discriminator.
[0013] In order to achieve the above object, on the other hand, a traffic flow data derivation method is provided, characterized in that the specific method is as follows:
[0014] Obtain traffic video dataset and perform preprocessing;
[0015] Classify traffic video datasets according to congestion levels;
[0016] Fill in the vehicle driving status in the traffic video dataset to construct training samples;
[0017] Generate an adversarial network using training sample training data;
[0018] The generator of the data-generating adversarial network generates derived data, and the discriminator of the data-generating adversarial network distinguishes the authenticity of the derived data.
[0019] Furthermore, the traffic video dataset is a highD dataset.
[0020] Furthermore, the average travel speed is used as the classification basis for the traffic video dataset. The specific method is as follows:
[0021] Calculate the average travel speed for roads in a traffic video dataset;
[0022] At a fixed evaluation interval, the average speed of the traffic video dataset and each classification threshold are compared to obtain scene data of different traffic congestion levels;
[0023] The scene data is extracted to obtain a number of scene segments, and the horizontal and vertical coordinate values of the vehicle at each moment are extracted from the scene segments.
[0024] Furthermore, the data generation adversarial network is a deep convolutional generation adversarial network, including a Dense fully connected layer, a linear layer, a convolutional layer, a batch normalization BN layer and an activation function.
[0025] A gated neural unit is added after the discriminator convolutional layer.
[0026] Furthermore, the training sample training data is used to generate an adversarial network. The specific method is as follows:
[0027] Input the training sample into the deep convolutional generative adversarial network, pre-set the generator random noise z, and generate sample data G(z);
[0028] Input the sample data into the discriminator and output the true sample probability as D(x);
[0029] The RMSprop optimizer is used in the training process to evaluate the generated data through the standard deviation of vehicle speed and the root mean square of acceleration.
[0030] Furthermore, the method also includes data generation adversarial network evaluation, and the specific method is as follows:
[0031] Select evaluation indicators for data-generating adversarial networks;
[0032] Assign evaluation weights to each evaluation indicator;
[0033] The method of giving membership function is used to make statistics on the data distribution of evaluation indicators;
[0034] Establish comprehensive indicators for generating traffic flow data.
[0035] Furthermore, the method also includes data generation adversarial network optimization, and the specific method is as follows:
[0036] According to the data distribution of the evaluation index, adjust the weight ratio of the generator and discriminator loss functions.
[0037] Due to the adoption of the above technical solution, the present invention has the following beneficial effects:
[0038] 1. The present invention obtains a training set by selecting a suitable traffic flow scene data set and preprocessing it, and then extracts data features through a neural network to generate a large number of traffic flow scenes that meet the data features. Then, the two indicators of gray correlation and dynamic time warping are selected to evaluate the degree of proximity between the motion state of the model-generated vehicle and the original vehicle. Finally, indicators are selected from a macro perspective to evaluate the generated traffic flow scenes. The results show that the generated traffic flow scenes have a high degree of conformity with the characteristics of natural driving traffic flow scenes.
[0039] 2. The present invention extracts the characteristics of traffic flow in natural driving scenes, and can generate a large number of traffic flow scenes that meet the characteristics of natural driving conditions, which enriches the test scenes when testing autonomous driving vehicles. At the same time, when performing SOTIF scene verification, it can also enrich the testing of SOTIF known dangerous scenes and SOTIF unknown dangerous scenes, which can effectively improve the testing efficiency of expected functional safety and provide a reference for perfecting the construction of expected functional safety test experimental scenes.
[0040] It should be noted that the terms "first", "second" and similar terms used in this article are only for describing the various components in the technical solution, and do not constitute a limitation of the technical solution, nor can they be understood as an indication or suggestion of the importance of the corresponding elements; elements with "first", "second" and similar terms indicate that the corresponding technical solution contains at least one of the element. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solution of the present invention and facilitate further understanding of the technical effects, technical features and purposes of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings. The accompanying drawings constitute an essential part of the specification and are used together with the embodiments of the present invention to illustrate the technical solution of the present invention, but do not constitute a limitation to the present invention.
[0042] The same reference numerals in the accompanying drawings represent the same components, specifically:
[0043] Figure 1 It is a schematic diagram of the process of the present invention.
[0044] Figure 2 Schematic diagram of the process of generating adversarial networks for training data. DETAILED DESCRIPTION
[0045] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. Of course, the specific embodiments described below are only for explaining the technical solutions of the present invention, rather than for limiting the present invention. In addition, the parts described in the embodiments or the accompanying drawings are only examples of the relevant parts of the present invention, rather than the whole of the present invention.
[0046] Embodiment 1:
[0047] A traffic flow data derivation system, comprising: a data sampling module, a data generation adversarial network and an evaluation module;
[0048] The data sampling module samples and preprocesses the driving data set;
[0049] The data generation adversarial network generates labeled derivative data based on the driving dataset;
[0050] The evaluation module evaluates the data generation adversarial network.
[0051] Specifically, the data generation adversarial network includes: a generator and a discriminator;
[0052] The generator generates sample data given random noise;
[0053] The discriminator outputs the true sample probability according to the generated sample data.
[0054] In this embodiment, a generator model is built. The U-net network is used as the main network structure. U-Net includes an encoder and a decoder. The information in the encoder can be directly transmitted to the corresponding layer of the decoder through a jump connection, so that the information is easier to propagate in the network. A generator structure with a shared bottom layer of multiple upper-layer generators is built. The purpose is to extract common information features in the bottom layer, and further subdivide them in multiple upper-layer generators. Each individual generator learns the scene information features of its corresponding category based on the bottom layer.
[0055] Build a discriminator model. In order to alleviate the problem of gradient vanishing in the shallow network, a deep residual network is selected as the main discriminator structure. This allows deep information to take a shortcut to the shallow layer to prevent gradient vanishing. Considering the size of the training parameters, the ResNet-50 network structure is selected and the relevant structural parameters are designed.
[0056] In this embodiment, an auxiliary category classifier is used in the data generation adversarial network to reconstruct the edge information, i.e., the "label", so that the network can obtain more information. The discriminator not only outputs the "true or false" of the generator, but also adds a "category" output.
[0057] Embodiment 2:
[0058] A traffic flow data derivation method, such as Figure 1 As shown, the specific steps are as follows:
[0059] S1. Obtain traffic video dataset and perform preprocessing.
[0060] In step S1, the highD dataset is selected as the dataset of the present invention. The dataset uses a bird's-eye view to record vehicle data, overcoming the limitations of previous traffic data collection. The dataset records the trajectories of more than 100,000 vehicles, including vehicle type, vehicle speed, etc. It has high positioning accuracy and small positioning error. Therefore, this dataset is selected as the data sample of the present invention.
[0061] S2. Classify the traffic video dataset according to the degree of congestion.
[0062] In step S2, the specific classification steps are as follows:
[0063] S21. Use the average travel speed to evaluate traffic congestion and classify the highD dataset according to the road traffic congestion. The expression of the average travel speed is:
[0064]
[0065] S22. Taking 240s as the evaluation time interval, the above data are segmented; on a road with a speed limit of 120km / h, the data are divided into four traffic scenarios according to the speed nodes of 30, 50, and 70, namely, severe congestion, moderate congestion, mild congestion, and smooth traffic, and the number of scenarios with different traffic congestion degrees is obtained.
[0066] S23, the classified data is processed, and 128 frames of data are used as a unit, and 0.2s is used as a time interval to extract the classified data, extract a number of scene segments, and extract the horizontal and vertical coordinate values of the vehicle at each moment from the scene segments. The sample data size is 128*128*4.
[0067] S3. Fill in the vehicle driving status in the traffic video dataset to construct training samples.
[0068] In step S3, for vehicles that enter the monitoring area after a period of monitoring, the missing time is filled with the position of entering the monitoring area, and for vehicles that leave the monitoring area during the monitoring time, the missing time is filled with the driving status of leaving the area. The data is normalized to facilitate subsequent training.
[0069] S4, Generate adversarial network with training sample training data, such as Figure 2 As shown, the specific steps are as follows:
[0070] S41. Establish a generator and discriminator consisting of a Dense fully connected layer, a linear layer, a convolutional layer, a batch normalization BN layer and an activation function. At the same time, a gated neural unit is added after the discriminator convolutional layer, and a dropout layer is added to prevent overfitting problems.
[0071] S42. The training sample is input into the generative adversarial network established by the generator and the discriminator for data generation. The generator random noise z is given in advance to generate sample data G(z); the sample data is input into the discriminator, and the probability of outputting the real sample is D(x). After continuous training of the generator model and the discriminator model, the discriminator's identification ability becomes stronger and stronger. At the same time, the generator's ability to generate data continues to improve. The generated data gradually approaches the real sample so that it can be identified by the discriminator, so that the generated sample reaches the optimal solution. Adversarial training can be regarded as a process of minimizing the loss function of the generator and the discriminator. The loss function can be expressed as:
[0072]
[0073] If and only if p data =p z When , the function has an optimal solution, and the training is stopped at this time. The distribution of data samples generated by the generator learns the distribution of real samples.
[0074] S43. During the training process, the discriminator and the adversarial network both use the RMSprop optimizer. The learning rate of the discriminator is set to 1e-4, the decay rate is set to 2e-6, and the learning rate of the adversarial network is set to 4e-4, and the decay rate is set to 1e-8, which can make the training more stable. In order to avoid the discriminator dominating the generator, the dropout ratio of the discriminator is set to 0.6. In order to avoid the problem of gradient disappearance, the a value of the LeakyRelu activation function is set to 0.2. The training results are similar to the vehicles selected in the original data. The motion status of some vehicles is plotted using MATLAB.
[0075] S5. Evaluate the rationality of the data generation adversarial network. The specific steps are as follows:
[0076] S51. Select indicators to evaluate the generated data
[0077] The speed standard deviation indicates the degree of dispersion of a single vehicle relative to the average speed. The larger the speed standard deviation, the more chaotic the traffic scene is and the worse the safety is. The speed standard deviation calculation formula is:
[0078]
[0079] Acceleration can reflect the driving state of vehicles in traffic flow scenes. As one of the important indicators reflecting the state of vehicles, the root mean square of acceleration is used as an indicator to evaluate the change of vehicle driving state. The calculation formula of the root mean square of acceleration is:
[0080]
[0081] The average traffic flow of a road section refers to the total number of vehicles passing through a fixed area, which usually reflects the degree of traffic congestion. The calculation formula for the average traffic flow of a road section is:
[0082]
[0083] The average speed of a road section is the average speed of all vehicles passing through the detection section within the detection time. It is an important parameter for measuring traffic flow status. The calculation formula for the average speed of a road section is as follows:
[0084]
[0085] The completeness of the number of frames of vehicle operation within the detection interval. A vehicle passing through a certain detection time may completely exit the detection section, or may exit too early or enter the detection section too late. This is also closely related to the traffic status of the section. The calculation formula is as follows:
[0086]
[0087] S52. Allocation of indicator weights
[0088] After determining the primary indicators, it is necessary to determine the weight distribution of each indicator. The larger the weight, the more information it can provide, and the more it can determine the score of the model. Determining the weight is the process of finding the maximum amount of information based on the primary indicators. In order to maximize the amount of information, the more unique the indicator, the greater the weight.
[0089] First, we obtain the indicator data in the original data set and perform positive dimensionless processing on the data. j )Quantitatively measure the amount of information contained in an indicator.
[0090]
[0091]
[0092]
[0093] x ij , x' ij They represent the original data and dimensionless data of the jth indicator in the i-th scenario, respectively. represents the mean value of the jth index, S j is the standard deviation of the j-th indicator.
[0094] Calculate the Spearman correlation coefficient, the Spearman correlation coefficient ρ of the i-th indicator and the j-th indicator ij for:
[0095]
[0096] where d mij It indicates the difference in ranking results after ranking the indicators based on the dimensionless results.
[0097] Calculate the conflict quantification value: the conflict quantification value H between the i-th indicator and other indicators i for:
[0098]
[0099] Calculate the amount of information: The amount of information provided by the i-th indicator is M i :
[0100] M i =C i ×H i
[0101] Calculate indicator weights: The weight of the i-th indicator is:
[0102]
[0103] S53. Establishment of comprehensive indicators for generating traffic flow data
[0104] The data distribution of primary indicators is statistically analyzed by giving membership functions. First, the indicators of the original data set are divided, and the data distribution of the difference between the indicator and the mean of the indicator is statistically analyzed to determine the membership function. The smaller the difference, the higher the score of the sample, and then the data distribution of the original data set is obtained. The generated samples are scored according to the membership function to obtain the data distribution of the generated samples. The proportion of samples in each score interval in each scenario to all samples in the scenario, as well as the proportion of samples in each score interval in all scenarios to the total number of samples, are calculated by the following formula with the distribution probability obtained from the training set to obtain the final_loss consistency evaluation indicator.
[0105]
[0106] train_class i Indicates the distribution probability of training set data, gen_class i Represents the distribution probability of sample data generated by the generative model.
[0107] S6. Optimize data to generate adversarial networks.
[0108] In step S6, the weight of the generator loss function is appropriately increased to improve the learning effect of the generator model, while ensuring that the model will not crash. This measure helps to enhance the generator's learning ability for complex traffic flow scenarios. When the training samples of the generated model begin to show that the consistency index continues to decrease and stabilizes near a fixed value, the trade-off relationship between the generator and discriminator loss functions is determined to optimize the training and generation effects of the model.
[0109] S7. Generate derivative data using data generation adversarial network.
[0110] It should be noted that the above embodiments are only for more clearly illustrating the technical solutions of the present invention. Those skilled in the art will understand that the implementation methods of the present invention are not limited to the above contents, and obvious changes, replacements or substitutions based on the above contents do not exceed the scope of the technical solutions of the present invention; other implementation methods will also fall within the scope of the present invention without departing from the concept of the present invention.
Claims
1. A traffic flow data derivation system, characterized in that: The system includes: a data sampling module, a data generation adversarial network and an evaluation module; The data sampling module samples and preprocesses the driving data set; The data generation adversarial network generates labeled derivative data based on the driving dataset; The evaluation module evaluates the data generation adversarial network.
2. The traffic flow data derivation system according to claim 1, characterized in that: The data generation adversarial network includes: a generator and a discriminator; The generator generates sample data given random noise; The discriminator outputs the true sample probability according to the generated sample data.
3. The traffic flow data derivation system according to claim 2, characterized in that: The system also includes a generative adversarial network optimization module that optimizes the data generative adversarial network and assigns weights to the generator and the discriminator.
4. A traffic flow data derivation method, characterized in that: The specific method is as follows: Obtain traffic video dataset and perform preprocessing; Classify traffic video datasets according to congestion levels; Fill in the vehicle driving status in the traffic video dataset to construct training samples; Generate an adversarial network using training sample training data; The generator of the data-generating adversarial network generates derived data, and the discriminator of the data-generating adversarial network distinguishes the authenticity of the derived data.
5. The traffic flow data derivation method according to claim 4, characterized in that: The traffic video dataset is a highD dataset.
6. The traffic flow data derivation method according to claim 4, characterized in that: For the classification of traffic video dataset, the average travel speed is used as the classification basis. The specific method is as follows: Calculate the average travel speed for roads in a traffic video dataset; At a fixed evaluation interval, the average speed of the traffic video dataset and each classification threshold are compared to obtain scene data of different traffic congestion levels; The scene data is extracted to obtain a number of scene segments, and the horizontal and vertical coordinate values of the vehicle at each moment are extracted from the scene segments.
7. The traffic flow data derivation method according to claim 4, characterized in that: The data generation adversarial network is a deep convolutional generation adversarial network, including a Dense fully connected layer, a linear layer, a convolutional layer, a batch normalization BN layer and an activation function. A gated neural unit is added after the discriminator convolutional layer.
8. The traffic flow data derivation method according to claim 7, characterized in that: The training sample training data generates an adversarial network. The specific method is as follows: Input the training sample into the deep convolutional generative adversarial network, pre-set the generator random noise z, and generate sample data G(z); Input the sample data into the discriminator and output the true sample probability as D(x); The RMSprop optimizer is used in the training process to evaluate the generated data through the standard deviation of vehicle speed and the root mean square of acceleration.
9. The traffic flow data derivation method according to claim 4, characterized in that: The method also includes data generation adversarial network evaluation, the specific method is as follows: Select evaluation indicators for data-generating adversarial networks; Assign evaluation weights to each evaluation indicator; The method of giving membership function is used to make statistics on the data distribution of evaluation indicators; Establish comprehensive indicators for generating traffic flow data.
10. The traffic flow data derivation method according to claim 9, characterized in that: The method also includes data generation adversarial network optimization, the specific method is as follows: According to the data distribution of the evaluation index, adjust the weight ratio of the generator and discriminator loss functions.
Citation Information
Cited By
Car insurance premium determination method and device, computer equipment and readable storage medium
CN119417619A
