Highway non-network vehicle travel prediction method and system based on spatio-temporal graph convolution
By using a spatiotemporal graph convolution method based on ETC data, the travel demand characteristics of vehicles not yet connected to the highway network are extracted. By combining multi-layer graph convolution and bidirectional gated cyclic unit networks with a multi-head self-attention mechanism, accurate and real-time prediction of the travel of vehicles not yet connected to the network is achieved, which solves the shortcomings of existing technologies in predicting vehicles not yet connected to the network and is suitable for real-time scheduling and traffic management of highways.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-29
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies struggle to provide accurate, real-time, and interpretable forecasts of travel demand for vehicles not yet connected to the highway network. In particular, the forecast accuracy is insufficient during peak holiday periods or unforeseen events, failing to meet the real-time scheduling requirements of highway operations.
Based on the spatiotemporal graph convolution method, a road network map structure is constructed using ETC entrance gantry data. Spatial topology and temporal periodic features are extracted. Multi-layer graph convolutional networks and bidirectional gated cyclic unit networks are used to capture the historical evolution and future dependence of travel demand. Combined with a multi-head self-attention mechanism, key period features are enhanced and noise is suppressed to predict the traffic flow of vehicles not yet connected to the network.
It achieves accurate prediction of the travel flow of vehicles not yet connected to the network in the next 15 minutes, improving the robustness and real-time performance of the prediction. It can meet the real-time scheduling needs of highways and is suitable for scenarios such as highway entrance traffic prediction, congestion warning and lane control.
Smart Images

