Road network traffic flow estimation method based on unmanned aerial vehicle data acquisition and generative adversarial network

Through drones collecting traffic flow data and using Generative Adversarial Network (STWGAN-GP) for data estimation, the problem of unavailable data acquisition and insufficient data volume is solved, and efficient and accurate estimation of traffic flow data under small sample conditions is achieved.

CN120067547APending Publication Date: 2025-05-30NANJING UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510005118.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The prior art cannot cover all research areas when using drones to collect traffic flow data, and the amount of data collected is not enough to support the training of deep learning models, making estimating data under small sample conditions challenging.

Method used

A method for estimating traffic flow data of road network based on drone data acquisition and generative adversarial network (STWGAN-GP) is proposed. Through drone data acquisition, feature extraction and pre-training sample screening are performed, GAN network is built, and the adversarial training of generators and discriminators are used to generate realistic traffic flow data.

Benefits of technology

Through this method, the road network traffic flow data can be effectively estimated, the dependence on training data is reduced, the robustness and estimation accuracy of the model are improved, and it is suitable for traffic flow data estimation under small sample conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120067547A_ABST
    Figure CN120067547A_ABST
Patent Text Reader

Abstract

The invention provides a road network traffic flow data estimation method based on unmanned aerial vehicle data acquisition and a generative adversarial network, and the method comprises the steps: calculating an average value and a standard deviation of traffic flow data of each target road section, screening matched source road section data from open-source traffic flow data, and obtaining a pre-training sample; artificially deleting the pre-training sample to obtain pre-training input data of the generator; constructing a GAN network, inputting pre-training input data into a generator to generate repair data, transmitting the repair data as a negative sample into a discriminator, transmitting a pre-training sample as a positive sample into the discriminator, feeding back a discrimination result of the discriminator to the generator, and training according to the discrimination result to obtain a pre-training model; and on the basis of the pre-training model, artificially deleting a target training sample to obtain input data of a generator, transmitting repair data generated by the generator as a negative sample to a discriminator, transmitting the target training sample as a positive sample to the discriminator, feeding back a discrimination result of the discriminator to the generator, and training to obtain a final generation model. According to the invention, the dependence of the model on training data is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to technologies such as deep learning and traffic data repair, and particularly relates to a method for estimating road network traffic flow data based on drone data collection and a generative adversarial network (STWGAN-GP). Background Art

[0002] Traffic flow data is crucial for intelligent transportation systems. The collection of traffic flow data is generally carried out through roadside devices, such as radar, coils, geomagnetism and other related sensing devices, by detecting the driving state of vehicles to obtain relevant data such as traffic volume and vehicle speed. This type of method has a fixed collection area and is difficult to maintain. Drones have obvious advantages in data collection compared to roadside units. The vision system of drones can collect diverse information, and the flight system can collect different regions according to requirements. However, the data collected by drones cannot cover all research areas, and the amount of data collected cannot support the training of deep learning models. Thus, under the condition of small samples, estimating data is a very challenging task, and it is necessary to design appropriate training methods and model structures to extract spatio-temporal patterns from complex traffic flow data.

[0003] W.Zhang proposed a traffic flow missing data imputation model (SA-GAIN) that combines self-attention mechanism, autoencoder and generative adversarial network. The introduction of the self-attention mechanism helps the model effectively capture the correlation between sensors with spatial distributions at different time points. Kazemi and Meidani adopted the WGAN-GP network in the recovery model, replacing weight clipping with gradient penalty to further stabilize network training. However, GAN-based estimation models require a large amount of data support during training. Summary of the Invention

[0004] The purpose of the present invention is to propose a method for estimating road network traffic flow data based on drone data collection and a generative adversarial network.

[0005] The technical solution for achieving the purpose of the present invention is as follows: A method for estimating road network traffic flow data based on drone data collection and a generative adversarial network, comprising the following steps:

[0006] Step 1, determine the target road network to be studied, and use a drone to collect traffic flow data in the road network area to obtain target training samples;

[0007] Step 2, extract features from the traffic flow data collected by the drone, calculate the average value and standard deviation of the traffic flow data of each target road section, screen and match the source road section data on the open-source traffic flow data, and randomly combine them according to the arrangement of the target road sections in the adjacency matrix to obtain pre-training samples;

