Multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data
Through data augmentation and multi-scale data preprocessing of the condition-generating adversarial network, combined with the hypergraph neural network model, the traditional traffic parameter estimation method has solved the problem of insufficient data sparseness, noise interference and complex traffic behavior modeling capabilities, significantly improving the accuracy and robustness of traffic parameter estimation, and providing strong data support for smart traffic systems.
Patent Information
- Application Number
- CN202411916910.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-22
AI Technical Summary
Traditional traffic parameter estimation methods have shortcomings in the problems of sparse data, noise interference and insufficient modeling capabilities of complex traffic behaviors, and it is difficult to meet the needs of modern traffic systems for large-scale, high-precision, and dynamic traffic parameter estimation.
The data augmentation method based on condition generation adversarial network is adopted, and high-quality synthetic trajectory data is generated through alternating training of generators and discriminators. Combined with multi-scale data preprocessing and feature extraction, a hypergraph neural network model is constructed to optimize traffic parameter estimation.
It significantly improves the estimation accuracy and robustness of key traffic parameters such as vehicle travel time, queue length and delay time, provides more reliable and refined data support, and provides strong support for the management and decision-making of smart transportation systems.
Smart Images

Figure BDA0005207028310000031 
Figure BDA0005207028310000033 
Figure BDA0005207028310000036
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing and traffic prediction, and in particular relates to a multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data. Background Art
[0002] With the development of intelligent transportation systems and the increasing complexity of urban traffic, accurate estimation of traffic parameters plays a vital role in optimizing traffic management, improving road traffic efficiency and improving travel experience. Traditional traffic parameter estimation methods mostly rely on fixed-position sensors (such as cameras, radars, etc.) or floating vehicle data. Although they can capture road traffic information to a certain extent, their spatial coverage is limited and their real-time performance is poor, which makes it difficult to meet the needs of modern transportation systems for large-scale, high-precision, and dynamic traffic parameter estimation.
[0003] As a comprehensive record of spatiotemporal information, vehicle trajectory data can describe the movement trajectory of vehicles in space in detail, providing more detailed and comprehensive spatiotemporal features for traffic parameter estimation. However, in practical applications, vehicle trajectory data are often accompanied by problems such as imbalance, missing or noise, which directly affect the accuracy of subsequent traffic parameter estimation. At the same time, the high dimensionality and complex spatiotemporal correlation of trajectory data also put forward higher requirements for feature extraction and model construction. Therefore, how to effectively process and utilize trajectory data and accurately estimate traffic parameters (such as travel time, queue length and delay time) has become one of the key research issues in the field of transportation. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data that solves the problems of data sparsity, noise interference and insufficient modeling ability of complex traffic behavior in traditional methods, and provides strong support for the dynamic management of intelligent transportation systems.
[0005] The technical solution of the present invention is:
[0006] A multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data comprises the following steps:
[0007] Step 1: Data enhancement based on conditional generative adversarial network, including the following steps:
[0008] Step S1, data preparation: collect original vehicle trajectory data, including timestamp, longitude and latitude, speed, acceleration and direction angle;
[0009] Step S2: constructing a conditional generative adversarial network model, including:
[0010] Generator: inputs random noise and conditional variables, including timestamp, longitude and latitude, speed, acceleration and direction angle, and outputs synthetic trajectory features that are close to the distribution of real data;
[0011] Discriminator: Inputs real trajectory data or synthetic trajectory features output by the generator to determine whether it is real or fake;
[0012] Step S3, using the improved Wasserstein GAN as the loss function, and introducing the gradient penalty term to stabilize the training process, and obtaining the generator loss function and the discriminator loss function;
[0013] Step S4, training process: alternately training the generator and the discriminator until the generator can generate high-quality trajectory data;
[0014] Step S5, data set enhancement: Use the trained generator to generate a large number of synthetic trajectory features, fuse the synthetic data with the original data, construct an enhanced data set, and use the enhanced data set as the input vehicle trajectory data of step 2;
[0015] Step 2: Multi-scale data preprocessing and feature extraction, including the following steps:
[0016] Step S6, data preprocessing, includes the following steps:
[0017] Step S61, coordinate conversion and map matching: convert the longitude and latitude into a plane rectangular coordinate system to perform precise position mapping of the trajectory points;
[0018] Step S62, time synchronization and interpolation: synchronize the data based on the timestamp, perform piecewise cubic spline interpolation on the sampling points, and improve the time resolution of the data;
[0019] Step S63, denoising and smoothing: using an improved Kalman filter to perform smoothing filtering on the trajectory data;
[0020] Step S7, feature decomposition and calculation: decomposing the velocity and acceleration into components in different directions in the plane coordinate system, and calculating the curvature and heading change rate of the vehicle trajectory based on the velocity and acceleration;
[0021] Step S8, multi-scale feature extraction and dimensionality reduction: extract multi-scale features of average velocity and average acceleration at different time scales, use principal component analysis to reduce the dimensionality of multi-scale features, and calculate multi-scale entropy;
[0022] Step S9, feature set construction: the preprocessed features, i.e., curvature, heading change rate, multi-scale velocity and acceleration features, are fused and standardized to form a final feature set, providing a data basis for subsequent modeling and optimization;
[0023] Step 3: Traffic parameter estimation, including the following steps:
[0024] Step S10: defining traffic parameters, including:
[0025] Travel time: the actual time consumed from the starting point to the end point;
[0026] Queue length: the length of the queue of vehicles caused by a road intersection or forward obstruction;
[0027] Delay time: the difference between the actual travel time and the ideal travel time under free-flow conditions;
[0028] Step S11, travel time estimation: using curvature, heading change rate, and acceleration characteristics, a weighted model is constructed to estimate the travel time of the vehicle on the road section;
[0029] Step S12, queue length estimation: using vehicle density and speed information, and according to the maximum saturation of the road, the queue length is estimated;
[0030] Step S13, delay time calculation: compare the actual travel time with the ideal travel time to obtain the delay time, and at the same time, define an adaptive delay function;
[0031] Step S14, parameter calibration: using actual observation data to minimize parameter estimation errors, calibrate model parameters to ensure the accuracy of travel time, queue length, and delay time estimates;
[0032] Step 4: Traffic parameter optimization based on hypergraph neural network, including the following steps:
[0033] Step S15, constructing a hypergraph structure: taking the vehicle trajectory nodes as the node set of the hypergraph, and based on the similarity threshold of the multi-scale features, associating the vehicle trajectory nodes with similar spatial positions, speeds and directions through hyperedges, to obtain the node feature matrix and hyperedge association matrix of the hypergraph;
[0034] Step S16, hypergraph Laplacian and convolution operation, includes the following steps:
[0035] Step S161: define the node degree matrix and the hyperedge degree matrix, and construct the hypergraph Laplacian matrix;
[0036] Step S162: using hypergraph convolution to integrate high-order correlation information into node feature representation, capturing complex behavioral correlations between multiple vehicles and multiple trajectories;
[0037] Step S17, hypergraph neural network model training, includes the following steps:
[0038] Step S171: extracting higher-level features through a multi-layer hypergraph neural network;
[0039] Step S172: inputting the improved features into the traffic parameter mapping function to optimize the travel time, queue length and delay time;
[0040] Step S173: constructing a loss function using real traffic parameter values and regularization terms, and training and optimizing network parameters;
[0041] Step S18, final output result: Based on the optimization model of the hypergraph neural network, a more accurate traffic parameter estimation result is obtained.
[0042] Furthermore, the expression of the generator in step S2 is:
[0043]
[0044] in, represents the generated trajectory feature vector, z represents the random noise vector, c represents the conditional variable, θ G represents the parameter set of the generator, G represents the generator function, W G ,b G Respectively represent the weight matrix and bias vector of the generator, σ G Represents the activation function of the generator, the activation function is the ReLU function, || represents the concatenation operation of the vector;
[0045] The expression of the discriminator in step S2 is:
[0046] D(f,c;θ D )→[0,1],
[0047] D(f,c)=σ D (W D (f||c]+b D ),
[0048] Where f represents the input trajectory feature vector, which comes from the real trajectory data or the generator, c represents the conditional variable, and θ D represents the parameter set of the discriminator, D represents the discriminator function, W D ,b D Represent the weight matrix and bias vector of the discriminator, σ D Represents the activation function of the discriminator, and the activation function is the Sigmoid function;
[0049] The expression of the generator loss function in step S3 is:
[0050]
[0051] Among them, L G represents the generator loss function, P Grepresents the generated data distribution, E represents the expected value operator, Represents the synthetic data output by the discriminator to the generator The discriminant result with the conditional variable c, that is, the probability that the discriminant data is "real";
[0052] The expression of the discriminator loss function in step S3 is:
[0053]
[0054] Among them, L D represents the discriminator loss function, P data represents the real data distribution, P G represents the generated data distribution, E represents the expected value operator, Represents the distribution of real data P data The expected output after sampling the real sample f and inputting it into the discriminator D is that the discriminator hopes to give a higher score to the real data. Denotes the distribution P from the generator G Generating data by sampling Calculate the expected value of the discriminator's output for the generated data, that is, the discriminator hopes to give a lower score to the generated data, λ gp represents the gradient penalty coefficient, Represents the distribution obtained by random sampling between real data and generated data, which is used to calculate the gradient penalty term. Denotes the discriminator D about the input The gradient of Represents samples randomly sampled between real data samples and generated data samples.
[0055] Furthermore, the training steps of the generator in step S4 are as follows:
[0056] (1) Sample n noise vectors from the noise distribution:
[0057] (2) The generator generates simulated data:
[0058]
[0059] in, represents the i-th generated synthetic data sample, G represents the generator function, z (i) represents the i-th random noise input, c (i) represents the i-th conditional variable;
[0060] (3) Calculator generator loss function L G , and update the generator parameters θ G ,Right now:
[0061]
[0062] Among them, η G represents the learning rate of the generator, Denotes the generator loss function L G For parameter θ G The gradient of
[0063] The training steps of the discriminator in step S4 are as follows:
[0064] (1) Sample n trajectory features from real data and its corresponding conditional variable
[0065] (2) Sample n noise vectors from the noise distribution
[0066] (3) The generator generates simulated data:
[0067]
[0068] in, represents the i-th generated synthetic data sample, G represents the generator function, z (i) represents the i-th random noise input, c (i) represents the i-th conditional variable;
[0069] (4) Calculate the discriminator loss function L D , and update the discriminator parameters θ D ,Right now:
[0070]
[0071] Among them, η D represents the learning rate of the discriminator, Denotes the discriminator loss function L D For parameter θ D The gradient of
[0072] The expression of the synthetic trajectory feature in step S5 is:
[0073]
[0074] in, represents the synthetic trajectory feature, G represents the generator function, Z new represents the new set of noise vectors, C new Represents the corresponding set of condition variables;
[0075] The expression of the enhanced data set in step S5 is:
[0076]
[0077] Among them, F enhanced represents the augmented dataset, F original represents the original data set, Represents the generated synthetic dataset.
[0078] Furthermore, the step S61 is specifically as follows: i and latitude φ i Convert to x in the rectangular coordinate system i ,y i , using the improved Gauss-Krüger projection, the specific formula is as follows:
[0079]
[0080] in, represents the radius of curvature of the yoke, represents the meridian arc length, a represents the major semi-axis of the earth ellipsoid, e represents the first eccentricity, represents the second eccentricity, λ0 represents the central meridian, △x, △y represent the coordinate translation parameters;
[0081] The step S62 is specifically as follows: according to the time stamp t i To synchronize the trajectory, the piecewise cubic spline interpolation method is used. The specific formula is as follows:
[0082] s i (t) = a i (tt i ) 2 +b i (tt i ) 2 +c i (tt i )+d i ,
[0083] Among them, s i (t) represents the cubic spline interpolation function, a i ,b i ,c i ,d i represents the polynomial coefficients, which are determined by the following conditions:
[0084] Define interval length and increment: △t i =t i+1 -t i ,△s i =s i+1 -s i ,△v i =v i+1-v i , solving the equations yields:
[0085] d i =s i
[0086] c i =υ i
[0087]
[0088] Then, decompose the velocity and acceleration, and convert the velocity v i and direction angle θ i Decomposed into components in the plane coordinate system, the specific formulas for velocity and acceleration are as follows:
[0089]
[0090] Among them, v i represents the speed of the vehicle at the i-th moment, θ i represents the driving direction angle of the vehicle at the i-th moment, v xi represents the velocity component of the vehicle along the x direction at the i-th moment, v yi represents the velocity component of the vehicle along the y direction at the i-th moment, represents the acceleration of the vehicle along the x-axis at the i-th moment, represents the acceleration of the vehicle along the y-axis at the i-th moment;
[0091] The step S63 is specifically as follows: using an improved Kalman filter to smooth and denoise the trajectory data, and the state vector X i and the state transfer equation X i+1 The formula is as follows:
[0092]
[0093] X i+1 =AX i +W i ,
[0094] W i ~N(0,Q),
[0095]
[0096] Among them, x i ,y i Respectively represent the x-axis and y-axis coordinates of the vehicle at the i-th moment, They represent the velocity components of the vehicle along the x-axis and y-axis at the i-th moment, T represents the transposition operation, A represents the state transfer matrix, and W irepresents process noise, N(0,Q) represents the distribution type of process noise is Gaussian distribution, Q represents the covariance matrix, △t i Indicates that from time t i to i+1 time interval;
[0097] The observation equation formula is as follows:
[0098] Z i = ΗX i +V i ,
[0099]
[0100] V i ~N(0,R),
[0101] Among them, Z i represents the observation vector obtained at time i, H represents the observation matrix, X i represents the system state vector at time i, V i represents observation noise, N(0,R) indicates that the distribution type of observation noise is Gaussian distribution, and R represents the covariance matrix.
[0102] Furthermore, the calculation formula of the curvature of the vehicle trajectory in step S7 is:
[0103]
[0104] Among them, k i represents the curvature of the vehicle at the i-th moment, They represent the velocity components of the vehicle along the x-axis and y-axis at the i-th moment, respectively. Respectively represent the acceleration components of the vehicle along the x-axis and y-axis at the i-th moment;
[0105] The calculation formula of the heading change rate of the vehicle trajectory in step S7 is:
[0106]
[0107] Among them, ω i represents the rate of change of the vehicle's heading in the i-th time interval, θ i ,θ i+1 They represent the vehicle at time t i and t i+1 The heading angle, t i and t i+1 Represents two adjacent sampling moments or observation moments;
[0108] The expression for extracting the multi-scale features of average velocity and average acceleration at different time scales in step S8 is:
[0109]
[0110]
[0111] in, represents the average speed of the vehicle at the i-th moment in the j-th time scale, v k represents the speed of the vehicle at the kth moment, n j Indicates the window size for calculating the average value, satisfying △t j represents the time length corresponding to the jth time scale, represents the average acceleration of the vehicle at the i-th moment in the j-th time scale, a k represents the acceleration of the vehicle at the kth moment, f i represents the comprehensive feature vector extracted at the i-th moment, and T represents the transposition operation;
[0112] The expression for reducing the dimension of multi-scale features by principal component analysis in step S8 is:
[0113]
[0114] Among them, f i norm represents the normalized comprehensive feature vector, μ f represents the comprehensive feature mean vector, σ f represents the comprehensive characteristic standard deviation vector, f i PCA represents the comprehensive feature vector after dimensionality reduction by PCA, W represents the projection matrix, and T represents the transposition operation;
[0115] The expression for calculating the multi-scale entropy in step S8 is:
[0116]
[0117] Among them, MSE represents multi-scale entropy, p l represents the probability of the comprehensive feature at the lth scale, and L represents the total number of possible states;
[0118] The expression of the final feature set in step S9 is:
[0119] F={f i PCA ,MSE},
[0120] Among them, F represents the final feature set, f i PCA represents the comprehensive feature vector after dimensionality reduction by PCA, and MSE represents multi-scale entropy.
[0121] Furthermore, the expression of the travel time in step S11 is:
[0122]
[0123] Among them, T trip represents the travel time, k(t) represents the curvature, ω(t) represents the rate of change of heading, a(t) represents the acceleration, and a x represents the acceleration along the x-axis, a y represents the acceleration along the y-axis, α1, α2, α3 represent weight coefficients, reflecting the influence of various factors on the travel time;
[0124] The expression of the queue length in step S12 is:
[0125]
[0126] Among them, L queue represents the queue length, ρ(t) represents the vehicle density at time t, and ρ jam represents the maximum saturation of the road; the expression of the delay time in step S13 is:
[0127]
[0128] Where D is the delay time, L is the driving distance, and v free represents the free flow speed;
[0129] The expression of the adaptive delay function in step S13 is:
[0130]
[0131] Among them, D adaptive represents the adaptive delay function, t N represents the end time, v(t) represents the instantaneous speed of the vehicle at time t, and v free represents the free flow speed;
[0132] The expression for minimizing the parameter estimation error in step S14 is:
[0133]
[0134] Among them, θ represents the model parameters, represents the actual observed value, represents the model estimate, and N represents the sample size.
[0135] Furthermore, the expression of the hypergraph in step S15 is:
[0136] H(υ,ε),
[0137] υ={v i},
[0138] ε={e j},
[0139] e j = {v i |Similarity(v i ,v j )≥δ},
[0140] Where Η represents the hypergraph, υ represents the set of hypergraph nodes, i.e., the feature vector of the vehicle trajectory, and v i represents the vehicle trajectory node, ε represents the hyperedge combination, e j represents a hyperedge, similarity (v i ,v j ) represents the vehicle trajectory node v i ,v j The feature similarity between them, δ represents the similarity threshold, ranging from 0.7 to 0.9;
[0141] The expression of the node feature matrix in step S15 is:
[0142] X=[f1,f2,...,f N ] Τ ∈R N×d ,
[0143] Among them, X represents the node feature matrix, R N×d Indicates that the node feature matrix X is a N×d dimensional matrix, belonging to the real number domain, N represents the number of nodes, d represents the feature dimension, f i Represents node v i The eigenvector of
[0144] The expression of the hypergraph association matrix in step S15 is:
[0145] H∈R N×M ,
[0146] Where M represents the number of hyperedges.
[0147] Furthermore, the expression of the node degree matrix in step S161 is:
[0148] D v =diag(d(v1),d(v2),...,d(v N )),
[0149] d(v i )=∑ e∈ε H ieθ(e),
[0150]
[0151] Among them, D v represents the node degree matrix, d(v i ) represents node v i , N represents the number of nodes, θ(e) represents the weight of hyperedge e, H ie Represents the hypergraph association matrix, used to represent node v i Whether it belongs to the hyperedge e, ε represents the hyperedge set;
[0152] The expression of the hyper-edge degree matrix in step S161 is:
[0153] D e =diag(d(e1),d(e2),...,d(e M )),
[0154] d(e j )=∑ v∈υ H vj ,
[0155]
[0156] Among them, D e represents the hyperedge degree matrix, d(e j ) represents the hyperedge e j degree, M represents the number of hyperedges, H vj Represents the hypergraph association matrix, which is used to indicate whether node v belongs to hyperedge e j ,υ represents the set of hypergraph nodes;
[0157] The expression of the hypergraph Laplacian matrix in step S161 is:
[0158]
[0159] Where L represents the hypergraph Laplacian matrix, Ε represents the identity matrix, i.e., the total number of node sets υ in the hypergraph, and D v represents the node degree matrix, H represents the hypergraph association matrix, D e represents the hyper-edge degree matrix, T represents the transpose operation;
[0160] The expression of the hypergraph convolution in step S162 is:
[0161]
[0162] Z∈R N×d′ ,
[0163] W∈R d×d ,
[0164] Among them, Z represents the output feature matrix, Z∈R N×d′ It means that the output feature matrix Z is an N×d-dimensional matrix, which belongs to the real number domain. σ represents the activation function, that is, the ReLU activation function. D v represents the node degree matrix, H represents the hypergraph association matrix, D e represents the hyperedge degree matrix, T represents the transpose operation, X represents the node feature matrix, W represents the learnable weight matrix, W∈R d×d The learnable weight matrix W is a d×d dimensional matrix belonging to the real number domain, where d represents the output feature dimension.
[0165] Furthermore, the expression for extracting higher-level features through the multi-layer hypergraph neural network in step S171 is:
[0166] Z (0) =X,
[0167] Among them, Z (l) represents the node feature matrix of the lth layer, σ represents the activation function, D v represents the node degree matrix, H represents the hypergraph association matrix, D e represents the hyper-edge degree matrix, T represents the transpose operation, and Z (l-1) Represents the node feature representation matrix of the l-1th layer, that is, the previous layer, W (l) represents the weight matrix of the lth layer, Z (0) represents the initial input feature matrix of the network, and X represents the initial feature matrix of the node;
[0168] The expression for the travel time estimation in step S172 is:
[0169]
[0170] in, represents the travel time estimate, f Τ The mapping function representing the travel time estimate, Z (L) Represents the node feature matrix after being processed by L layers of hypergraph neural network;
[0171] The expression for estimating the queue length in step S172 is:
[0172]
[0173] in, represents the queue length estimate, f L Denotes the mapping function for queue length estimation, Z (L) Represents the node feature matrix after being processed by L layers of hypergraph neural network;
[0174] The expression for delay time estimation in step S172 is:
[0175] D opt =f D (Z (L) ),
[0176] Among them, D opt represents the delay time estimate, f D Denotes the mapping function of the delay time estimate, Z (L) Represents the node feature matrix after being processed by L layers of hypergraph neural network;
[0177] The expression of constructing the loss function using the real traffic parameter value and the regularization term in step S173 is:
[0178]
[0179] L total =L est +L reg ,
[0180] Among them, L est Represents the estimated error loss, α, β, γ represent the weight coefficients of the estimated error loss function, N represents the number of layers of the model, Indicates the actual travel time. represents the estimated travel time, represents the actual queue length, represents the estimated queue length, Indicates the actual delay time, represents the estimated delay time, L reg represents the regularization loss, λ represents the regularization coefficient, ||·|| F represents the Frobenius norm, W represents the weight matrix, W (l) represents the weight matrix of the lth layer, L total Represents the total loss function.
[0181] Beneficial effects of the present invention:
[0182] 1. Realize high-fidelity vehicle trajectory data enhancement through conditional generative adversarial network: This paper adopts improved Wasserstein GAN and introduces gradient penalty term, which can stabilize the training process of generator and discriminator and avoid common problems such as mode collapse; the generated data is similar to the original trajectory distribution, enriches the sample diversity, and alleviates the problems of insufficient samples and sampling bias that may occur in actual collection; conditional variables (timestamp, longitude and latitude, speed, acceleration and direction angle) are used to guide the generation process to ensure that the generated data has consistent spatiotemporal semantics with the real traffic environment;
[0183] 2. Multi-scale data preprocessing and feature extraction to accurately characterize the vehicle operation status: The present invention adopts an improved Gauss-Krüger projection to convert geographic coordinates into a plane rectangular coordinate system, ensuring high-precision position mapping under large-scale and multi-road network conditions; segmented cubic spline interpolation and time synchronization can effectively improve the resolution of trajectory data on the time axis and reduce the discreteness caused by measurement and recording intervals; improved Kalman filter denoising and smoothing reduce the interference of noise and abnormal points in vehicle trajectory data, laying a reliable data foundation for subsequent feature extraction; the present invention not only focuses on first-order features such as instantaneous speed and acceleration, but also based on derived features such as curvature and heading change rate, and combines statistical indicators such as multi-scale average speed, average acceleration and multi-scale entropy; through PCA and multi-scale entropy, the feature space is made more compact, improving the computational efficiency and generalization ability of the subsequent modeling process;
[0184] 3. Traffic parameter estimation combining curvature, heading change rate and acceleration information is closer to real driving behavior: In the estimation of travel time, the present invention fully considers actual driving factors such as curvature and angular change, avoiding simple inference based on average speed or section length; the queue length estimation is based on vehicle density and maximum road saturation, which can more accurately capture the congestion state and queue evolution law; the adaptive function design of delay time can make dynamic adjustments according to real-time traffic status (such as the difference between instantaneous speed and free flow speed), improving the ability to describe nonlinear congestion; the parameter calibration link adopts the method of minimizing estimation error, and in the process of continuous comparison and iteration with measured data, the adaptability of the model to complex road networks and traffic environments is guaranteed;
[0185] 4. Introduce hypergraph neural network to capture high-order associations between multiple vehicles and multiple trajectories: The hypergraph structure of the present invention can flexibly associate similar vehicle trajectory nodes through hyperedges, thereby capturing high-order neighborhood relationships between multiple vehicles; the design of hypergraph Laplace and hypergraph convolution can fully refine the structural information of nodes within the "hyperedge", and then gradually learn deeper traffic characteristics in the multi-layer hypergraph neural network; compared with traditional graph convolution, hypergraph can represent richer "local group" or "group behavior" information, reducing the lack of description of single vehicle trajectory and local neighborhood; the node features obtained by the multi-layer hypergraph neural network are then mapped to the estimation model of travel time, queue length and delay time, so that the prediction accuracy and stability of the final traffic parameters are significantly improved;
[0186] 5. It has scalability and generalization capabilities, and is suitable for more complex traffic scenarios: The data enhancement link of the present invention can be continuously iterated and trained according to different cities and different road conditions to generate diversified trajectory data to adapt to new environments; the hypergraph neural network has good scalability when dealing with heterogeneous and multi-source traffic data, and can introduce more traffic-related contextual information (such as traffic lights, weather, and Internet of Vehicles data, etc.); the entire process, from data enhancement to multi-scale feature extraction, and then to high-order representation learning of the hypergraph neural network, forms an end-to-end traffic parameter estimation and optimization framework that can meet the deep customization needs in different scenarios;
[0187] 6. Achieve a balance between real-time performance and reliability: The present invention adopts piecewise interpolation and multi-scale methods, which makes the processing of real-time data more flexible, and improves the real-time performance by using online update strategies such as Kalman filtering; the hypergraph neural network mainly performs matrix multiplication and nonlinear activation operations in the inference stage, which can still maintain a faster reasoning speed than traditional traffic simulation methods, and improves the robustness to noise and heterogeneous data through regularization strategies and hierarchical structures; traffic management departments can use this solution to deploy on conventional servers or edge computing platforms to perform real-time estimation and online optimization of traffic parameters for different levels of roads or different time periods;
[0188] In summary, in a traffic environment with insufficient data or high noise, the present invention can significantly improve the estimation accuracy and robustness of key traffic parameters such as vehicle travel time, queue length and delay time with the help of the mutual cooperation of conditional generative adversarial networks and hypergraph neural networks, providing more reliable and refined data support for the management and decision-making of intelligent transportation systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0189] Figure 1 It is a comparison diagram of the actual trajectory of a vehicle and the trajectory of a generated data set in a multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data of the present invention.
[0190] Figure 2 It is a comparison diagram between the actual vehicle speed and the generated speed of a multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data of the present invention.
[0191] Figure 3 It is a comparison diagram between the actual acceleration and the generated acceleration of a vehicle in a multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data of the present invention.
[0192] Figure 4 It is a vehicle trajectory spatial distribution diagram of a multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data of the present invention.
[0193] Figure 5It is a conversion diagram of original longitude and latitude and plane rectangular coordinate system of a multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data of the present invention.
[0194] Figure 6 It is a longitude change diagram before and after time interpolation of a multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data of the present invention.
[0195] Figure 7 It is a trajectory smoothing effect diagram before and after Kalman filtering of a multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data of the present invention.
[0196] Figure 8 It is a travel time comparison diagram of a multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data of the present invention.
[0197] Fig. 9 It is a curvature and heading change relationship diagram of a multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data of the present invention.
[0198] Fig.10 It is an adaptive aversion function estimation diagram of a multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data of the present invention.
[0199] Fig.11 It is a comparison diagram of speed estimation before and after convolution of a multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data of the present invention.
[0200] Fig.12 It is a comparison diagram of queue length estimation before and after convolution of a multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data of the present invention.
[0201] Fig.13 It is a comparison diagram of travel time estimation before and after convolution of a multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data of the present invention.
[0202] Fig.14 It is a comparison diagram of delay time estimation before and after convolution of a multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data of the present invention. DETAILED DESCRIPTION
[0203] like Figure 1-14 As shown, a multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data includes the following steps:
[0204] Step 1: Data enhancement based on conditional generative adversarial network, including the following steps:
[0205] Step S1, data preparation: collect original vehicle trajectory data, including timestamp, longitude and latitude, speed, acceleration and direction angle;
[0206] Step S2: constructing a conditional generative adversarial network model, including:
[0207] Generator: inputs random noise and conditional variables, including timestamp, longitude and latitude, speed, acceleration and direction angle, and outputs synthetic trajectory features that are close to the distribution of real data;
[0208] Discriminator: Inputs real trajectory data or synthetic trajectory features output by the generator to determine whether it is real or fake;
[0209] Step S3, using the improved Wasserstein GAN as the loss function, and introducing the gradient penalty term to stabilize the training process, and obtaining the generator loss function and the discriminator loss function;
[0210] Step S4, training process: alternately training the generator and the discriminator until the generator can generate high-quality trajectory data;
[0211] Step S5, data set enhancement: Use the trained generator to generate a large number of synthetic trajectory features, fuse the synthetic data with the original data, construct an enhanced data set, and use the enhanced data set as the input vehicle trajectory data of step 2;
[0212] Step 2: Multi-scale data preprocessing and feature extraction, including the following steps:
[0213] Step S6, data preprocessing, includes the following steps:
[0214] Step S61, coordinate conversion and map matching: convert the longitude and latitude into a plane rectangular coordinate system to perform precise position mapping of the trajectory points;
[0215] Step S62, time synchronization and interpolation: synchronize the data based on the timestamp, perform piecewise cubic spline interpolation on the sampling points, and improve the time resolution of the data;
[0216] Step S63, denoising and smoothing: using an improved Kalman filter to perform smoothing filtering on the trajectory data;
[0217] Step S7, feature decomposition and calculation: decomposing the velocity and acceleration into components in different directions in the plane coordinate system, and calculating the curvature and heading change rate of the vehicle trajectory based on the velocity and acceleration;
[0218] Step S8, multi-scale feature extraction and dimensionality reduction: extract multi-scale features of average velocity and average acceleration at different time scales, use principal component analysis to reduce the dimensionality of multi-scale features, and calculate multi-scale entropy;
[0219] Step S9, feature set construction: the preprocessed features, i.e., curvature, heading change rate, multi-scale velocity and acceleration features, are fused and standardized to form a final feature set, providing a data basis for subsequent modeling and optimization;
[0220] Step 3: Traffic parameter estimation, including the following steps:
[0221] Step S10: defining traffic parameters, including:
[0222] Travel time: the actual time consumed from the starting point to the end point;
[0223] Queue length: the length of the queue of vehicles caused by a road intersection or forward obstruction;
[0224] Delay time: the difference between the actual travel time and the ideal travel time under free-flow conditions;
[0225] Step S11, travel time estimation: using curvature, heading change rate, and acceleration characteristics, a weighted model is constructed to estimate the travel time of the vehicle on the road section;
[0226] Step S12, queue length estimation: using vehicle density and speed information, and according to the maximum saturation of the road, the queue length is estimated;
[0227] Step S13, delay time calculation: compare the actual travel time with the ideal travel time to obtain the delay time, and at the same time, define an adaptive delay function;
[0228] Step S14, parameter calibration: using actual observation data to minimize parameter estimation errors, calibrate model parameters to ensure the accuracy of travel time, queue length, and delay time estimates;
[0229] Step 4: Traffic parameter optimization based on hypergraph neural network, including the following steps:
[0230] Step S15, constructing a hypergraph structure: taking the vehicle trajectory nodes as the node set of the hypergraph, and based on the similarity threshold of the multi-scale features, associating the vehicle trajectory nodes with similar spatial positions, speeds and directions through hyperedges, to obtain the node feature matrix and hyperedge association matrix of the hypergraph;
[0231] Step S16, hypergraph Laplacian and convolution operation, includes the following steps:
[0232] Step S161: define the node degree matrix and the hyperedge degree matrix, and construct the hypergraph Laplacian matrix;
[0233] Step S162: using hypergraph convolution to integrate high-order correlation information into node feature representation, capturing complex behavioral correlations between multiple vehicles and multiple trajectories;
[0234] Step S17, hypergraph neural network model training, includes the following steps:
[0235] Step S171: extracting higher-level features through a multi-layer hypergraph neural network;
[0236] Step S172: inputting the improved features into the traffic parameter mapping function to optimize the travel time, queue length and delay time;
[0237] Step S173: constructing a loss function using real traffic parameter values and regularization terms, and training and optimizing network parameters;
[0238] Step S18, final output result: Based on the optimization model of the hypergraph neural network, a more accurate traffic parameter estimation result is obtained.
[0239] Preferably, the expression of the generator in step S2 is:
[0240]
[0241]
[0242] in, represents the generated trajectory feature vector, z represents the random noise vector, c represents the conditional variable, θ G represents the parameter set of the generator, G represents the generator function, W G ,b G Respectively represent the weight matrix and bias vector of the generator, σ G Represents the activation function of the generator, the activation function is the ReLU function, || represents the concatenation operation of the vector;
[0243] The expression of the discriminator in step S2 is:
[0244] D(f,c;θ D )→[0,1],
[0245] D(f,c)=σ D (W D [f||c]+b D ),
[0246] Where f represents the input trajectory feature vector, which comes from the real trajectory data or the generator, c represents the conditional variable, and θ D represents the parameter set of the discriminator, D represents the discriminator function, W D ,b D Represent the weight matrix and bias vector of the discriminator, σ D Represents the activation function of the discriminator, and the activation function is the Sigmoid function;
[0247] The expression of the generator loss function in step S3 is:
[0248]
[0249] Among them, L G represents the generator loss function, P G represents the generated data distribution, E represents the expected value operator, Represents the synthetic data output by the discriminator to the generator The discriminant result with the conditional variable c, that is, the probability that the discriminant data is "real";
[0250] The expression of the discriminator loss function in step S3 is:
[0251]
[0252] Among them, L D represents the discriminator loss function, P data represents the real data distribution, P G represents the generated data distribution, E represents the expected value operator, Represents the distribution of real data P data The expected output after sampling the real sample f and inputting it into the discriminator D is that the discriminator hopes to give a higher score to the real data. Denotes the distribution P from the generator G Generating data by sampling Calculate the expected value of the discriminator's output for the generated data, that is, the discriminator hopes to give a lower score to the generated data, λ gp represents the gradient penalty coefficient, Represents the distribution obtained by random sampling between real data and generated data, which is used to calculate the gradient penalty term. Denotes the discriminator D about the input The gradient of Represents samples randomly sampled between real data samples and generated data samples.
[0253] Preferably, the training steps of the generator in step S4 are as follows:
[0254] (1) Sample n noise vectors from the noise distribution:
[0255] (2) The generator generates simulated data:
[0256]
[0257] in, represents the i-th generated synthetic data sample, G represents the generator function, z (i) represents the i-th random noise input, c (i) represents the i-th conditional variable;
[0258] (3) Calculator generator loss function L G , and update the generator parameters θ G ,Right now:
[0259]
[0260] Among them, η G represents the learning rate of the generator, Denotes the generator loss function L G For parameter θ G The gradient of
[0261] The training steps of the discriminator in step S4 are as follows:
[0262] (1) Sample n trajectory features from real data and its corresponding conditional variable
[0263] (2) Sample n noise vectors from the noise distribution
[0264] (3) The generator generates simulated data:
[0265]
[0266] in, represents the i-th generated synthetic data sample, G represents the generator function, z (i) represents the i-th random noise input, c (i) represents the i-th conditional variable;
[0267] (4) Calculate the discriminator loss function L D , and update the discriminator parameters θ D ,Right now:
[0268]
[0269] Among them, η D represents the learning rate of the discriminator, Denotes the discriminator loss function L D For parameter θ D The gradient of
[0270] The expression of the synthetic trajectory feature in step S5 is:
[0271]
[0272] in, represents the synthetic trajectory feature, G represents the generator function, Z new represents the new set of noise vectors, C new Represents the corresponding set of condition variables;
[0273] The expression of the enhanced data set in step S5 is:
[0274]
[0275] Among them, F enhanced represents the augmented dataset, F original represents the original data set, Represents the generated synthetic dataset.
[0276] Preferably, the step S61 specifically comprises: i and latitude φ i Convert to x in the rectangular coordinate system i ,y i , using the improved Gauss-Krüger projection, the specific formula is as follows:
[0277]
[0278] in, represents the radius of curvature of the yoke, represents the meridian arc length, a represents the major semi-axis of the earth ellipsoid, e represents the first eccentricity, represents the second eccentricity, λ0 represents the central meridian, △x, △y represent the coordinate translation parameters;
[0279] The step S62 is specifically as follows: according to the time stamp t i To synchronize the trajectory, the piecewise cubic spline interpolation method is used. The specific formula is as follows:
[0280] s i (t) = a i (tt i ) 2 +b i (tt i ) 2 +c i (tt i )+d i ,
[0281] Among them, s i (t) represents the cubic spline interpolation function, a i ,b i ,c i ,d i represents the polynomial coefficients, which are determined by the following conditions:
[0282] Define interval length and increment: △t i =t i+1 -t i ,△s i =s i+1 -s i ,△v i =v i+1 -v i , solving the equations yields:
[0283] d i =s i
[0284] c i =υ i
[0285]
[0286] Then, decompose the velocity and acceleration, and convert the velocity v i and direction angle θ i Decomposed into components in the plane coordinate system, the specific formulas for velocity and acceleration are as follows:
[0287]
[0288] Among them, v i represents the speed of the vehicle at the i-th moment, θ i represents the driving direction angle of the vehicle at the i-th moment, v xi represents the velocity component of the vehicle along the x direction at the i-th moment, v yi represents the velocity component of the vehicle along the y direction at the i-th moment, represents the acceleration of the vehicle along the x-axis at the i-th moment, represents the acceleration of the vehicle along the y-axis at the i-th moment;
[0289] The step S63 is specifically as follows: using an improved Kalman filter to smooth and denoise the trajectory data, and the state vector X i and the state transfer equation X i+1 The formula is as follows:
[0290]
[0291] X i+1 =AX i +W i ,
[0292] W i ~N(0,Q),
[0293]
[0294] Among them, x i ,y i Respectively represent the x-axis and y-axis coordinates of the vehicle at the i-th moment, They represent the velocity components of the vehicle along the x-axis and y-axis at the i-th moment, T represents the transposition operation, A represents the state transfer matrix, and W i represents process noise, N(0,Q) represents the distribution type of process noise is Gaussian distribution, Q represents the covariance matrix, △t i Indicates that from time t i to i+1 time interval;
[0295] The observation equation formula is as follows:
[0296] Z i = ΗX i +V i ,
[0297]
[0298] V i ~N(0,R),
[0299] Among them, Z i represents the observation vector obtained at time i, H represents the observation matrix, X i represents the system state vector at time i, V i represents observation noise, N(0,R) indicates that the distribution type of observation noise is Gaussian distribution, and R represents the covariance matrix.
[0300] Preferably, the calculation formula of the curvature of the vehicle trajectory in step S7 is:
[0301]
[0302] Among them, k i represents the curvature of the vehicle at the i-th moment, They represent the velocity components of the vehicle along the x-axis and y-axis at the i-th moment, respectively. Respectively represent the acceleration components of the vehicle along the x-axis and y-axis at the i-th moment;
[0303] The calculation formula of the heading change rate of the vehicle trajectory in step S7 is:
[0304]
[0305] Among them, ω i represents the rate of change of the vehicle's heading in the i-th time interval, θ i ,θ i+1They represent the vehicle at time t i and t i+1 The heading angle, t i and t i+1 Represents two adjacent sampling moments or observation moments;
[0306] The expression for extracting the multi-scale features of average velocity and average acceleration at different time scales in step S8 is:
[0307]
[0308]
[0309] in, represents the average speed of the vehicle at the i-th moment in the j-th time scale, v k represents the speed of the vehicle at the kth moment, n j Indicates the window size for calculating the average value, satisfying △t j represents the time length corresponding to the jth time scale, represents the average acceleration of the vehicle at the i-th moment in the j-th time scale, a k represents the acceleration of the vehicle at the kth moment, f i represents the comprehensive feature vector extracted at the i-th moment, and T represents the transposition operation;
[0310] The expression for reducing the dimension of multi-scale features by principal component analysis in step S8 is:
[0311]
[0312] Among them, f i norm represents the normalized comprehensive feature vector, μ f represents the comprehensive feature mean vector, σ f represents the comprehensive characteristic standard deviation vector, f i PCA represents the comprehensive feature vector after dimensionality reduction by PCA, W represents the projection matrix, and T represents the transposition operation;
[0313] The expression for calculating the multi-scale entropy in step S8 is:
[0314]
[0315] Among them, MSE represents multi-scale entropy, p l represents the probability of the comprehensive feature at the lth scale, and L represents the total number of possible states;
[0316] The expression of the final feature set in step S9 is:
[0317] F={f i PCA ,MSE},
[0318] Among them, F represents the final feature set, f i PCA represents the comprehensive feature vector after dimensionality reduction by PCA, and MSE represents multi-scale entropy.
[0319] Preferably, the expression of the travel time in step S11 is:
[0320]
[0321] Among them, T trip represents the travel time, k(t) represents the curvature, ω(t) represents the rate of change of heading, a(t) represents the acceleration, and a x represents the acceleration along the x-axis, a y represents the acceleration along the y-axis, α1, α2, α3 represent weight coefficients, reflecting the influence of various factors on the travel time;
[0322] The expression of the queue length in step S12 is:
[0323]
[0324] Among them, L queue represents the queue length, ρ(t) represents the vehicle density at time t, and ρ jam represents the maximum saturation of the road; the expression of the delay time in step S13 is:
[0325]
[0326] Where D is the delay time, L is the driving distance, and v free represents the free flow speed;
[0327] The expression of the adaptive delay function in step S13 is:
[0328]
[0329] Among them, D adaptive represents the adaptive delay function, t N represents the end time, v(t) represents the instantaneous speed of the vehicle at time t, and v free represents the free flow speed;
[0330] The expression for minimizing the parameter estimation error in step S14 is:
[0331]
[0332] Among them, θ represents the model parameters, represents the actual observed value, represents the model estimate, and N represents the sample size.
[0333] Preferably, the expression of the hypergraph in step S15 is:
[0334] H(υ,ε),
[0335] υ={v i},
[0336] ε={e j},
[0337] e j = {v i |Similarity(v i ,v j )≥δ},
[0338] Where Η represents the hypergraph, υ represents the set of hypergraph nodes, i.e., the feature vector of the vehicle trajectory, and v i represents the vehicle trajectory node, ε represents the hyperedge combination, e j represents a hyperedge, similarity (v i ,v j ) represents the vehicle trajectory node v i ,v j The feature similarity between them, δ represents the similarity threshold, ranging from 0.7 to 0.9;
[0339] The expression of the node feature matrix in step S15 is:
[0340] X=[f1,f2,...,f N ] Τ ∈R N×d ,
[0341] Among them, X represents the node feature matrix, R N×d Indicates that the node feature matrix X is a N×d dimensional matrix, belonging to the real number domain, N represents the number of nodes, d represents the feature dimension, f i Represents node v i The eigenvector of
[0342] The expression of the hypergraph association matrix in step S15 is:
[0343] H∈R N×M ,
[0344] Where M represents the number of hyperedges.
[0345] Preferably, the expression of the node degree matrix in step S161 is:
[0346] D v =diag(d(v1),d(v2),...,d(v N )),
[0347] d(v i )=∑ e∈ε H ie θ(e),
[0348]
[0349] Among them, D v represents the node degree matrix, d(v i ) represents node v i , N represents the number of nodes, θ(e) represents the weight of hyperedge e, H ie Represents the hypergraph association matrix, used to represent node v i Whether it belongs to the hyperedge e, ε represents the hyperedge set;
[0350] The expression of the hyper-edge degree matrix in step S161 is:
[0351] D e =diag(d(e1),d(e2),...,d(e M )),
[0352] d(e j )=∑ v∈υ H vj ,
[0353]
[0354] Among them, D e represents the hyperedge degree matrix, d(e j ) represents the hyperedge e j degree, M represents the number of hyperedges, H vj Represents the hypergraph association matrix, which is used to indicate whether node v belongs to hyperedge e j ,υ represents the set of hypergraph nodes;
[0355] The expression of the hypergraph Laplacian matrix in step S161 is:
[0356]
[0357] Where L represents the hypergraph Laplacian matrix, Ε represents the identity matrix, i.e., the total number of node sets υ in the hypergraph, and D v represents the node degree matrix, H represents the hypergraph association matrix, D e represents the hyper-edge degree matrix, T represents the transpose operation;
[0358] The expression of the hypergraph convolution in step S162 is:
[0359]
[0360] Z∈R N×d′ ,
[0361] W∈R d×d ,
[0362] Among them, Z represents the output feature matrix, Z∈R N×d′ Indicates that the output feature matrix Z is a N×d dimensional matrix, belonging to the real number field, σ represents the activation function, that is, the ReLU activation function, D v represents the node degree matrix, H represents the hypergraph association matrix, D e represents the hyperedge degree matrix, T represents the transpose operation, X represents the node feature matrix, W represents the learnable weight matrix, W∈R d×d The learnable weight matrix W is a d×d dimensional matrix belonging to the real number domain, where d represents the output feature dimension.
[0363] Preferably, the expression for extracting higher-level features through the multi-layer hypergraph neural network in step S171 is:
[0364] Z (0) =X,
[0365] Among them, Z (l) represents the node feature matrix of the lth layer, σ represents the activation function, D v represents the node degree matrix, H represents the hypergraph association matrix, D e represents the hyper-edge degree matrix, T represents the transpose operation, and Z (l-1) Represents the node feature representation matrix of the l-1th layer, that is, the previous layer, W (l) represents the weight matrix of the lth layer, Z (0) represents the initial input feature matrix of the network, and X represents the initial feature matrix of the node;
[0366] The expression for the travel time estimation in step S172 is:
[0367]
[0368] in, represents the travel time estimate, f Τ The mapping function representing the travel time estimate, Z (L) Represents the node feature matrix after being processed by L layers of hypergraph neural network;
[0369] The expression for estimating the queue length in step S172 is:
[0370]
[0371] in, represents the queue length estimate, f L Denotes the mapping function for queue length estimation, Z (L) Represents the node feature matrix after being processed by L layers of hypergraph neural network;
[0372] The expression for delay time estimation in step S172 is:
[0373] D opt =f D (Z (L) ),
[0374] Among them, D opt represents the delay time estimate, f D Denotes the mapping function of the delay time estimate, Z (L) Represents the node feature matrix after being processed by L layers of hypergraph neural network;
[0375] The expression of constructing the loss function using the real traffic parameter value and the regularization term in step S173 is:
[0376]
[0377] L total =L est +L reg ,
[0378] Among them, L est Represents the estimated error loss, α, β, γ represent the weight coefficients of the estimated error loss function, N represents the number of layers of the model, Indicates the actual travel time. represents the estimated travel time, represents the actual queue length, represents the estimated queue length, Indicates the actual delay time, represents the estimated delay time, L reg represents the regularization loss, λ represents the regularization coefficient, ||·|| F represents the Frobenius norm, W represents the weight matrix, W (l) represents the weight matrix of the lth layer, L total Represents the total loss function.
[0379] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data, characterized in that: The following steps are involved: Step 1: Data enhancement based on conditional generative adversarial network, including the following steps: Step S1, data preparation: collect original vehicle trajectory data, including timestamp, longitude and latitude, speed, acceleration and direction angle; Step S2: constructing a conditional generative adversarial network model, including: Generator: inputs random noise and conditional variables, including timestamp, longitude and latitude, speed, acceleration and direction angle, and outputs synthetic trajectory features that are close to the distribution of real data; Discriminator: Inputs real trajectory data or synthetic trajectory features output by the generator to determine whether it is real or fake; Step S3, using the improved Wasserstein GAN as the loss function, and introducing the gradient penalty term to stabilize the training process, and obtaining the generator loss function and the discriminator loss function; Step S4, training process: alternately training the generator and the discriminator until the generator can generate high-quality trajectory data; Step S5, data set enhancement: Use the trained generator to generate a large number of synthetic trajectory features, fuse the synthetic data with the original data, construct an enhanced data set, and use the enhanced data set as the input vehicle trajectory data of step 2; Step 2: Multi-scale data preprocessing and feature extraction, including the following steps: Step S6, data preprocessing, includes the following steps: Step S61, coordinate conversion and map matching: converting the longitude and latitude into a plane rectangular coordinate system to perform precise position mapping of the trajectory points; Step S62, time synchronization and interpolation: synchronize the data based on the timestamp, perform piecewise cubic spline interpolation on the sampling points, and improve the time resolution of the data; Step S63, denoising and smoothing: using an improved Kalman filter to perform smoothing filtering on the trajectory data; Step S7, feature decomposition and calculation: decomposing the velocity and acceleration into components in different directions in the plane coordinate system, and calculating the curvature and heading change rate of the vehicle trajectory based on the velocity and acceleration; Step S8, multi-scale feature extraction and dimensionality reduction: extract multi-scale features of average velocity and average acceleration at different time scales, use principal component analysis to reduce the dimensionality of multi-scale features, and calculate multi-scale entropy; Step S9, feature set construction: the preprocessed features, i.e., curvature, heading change rate, multi-scale velocity and acceleration features, are fused and standardized to form a final feature set, providing a data basis for subsequent modeling and optimization; Step 3: Traffic parameter estimation, including the following steps: Step S10: defining traffic parameters, including: Travel time: the actual time consumed from the starting point to the end point; Queue length: the length of the queue of vehicles caused by a road intersection or forward obstruction; Delay time: the difference between the actual travel time and the ideal travel time under free-flow conditions; Step S11, travel time estimation: using curvature, heading change rate, and acceleration characteristics, a weighted model is constructed to estimate the travel time of the vehicle on the road section; Step S12, queue length estimation: using vehicle density and speed information, and according to the maximum saturation of the road, the queue length is estimated; Step S13, delay time calculation: compare the actual travel time with the ideal travel time to obtain the delay time, and at the same time, define an adaptive delay function; Step S14, parameter calibration: using actual observation data to minimize parameter estimation errors, calibrate model parameters to ensure the accuracy of travel time, queue length, and delay time estimates; Step 4: Traffic parameter optimization based on hypergraph neural network, including the following steps: Step S15, constructing a hypergraph structure: taking the vehicle trajectory nodes as the node set of the hypergraph, and based on the similarity threshold of the multi-scale features, associating the vehicle trajectory nodes with similar spatial positions, speeds and directions through hyperedges, to obtain the node feature matrix and hyperedge association matrix of the hypergraph; Step S16, hypergraph Laplacian and convolution operation, includes the following steps: Step S161: define the node degree matrix and the hyperedge degree matrix, and construct the hypergraph Laplacian matrix; Step S162: using hypergraph convolution to integrate high-order correlation information into node feature representation, capturing complex behavioral correlations between multiple vehicles and multiple trajectories; Step S17, hypergraph neural network model training, includes the following steps: Step S171: extracting higher-level features through a multi-layer hypergraph neural network; Step S172: inputting the improved features into the traffic parameter mapping function to optimize the travel time, queue length and delay time; Step S173: constructing a loss function using real traffic parameter values and regularization terms, and training and optimizing network parameters; Step S18, final output result: Based on the optimization model of the hypergraph neural network, a more accurate traffic parameter estimation result is obtained.
2. The multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data according to claim 1 is characterized in that: The expression of the generator in step S2 is: in, represents the generated trajectory feature vector, z represents the random noise vector, c represents the conditional variable, θ G represents the parameter set of the generator, G represents the generator function, W G ,b G Respectively represent the weight matrix and bias vector of the generator, σ G Represents the activation function of the generator, the activation function is the ReLU function, and || represents the concatenation operation of the vector; The expression of the discriminator in step S2 is: D(f,c;θ D )→[0,1], D(f,c)=σ D (W D [f||c]+b D ), Where f represents the input trajectory feature vector, which comes from the real trajectory data or the generator, c represents the conditional variable, and θ D represents the parameter set of the discriminator, D represents the discriminator function, W D ,b D Represent the weight matrix and bias vector of the discriminator, σ D Represents the activation function of the discriminator, and the activation function is the Sigmoid function; The expression of the generator loss function in step S3 is: Among them, L G represents the generator loss function, P G represents the generated data distribution, E represents the expected value operator, Represents the synthetic data output by the discriminator to the generator The discriminant result with the conditional variable c, that is, the probability that the discriminant data is "real"; The expression of the discriminator loss function in step S3 is: Among them, L D represents the discriminator loss function, P data represents the real data distribution, P G represents the generated data distribution, E represents the expected value operator, Represents the distribution of real data P data The expected output after sampling the real sample f and inputting it into the discriminator D is that the discriminator hopes to give a higher score to the real data. Denotes the distribution P from the generator G Generating data by sampling Calculate the expected value of the discriminator's output for the generated data, that is, the discriminator hopes to give a lower score to the generated data, λ gp represents the gradient penalty coefficient, Represents the distribution obtained by random sampling between real data and generated data, which is used to calculate the gradient penalty term. Denotes the discriminator D about the input The gradient of Represents samples randomly sampled between real data samples and generated data samples.
3. The multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data according to claim 1 is characterized in that: The training steps of the generator in step S4 are as follows: (1) Sample n noise vectors from the noise distribution: (2) The generator generates simulated data: in, represents the i-th generated synthetic data sample, G represents the generator function, z (i) represents the i-th random noise input, c (i) represents the i-th conditional variable; (3) Calculator generator loss function L G , and update the generator parameters θ G ,Right now: Among them, η G represents the learning rate of the generator, Denotes the generator loss function L G For parameter θ G The gradient of The training steps of the discriminator in step S4 are as follows: (1) Sample n trajectory features from real data and its corresponding conditional variable (2) Sample n noise vectors from the noise distribution (3) The generator generates simulated data: in, represents the i-th generated synthetic data sample, G represents the generator function, z (i) represents the i-th random noise input, c (i) represents the i-th conditional variable; (4) Calculate the discriminator loss function L D , and update the discriminator parameters θ D ,Right now: Among them, η D represents the learning rate of the discriminator, Denotes the discriminator loss function L D For parameter θ D The gradient of The expression of the synthetic trajectory feature in step S5 is: in, represents the synthetic trajectory feature, G represents the generator function, Z new represents the new set of noise vectors, C new Represents the corresponding set of condition variables; The expression of the enhanced data set in step S5 is: Among them, F enhanced represents the augmented dataset, F original represents the original data set, Represents the generated synthetic dataset.
4. The multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data according to claim 1 is characterized in that: The step S61 specifically includes: i and latitude φ i Convert to x in the plane rectangular coordinate system i ,y i , using the improved Gauss-Krüger projection, the specific formula is as follows: in, represents the radius of curvature of the yoke, represents the meridian arc length, a represents the major semi-axis of the earth ellipsoid, e represents the first eccentricity, represents the second eccentricity, λ0 represents the central meridian, △x, △y represent the coordinate translation parameters; The step S62 is specifically as follows: according to the time stamp t i To synchronize the trajectory, the piecewise cubic spline interpolation method is used. The specific formula is as follows: s i (t)=a i (t-t i ) 2 +b i (t-t i ) 2 +c i (t-t i )+d i , Among them, s i (t) represents the cubic spline interpolation function, a i ,b i ,c i ,d i represents the polynomial coefficients, which are determined by the following conditions: Define interval length and increment: △t i =t i+1 -t i ,△s i =s i+1 -s i ,△v i =v i+1 -v i , solving the equations yields: d i =s i c i =in i Then, decompose the velocity and acceleration, and convert the velocity v i and direction angle θ i Decomposed into components in the plane coordinate system, the specific formulas for velocity and acceleration are as follows: Among them, v i represents the speed of the vehicle at the i-th moment, θ i represents the driving direction angle of the vehicle at the i-th moment, v xi represents the velocity component of the vehicle along the x direction at the i-th moment, v yi represents the velocity component of the vehicle along the y direction at the i-th moment, represents the acceleration of the vehicle along the x-axis at the i-th moment, represents the acceleration of the vehicle along the y-axis at the i-th moment; The step S63 is specifically as follows: using an improved Kalman filter to smooth and denoise the trajectory data, and the state vector X i and the state transfer equation X i+1 The formula is as follows: X i+1 =AX i +W i , W i ~N(0,Q), Among them, x i ,y i Respectively represent the x-axis and y-axis coordinates of the vehicle at the i-th moment, They represent the velocity components of the vehicle along the x-axis and y-axis at the i-th moment, T represents the transposition operation, A represents the state transfer matrix, and W i represents process noise, N(0,Q) represents the distribution type of process noise is Gaussian distribution, Q represents the covariance matrix, △t i Indicates that from time t i to i+1 time interval; The observation equation formula is as follows: Z i =ΗX i +V i , V i ~N(0,R), Among them, Z i represents the observation vector obtained at time i, H represents the observation matrix, X i represents the system state vector at time i, V i represents observation noise, N(0,R) indicates that the distribution type of observation noise is Gaussian distribution, and R represents the covariance matrix.
5. The multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data according to claim 1 is characterized in that: The calculation formula of the curvature of the vehicle trajectory in step S7 is: Among them, k i represents the curvature of the vehicle at the i-th moment, They represent the velocity components of the vehicle along the x-axis and y-axis at the i-th moment, respectively. Respectively represent the acceleration components of the vehicle along the x-axis and y-axis at the i-th moment; The calculation formula of the heading change rate of the vehicle trajectory in step S7 is: Among them, ω i represents the rate of change of the vehicle's heading in the i-th time interval, θ i ,θ i+1 They represent the vehicle at time t i and t i+1 The heading angle, t i and t i+1 Represents two adjacent sampling moments or observation moments; The expression for extracting the multi-scale features of average velocity and average acceleration at different time scales in step S8 is: in, represents the average speed of the vehicle at the i-th moment in the j-th time scale, v k represents the speed of the vehicle at the kth moment, n j Indicates the window size for calculating the average value, satisfying △t j represents the time length corresponding to the jth time scale, represents the average acceleration of the vehicle at the i-th moment in the j-th time scale, a k represents the acceleration of the vehicle at the kth moment, f i represents the comprehensive feature vector extracted at the i-th moment, and T represents the transposition operation; The expression for reducing the dimension of multi-scale features by principal component analysis in step S8 is: f i PCA =W Τ f i norm , Among them, f i norm represents the normalized comprehensive feature vector, μ f represents the comprehensive feature mean vector, σ f represents the comprehensive characteristic standard deviation vector, f i PCA represents the comprehensive feature vector after dimensionality reduction by PCA, W represents the projection matrix, and T represents the transposition operation; The expression for calculating the multi-scale entropy in step S8 is: Among them, MSE represents multi-scale entropy, p l represents the probability of the comprehensive feature at the lth scale, and L represents the total number of possible states; The expression of the final feature set in step S9 is: F={f i PCA ,MSE}, Among them, F represents the final feature set, f i PCA represents the comprehensive feature vector after dimensionality reduction by PCA, and MSE represents multi-scale entropy.
6. The multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data according to claim 1 is characterized in that: The expression of the travel time in step S11 is: Among them, T trip represents the travel time, k(t) represents the curvature, ω(t) represents the rate of change of heading, a(t) represents the acceleration, and a x represents the acceleration along the x-axis, a y represents the acceleration along the y-axis, α1, α2, α3 represent weight coefficients, reflecting the influence of various factors on the travel time; The expression of the queue length in step S12 is: Among them, L queue represents the queue length, ρ(t) represents the vehicle density at time t, and ρ jam Indicates the maximum saturation of the road; The expression of the delay time in step S13 is: Where D is the delay time, L is the driving distance, and v free represents the free flow speed; The expression of the adaptive delay function in step S13 is: Among them, D adaptive represents the adaptive delay function, tN represents the termination time, v(t) represents the instantaneous speed of the vehicle at time t, and v free represents the free flow speed; The expression for minimizing the parameter estimation error in step S14 is: Among them, θ represents the model parameters, represents the actual observed value, represents the model estimate, and N represents the sample size.
7. The multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data according to claim 1 is characterized in that: The expression of the hypergraph in step S15 is: H(υ,ε), υ={v i }, e={e j }, e j = {v i |Similarity(v i ,v j )≥δ}, Where Η represents the hypergraph, υ represents the hypergraph node set, i.e., the feature vector of the vehicle trajectory, and v i represents the vehicle trajectory node, ε represents the hyperedge combination, e j represents a hyperedge, similarity (v i ,v j ) represents the vehicle trajectory node v i ,v j The feature similarity between them, δ represents the similarity threshold, ranging from 0.7 to 0.9; The expression of the node feature matrix in step S15 is: X=[f1,f2,...,f N ] Τ ∈R N×d , Among them, X represents the node feature matrix, R N×d Indicates that the node feature matrix X is a x ×d-dimensional matrix, belonging to the real number domain, N represents the number of nodes, d represents the feature dimension, f i Represents node v i The eigenvector of The expression of the hypergraph association matrix in step S15 is: Η∈R N×M , Where M represents the number of hyperedges.
8. The multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data according to claim 1 is characterized in that: The expression of the node degree matrix in step S161 is: <h2 style=";text-align:left;direction:ltr">D<h2 style=";text-align:left;direction:ltr"> v <h2 style=";text-align:left;direction:ltr"> =diag(d(v1),d(v2),...,d(v<h2 style=";text-align:left;direction:ltr"> N <h2 style=";text-align:left;direction:ltr"> )), d(v i )=∑ e∈ε H ie θ(e), Among them, D v represents the node degree matrix, d(v i ) represents node v i , N represents the number of nodes, θ(e) represents the weight of hyperedge e, H ie Represents the hypergraph association matrix, used to represent node v i Whether it belongs to the hyperedge e, ε represents the hyperedge set; The expression of the hyper-edge degree matrix in step S161 is: D e =diag(d(e1),d(e2),...,d(e M )), d(e j )=∑ v∈υ H vj , Among them, D e represents the hyperedge degree matrix, d(e j ) represents the hyperedge e j degree, M represents the number of hyperedges, H vj Represents the hypergraph association matrix, which is used to indicate whether node v belongs to hyperedge e j ,υ represents the set of hypergraph nodes; The expression of the hypergraph Laplacian matrix in step S161 is: Where L represents the hypergraph Laplacian matrix, Ε represents the identity matrix, i.e., the total number of node sets υ in the hypergraph, and D v represents the node degree matrix, H represents the hypergraph association matrix, D e represents the hyper-edge degree matrix, T represents the transpose operation; The expression of the hypergraph convolution in step S162 is: Z∈R N×d′ , W∈R d×d , Among them, Z represents the output feature matrix, Z∈R N×d′ It means that the output feature matrix Z is an N×d-dimensional matrix, which belongs to the real number domain. σ represents the activation function, that is, the ReLU activation function. D v represents the node degree matrix, H represents the hypergraph association matrix, D e represents the hyperedge degree matrix, T represents the transpose operation, X represents the node feature matrix, W represents the learnable weight matrix, W∈R d×d The learnable weight matrix W is a d×d dimensional matrix belonging to the real number domain, where d represents the output feature dimension.
9. The multi-scale traffic parameter comprehensive estimation method based on vehicle trajectory data according to claim 1, characterized in that: The expression for extracting higher-level features through the multi-layer hypergraph neural network in step S171 is: Z (0) =X, Among them, Z (l) represents the node feature matrix of the lth layer, σ represents the activation function, D v represents the node degree matrix, H represents the hypergraph association matrix, D e represents the hyper-edge degree matrix, T represents the transpose operation, and Z (l-1) Represents the node feature representation matrix of the l-1th layer, that is, the previous layer, W (l) represents the weight matrix of the lth layer, Z (0) represents the initial input feature matrix of the network, and X represents the initial feature matrix of the node; The expression for the travel time estimation in step S172 is: in, represents the travel time estimate, f Τ The mapping function representing the travel time estimate, Z (L) Represents the node feature matrix after being processed by L layers of hypergraph neural network; The expression for estimating the queue length in step S172 is: in, represents the queue length estimate, f L Denotes the mapping function for queue length estimation, Z (L) Represents the node feature matrix after being processed by L layers of hypergraph neural network; The expression for delay time estimation in step S172 is: D opt =f D (Z (L) ), Among them, D opt represents the delay time estimate, f D Denotes the mapping function of the delay time estimate, Z (L) Represents the node feature matrix after being processed by L layers of hypergraph neural network; The expression of constructing the loss function using the real traffic parameter value and the regularization term in step S173 is: L total =L est +L reg , Among them, L est Represents the estimated error loss, α, β, γ represent the weight coefficients of the estimated error loss function, N represents the number of layers of the model, Indicates the actual travel time. represents the estimated travel time, represents the actual queue length, represents the estimated queue length, Indicates the actual delay time, represents the estimated delay time, L reg represents the regularization loss, λ represents the regularization coefficient, ||·|| F represents the Frobenius norm, W represents the weight matrix, W (l) represents the weight matrix of the lth layer, L total Represents the total loss function.