Figure CN122493664A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of road traffic management technology, and in particular to a method and system for predicting the travel of vehicles not yet connected to the highway network based on spatiotemporal graph convolution. Background Technology
[0002] Currently, with the rapid development of highway networks, traffic management departments have an increasing demand for highway traffic flow prediction, traffic scheduling, and emergency management. Existing highway vehicle prediction technologies mainly rely on data from vehicles already in the network, such as ETC, GPS trajectories, or traffic camera data, using statistical models or deep learning methods to predict traffic flow. However, these methods still have significant shortcomings in practical applications: 1. Incomplete data coverage: Existing technologies mainly analyze vehicles already in the network, lacking the ability to predict vehicles not yet in the network (vehicles awaiting network entry), leading to biases in overall traffic flow prediction. 2. Limitations of model methods: Traditional prediction models such as ARIMA, LSTM, or GRU are difficult to effectively model the travel demand of vehicles not yet in the network. While existing graph convolutional network methods can capture spatiotemporal features, they are mostly limited to the trajectories of vehicles already in the network, failing to fully consider highway network topology, service area congestion, and holiday travel patterns. 3. Insufficient prediction accuracy and real-time performance: Existing methods struggle to cope with traffic fluctuations caused by holiday peaks or emergencies, resulting in large prediction delays and high errors, failing to meet the real-time scheduling needs of highway operations.
[0003] In summary, existing technologies are insufficient to accurately, in real-time, and interpretably predict the travel demand of vehicles not yet connected to the highway network, and a new technological solution is urgently needed to overcome these shortcomings. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for predicting the travel of vehicles not yet connected to the highway network based on spatiotemporal graph convolution.
[0005] The technical solution adopted in this invention is:
[0006] A method for predicting trips of non-networked vehicles on highways based on spatiotemporal graph convolution includes the following steps:
[0007] Acquire the passage record data of the ETC gantry at the highway entrance. The passage record data includes at least the vehicle's unique identifier, vehicle passage time, gantry number, and vehicle type. Aggregate the passage record data at a first preset time granularity to generate the historical traffic time series of each gantry node. Construct an adjacency matrix of the road network structure based on the physical topological relationship between the gantries.
[0008] Extract the spatial topological features and temporal periodic features of each gantry node, and fuse the spatial topological features and temporal periodic features to form a spatiotemporal joint feature vector; the spatial topological features should at least include one-hop and multi-hop neighbor structure information based on the adjacency matrix; the temporal periodic features should at least include hour, weekday, holiday identifiers and statistical features of historical traffic time series;
[0009] A parallelized multi-layer graph convolutional network is used to extract deep spatial features from the spatiotemporal joint feature vectors at each time step, and the deep spatial features at each time step are integrated into preliminary spatiotemporal travel demand features. By constructing a graph convolutional sub-network independently for each time step, the travel demand information of neighboring gantry nodes of each gantry node is aggregated layer by layer to extract deep spatial features that reflect the spatial propagation and diffusion law of travel demand between gantry nodes. Specifically, each graph convolutional sub-network consists of stacked multi-layer graph convolutional layers, ReLU activation function and Dropout layer, and outputs the deep spatial features of each time step by aggregating the neighbor information of the normalized adjacency matrix.
[0010] After dimensional rearrangement of the initial spatiotemporal feature representation, it is input into a two-layer bidirectional gated recurrent unit network. The reset gate and update gate mechanisms are used to capture the historical evolution trend of travel demand in the initial spatiotemporal feature representation along the forward time direction, and extract the retrospective dependency relationship between future time periods and historical time periods along the reverse time direction, forming a spatiotemporal joint feature that represents the long-term and short-term time dependency relationship of travel demand.
[0011] The spatiotemporal joint features are input into a multi-head self-attention module, which adaptively learns the attention weights of each feature channel corresponding to different travel influencing factors through a multi-scale bottleneck structure. The features of key travel periods are dynamically enhanced, while noise fluctuations in unrelated periods are suppressed, generating enhanced spatiotemporal travel demand features with focusing capabilities. Among them, key travel periods include holiday peaks and commuting peaks.
[0012] Specifically, the spatiotemporal joint features are reshaped to merge the spatial and temporal dimensions; attention weight vectors are generated for each feature channel through a feedforward network with a multi-scale bottleneck structure using a multi-head self-attention module, and after normalization by the Sigmoid function, the spatiotemporal joint features are dynamically weighted to highlight key channel and key time period information, suppress noise, and obtain enhanced spatiotemporal features.
[0013] After enhancing the spatiotemporal travel demand characteristics, the predicted travel flow of non-networked vehicles at each ETC entrance gantry is output through layer normalization and regularization via a fully connected layer. The predicted travel flow of non-networked vehicles represents the number of potential travel vehicles that have not yet entered the highway through the ETC entrance gantry.
[0014] Furthermore, the first preset time granularity is 5 minutes, and the second preset time granularity is the next 15 minutes;
[0015] Furthermore, the time period characteristics also include weekend / weekday identifiers, and the spatial topology characteristics include gantry topology relationships, multi-hop neighbor subgraphs, node attributes, and the location type of the entrance gantry. The location types include urban core area entrances, suburban entrances, and trunk interchange entrances.
[0016] Furthermore, the implementation of multi-layer graph convolutional networks for extracting deep spatial features includes:
[0017] ;
[0018] in, For the first The node feature matrix of the layer; For the first The node feature matrix of the layer The total number of nodes. For the first The feature dimension of the layer; The adjacency matrix after adding self-loops, where A represents the spatial adjacency relationship between gantry nodes. Represents a node and Connected; It is an identity matrix; the introduction of self-loops allows each gantry node to retain its own historical travel characteristics when aggregating neighbor travel demand information; express The degree matrix, i.e., the diagonal matrix, has the corresponding elements. , It is the adjacency matrix after adding self-loops. The element in the i-th row and j-th column is obtained by superimposing the original adjacency matrix A with the identity matrix. When i and j are different gantry nodes... Values and The same applies: 1 represents a direct road network connection between the two gantries, and 0 represents that they are not adjacent to each other; when i=j The value is always 1, enabling nodes to self-connect, allowing graph convolution operations to retain their own historical traffic information while aggregating the travel characteristics of neighboring gantries. It is a symmetric normalized adjacency matrix used to balance the scale difference between high-flow gantries and low-flow gantries in feature aggregation, and to prevent gradient explosion or vanishing. For the first A learnable weight matrix is used to linearly transform the aggregated travel demand features. ReLU is a non-linear activation function that introduces expressive power into the model.
[0019] Furthermore, the processing procedure of the two-layer bidirectional gated cyclic unit network includes:
[0020] The first-layer gated loop unit processes the initial spatiotemporal travel demand features in the forward chronological direction, capturing the positive evolution pattern of travel demand for vehicles not yet connected to the network from history to the present. The second-layer gated loop unit processes the initial spatiotemporal travel demand features in the reverse chronological direction, extracting the reverse correlation information between future travel demand and historical travel patterns. The hidden states extracted from the two directions are then concatenated to obtain a spatiotemporal joint feature that simultaneously contains forward trend information and backward correlation information.
[0021] Furthermore, the processing steps of the multi-head self-attention module include:
[0022] The spatiotemporal joint features are reshaped to merge the spatial and temporal dimensions;
[0023] Then, global pooling is used to compress the spatiotemporal information of each feature channel to generate a scalar importance weight for each feature channel;
[0024] The scalar importance weights of each feature channel are used to generate attention weights for each feature channel through a two-layer fully connected network with a bottleneck structure constructed using a dimensionality reduction ratio r. The first layer weight matrix is as follows: The second layer weight matrix is C represents the number of feature channels. Specifically, by using a multi-scale bottleneck structure, the number of parameters is reduced while enhancing the nonlinear modeling ability of the interaction between different travel influencing factors, enabling the model to automatically distinguish the importance of differentiated feature channels between weekday commuting patterns and holiday travel patterns.
[0025] A highway trip prediction system for vehicles not yet connected to the network, based on spatiotemporal graph convolution, includes:
[0026] The data acquisition and preprocessing module is used to collect passage record data from ETC gantries at highway entrances. The passage record data includes at least the vehicle's unique identifier, vehicle passage time, gantry number, and vehicle type. The passage record data is aggregated at a first preset time granularity to generate historical traffic time series for each gantry node. An adjacency matrix of the road network structure is constructed based on the physical topological relationship between the gantries.
[0027] The spatiotemporal feature construction module is used to extract the spatial topological features and temporal periodic features of each gantry node, and fuse the spatial topological features and temporal periodic features to form a spatiotemporal joint feature vector; the spatial topological features include at least one-hop and multi-hop neighbor structure information based on the adjacency matrix; the temporal periodic features include at least hour, weekday, holiday identifiers and statistical features of historical traffic time series;
[0028] The parallelized multi-layer graph convolutional spatial coding module is used to extract deep spatial features from the spatiotemporal joint feature vectors at each time step and integrate the deep spatial features of each time step into preliminary spatiotemporal travel demand features. By independently constructing a graph convolutional sub-network for each time step, the travel demand information of neighboring gantries of each gantry node is aggregated layer by layer to extract deep spatial features that reflect the spatial propagation and diffusion law of travel demand between gantries.
[0029] The bidirectional gated loop unit time series modeling module is used to capture the historical evolution trend of travel demand in the preliminary spatiotemporal feature representation along the forward time direction using the reset gate and update gate mechanisms, and to extract the retrospective dependency relationship between future time periods and historical time periods along the reverse time direction, forming a spatiotemporal joint feature that represents the long-term and short-term time dependency relationship of travel demand.
[0030] The multi-head self-attention enhancement module is used to address the differences in the importance of factors influencing travel demand at each entrance gantry under different date types and time periods. It adaptively learns the attention weights of each feature channel corresponding to different travel influencing factors through a multi-scale bottleneck structure. It dynamically enhances the features of key travel periods while suppressing noise fluctuations in unrelated periods, generating enhanced spatiotemporal travel demand features with focusing capabilities.
[0031] The prediction output module is used to process the enhanced spatiotemporal travel demand characteristics through layer normalization and regularization, and then output the predicted travel flow of non-networked vehicles at each ETC entrance gantry within the second preset time granularity in the future through a fully connected layer mapping. The predicted travel flow of non-networked vehicles represents the number of potential travel vehicles that have not yet entered the highway through the ETC entrance gantry.
[0032] The model evaluation and optimization module is used to optimize and train a spatiotemporal graph neural network model that includes a spatiotemporal feature construction module, a parallelized multi-layer graph convolutional spatial coding module, a bidirectional gated recurrent unit temporal modeling module, a multi-head self-attention enhancement module, and a prediction output module using a time-segmented weighted loss function. The module also evaluates the model performance using a travel prediction accuracy evaluation index and iteratively updates the model parameters based on the evaluation results.
[0033] Furthermore, addressing the practical issue of varying prediction difficulty between regular traffic periods and peak holiday traffic periods in travel forecasting for vehicles not yet connected to the network, a time-segmented weighted loss function is employed to optimize the spatiotemporal graph neural network model. The error weights assigned to samples during peak holiday traffic periods are greater than those for regular traffic periods. The model training utilizes the AdamW optimizer, coupled with a cosine annealing learning rate scheduling strategy and an early stopping mechanism to prevent overfitting.
[0034] Furthermore, the evaluation indicators include mean absolute error, root mean square error, and coefficient of determination.
[0035] The present invention adopts the above technical solution and has the following significant advantages compared with the prior art:
[0036] (1) This invention, through historical traffic data of ETC entrance gantries, for the first time achieves the prediction of the number of vehicles not yet connected to the network at each entrance within the next 15 minutes, filling a technological gap in this field. (2) This invention uses multi-layer graph convolution parallel extraction to extract the spatial propagation law of travel demand between gantries, bidirectional GRU to simultaneously capture the historical evolution trend and future retrospective dependence of travel demand, and multi-head attention mechanism to adaptively enhance the characteristics of key time periods such as holiday peaks and commuting peaks, and suppress noise, thereby effectively overcoming the limitation of traditional models that cannot model the complex spatiotemporal travel patterns of vehicles not yet connected to the network. (3) This invention is particularly robust to travel prediction during peak periods with sudden changes in traffic flow, and can meet the requirements of real-time scheduling of highways for prediction accuracy and timeliness.
[0037] This invention directly utilizes existing ETC gantry data, requires no additional hardware, has strong generalization capabilities, and can be quickly deployed in scenarios such as highway entrance traffic prediction, congestion warning, and lane control. Attached Figure Description
[0038] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments;
[0039] Figure 1 This is a schematic diagram illustrating the principle architecture of the highway non-networked vehicle travel prediction method based on spatiotemporal graph convolution of the present invention.
[0040] Figure 2 This is a schematic diagram of the graph convolution module structure of the multilayer graph convolutional network of the present invention;
[0041] Figure 3 This is a schematic diagram of the gated loop unit (GRU) module structure of the present invention;
[0042] Figure 4 This is a schematic diagram of the multi-head self-attention module structure of the present invention. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0044] like Figures 1 to 4 As shown, this invention discloses a method for predicting the travel of vehicles not yet connected to the highway network based on spatiotemporal graph convolution, including the following steps:
[0045] Acquire the passage record data of the ETC gantry at the highway entrance. The passage record data includes at least the vehicle's unique identifier, vehicle passage time, gantry number, and vehicle type. Aggregate the passage record data at a first preset time granularity to generate the historical traffic time series of each gantry node. Construct an adjacency matrix of the road network structure based on the physical topological relationship between the gantries.
[0046] Extract the spatial topological features and temporal periodic features of each gantry node, and fuse the spatial topological features and temporal periodic features to form a spatiotemporal joint feature vector; the spatial topological features should at least include , This is the matrix after adding self-loops.
[0047] Based on the adjacency matrix, the system incorporates one-hop and multi-hop neighbor structure information; temporal periodic features include at least hourly, weekday, and holiday identifiers, as well as statistical features of historical traffic time series; specifically, spatial topological features include gantry topology, two-hop neighbor subgraphs, node attributes, and the location type of the entrance gantry, with location types including urban core area entrances, suburban entrances, and trunk interchange entrances. Temporal periodic features also include weekend / weekday identifiers, and spatial topological features include gantry topological relationships, multi-hop neighbor subgraphs, node attributes, and the location type of the entrance gantry. These spatial and temporal features are mapped to a unified high-dimensional space to form a spatiotemporal joint feature vector.
[0048] A parallelized multi-layer graph convolutional network is employed to extract deep spatial features from the spatiotemporal joint feature vectors at each time step, and these deep spatial features are then integrated into preliminary spatiotemporal travel demand features. By independently constructing a graph convolutional sub-network for each time step, the travel demand information of neighboring gantry nodes is aggregated layer by layer to extract deep spatial features reflecting the spatial propagation and diffusion patterns of travel demand between gantry nodes. Specifically, each graph convolutional sub-network consists of stacked multi-layer graph convolutional layers, ReLU activation functions, and Dropout layers. The deep spatial features of each time step are output by aggregating neighbor information from the normalized adjacency matrix. This hierarchical approach extracts deep nonlinear spatial features from the graph data at each independent time step, effectively mitigating overfitting. The spatial features extracted from all time steps are then integrated to form a preliminary spatiotemporal feature representation.
[0049] The initial spatiotemporal feature representation is rearranged in dimensions and then input into a two-layer bidirectional gated recurrent unit (GRU) network. The reset and update gate mechanisms simultaneously capture the historical evolution trend of travel demand in the initial spatiotemporal feature representation along the forward chronological direction and extract the retrospective dependencies of future periods on historical periods along the reverse chronological direction, forming a spatiotemporal joint feature representing the long-term and short-term temporal dependencies of travel demand. Specifically, the initial spatiotemporal feature representation is first rearranged in dimensions to adapt to the input format of the sequence model. Subsequently, the features are fed into a two-layer GRU network. The GRU's gating mechanism can capture the dynamic evolution and long-term dependencies of node features over time, thereby expanding the spatial features into true spatiotemporal joint features.
[0050] The spatiotemporal joint features are input into a multi-head self-attention module. Through a multi-scale bottleneck structure, the module adaptively learns the attention weights for different travel influencing factors corresponding to each feature channel. Features during key travel periods are dynamically enhanced, while noise fluctuations in unrelated periods are suppressed, generating enhanced spatiotemporal travel demand features with focusing capabilities. Key travel periods include holiday peaks and commuting peaks. Specifically, the spatiotemporal joint features are reshaped to merge the spatial and temporal dimensions. An attention weight vector is generated for each feature channel through a feedforward network of the multi-scale bottleneck structure of the multi-head self-attention module. After normalization using the Sigmoid function, the spatiotemporal joint features are dynamically weighted to highlight key channels and key time periods, suppressing noise and obtaining enhanced spatiotemporal features. Specifically, a multi-scale attention enhancement module is introduced to focus on key information. This module first reshapes the spatiotemporal features, then utilizes a multi-head attention mechanism to enable the model to focus on important correlations between features in parallel from different subspaces (i.e., "multi-scale"), adaptively enhancing information-rich features and suppressing noise. Finally, a reverse feature reshaping operation restores the features to their original format, completing the information extraction and enhancement.
[0051] After enhancing the spatiotemporal travel demand features through layer normalization and regularization, the predicted travel flow of non-ETC (Electronic Toll Collection) vehicles at each ETC entrance gantry within a second preset time granularity is output via a fully connected layer. This predicted travel flow represents the number of potential vehicles that have not yet entered the highway through the ETC entrance gantry. Specifically, the final processed high-level features are fed into a classification prediction module. This module consists of two fully connected layers, with ReLU activation, Dropout, and LayerNorm layers in between, to further enhance the model's nonlinear expressive power, stabilize the training process, and normalize the feature distribution, ultimately outputting the prediction results. This invention achieves the separation and collaborative modeling of spatial dependence and temporal dynamics, and realizes autonomous feature optimization through an attention mechanism, providing a general and effective solution for the spatiotemporal prediction problem of graph-structured data.
[0052] Furthermore, the implementation of multi-layer graph convolutional networks for extracting deep spatial features includes:
[0053] ;
[0054] in, For the first The node feature matrix of the layer; For the first The node feature matrix of the layer The total number of nodes. For the first The feature dimension of the layer; The adjacency matrix after adding self-loops, where A represents the spatial adjacency relationship between gantry nodes. Represents a node and Connected; It is an identity matrix; the introduction of self-loops allows each gantry node to retain its own historical travel characteristics when aggregating neighbor travel demand information; express The degree matrix, i.e., the diagonal matrix, has the corresponding elements. . It is the adjacency matrix after adding self-loops. The element in the i-th row and j-th column is obtained by superimposing the original adjacency matrix A with the identity matrix. When i and j are different gantry nodes... Values and The same applies: 1 represents a direct road network connection between the two gantries, and 0 represents that they are not adjacent to each other; when i=j The value is always 1, enabling nodes to self-connect, allowing graph convolution operations to retain their own historical traffic information while aggregating the travel characteristics of neighboring gantries. It is a symmetric normalized adjacency matrix used to balance the scale difference between high-flow gantries and low-flow gantries in feature aggregation, and to prevent gradient explosion or vanishing. For the first A learnable weight matrix is used to linearly transform the aggregated travel demand features. ReLU is a non-linear activation function that introduces expressive power into the model.
[0055] like Figure 2 As shown, the specific workflow of a multi-layer graph convolutional network is as follows:
[0056] The first layer of the GCN (GCN Layer 1) receives the input feature matrix. and normalized adjacency matrix Perform the following operations:
[0057] (3);
[0058] This layer passes through Achieve weighted average aggregation of one-hop neighbor information, and then... The intermediate feature representation is obtained by linear transformation and ReLU activation. At this point, the features of each node have encoded the structural information of its direct neighbors.
[0059] The second layer GCN (GCN Layer 2) is Using this as input, further extract higher-order graph structure features:
[0060] (4);
[0061] because Essentially This approximation (ignoring the weight matrix) allows each node to perceive neighbor information within a two-hop range, resulting in a more global understanding of the graph structure. Final output... As a feature representation of the entire GCN module, it will be sent to the subsequent temporal feature extraction module, laying a solid spatial feature foundation for subsequent spatiotemporal joint modeling.
[0062] Furthermore, the processing procedure of the two-layer bidirectional gated cyclic unit network includes:
[0063] The first-layer gated loop unit processes the initial spatiotemporal travel demand features in the forward chronological direction, capturing the positive evolution pattern of travel demand for vehicles not yet connected to the network from history to the present. The second-layer gated loop unit processes the initial spatiotemporal travel demand features in the reverse chronological direction, extracting the reverse correlation information between future travel demand and historical travel patterns. The hidden states extracted from the two directions are then concatenated to obtain a spatiotemporal joint feature that simultaneously contains forward trend information and backward correlation information.
[0064] Specifically, such as Figure 3 As shown, spatial features are rearranged and fed into a two-layer bidirectional GRU. Reset and update gates are used to capture long-short-term dependencies, forming spatiotemporal joint features. A Gated Recurrent Unit (GRU) is used as its core temporal feature extraction module. Its core innovation lies in dynamically controlling the fusion of historical information and current input through two learnable gating vectors—the reset gate and the update gate—to achieve efficient modeling of long-term temporal dependencies. This mechanism is mathematically defined as several consecutive computational steps. The first step is gating signal generation. The model receives the input features of the current time step. Hidden state compared to the previous time step First, through independent linear transformations and the Sigmoid activation function... Parallel calculation of the reset gate With the update gate :
[0065] (5);
[0066] (6)
[0067] in, This is the corresponding weight matrix. The bias vector. Reset gate. The value range is [0,1], which determines how much historical information is available. The state should be "forgotten" to be used to compute new candidate states; while the update gate... This controls the extent to which newly generated information will cover historical information in subsequent steps. The second step is candidate hidden state calculation. The role of the reset gate is reflected in this step. The model calculates a candidate hidden state. It represents a "suggested update" based on the current input and filtered historical information:
[0068]
[0069] here, This represents the Hadamard product (element-wise multiplication). When the gate is reset... When the value is close to 0, historical information is largely ignored, and the candidate state depends primarily on the current input. This allows the model to quickly adapt to sudden changes or new patterns in the input that are unrelated to the history; when When the value approaches 1, nearly complete historical information is used for calculation, which helps to capture stable and continuous temporal evolution patterns.
[0070] The third step is the final update of the hidden state. (Update portal) It plays a central role in this step, acting as a mixing coefficient in historical states. and candidate states Weighted interpolation is performed between the values to generate the final hidden state at the current time step. :
[0071] (8);
[0072] This achieves smooth integration of information flow. If Approaching 0, then The model tends to retain historical memory, which is beneficial for modeling long-term dependencies and stable processes; if If it approaches 1, then The model tends to adopt updates based on current observations, which can quickly respond to significant changes in the input sequence.
[0073] Furthermore, the processing steps of the multi-head self-attention module include:
[0074] The spatiotemporal joint features are reshaped to merge the spatial and temporal dimensions;
[0075] Then, global pooling is used to compress the spatiotemporal information of each feature channel to generate a scalar importance weight for each feature channel;
[0076] The scalar importance weights of each feature channel are used to generate attention weights for each feature channel through a two-layer fully connected network with a bottleneck structure constructed using a dimensionality reduction ratio r. The first layer weight matrix is as follows: The second layer weight matrix is C represents the number of feature channels. Specifically, by using a multi-scale bottleneck structure, the number of parameters is reduced while enhancing the nonlinear modeling ability of the interaction between different travel influencing factors, enabling the model to automatically distinguish the importance of differentiated feature channels between weekday commuting patterns and holiday travel patterns.
[0077] Specifically, such as Figure 4 As shown, spatiotemporal features are reshaped and multi-scale attention weighted to adaptively highlight key channels and key time periods, suppress noise, and improve prediction stability. The core idea of the attention module is to allow the model to automatically learn the importance weights of different feature channels (or feature dimensions) and recalibrate the original features accordingly. The process can be summarized in three steps: feature reshaping, weight generation, and feature reweighting. Feature reshaping first reshapes the temporal features output by the GRU module to adapt to the calculation of attention weights. Assume the final feature tensor output by the GRU is... ,in For batch size, For the number of nodes, For time steps, This represents the number of feature channels.
[0078] (9);
[0079] The purpose of this step is to merge the spatial (node) and temporal dimensions so that the attention mechanism operates in the feature channel dimension. The operation is performed on the above. Attention weight generation (multi-scale information extraction and aggregation) is the core of the attention mechanism. The model generates a scalar importance weight for each feature channel through a shared feedforward network (usually composed of fully connected layers and non-linear activation functions):
[0080] (10);
[0081] in, This indicates that global average pooling is performed across the merged (N×T) dimension, compressing the spatiotemporal information of each channel into a scalar. Next, an attention weight vector is generated through a two-layer feedforward network with a bottleneck structure.
[0082] (11);
[0083] (12);
[0084] here, , , This is the dimensionality reduction ratio (e.g., 16), used to construct the bottleneck structure to reduce the number of parameters and enhance nonlinearity. The final attention weights. Normalization to the (0,1) interval using the Sigmoid function indicates the importance of each feature channel.
[0085] Furthermore, the present invention also discloses a highway non-networked vehicle trip prediction system based on spatiotemporal graph convolution, comprising:
[0086] The data acquisition and preprocessing module is used to collect passage record data from ETC gantries at highway entrances. The passage record data includes at least the vehicle's unique identifier, vehicle passage time, gantry number, and vehicle type. The passage record data is aggregated at a first preset time granularity to generate historical traffic time series for each gantry node. An adjacency matrix of the road network structure is constructed based on the physical topological relationship between the gantries.
[0087] The spatiotemporal feature construction module is used to extract the spatial topological features and temporal periodic features of each gantry node, and fuse the spatial topological features and temporal periodic features to form a spatiotemporal joint feature vector; the spatial topological features include at least one-hop and multi-hop neighbor structure information based on the adjacency matrix; the temporal periodic features include at least hour, weekday, holiday identifiers and statistical features of historical traffic time series;
[0088] The parallelized multi-layer graph convolutional spatial coding module is used to extract deep spatial features from the spatiotemporal joint feature vectors at each time step and integrate the deep spatial features of each time step into preliminary spatiotemporal travel demand features. By independently constructing a graph convolutional sub-network for each time step, the travel demand information of neighboring gantries of each gantry node is aggregated layer by layer to extract deep spatial features that reflect the spatial propagation and diffusion law of travel demand between gantries.
[0089] The bidirectional gated loop unit time series modeling module is used to capture the historical evolution trend of travel demand in the preliminary spatiotemporal feature representation along the forward time direction using the reset gate and update gate mechanisms, and to extract the retrospective dependency relationship between future time periods and historical time periods along the reverse time direction, forming a spatiotemporal joint feature that represents the long-term and short-term time dependency relationship of travel demand.
[0090] The multi-head self-attention enhancement module is used to address the differences in the importance of factors influencing travel demand at each entrance gantry under different date types and time periods. It adaptively learns the attention weights of each feature channel corresponding to different travel influencing factors through a multi-scale bottleneck structure. It dynamically enhances the features of key travel periods while suppressing noise fluctuations in unrelated periods, generating enhanced spatiotemporal travel demand features with focusing capabilities.
[0091] The prediction output module is used to process the enhanced spatiotemporal travel demand characteristics through layer normalization and regularization, and then output the predicted travel flow of non-networked vehicles at each ETC entrance gantry within the second preset time granularity in the future through a fully connected layer mapping. The predicted travel flow of non-networked vehicles represents the number of potential travel vehicles that have not yet entered the highway through the ETC entrance gantry.
[0092] The model evaluation and optimization module is used to optimize and train a spatiotemporal graph neural network model that includes a spatiotemporal feature construction module, a parallelized multi-layer graph convolutional spatial coding module, a bidirectional gated recurrent unit temporal modeling module, a multi-head self-attention enhancement module, and a prediction output module using a time-segmented weighted loss function. The module also evaluates the model performance using a travel prediction accuracy evaluation index and iteratively updates the model parameters based on the evaluation results.
[0093] Furthermore, addressing the practical issue of varying prediction difficulty between regular traffic periods and peak holiday traffic periods in travel forecasting for vehicles not yet connected to the network, a time-segmented weighted loss function is employed to optimize the spatiotemporal graph neural network model. The error weights assigned to samples during peak holiday traffic periods are greater than those for regular traffic periods. The model training utilizes the AdamW optimizer, coupled with a cosine annealing learning rate scheduling strategy and an early stopping mechanism to prevent overfitting.
[0094] Furthermore, the evaluation indicators include mean absolute error, root mean square error, and coefficient of determination.
[0095] Experimental results: As shown in Table 1, in order to verify the superiority of the system of the present invention in the task of predicting traffic flow of ETC on highways, a comparative experiment was conducted. The three core indicators, namely mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination R², were combined with the actual-predicted traffic flow fitting scatter plot for comprehensive evaluation.
[0096] Table 1 Comparison of prediction results from different models
[0097]
[0098] To evaluate the contribution of each module to the overall model performance, this invention conducted systematic ablation experiments, and the results are shown in Table 2. This invention achieved optimal performance across all evaluation metrics. The results show that the attention mechanism has the most significant impact on performance. After removing the attention module (ablation_no_attention), MSE, RMSE, and MAE all increased significantly, while R² decreased markedly, indicating that the attention mechanism plays a crucial role in capturing spatiotemporal dependencies and assigning weights to key features. The GCN module also makes a significant contribution to prediction accuracy. Removing GCN (ablation_no_gcn) significantly degrades performance, demonstrating that graph structure modeling plays an irreplaceable role in characterizing spatial correlations between nodes. Furthermore, the model retaining only GCN (ablation_only_gcn) performed the worst, further indicating that a single structure is insufficient to effectively model complex spatiotemporal dynamic features. The introduction of temporal features and positional encoding effectively improves the model's temporal modeling capability. Removing either temporal features or positional encoding leads to an increase in prediction error, particularly noticeable in MAPE and validation loss metrics, indicating that they complement each other in characterizing periodic changes and sequence positional information. Meanwhile, residual connections have a positive impact on model training stability and performance improvement. Without residual connections, the error increases significantly, validating the effectiveness of residual structures in mitigating gradient vanishing and enhancing the expressive power of deep networks.
[0099] Table 2 Comparison of ablation experiments
[0100]
[0101] In summary, each module plays a crucial role in improving model performance, and the collaborative design of multiple modules enables the complete model to achieve optimal performance in both prediction accuracy and generalization ability.
[0102] This invention achieves high-precision prediction, outperforming existing baseline models such as ARIMA, LSTM, GRU, Transformer, and Random Forest on measured data from Fujian's expressways ETC system. It employs a multi-layered GCN adaptive learning mechanism to learn gantry node topology dependencies, overcoming the limitations of static graph structures and adapting to dynamic changes in the road network. The bidirectional GRU effectively captures long- and short-term time dependencies, solving the problems of limited receptive fields and large long-term prediction biases in traditional cyclic networks. The multi-head self-attention mechanism dynamically weights spatiotemporal features, adaptively enhancing performance for peak and sudden traffic surges, significantly improving robustness. Directly relying on ETC gantry data, this invention requires no additional hardware and can be quickly deployed for scenarios such as expressway entrance traffic prediction, congestion warning, and lane control. By comparing data from expressway entrances, this invention maintains high fitting accuracy at high-traffic entrances such as Xiamen, Xiangqian, Xiang'an, Fuzhou South, and Fuzhou East, making it suitable for full-network-level prediction. This invention supports ablation analysis and module replacement, facilitating continuous upgrades through the integration of multi-source data such as meteorological, holiday, and accident data.
[0103] The present invention adopts the above technical solution and has the following significant advantages compared with the prior art:
[0104] (1) This invention, through historical traffic data of ETC entrance gantries, for the first time achieves the prediction of the number of vehicles not yet connected to the network at each entrance within the next 15 minutes, filling a technological gap in this field. (2) This invention uses multi-layer graph convolution parallel extraction to extract the spatial propagation law of travel demand between gantries, bidirectional GRU to simultaneously capture the historical evolution trend and future retrospective dependence of travel demand, and multi-head attention mechanism to adaptively enhance the characteristics of key time periods such as holiday peaks and commuting peaks, and suppress noise, thereby effectively overcoming the limitation of traditional models that cannot model the complex spatiotemporal travel patterns of vehicles not yet connected to the network. (3) This invention is particularly robust to travel prediction during peak periods with sudden changes in traffic flow, and can meet the requirements of real-time scheduling of highways for prediction accuracy and timeliness.
[0105] This invention directly utilizes existing ETC gantry data, requires no additional hardware, has strong generalization capabilities, and can be quickly deployed in scenarios such as highway entrance traffic prediction, congestion warning, and lane control.
[0106] Obviously, the described embodiments are only a part of the embodiments of this application, not all of them. Without conflict, the embodiments and features in the embodiments of this application can be combined with each other. The components of the embodiments of this application described and illustrated herein can generally be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of this application is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
Claims
1. A highway non-connected vehicle trip prediction method based on space-time graph convolution, characterized in that, Includes the following steps: Acquire the passage record data of the ETC gantry at the highway entrance. The passage record data includes at least the vehicle's unique identifier, vehicle passage time, gantry number, and vehicle type. Aggregate the passage record data at a first preset time granularity to generate the historical traffic time series of each gantry node. Construct an adjacency matrix of the road network structure based on the physical topological relationship between the gantries. Extract the spatial topological features and temporal periodic features of each gantry node, and fuse the spatial topological features and temporal periodic features to form a spatiotemporal joint feature vector; Topological features should include at least one-hop and multi-hop neighbor structure information based on the adjacency matrix; time period features should include at least hour, weekday, and holiday identifiers, as well as statistical features of historical traffic time series. Parallelized multi-layer graph convolutional networks are used to extract deep spatial features from the spatiotemporal joint feature vectors at each time step, and the deep spatial features at each time step are integrated into preliminary spatiotemporal travel demand features. By constructing graph convolutional sub-networks independently for each time step, the travel demand information of neighboring gantries of each gantry node is aggregated layer by layer to extract deep spatial features that reflect the spatial propagation and diffusion law of travel demand between gantries. After dimensional rearrangement of the initial spatiotemporal feature representation, it is input into a two-layer bidirectional gated recurrent unit network. The reset gate and update gate mechanisms are used to capture the historical evolution trend of travel demand in the initial spatiotemporal feature representation along the forward time direction, and extract the retrospective dependency relationship between future time periods and historical time periods along the reverse time direction, forming a spatiotemporal joint feature that represents the long-term and short-term time dependency relationship of travel demand. The spatiotemporal joint features are input into a multi-head self-attention module, which adaptively learns the attention weights of each feature channel corresponding to different travel influencing factors through a multi-scale bottleneck structure. The features of key travel periods are dynamically enhanced, while noise fluctuations in unrelated periods are suppressed, generating enhanced spatiotemporal travel demand features with focusing capabilities. Among them, key travel periods include holiday peaks and commuting peaks. After enhancing the spatiotemporal travel demand characteristics, the predicted travel flow of non-networked vehicles at each ETC entrance gantry is output through layer normalization and regularization via a fully connected layer. The predicted travel flow of non-networked vehicles represents the number of potential travel vehicles that have not yet entered the highway through the ETC entrance gantry.
2. The highway V2X travel prediction method based on spatio-temporal graph convolution according to claim 1, characterized in that, The first preset time granularity is 5 minutes, and the second preset time granularity is the next 15 minutes.
3. The method for predicting trips of non-networked vehicles on highways based on spatiotemporal graph convolution according to claim 1, characterized in that, The time period features also include weekend / weekday identifiers, and the spatial topology features include gantry topology relationships, multi-hop neighbor subgraphs, node attributes, and the location type of the entrance gantry. The location types include urban core area entrances, suburban entrances, and trunk interchange entrances.
4. The method for predicting trips of non-networked vehicles on highways based on spatiotemporal graph convolution according to claim 1, characterized in that, The implementation of multi-layer graph convolutional networks for extracting deep spatial features includes: ; in, For the first The node feature matrix of the layer; For the first The node feature matrix of the layer, The total number of nodes. For the first The feature dimensions of the layer; The adjacency matrix after adding self-loops, where A represents the spatial adjacency relationship between gantry nodes; It is the identity matrix; express The degree matrix; It is a symmetric normalized adjacency matrix; For the first Layer-learnable weight matrix; It is a non-linear activation function.
5. The method for predicting trips of non-networked vehicles on highways based on spatiotemporal graph convolution according to claim 1, characterized in that, The processing steps of a two-layer bidirectional gated recurrent unit network include: The first-layer gated loop unit processes the initial spatiotemporal travel demand features in the forward chronological direction, capturing the positive evolution pattern of travel demand for vehicles not yet connected to the network from history to the present. The second-layer gated loop unit processes the initial spatiotemporal travel demand features in the reverse chronological direction, extracting the reverse correlation information between future travel demand and historical travel patterns. The hidden states extracted from the two directions are then concatenated to obtain a spatiotemporal joint feature that simultaneously contains forward trend information and backward correlation information.
6. The method for predicting trips of non-networked vehicles on highways based on spatiotemporal graph convolution according to claim 1, characterized in that, The processing steps of the multi-head self-attention module include: The spatiotemporal joint features are reshaped to merge the spatial and temporal dimensions; Then, global pooling is used to compress the spatiotemporal information of each feature channel to generate a scalar importance weight for each feature channel; The scalar importance weights of each feature channel are used to generate attention weights for each feature channel through a two-layer fully connected network with a bottleneck structure constructed using a dimensionality reduction ratio r. The first layer weight matrix is as follows: The second layer weight matrix is C represents the number of feature channels.
7. A highway out-of-network vehicle trip prediction system based on spatiotemporal graph convolution, employing the highway out-of-network vehicle trip prediction method based on spatiotemporal graph convolution as described in any one of claims 1 to 6, characterized in that, The system includes: The data acquisition and preprocessing module is used to collect passage record data from ETC gantries at highway entrances. The passage record data includes at least the vehicle's unique identifier, vehicle passage time, gantry number, and vehicle type. The passage record data is aggregated at a first preset time granularity to generate historical traffic time series for each gantry node. An adjacency matrix of the road network structure is constructed based on the physical topological relationship between the gantries. The spatiotemporal feature construction module is used to extract the spatial topological features and temporal periodic features of each gantry node, and fuse the spatial topological features and temporal periodic features to form a spatiotemporal joint feature vector; the spatial topological features include at least one-hop and multi-hop neighbor structure information based on the adjacency matrix; the temporal periodic features include at least hour, weekday, holiday identifiers and statistical features of historical traffic time series; The parallelized multi-layer graph convolutional spatial coding module is used to extract deep spatial features from the spatiotemporal joint feature vectors at each time step and integrate the deep spatial features of each time step into preliminary spatiotemporal travel demand features. By independently constructing a graph convolutional sub-network for each time step, the travel demand information of neighboring gantries of each gantry node is aggregated layer by layer to extract deep spatial features that reflect the spatial propagation and diffusion law of travel demand between gantries. The bidirectional gated loop unit time series modeling module is used to capture the historical evolution trend of travel demand in the preliminary spatiotemporal feature representation along the forward time direction using the reset gate and update gate mechanisms, and to extract the retrospective dependency relationship between future time periods and historical time periods along the reverse time direction, forming a spatiotemporal joint feature that represents the long-term and short-term time dependency relationship of travel demand. The multi-head self-attention enhancement module is used to address the differences in the importance of factors influencing travel demand at each entrance gantry under different date types and time periods. It adaptively learns the attention weights of each feature channel corresponding to different travel influencing factors through a multi-scale bottleneck structure. It dynamically enhances the features of key travel periods while suppressing noise fluctuations in unrelated periods, generating enhanced spatiotemporal travel demand features with focusing capabilities. The prediction output module is used to process the enhanced spatiotemporal travel demand characteristics through layer normalization and regularization, and then output the predicted travel flow of non-networked vehicles at each ETC entrance gantry within the second preset time granularity in the future through a fully connected layer mapping. The predicted travel flow of non-networked vehicles represents the number of potential travel vehicles that have not yet entered the highway through the ETC entrance gantry. The model evaluation and optimization module is used to optimize and train a spatiotemporal graph neural network model that includes a spatiotemporal feature construction module, a parallelized multi-layer graph convolutional spatial coding module, a bidirectional gated recurrent unit temporal modeling module, a multi-head self-attention enhancement module, and a prediction output module using a time-segmented weighted loss function. The module also evaluates the model performance using a travel prediction accuracy evaluation index and iteratively updates the model parameters based on the evaluation results.
8. The highway non-networked vehicle travel prediction system based on spatiotemporal graph convolution according to claim 7, characterized in that, The spatiotemporal graph neural network model is optimized and trained using a time-segmented weighted loss function, with the error weights assigned to samples during peak traffic periods of holidays being greater than those during regular traffic periods. The model training uses the AdamW optimizer, along with a cosine annealing learning rate scheduling strategy and an early stopping mechanism to prevent overfitting.
9. The highway non-networked vehicle travel prediction system based on spatiotemporal graph convolution according to claim 7, characterized in that, Evaluation metrics include mean absolute error, root mean square error, and coefficient of determination.