[0008] Step 3: According to the UAV acquisition mode, artificially missing the pre-training samples, retaining the data size of the UAV's one-time acquisition, and obtaining the pre-training input data for the generator;

[0009] Step 4: Construct a GAN network, which consists of two parts: a generator and a discriminator. The generator is composed of multiple spatio-temporal blocks. A fully connected layer is set after multiple spatio-temporal blocks in the discriminator. The spatio-temporal block uses a spatio-temporal block composed of a multi-head attention mechanism and a one-dimensional convolutional block to learn the input data, and additional weights are added to the attention mechanism to assist the network in learning. After the pre-training input data is input into the generator, the repaired data is generated as a negative sample and fed into the discriminator. At the same time, the pre-training samples are fed into the discriminator as positive samples, and the discrimination result of the discriminator is fed back to the generator, and thus a pre-training model is obtained through training;

[0010] Step 5: On the basis of the pre-training model, artificially missing the target training samples, retaining the data size of the UAV's one-time acquisition, obtaining the input data for the generator, feeding the repaired data generated by the generator into the discriminator as a negative sample, feeding the target training samples into the discriminator as positive samples, and feeding the discrimination result of the discriminator back to the generator to train and obtain the final generation model;

[0011] Step 6: Obtain the traffic flow of the target road network to be estimated from the generator of the final generation model.

[0012] Further, in Step 1, determine the target road network to be studied, and use a UAV to collect traffic flow data in the road network area to obtain target training samples. The specific method is as follows:

[0013] Step 1.1: Determine the target road network to be studied; there are N target road segments in the target road network, and the number of time nodes required for estimating the road network traffic flow data is T. The adjacency matrix A of the target road network = [a jk , which is used to describe the connection relationship between road segments in the target road network, where a jk is the element in the j-th column of the k-th row of the adjacency matrix, and this value is calculated by the following equation:

[0014]

[0015] Step 1.2: Use a UAV to collect traffic flow data of the target road network. The number of road segments collected by the UAV is n, n < N, the number of time nodes is t, t < T, and the time node interval for data collection is 5 minutes. By collecting multiple times on different target road segments, target traffic flow data of N road segments and T t time nodes are obtained, and T t > T;

[0016] Step 1.3, slide a window of size N*T on the time node axis of the target traffic flow data to obtain the target training samples.

[0017] Further, in step two, perform feature extraction on the traffic flow data collected by the drone, calculate the average value and standard deviation of the traffic flow data of each target section, screen the matching source section data from the open-source traffic flow data, and randomly combine them according to the arrangement of the target sections in the adjacency matrix to obtain the pre-training samples. The specific method is as follows:

[0018] Step 2.1, perform feature extraction on the target traffic flow data, calculate the average value and standard deviation of the traffic flow data of each target section as the target section features;

[0019] Step 2.2, download the open-source traffic flow data from the Internet and make it into source traffic flow data of N s source sections and T s time nodes, where N s >> N, T s >> T;

[0020] Step 2.3, take the average value in the target section features as the benchmark, and the standard deviation as the size of the upper and lower floating intervals as the matching threshold, calculate the average value of the traffic flow data of the T time nodes connected to the source section. If it is within the threshold range, it is recorded as the matching source section data. Finally, a large number of matching source section data corresponding to each target section are obtained;

[0021] Step 2.4, randomly combine the matching source section data corresponding to each target section according to the arrangement of the target sections in the adjacency matrix to obtain a large number of pre-training samples of size N sections and T time nodes.

[0022] Further, in step four, construct a GAN network. The GAN network includes two parts: a generator and a discriminator. The generator consists of multiple spatio-temporal blocks. The discriminator sets a fully connected layer after multiple spatio-temporal blocks. The spatio-temporal block uses a spatio-temporal block composed of a multi-head attention mechanism and a one-dimensional convolutional block to learn the input data, and adds additional weights to the attention mechanism to assist the network learning. After the pre-training input data is input into the generator, the repaired data is generated as a negative sample and fed into the discriminator. At the same time, the pre-training samples are fed into the discriminator as positive samples, and the discrimination result of the discriminator is fed back to the generator. Based on this, a pre-training model is obtained, where:

[0023] The generator loss function L G consists of two parts. One part comes from the discrimination result of the discriminator on the repaired data of the generator, and the other is the mean absolute error, i.e., MSE, between the repaired data of the generator and the pre-training samples. The formula is as follows

[0024]

[0025] m padding is the pre - trained input data, G(·) is the repaired data of the generator, and D(·) is the discrimination result of the discriminator. is the pre - trained sample, P M represents the distribution of the repaired data of the generator;

[0026] The discriminator loss function L D includes two parts. One part comes from the discrimination results of the pre - trained samples and the repaired data of the generator, and the other part comes from the gradient penalty. The formula is as follows

[0027]

[0028] is a random linear interpolation sample between the pre - trained sample and the repaired data of the generator, λ is the weight of the gradient penalty term, is the gradient of the discriminator for the interpolation sample, is the distribution of the pre - trained sample.

[0029] Furthermore, in step four, construct a GAN network. The GAN network includes two parts: a generator and a discriminator. The generator consists of multiple spatio - temporal blocks, and a fully - connected layer is set after the multiple spatio - temporal blocks in the discriminator. The spatio - temporal block uses a spatio - temporal block composed of a multi - head attention mechanism and a one - dimensional convolutional block to learn the input data, and additional weights are added to the attention mechanism to assist the network learning. After the pre - trained input data is input into the generator, the repaired data is generated as a negative sample and passed into the discriminator. At the same time, the pre - trained sample is passed into the discriminator as a positive sample, and the discrimination result of the discriminator is fed back to the generator. Based on this, a pre - trained model is obtained, where: The spatio - temporal block is composed of a multi - head attention mechanism module, a residual connection and a layer normalization module, a one - dimensional convolutional block, a residual connection and a layer normalization module in sequence. Specifically:

[0030] (1) Multi - head attention mechanism module

[0031] Add additional weights to the attention weights. The additional weights consist of three parts: traffic flow weight, distance weight, and center weight, and are calculated from the target traffic flow data and the adjacency matrix A;

[0032] The average value of the traffic flow data of each target road segment The ratio to the overall average value, and is used as the traffic flow weight flow_weight through normalization. The calculation formula is as follows

[0033]

[0034] The reciprocal of the sum of the shortest distances of each target road segment on the adjacency matrix is used as the distance weight dist_weight after normalization. The calculation formula is as follows

[0035]

[0036] dist j,k represents the shortest path length connecting road segment j and road segment k on the adjacency matrix;

[0037] The number of road segments adjacent to each target road segment is used as the central weight deg_weight after normalization. The calculation formula is as follows;

[0038] deg_weight = softmax(deg(A))

[0039] deg: Add the adjacency matrix row by row;

[0040] (2) One-dimensional convolutional block

[0041] A one-dimensional convolutional block is constructed by alternately using three one-dimensional convolutions and three max poolings;

[0042] (2) Residual connection and layer normalization module

[0043] The residual connection and layer normalization module is used to process the outputs of the multi-head attention mechanism and the one-dimensional convolutional block. The residual connection first adds the input and output of the multi-head attention mechanism or the one-dimensional convolutional block to obtain the residual connection output, and then performs layer normalization on the residual connection output.

[0044] Furthermore, in step four, a GAN network is constructed. The GAN network includes two parts: a generator and a discriminator. The generator consists of multiple spatio-temporal blocks. A fully connected layer is set after multiple spatio-temporal blocks in the discriminator. The spatio-temporal block uses the spatio-temporal block composed of the multi-head attention mechanism and the one-dimensional convolutional block to learn the input data, and adds additional weights to the attention mechanism to assist the network in learning. The pre-trained input data is input into the generator to generate repaired data as negative samples and sent into the discriminator. At the same time, the pre-trained samples are sent into the discriminator as positive samples, and the discrimination result of the discriminator is fed back to the generator. Based on this, a pre-trained model is obtained, where:

[0045] In the model training stage, the Adam gradient descent algorithm is used for parameter optimization and learning rate adjustment. All weights are initialized using Xavier uniform initialization; the batch size of the pre-trained input data is set to 32; ReLU is used as the activation function; three iteration cycles are used as the stopping condition for model training.

[0046] Furthermore, in step six, the traffic flow of the target road network to be estimated is obtained from the generator of the final generation model. The specific method is as follows:

[0047] The traffic flow data of size n*t collected by the drone is expanded to N*T size by padding with 0s and input into the final generation model, and the generator outputs the estimated traffic flow of the target road network.

[0048] A road network traffic flow data estimation system based on drone data collection and generative adversarial network implements the above-mentioned road network traffic flow data estimation method based on drone data collection and generative adversarial network, realizes the road network traffic flow data estimation based on drone data collection and generative adversarial network, and is divided into six modules, which respectively execute steps one to six.

[0049] A computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the above-mentioned road network traffic flow data estimation method based on drone data collection and generative adversarial network, and realizes the road network traffic flow data estimation based on drone data collection and generative adversarial network.

[0050] A computer-readable storage medium stores a computer program thereon. When the computer program is executed by a processor, it implements the above-mentioned road network traffic flow data estimation method based on drone data collection and generative adversarial network, and realizes the road network traffic flow data estimation based on drone data collection and generative adversarial network.

[0051] Compared with the prior art, the present invention has the following remarkable advantages: 1) Using a generative adversarial network to estimate missing traffic flow data: Using a deep learning model to learn the dependencies between traffic flow data during training without setting hypothesis conditions for traffic flow data; Using a multi-head attention mechanism to extract spatial information and a one-dimensional convolutional block to extract temporal information. The convolutional block can process temporal information in parallel, improving the model processing speed; Using the adversarial training of the generator and discriminator to enable the generator to generate realistic traffic flow data. 2) Introducing model fine-tuning in the model training stage: By screening the obtained pre-trained traffic flow data, the distribution distance between the pre-trained traffic flow data and the target traffic flow data is effectively reduced, reducing the model's dependence on training data and improving the efficiency of fine-tuning. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a flowchart of the road network traffic flow data estimation method based on drone data collection and generative adversarial network of the present invention.

[0053] Figure 2 It is a structure diagram of a multi-head attention.

[0054] Figure 3 It is a structure diagram of a one-dimensional convolutional block.

[0055] Figure 4 It is a spatio-temporal block structure diagram.

[0056] Figure 5 It is a GAN network structure diagram.

[0057] Figure 6 It is a result comparison diagram of the estimation model proposed by the present invention and several other estimation models. Detailed implementation manners

[0058] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0059] As Figure 1 shown, a road network traffic flow data estimation method based on drone data collection and generative adversarial network uses deep learning methods under the realistic conditions collected by drones, and uses adversarial neural networks to learn the distribution characteristics of traffic data. The spatio-temporal features of traffic flow data are extracted by means of a spatio-temporal block composed of a one-dimensional convolutional block and a multi-head attention mechanism, and model fine-tuning is introduced in the model training stage to solve the problem of scarce data collected by drones. Finally, the generator estimates the missing data into complete data. The method includes the following steps:

[0060] Step 1: Determine the target road network to be studied. There are N target sections in the target road network, the number of time nodes required for estimating the road network traffic flow data is T, and the target road network adjacency matrix A = [a jk , which is used to describe the connection relationship between sections in the target road network, where a jk is the element in the j-th column of the k-th row of the adjacency matrix, and this value is calculated by the following equation.

[0061]

[0062] Step 2: Use drones to collect traffic flow data of the target road network. The number of sections collected by drones is n, n < N, the number of time nodes is t, t < T, and the time node interval for data collection is 5 minutes. By collecting multiple times on different target sections, N sections and T t time nodes of target traffic flow data can be obtained, and T t > T.

[0063] Step 3: Use a window of size N*T to slide on the time node axis of the target traffic flow data, so as to obtain a small number of target training samples.

[0064] Step 4: Extract features from the target traffic flow data, and calculate the average value and standard deviation of the traffic flow data of each target road section in the target traffic flow data as the target road section features.

[0065] Step 5: Download a large number of open-source traffic flow data from the Internet and make them into source traffic flow data of N s source road sections and T s time nodes. Among them, N s >> N, T s >> T. Taking the average value in the target road section features as the benchmark and the standard deviation as the size of the upper and lower floating intervals as the matching threshold, calculate the average value of the traffic flow data of the source road section at T time nodes. If it is within the threshold range, it is recorded as the matching source road section data. Finally, a large number of matching source road section data corresponding to each target road section can be obtained.

[0066] Step 6: Randomly combine the matching source road section data corresponding to each target road section according to the arrangement of the target road sections in the adjacency matrix to obtain a large number of pre-training samples of size N road sections and T time nodes.

[0067] Step 7: Artificially make the pre-training samples missing, set the missing part to zero, and retain the data of size n * t, that is, the data size collected by the drone at one time, to obtain the pre-training input data for the input generator.

[0068] Step 8: Construct a GAN network. As Figure 5 shown, the network mainly consists of a generator and a discriminator. The repaired data generated by the generator is used as a negative sample and fed into the discriminator, and the pre-training samples are used as positive samples and fed into the discriminator. The discrimination result of the discriminator is fed back to the generator to help the generator train. The loss functions of the two models restrict each other, so that the two models continuously learn and improve in the game. Among them, the generator loss consists of two parts. One part comes from the discrimination result of the discriminator on the repaired data of the generator, and the other is the MSE (mean squared error) between the repaired data of the generator and the pre-training samples. The formula is as follows

[0069]

[0070] m padding is the pre-training input data, G(·) is the repaired data of the generator, D(·) is the discrimination result of the discriminator, is the pre-training sample, and P M represents the distribution of the repaired data of the generator.

[0071] The discriminator loss also includes two parts. One part comes from the discrimination results on the pre-training samples and the repaired data of the generator, and the other part comes from the gradient penalty. The formula is as follows

[0072]

[0073] is a random linear interpolation sample between the pre-training samples and the repaired data of the generator, λ is the weight of the gradient penalty term, is the gradient of the discriminator with respect to the interpolation sample, is the distribution of the pre-training samples.

[0074] Step Nine: Build the generator and the discriminator. Both models are composed of multiple spatio-temporal blocks. After multiple spatio-temporal blocks, the discriminator also needs to pass through a fully connected layer. As Figure 4 shown, the spatio-temporal block consists of a multi-head attention mechanism, residual connections, layer normalization, and a one-dimensional convolutional block, which are combined in sequence with the residual connections and layer normalization.

[0075] 1. The attention mechanism calculates the similarity between different segments, assigns an attention weight to each pair of segments, and then applies the attention weight to the feature vector of the corresponding segment to obtain a weighted representation. As Figure 2 shown, after receiving the input, the attention mechanism obtains three feature representations, query (Q), key (K), and value (V), through a fully connected layer. They are denoted by Q h , K h , V h , h ∈ {1, 2, …, H}, where H represents the number of heads into which the division is made. Matrix multiplication is performed between Q h , K h , and then divided by the dimension of the key vector to obtain the attention scores. After passing the attention scores through the normalization function softmax, the attention weights can be obtained. Multiplying the attention weights by V h gives the attention output of one head, head h . The specific calculation is shown in the following formula.

[0076]

[0077] represents the dimension of the key vector, which is used to scale the dot product to prevent the dot product from being too large and causing the gradient to vanish. The softmax function is used to normalize the weights. The Attention map is an N×N-sized attention weight, and each element represents the weight relationship between the segment represented by the row where it is located and the segment represented by the column where it is located.

[0078] Combine the attention outputs of multiple heads and reshape them through a fully connected layer to obtain the segment feature output of the multi-head attention mechanism.

[0079] 2. Add an additional weight to the attention weight. The additional weight consists of three parts: traffic weight, distance weight, and central weight, which can be calculated through the target traffic flow data and the adjacency matrix.

[0080] The average value of the traffic flow data of each target road segment The ratio to the overall average value, which is used as the traffic weight flow_weight after normalization. The calculation formula is as follows

[0081]

[0082] The inverse ratio of the shortest distance plus one on the adjacency matrix of each target road segment, which is used as the distance weight after normalization. The calculation formula is as follows

[0083]

[0084] dist j,k Represents the shortest path length connecting road segment j and road segment k on the adjacency matrix.

[0085] The number of adjacent road segments of each target road segment, which is used as the central weight after normalization

[0086] deg_weight = softmax(deg(A))

[0087] deg: Add the adjacency matrix row by row

[0088] Sum and average the four weights to obtain the final weight representation.

[0089] 3. For road segments without input information, set the attention weight of this road segment to 0. For road segments that are all set to 0 in the pre-trained input data, for the attention weights calculated in the multi-head attention mechanism, set the weights corresponding to the road segments that are all set to 0 to 0.

[0090] 4. Use three one-dimensional convolutions and three max poolings alternately to form a one-dimensional convolutional block. As Figure 3 shown, the one-dimensional convolutional block extracts the time features of the road segment feature output.

[0091] 5. Residual connection and layer normalization are used to connect the multi-head attention mechanism and the one-dimensional convolutional block. After the outputs of the multi-head attention mechanism and the one-dimensional convolutional block, layer normalization is required for the output. The residual connection adds the inputs and outputs of the multi-head attention mechanism and the one-dimensional convolutional block.

[0092] Step 10: In the model training stage, the Adam gradient descent algorithm is used for parameter optimization and learning rate adjustment. All weights are initialized uniformly using Xavier. The mini-batch size of the pre-training input data is set to 32, and the pre-training input data is normalized. The ReLU is used as the activation function, except for the output layer of the discriminator which does not include an activation function. Three epochs are adopted as the stopping condition for model training.

[0093] Step 11: The GAN network is pre-trained based on the pre-training samples to obtain a pre-trained model.

[0094] Step 12: Artificially make the target training samples missing. Similar to Step 7, prepare the input target training data for the generator. Use the target training samples as positive samples for the input of the discriminator, and use the repaired data generated by the generator as negative samples and input them into the discriminator. Use the target training samples as positive samples and input them into the discriminator. Based on the pre-trained model, re-train it once with the target training samples to obtain the final GAN network.

[0095] Step 13: Expand the traffic flow data of size n*t collected by the drone to size N*T by padding with 0, and input it into the generator in the final GAN network to obtain the estimated traffic flow of the target road network.

[0096] Embodiment

[0097] To prove the effectiveness of the proposed solution of the present invention, the following experiments are carried out

[0098] (1) Experiment preparation

[0099] The software platform is based on pycharm, the environment is based on python3.7 and tensorflow2.6, and the hardware platform is based on GeForce RTX4060.

[0100] (2) Data preparation

[0101] The experimental data is sourced from the real traffic police data of a certain city, including 150 sections, and processed into seven-day traffic flow data with statistics every five minutes.

[0102] (3) Preparation of training samples

[0103] In a road network with 150 road segments, an eight-road segment area is selected as the target road network, and the adjacency matrix of the target road network is obtained. The target traffic flow data is selected during the off-peak time period, intercepted from 8:30 to 11:30 in the morning and from 2:30 to 5:30 in the afternoon. 182 target samples are obtained through window sliding, and only 20 are taken as target training samples, and the rest are used as target test samples. The pre-training samples are made from the traffic flow data in areas outside the target road network. Through screening, 14,000 training samples are obtained, 20% are used as pre-verification samples, and 10% are used as pre-test samples. The number of road segments collected by the drone is 5, and the number of time nodes is 6. The number of time nodes in the estimated road network traffic flow data is 24. That is, by inputting the traffic flow data of 5 road segments and 6 time nodes, through the generator in the GAN network, the traffic flow data of 8 road segments and 24 time nodes is obtained.

[0104] (4) Construct the model

[0105] The generator and discriminator are composed of 3 spatio-temporal blocks, and 4 heads are selected for the multi-head attention mechanism in the spatio-temporal blocks.

[0106] (5) Experimental analysis

[0107] Based on the above data, the model method proposed in the present invention and 6 comparative models, namely ARIMA, KNN, FNN, GAIN, VAE-GAN, and STGCN, are trained. The effect of the data generated by the model is as Figure 6 shown. It can be seen that the estimation effect of the model proposed in the present invention is better than that of the baseline model.

[0108] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.

[0109] The above-described embodiments only represent several implementation manners of the present application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A road network traffic flow data estimation method based on drone data collection and generative adversarial network, characterized in that: The steps include: Step 1: determine the target road network to be studied, use drones to collect traffic flow data in the road network area, and obtain target training samples; Step 2: Extract features from the traffic flow data collected by the drone, calculate the mean and standard deviation of the traffic flow data for each target road section, select matching source road section data based on the open source traffic flow data, and randomly combine the target road sections according to the arrangement of the adjacency matrix to obtain pre-training samples; Step 3: According to the drone collection mode, the pre-training samples are artificially omitted, the size of data collected by the drone at one time is retained, and the pre-training input data of the generator is obtained; Step 4, constructing a GAN network, the GAN network includes two parts: a generator and a discriminator, wherein the generator is composed of multiple spatiotemporal blocks, and the discriminator sets a fully connected layer after the multiple spatiotemporal blocks, and uses a multi-head attention mechanism and a spatiotemporal block composed of a one-dimensional convolution block to learn the input data, and adds additional weights to the attention mechanism to assist network learning. After the pre-trained input data is input into the generator, the repaired data generated is passed into the discriminator as a negative sample, and the pre-trained sample is passed into the discriminator as a positive sample, and the discriminant result is fed back to the generator, and the pre-trained model is obtained by training; Step 5: Based on the pre-trained model, the target training samples are artificially omitted, the size of the data collected by the drone is retained, the input data of the generator is obtained, the repair data generated by the generator is passed into the discriminator as a negative sample, the target training samples are passed into the discriminator as a positive sample, the discrimination result of the discriminator is fed back to the generator, and the final generative model is obtained through training; Step six, the traffic flow of the target road network to be estimated is obtained from the generator of the final generative model.

2. The method for estimating road network traffic flow data based on drone data collection and generative adversarial network according to claim 1 is characterized in that: Step 1: Determine the target road network to be studied, use drones to collect traffic flow data in the road network area, and obtain target training samples. The specific method is as follows: Step 1.1, determine the target road network to be studied; there are N target road sections in the target road network, the number of time nodes required for the estimated road network traffic flow data is T, and the target road network adjacency matrix A = [a jk ], used to describe the connection relationship between road segments in the target road network, where a jk is the element in the jth column of the kth row of the adjacency matrix and is calculated by the following equation: Step 1.2, use a drone to collect traffic flow data of the target road network. The number of road segments collected by the drone is n, where n < N, and the number of time nodes is t, where t < T. The time node interval for data collection is 5 minutes. By collecting multiple times on different target road segments, the target traffic flow data of N road segments and T t time nodes is obtained, where T t > T; Step 1.3, use a window of size N*T to slide on the time node axis of the target traffic flow data to obtain the target training samples.

3. The method for estimating road network traffic flow data based on drone data collection and generative adversarial network according to claim 2 is characterized in that: Step 2: Extract features from the traffic flow data collected by the drone, calculate the mean and standard deviation of the traffic flow data for each target road section, select matching source road section data on the open source traffic flow data, and randomly combine the target road sections in the adjacency matrix to obtain pre-training samples. The specific method is as follows: Step 2.1, extracting features from the target traffic flow data, and calculating the mean and standard deviation of the traffic flow data of each target road section as the target road section features; Step 2.2, download open source traffic flow data from the Internet and make N s source sections, T s Source traffic flow data at time nodes, where N s >>N, T s >>T; Step 2.3, taking the average value of the target road segment characteristics as the benchmark, and the standard deviation as the upper and lower floating interval size as the matching threshold, calculate the average value of the traffic flow data of the T time nodes connected to the source road segment. If it is within the threshold range, it is recorded as the matched source road segment data, and finally obtain a large amount of matched source road segment data corresponding to each target road segment; In step 2.4, the matching source section data corresponding to each target section are randomly combined according to the arrangement of the target section in the adjacency matrix to obtain a large number of pre-training samples with a size of N sections and T time nodes.

4. The method for estimating road network traffic flow data based on drone data collection and generative adversarial network according to claim 1 is characterized in that: Step 4: Construct a GAN network. The GAN network includes two parts: a generator and a discriminator. The generator is composed of multiple spatiotemporal blocks. The discriminator sets a fully connected layer after the multiple spatiotemporal blocks. The spatiotemporal blocks composed of a multi-head attention mechanism and a one-dimensional convolutional block are used to learn the input data, and additional weights are added to the attention mechanism to assist network learning. After the pre-trained input data is input into the generator, the repaired data is generated as a negative sample and passed into the discriminator. At the same time, the pre-trained sample is passed into the discriminator as a positive sample, and the discriminator's discrimination result is fed back to the generator. The pre-trained model is obtained by training, wherein: Generator loss function L G It includes two parts. One part comes from the discriminator's judgment result on the repaired data of the generator, and the other is the absolute mean error between the repaired data of the generator and the pre-trained samples, that is, MSE. The formula is as follows m padding is the pre-training input data, G(·) is the repair data of the generator, D(·) is the discriminant result of the discriminator, x is the pre-training sample, P M represents the distribution of repair data of the generator; Discriminator loss function L D It includes two parts, one part comes from the discrimination results of the pre-trained samples and the repaired data of the generator, and the other part comes from the gradient penalty. The formula is as follows is a random linear interpolation sample between the pre-trained sample and the repaired data of the generator, λ is the weight of the gradient penalty term, is the gradient of the discriminator to the interpolated sample, P x is the distribution of pre-training samples.

5. The method for estimating road network traffic flow data based on drone data collection and generative adversarial network according to claim 1 is characterized in that: Step 4, construct a GAN network, the GAN network includes two parts: a generator and a discriminator, wherein the generator is composed of multiple spatiotemporal blocks, and the discriminator sets a fully connected layer after the multiple spatiotemporal blocks, and uses a multi-head attention mechanism and a spatiotemporal block composed of a one-dimensional convolution block to learn the input data, and adds additional weights to the attention mechanism to assist network learning. After the pre-trained input data is input into the generator, the repaired data is generated as a negative sample and passed into the discriminator. At the same time, the pre-trained sample is passed into the discriminator as a positive sample, and the discrimination result of the discriminator is fed back to the generator. The pre-trained model is obtained by training, wherein: the spatiotemporal block is composed of a multi-head attention mechanism module, a residual connection and a layer normalization module, a one-dimensional convolution block, a residual connection and a layer normalization module, specifically: (1) Multi-head attention mechanism module Add additional weights to the attention weights. The additional weights consist of flow weights, distance weights, and center weights, which are calculated using the target traffic flow data and the adjacency matrix A. The average value of traffic flow data for each target road segment The ratio to the overall average is normalized as the flow weight flow_weight, and the calculation formula is as follows The shortest distance of each target road segment on the adjacency matrix is ​​inversely proportional to one, and normalized as the distance weight dist_weight. The calculation formula is as follows dist j,k Indicates the shortest path length connecting road segment j and road segment k on the adjacency matrix; The number of adjacent sections of each target section is normalized as the center weight deg_weight, and the calculation formula is as follows; deg_weight = softmax(deg(A)) deg: add the adjacency matrix row by row; (2) One-dimensional convolutional block A one-dimensional convolution block is constructed by alternating three one-dimensional convolutions and three maximum poolings; (2) Residual connection and layer normalization module The residual connection and layer normalization modules are used to process the output of the multi-head attention mechanism and the one-dimensional convolution block. The residual connection first adds the input and output of the multi-head attention mechanism or the one-dimensional convolution block to obtain the residual connection output, and then performs layer normalization on the residual connection output.

6. The method for estimating road network traffic flow data based on drone data collection and generative adversarial network according to claim 1 is characterized in that: Step 4: Construct a GAN network. The GAN network includes two parts: a generator and a discriminator. The generator is composed of multiple spatiotemporal blocks. The discriminator sets a fully connected layer after the multiple spatiotemporal blocks. The spatiotemporal blocks composed of a multi-head attention mechanism and a one-dimensional convolutional block are used to learn the input data, and additional weights are added to the attention mechanism to assist network learning. After the pre-trained input data is input into the generator, the repaired data is generated as a negative sample and passed into the discriminator. At the same time, the pre-trained sample is passed into the discriminator as a positive sample, and the discriminator's discrimination result is fed back to the generator. The pre-trained model is obtained by training, wherein: During the model training phase, the Adam gradient descent algorithm was used for parameter optimization and learning rate adjustment, and all weights were uniformly initialized using Xavier. The batch size of the pre-training input data was set to 32. ReLU was used as the activation function. Three iteration cycles were used as the stopping condition for model training.

7. The method for estimating road network traffic flow data based on drone data collection and generative adversarial network according to claim 1 is characterized in that: Step 6: The traffic flow of the target road network to be estimated is obtained by the generator of the final generation model. The specific method is as follows: The traffic data of size n*t collected by the drone is expanded to N*T by padding with 0, and input into the final generation model. The generator outputs the estimated traffic flow of the target road network.

8. A road network traffic flow data estimation system based on drone data collection and generative adversarial network, characterized in that: Implement the method for estimating road network traffic flow data based on drone data collection and generative adversarial networks as described in any one of claims 1-7, realize road network traffic flow data estimation based on drone data collection and generative adversarial networks, and divide it into six modules to execute steps one to six respectively.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for estimating road network traffic flow data based on drone data collection and a generative adversarial network as described in any one of claims 1 to 7 is implemented to realize road network traffic flow data estimation based on drone data collection and a generative adversarial network.

10. A computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for estimating road network traffic flow data based on drone data collection and a generative adversarial network as described in any one of claims 1 to 7 is implemented to realize road network traffic flow data estimation based on drone data collection and a generative adversarial network.