A heterogeneous regional traffic prediction method

By combining strip convolutional layers, extended causal convolutional layers, adaptive graph convolutional layers, and cross-channel spatial attention layers, the problem of low traffic flow prediction accuracy in heterogeneous areas is solved, achieving high-precision and high-speed traffic flow prediction, which is applicable to road monitoring in various regions.

CN120258194BActive Publication Date: 2025-11-18DONGGUAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510202320.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-22
Publication Date
2025-11-18
Estimated Expiration
2045-02-22

AI Technical Summary

Technical Problem

Existing artificial intelligence solutions have poor accuracy in predicting traffic flow in heterogeneous regions, making it difficult to capture hidden relationships in heterogeneous regions, and data dimensionality upgrades and downscaling lead to the loss of spatial structure.

Method used

A neural network module consisting of strip convolutional layers, extended causal convolutional layers, adaptive graph convolutional layers, and cross-channel spatial attention layers is used to process spatiotemporal information through skip connections and residual connections. The adaptive graph convolutional layers are combined to simulate the road connectivity in heterogeneous regions for traffic flow prediction.

Benefits of technology

It improves the accuracy and speed of traffic flow prediction in heterogeneous areas and has strong compatibility, making it suitable for traffic flow monitoring in various regions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_29
    Figure QLYQS_29
  • Figure QLYQS_35
    Figure QLYQS_35
  • Figure GHA0000017092010000042
    Figure GHA0000017092010000042
Patent Text Reader

Abstract

A heterogeneous regional traffic flow prediction method, comprising the following steps: S1: a traffic monitoring module monitors; S2: a feature analysis module is transmitted to a neural network traffic prediction module; S3: the neural network traffic prediction module comprises: S31: a strip-shaped convolution layer is used for pre-processing spatial data; S32: an extended causal convolution is used as a time convolution layer to obtain the time correlation between road network nodes; S33: the adaptive graph convolution layer is used to imitate the road connection relationship between heterogeneous regions, analyze the spatial features, and use the space-time aggregation module when facing the traffic intersection area selection, so that the adaptive graph convolution layer focuses on the time information change combined with the space-time aggregation module; S34: the cross-channel space attention layer is used to learn the connectivity relationship of adjacent roads; S35: the residual connection and the fully connected layer are used to aggregate the space and time information to obtain the traffic prediction result; S4: a traffic information visualization module is displayed; the application improves the traffic prediction accuracy and prediction speed, and the method has strong compatibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of traffic flow prediction, and in particular to a method for predicting traffic flow in heterogeneous regions. Background Technology

[0002] Existing AI solutions have significantly improved the accuracy of traffic flow prediction.

[0003] Among the common technical methods used by artificial intelligence solutions for traffic flow prediction, the following are some examples:

[0004] 1. Convolutional neural networks can automatically extract spatiotemporal features from traffic flow data, making them suitable for processing traffic data with spatial correlations, such as road network structure and traffic flow distribution.

[0005] 2. Recurrent neural networks, such as Long Short-Term Memory (LSTM) and Gated Recurrent Units (GRU), can effectively capture the time-series characteristics and long-term dependencies of traffic flow, and have high accuracy in short-term traffic flow prediction.

[0006] 3. Graph neural networks introduce graph structures to the road network topology, which can fully consider the spatiotemporal correlation of traffic flow data and are suitable for traffic flow prediction of large-scale complex road networks.

[0007] However, in the graph neural network processing methods of the above-mentioned artificial intelligence solutions, since the input of the spatiotemporal graph is dynamic, the existing methods are unstable for spatiotemporal graph modeling. At the same time, it is difficult to capture the hidden relationships of traffic flow in heterogeneous regions (adjacent regions but with different traffic flow distributions). In the graph structure, the dimensionality increase and decrease of data can easily cause the loss of data spatial structure, resulting in poor traffic flow prediction accuracy for heterogeneous regions. Summary of the Invention

[0008] The purpose of this invention is to overcome the above-mentioned defects in the prior art and provide a heterogeneous regional flow prediction method to solve the problem of poor flow prediction accuracy in heterogeneous regions.

[0009] To achieve the above objectives, the present invention provides a heterogeneous regional flow prediction method, which includes the following steps:

[0010] S1: The traffic monitoring module acquires initial road traffic data through deployment at road network nodes and transmits it to the feature analysis module;

[0011] S2: The feature analysis module analyzes the initial road traffic data, eliminates abnormal data values, and transforms the initial traffic data into a feature matrix that can be input into the neural network. The feature matrix is ​​then input into the neural network traffic prediction module.

[0012] S3: The computational system in the neural network traffic prediction module performs prediction processing on the feature matrix in S2 through several stacked spatiotemporal modules. These spatiotemporal modules combine spatiotemporal information at different depths through skip connections and residual connections. The steps of combining these modules include the following sub-steps:

[0013] S31: The strip convolutional layer stabilizes the spatial data structure through strip convolution. After expanding the spatial dimension through two-dimensional convolution, it uses strip blocks to connect the space and preprocess the spatial data.

[0014] S32: Use extended causal convolution as a temporal convolutional layer to obtain the temporal correlation between road network nodes;

[0015] S33: By using an adaptive graph convolutional layer to mimic the road connection relationship between heterogeneous regions and analyze spatial features, a spatiotemporal aggregation module is used when selecting traffic flow intersection areas. After completing the reasoning of the time step, the module effectively combines the temporal and spatial traffic node information, embedding the predicted time step information into the traffic nodes. Combined with this spatiotemporal aggregation module, the adaptive graph convolutional layer pays attention to the changes in time information.

[0016] S34: Learn the connectivity between adjacent roads through a cross-channel spatial attention layer;

[0017] S35: Obtain traffic prediction results by aggregating spatial and temporal information through residual connections and fully connected layers;

[0018] S4: The traffic information visualization module displays traffic flow prediction results and shows the real-time traffic flow status and control plan of the monitored area.

[0019] Preferably, in step S31, the strip convolutional layer connects long-distance spatial data in the input. Using spatial features from point and edge clustering, one-dimensional convolutions of size 3 are performed in parallel on the inputs of the node and edge structures, respectively. The output Z is as follows:

[0020] Z=X☉σ(g(x N ,x D ))

[0021] Here, X represents a feature matrix input, N and D are the components of the feature matrix in two directions, ⊙ represents the matrix performing a Hardman product operation, σ is the sigmoid function that maps the features to the 0-1 interval, and the function g(-,-) represents the combination of the inputs at the two positions after performing one-dimensional convolutions.

[0022] Preferably, in step S32, extended causal convolution is used as a temporal convolutional layer to obtain the temporal correlation between road network nodes. The selected temporal convolutional layer uses a gating mechanism to control the flow of temporal information between layers. Specifically, the first temporal convolutional module uses extended causal convolution and a hyperbolic tangent activation function to learn sequence feature representations. Conversely, the second temporal convolutional module uses extended causal convolution and a sigmoid activation function to generate a gating signal, controlling the proportion of features learned by the first temporal convolutional module passed to the next layer. The expression for this signal is as follows:

[0023] Z=tanh(Φ1*X+c1)☉σ(Φ2*X+c2)

[0024] Where Z represents the output information, X represents the input information, Φ1, Φ2, c1, and c2 are model parameters, and tanh is the activation function, which keeps the data stable within the range of (-1, 1) to avoid the effects of gradient vanishing or gradient explosion.

[0025] Preferably, in step S33, the adaptive graph convolutional layer is a basic operation that extracts structural information of a given node through convolution. Spatially, graph convolution utilizes the information of neighboring nodes around a road network node, and by smoothing the signal of the central node itself to a certain extent, forms a new signal to increase the robustness of the signal. Let X represent the input signal, and let... Let Z represent the self-circular normalized adjacency matrix, Z∈R N×M Represents the output signal, W∈R D×M Let the learnable system parameter matrix be represented, and its graph convolution be defined as:

[0026]

[0027] Adaptive graph convolutional layers generate an adaptive adjacency matrix by randomly initializing two learnable embedding nodes, allowing the strength of connections between nodes to be quantified and spatial dependencies to be explored. The specific method is as follows:

[0028]

[0029] Among them, G1 is named the source node embedding. Named target node embedding, by G1 and Multiplying the values ​​yields the spatial dependency weights between the source and target nodes. The ReLU activation function is used to eliminate weak connections while preserving the necessary road network relationships. The SoftMax function is then applied to the adaptive adjacency matrix A. adp Normalization is performed; therefore, the normalized adaptive adjacency matrix A adp It can be viewed as a node transition matrix in the graph convolution diffusion process.

[0030] The following adaptive graph convolutional layer was used to simulate the diffusion and propagation process of the graph signal over k finite steps:

[0031] Z = ∑P k XW k1 +∑A adp XW k2

[0032] Among them, P k It is the power of the transitive matrix.

[0033] Preferably, in step s33, the spatiotemporal aggregation module includes the following steps:

[0034] Temporal state embedding models the node state transition relationship P across time steps using quaternion tensor operations, and its calculation process satisfies:

[0035]

[0036] Where X is the traffic node feature matrix, M1, M2, and M3 are trainable time parameter matrices, V is the input traffic flow speed vector, and b P As a bias term, the quaternion tensor models the node state transition relationship P across time steps, and can dynamically adjust the weight of the affected region in subsequent time steps.

[0037] Matrix D is generated by modeling dynamic spatial relationships, and its calculation process satisfies:

[0038]

[0039] Where X is the traffic node feature matrix, L1, L2, and L3 are trainable spatial parameter matrices, V is the input traffic flow speed vector, and b D As the bias term, the dynamic spatial relationship model generates matrix D through chain multiplication. A dimensionality reduction spatial interaction operator is constructed and combined with an adaptive graph convolution module to obtain the spatiotemporal aggregated feature Z of the output:

[0040] Z = DA adp WXP T

[0041] The spatiotemporal aggregation feature Z models the dynamic spatial relationship to generate matrix D and adaptive adjacency matrix A. adp Matrix multiplication is performed to generate spatial correlation features that integrate real-time vehicle speed. The node state transition relation matrix P is multiplied with the input feature matrix X to achieve joint encoding of traffic flow speed and spatiotemporal state. The final output spatiotemporal aggregation feature Z simultaneously includes road network topology constraints and traffic flow propagation delay characteristics.

[0042] Preferably, in step S34, the cross-channel spatial attention layer learns the connectivity between each input channel X and its adjacent channels through a weight matrix H, avoiding the impact of dimensionality reduction on the spatial channels, eliminating the dimensionality reduction operation, optimizing the channel learning mechanism, and adaptively learning different weights for each channel through one-dimensional convolution. Its output Z is expressed as:

[0043] Z = σ(HX)

[0044] Furthermore, the size of the one-dimensional convolution kernel is determined based on the number of channels, obtaining the mapping relationship Υ between the kernel size θ and the number of channels Q. The relationship between the number of channels Q and the kernel is then logarithmically fitted. An adaptive convolution kernel θ is generated based on the number of channels using the function Υ. This attention mechanism uses only the θ parameter, resolving spatial relationships through one-dimensional convolution while preserving the spatial structure of high-dimensional channels. The expression for its processing steps is as follows:

[0045]

[0046] ω=σ(Cov1 θ X),

[0047] Where b1 and b2 represent bias parameters, ω represents the processing result, and {} od Cov1 indicates that taking the odd number closest to X ensures that the convolution size is odd. θ X represents a one-dimensional convolution with kernel θ, and σ(·) represents the sigmoid activation function.

[0048] Preferably, in step S35, the results of each module are fused through skip connections and residual connections, and then fed into a fully connected layer to obtain the final traffic prediction output. The mean absolute error is selected as the training objective for the combination of several spatiotemporal modules, and is defined as follows:

[0049]

[0050] Where t is a certain time step, T represents the total number of time steps, X represents a feature matrix input, and N and D are the two directional components of this feature matrix, respectively. Represented as the predicted recursive value, Represented as the true value, As a whole output, instead of being generated recursively through t. The solution addresses the issue of the model making predictions for one step during training and testing, and attempting to make predictions for multiple steps during inference. The prediction results and real-time traffic flow information are uploaded to a visualization server via a wired network or 5G network.

[0051] Preferably, in step S1, the traffic monitoring module integrates multiple sensors and devices deployed at road network nodes. These sensors and devices include cameras and / or lidar and / or infrared sensors and / or pressure sensors. These sensors and devices can accurately detect and analyze road traffic in different areas and acquire initial road traffic data.

[0052] Preferably, in step S2, the feature analysis module is deployed in an edge computing center close to the traffic hub. The feature analysis module uses at least one central processing unit (CPU) and at least one image processing unit (GPU). The CPU is used to call the GPU, and the GPU is used to process the initial road traffic data and convert it into a neural network reading mode. The feature analysis module obtains the real-time initial road traffic data transmitted by each traffic monitoring module through 5G communication, obtains time data and spatial data, generates a feature matrix, and transmits it to the neural network traffic prediction module.

[0053] In step S3, the computing system in the neural network traffic prediction module is deployed in an edge computing center close to the traffic hub. The neural network traffic prediction module uses at least one central processing unit (CPU) and at least four image processing units (GPUs). The CPU is used to call the GPUs, which are used to run the traffic flow prediction neural network, receive feature matrices from real-time traffic flow, and perform analysis.

[0054] Preferably, in step S4, the traffic information visualization module retrieves real-time traffic data and prediction results from the neural network traffic prediction module, integrates the acquired real-time data with the prediction results, and deploys at least one display, one central processing unit (CPU), and at least one memory. The display is used to view the final traffic prediction results and real-time traffic flow, the CPU is used to generate visualization data, and the memory is used to record prediction results and traffic flow trends.

[0055] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0056] 1. The present invention uses a neural network traffic prediction module to perform prediction processing on the feature matrix by a computing system consisting of several stacked spatiotemporal modules. These spatiotemporal modules combine spatiotemporal information of different depths through skip connections and residual connections, effectively processing spatiotemporal dependencies at different levels.

[0057] The neural network traffic prediction module combines cross-channel spatial attention mechanisms with graph convolutions, where each graph convolutional layer (strip convolutional layer, temporal convolutional layer (which contains extended causal convolutional layers), adaptive graph convolutional layer (which contains a spatiotemporal aggregation module), cross-channel spatial attention layer, and fully connected layer) processes the spatial dependencies of node information extracted by extended arbitrary convolutional layers at different granularities.

[0058] A striped convolutional layer is introduced to minimize the impact of data magnification and enhance spatial structure. This striped convolutional layer is combined with a cross-channel spatial attention layer to avoid the effects of size reduction (model) and address spatial heterogeneity. An adaptive graph convolutional layer is used to extract nodes and road flow relationships in heterogeneous spaces, improving both prediction accuracy and speed. Furthermore, a spatiotemporal aggregation module is used when selecting traffic convergence areas, further reducing spatial heterogeneity through spatiotemporal aggregation.

[0059] Moreover, the entire traffic flow prediction method has strong compatibility and can be applied to various regional road traffic flow monitoring and prediction problems.

[0060] 2. In summary, the heterogeneous regional flow prediction method provided by this invention not only effectively improves the accuracy of flow prediction, but also effectively improves the prediction speed, and has strong compatibility. Detailed Implementation

[0061] The technical solution of this embodiment of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiment is one embodiment of the present invention, and not all embodiments thereof. Based on this embodiment of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0062] Embodiments of the present invention provide a heterogeneous regional flow prediction method, which includes the following steps:

[0063] S1: The traffic monitoring module acquires initial road traffic data through deployment at road network nodes and transmits it to the feature analysis module;

[0064] In step S1, the main function of the traffic monitoring module is to collect traffic flow data in real time, including but not limited to information such as vehicle flow, vehicle speed, and traffic density. By deploying and integrating a variety of sensors and devices at road network nodes, including cameras and / or lidar and / or infrared sensors and / or pressure sensors, the various sensors and devices can accurately detect and analyze road traffic in different areas and obtain initial road traffic data.

[0065] S2: The feature analysis module analyzes the initial road traffic data, eliminates abnormal data values, and transforms the initial traffic data into a feature matrix that can be input into the neural network. The feature matrix is ​​then input into the neural network traffic prediction module.

[0066] In step S2, the feature analysis module is deployed in an edge computing center close to a transportation hub (which may be the location of a key node among many road network nodes). The feature analysis module uses at least one central processing unit (CPU) and at least one image processing unit (GPU). The CPU is used to call the GPU, which is used to process the initial road traffic data and convert it into a neural network reading mode. It has certain data calculation functions. The feature analysis module obtains the real-time initial road traffic data transmitted by each traffic monitoring module through 5G communication, obtains time data and spatial data, generates a feature matrix, and transmits it to the neural network traffic prediction module.

[0067] S3: The computing system in the neural network traffic prediction module performs prediction processing on the feature matrix in S2 through several stacked spatiotemporal modules;

[0068] In step S3, the computing system in the neural network traffic prediction module is deployed in an edge computing center close to the traffic hub. The neural network traffic prediction module uses at least one central processing unit (CPU) and at least four image processing units (GPUs). The CPU is used to call the GPUs, and the GPUs are used to run the traffic flow prediction neural network, receive feature matrices from real-time routes, and perform analysis.

[0069] In step S3, the specific processing steps of the neural network traffic prediction module are as follows:

[0070] Several spatiotemporal modules (including strip convolutional layers, temporal convolutional layers, adaptive graph convolutional layers, cross-channel spatial attention layers, and fully connected layers, as described below) combine spatiotemporal information of different depths through skip connections and residual connections, effectively handling spatiotemporal dependencies at different levels. The combination process includes the following sub-steps:

[0071] S31: The strip convolutional layer stabilizes the spatial data structure through strip convolution. After expanding the spatial dimension through two-dimensional convolution, it uses strip blocks to connect the space and preprocess the spatial data.

[0072] In step S31, the strip convolutional layer connects long-distance spatial data in the input as a method for modeling spatial correlations. Specifically, spatial features from point and edge clustering are used, and one-dimensional convolutions of size 3 are performed in parallel on the inputs of the node and edge structures, respectively. The output Z is as follows:

[0073] Z=X☉σ(g(x N ,x D ))

[0074] Here, X represents a feature matrix input, N and D are the two directional components of this feature matrix, ⊙ represents the Haldman product operation, σ is the sigmoid function that maps the features to the 0-1 interval, and the function g(-,-) represents the combination of the inputs at the two positions after performing one-dimensional convolutions. Compared with global average pooling, this strip convolutional layer considers the preservation of associations and the enhancement of the preservation space, avoiding the entire feature mapping.

[0075] S32: Use extended causal convolution as a temporal convolutional layer to obtain the temporal correlation between road network nodes;

[0076] In step S32, extended causal convolution is used as a temporal convolutional layer to obtain the temporal correlation between road network nodes. The selection of the temporal convolutional layer employs a gating mechanism to control the flow of temporal information between layers. Specifically, the first temporal convolutional module uses extended causal convolution and a hyperbolic tangent activation function to learn sequence feature representations. Conversely, the second temporal convolutional module uses extended causal convolution and a sigmoid activation function to generate a gating signal, controlling the proportion of features learned by the first temporal convolutional module passed to the next layer. Through this gating mechanism, the model can learn to decide when to suppress feature representations, enhancing its ability to model sequence context relationships. The gated spatiotemporal convolutional network is more scalable in capturing temporal dependencies and stable feature representations. Its expression is as follows:

[0077] Z=tanh(Φ1*X+c1)☉σ(Φ2*X+c2)

[0078] Where Z represents the output information, X represents the input information, Φ1, Φ2, c1, and c2 are model parameters, and tanh is the activation function, which keeps the data stable within the range of (-1, 1) to avoid the effects of gradient vanishing or gradient explosion.

[0079] S33: By using an adaptive graph convolutional layer to mimic the road connectivity between heterogeneous regions and analyze spatial features, a spatiotemporal aggregation module is used when selecting traffic convergence areas. After completing the time step inference, the module effectively combines temporal and spatial traffic node information, embedding the predicted time step information into the traffic nodes. Combined with this spatiotemporal aggregation module, the adaptive graph convolutional layer pays attention to changes in time information, thereby reducing spatial heterogeneity through spatiotemporal aggregation.

[0080] In step S33, the adaptive graph convolutional layer is a basic operation that extracts structural information of a given node through convolution. Spatially, graph convolution utilizes information from neighboring nodes around a network node, smoothing the signal of the central node to a certain extent to form a new signal that increases its robustness. Let X represent the input signal, and let... Let Z represent the self-circular normalized adjacency matrix, Z∈R N×M Represents the output signal, W∈R D×M Let the learnable system parameter matrix be represented, and its graph convolution be defined as:

[0081]

[0082] Adaptive graph convolutional layers generate an adaptive adjacency matrix by randomly initializing two learnable embedding nodes, allowing the strength of connections between nodes to be quantified and spatial dependencies to be explored. The specific method is as follows:

[0083]

[0084] Among them, G1 is named the source node embedding. Named target node embedding, by G1 and Multiplying the values ​​yields the spatial dependency weights between the source and target nodes. The ReLU activation function is used to eliminate weak connections while preserving the necessary road network relationships. The SoftMax function is then applied to the adaptive adjacency matrix A. adp Normalization is performed; therefore, the normalized adaptive adjacency matrix A adp It can be viewed as a node transition matrix in the graph convolution diffusion process.

[0085] The following adaptive graph convolutional layer was used to simulate the diffusion and propagation process of the graph signal over k finite steps:

[0086] Z = ∑P k XW k1 +∑A adp XW k2

[0087] Among them, P k It is the power of the transitive matrix.

[0088] In step s33, the spatiotemporal aggregation module includes the following steps:

[0089] Temporal state embedding models the node state transition relationship P across time steps using quaternion tensor operations, and its calculation process satisfies:

[0090]

[0091] Where X is the traffic node feature matrix, M1, M2, and M3 are trainable time parameter matrices, V is the input traffic flow speed vector, and b P As a bias term, the quaternion tensor models the node state transition relationship P across time steps, and can dynamically adjust the weight of the affected region in subsequent time steps.

[0092] Matrix D is generated by modeling dynamic spatial relationships, and its calculation process satisfies:

[0093]

[0094] Where X is the traffic node feature matrix, L1, L2, and L3 are trainable spatial parameter matrices, V is the input traffic flow speed vector, and b D As the bias term, the dynamic spatial relationship model generates matrix D through chain multiplication. Constructing a dimensionality-reduced spatial interaction operator, compared to static adjacency matrices or fully connected weight matrices, the dimensionality reduction design of chained products avoids explicit prior assumptions about spatial relationships and is more adaptable to dynamically changing traffic networks. Combined with an adaptive graph convolution module, it yields the spatiotemporal aggregation feature Z of the output:

[0095] Z = DA adp WXP T

[0096] The spatiotemporal aggregation feature Z models the dynamic spatial relationship to generate matrix D and adaptive adjacency matrix A. adp Matrix multiplication is performed to generate spatial correlation features that integrate real-time vehicle speed. The node state transition relation matrix P is multiplied with the input feature matrix X to achieve joint encoding of traffic flow speed and spatiotemporal state. The final output spatiotemporal aggregation feature Z simultaneously includes road network topology constraints and traffic flow propagation delay characteristics.

[0097] S34: Learn the connectivity between adjacent roads through a cross-channel spatial attention layer to avoid data loss caused by channel dimensionality reduction in neural networks;

[0098] In step S34, the cross-channel spatial attention layer learns the connectivity between each input channel X and its neighboring channels through the weight matrix H, avoiding the impact of dimensionality reduction on the spatial channels, eliminating the dimensionality reduction operation, optimizing the channel learning mechanism, and adaptively learning different weights for each channel through one-dimensional convolution. Its output Z is represented as:

[0099] Z = σ(HX)

[0100] Furthermore, the size of the one-dimensional convolution kernel is determined based on the number of channels, obtaining the mapping relationship Υ between the kernel size θ and the number of channels Q. The relationship between the number of channels Q and the kernel is then logarithmically fitted. An adaptive convolution kernel θ is generated based on the number of channels using the function Υ. This attention mechanism uses only the θ parameter, resolving spatial relationships through one-dimensional convolution while preserving the spatial structure of high-dimensional channels. The expression for its processing steps is as follows:

[0101]

[0102] ω=σ(Cov1 θ X),

[0103] Where b1 and b2 represent bias parameters, ω represents the processing result, and {} od Cov1 indicates that taking the odd number closest to X ensures that the convolution size is odd. θ X represents a one-dimensional convolution with kernel θ, and σ(·) represents the sigmoid activation function.

[0104] S35: Obtain traffic prediction results by aggregating spatial and temporal information through residual connections and fully connected layers;

[0105] In step S35, the results of each module are fused through skip connections and residual connections, and then fed into a fully connected layer to obtain the final traffic prediction output. The mean absolute error is selected as the training objective for the combination of several spatiotemporal modules, and is defined as follows:

[0106]

[0107] Where t is a certain time step, T represents the total number of time steps, X represents a feature matrix input, and N and D are the two directional components of this feature matrix, respectively. Represented as the predicted recursive value, Represented as the true value, As a whole output, instead of being generated recursively through t. The solution addresses the issue of the model making predictions for one step during training and testing, and attempting to make predictions for multiple steps during inference. The prediction results and real-time traffic flow information are uploaded to a visualization server via a wired network or 5G network.

[0108] S4: The traffic information visualization module displays traffic flow prediction results and shows the real-time traffic flow status and control plan of the monitored area.

[0109] In step S4, the traffic information visualization module retrieves real-time traffic data and prediction results from the neural network traffic prediction module, integrating the acquired real-time data with the prediction results. The traffic information visualization module deploys at least one display, one central processing unit (CPU), and at least one storage device. The display is used to view the final traffic prediction results and real-time traffic flow. The CPU is used to generate visualization data, and the storage device is used to record prediction results and traffic flow trends. The traffic information visualization module uses Python for data processing, Pandas for data cleaning and processing, and NumPy for numerical computation. A data server is built using a web framework such as Flask or Django, allowing the front-end to request real-time traffic and prediction results. The front-end uses JavaScript and visualization libraries to draw real-time traffic graphs, traffic flow prediction graphs, and error analysis graphs. The front-end and back-end are integrated and hosted on a web server to ensure smooth system operation even with multiple concurrent users.

[0110] An embodiment of the present invention provides a heterogeneous regional traffic prediction method, in which the computing system in the neural network traffic prediction module performs prediction processing on the feature matrix by stacked spatiotemporal modules. These spatiotemporal modules combine spatiotemporal information of different depths through skip connections and residual connections, effectively handling spatiotemporal dependencies at different levels.

[0111] The neural network traffic prediction module combines cross-channel spatial attention mechanisms with graph convolution, where each graph convolutional layer processes the spatial dependencies of node information extracted by dilated arbitrary convolutional layers at different granularities.

[0112] Furthermore, a striped convolutional layer was introduced to minimize the impact of data amplification and enhance spatial structure. This striped convolutional layer was combined with a cross-channel spatial attention layer to avoid the effects of size reduction (model) and to address spatial heterogeneity. Adaptive graph convolutional layers were used to extract nodes and road flow relationships in heterogeneous spaces, improving both prediction accuracy and speed.

[0113] Furthermore, this heterogeneous regional traffic flow prediction system has strong compatibility and can be applied to various regional road traffic flow monitoring and prediction problems.

[0114] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for predicting flow in heterogeneous regions, characterized in that, It includes the following steps: S1: The traffic monitoring module acquires initial road traffic data through deployment at road network nodes and transmits it to the feature analysis module; S2: The feature analysis module analyzes the initial road traffic data, eliminates abnormal data values, and transforms the initial traffic data into a feature matrix that can be input into the neural network. The feature matrix is ​​then input into the neural network traffic prediction module. S3: The computational system in the neural network traffic prediction module performs prediction processing on the feature matrix in S2 through several stacked spatiotemporal modules. These spatiotemporal modules combine spatiotemporal information at different depths through skip connections and residual connections. The steps of combining these modules include the following sub-steps: S31: The strip convolutional layer stabilizes the spatial data structure through strip convolution. After expanding the spatial dimension through two-dimensional convolution, it uses strip blocks to connect the space and preprocess the spatial data. S32: Use extended causal convolution as a temporal convolutional layer to obtain the temporal correlation between road network nodes; S33: By using an adaptive graph convolutional layer to mimic the road connection relationship between heterogeneous regions and analyze spatial features, a spatiotemporal aggregation module is used when selecting traffic flow intersection areas. After completing the reasoning of the time step, the module effectively combines the temporal and spatial traffic node information, embedding the predicted time step information into the traffic nodes. Combined with this spatiotemporal aggregation module, the adaptive graph convolutional layer pays attention to the changes in time information. S34: Learn the connectivity between adjacent roads through a cross-channel spatial attention layer; S35: Obtain traffic prediction results by aggregating spatial and temporal information through residual connections and fully connected layers; S4: Display traffic flow prediction results through the traffic information visualization module, and show the real-time traffic flow status and control plan of the monitored area; In step S31, the strip convolutional layer connects long-distance spatial data in the input. Using spatial features from point and edge clustering, one-dimensional convolutions of size 3 are performed in parallel on the inputs of the node and edge structures, respectively. The output Z is as follows: Where X represents a feature matrix input, N and D are the components of the feature matrix in two directions, ⊙ represents the matrix performing a Hardman product operation, σ is the sigmoid function that maps the features to the 0-1 interval, and the function g(-, -) represents the combination of the inputs at the two positions after performing one-dimensional convolutions respectively. In step S33, the spatiotemporal aggregation module includes the following steps: Temporal state embedding models the node state transition relationship P across time steps using quaternion tensor operations, and its calculation process satisfies: Where X is the traffic node feature matrix. Let V be the trainable time parameter matrix, and V be the input traffic flow speed vector. As a bias term, a quaternion tensor models the node state transition relationship P across time steps, which can dynamically adjust the weights of the affected region in subsequent time steps; a matrix D is generated through dynamic spatial relationship modeling, and its calculation process satisfies: Where X is the traffic node feature matrix. Let V be a trainable spatial parameter matrix, and V be the input traffic flow speed vector. As the bias term, the dynamic spatial relationship model generates matrix D through chain multiplication. A dimensionality reduction spatial interaction operator is constructed and combined with an adaptive graph convolution module to obtain the spatiotemporal aggregated feature Z of the output: The spatiotemporal aggregation feature Z models the dynamic spatial relationship to generate matrix D and an adaptive adjacency matrix. Matrix multiplication is performed to generate spatial correlation features that integrate real-time vehicle speed. The node state transition relation matrix P is multiplied with the input feature matrix X to achieve joint encoding of traffic flow speed and spatiotemporal state. The final output spatiotemporal aggregation feature Z simultaneously includes road network topology constraints and traffic flow propagation delay characteristics.

2. The heterogeneous regional flow prediction method according to claim 1, characterized in that, In step S32, extended causal convolution is used as a temporal convolutional layer to obtain the temporal correlation between road network nodes. The selected temporal convolutional layer employs a gating mechanism to control the flow of temporal information between layers. Specifically, the first temporal convolutional module uses extended causal convolution and a hyperbolic tangent activation function to learn sequence feature representations. Conversely, the second temporal convolutional module uses extended causal convolution and a sigmoid activation function to generate a gating signal, controlling the proportion of features learned by the first temporal convolutional module passed to the next layer. The expression for this signal is as follows: Where Z represents the output information and X represents the input information. For model parameters, The activation function is used to keep the data stable within the range of (-1, 1) and avoid the effects of gradient vanishing or gradient exploding.

3. The heterogeneous regional flow prediction method according to claim 1, characterized in that, In step S33, the adaptive graph convolutional layer is a basic operation that extracts structural information of a given node through convolution. Spatially, graph convolution utilizes information from neighboring nodes around a network node, smoothing the signal of the central node to a certain extent to form a new signal that increases its robustness. Let X represent the input signal, and let... Represents a self-circular normalized adjacency matrix. Indicates the output signal. Let the learnable system parameter matrix be represented, and its graph convolution be defined as: Adaptive graph convolutional layers generate an adaptive adjacency matrix by randomly initializing two learnable embedding nodes, allowing the strength of connections between nodes to be quantified and spatial dependencies to be explored. The specific method is as follows: Among them, Named as source node embedding, Named target node embedding, by and Multiplying the values ​​yields the spatial dependency weights between the source and target nodes. The ReLU activation function is used to eliminate weak connections while preserving the necessary road network relationships. The SoftMax function is then applied to the adaptive adjacency matrix. Normalization is performed; therefore, the normalized adaptive adjacency matrix is ​​obtained. It can be viewed as a node transition matrix in the graph convolution diffusion process. The following adaptive graph convolutional layer was used to simulate the diffusion and propagation process of the graph signal over k finite steps: in, It is the power of the transitive matrix.

4. The heterogeneous regional flow prediction method according to claim 1, characterized in that, In step S34, the cross-channel spatial attention layer learns the connectivity between each input channel X and its neighboring channels through the weight matrix H, avoiding the impact of dimensionality reduction on the spatial channels, eliminating the dimensionality reduction operation, optimizing the channel learning mechanism, and adaptively learning different weights for each channel through one-dimensional convolution. Its output Z is represented as: Furthermore, the size of the one-dimensional convolution kernel is determined based on the number of channels, thus obtaining the mapping relationship between the kernel size θ and the number of channels Q. Logarithmic fitting is performed on the relationship between the number of channels Q and the convolution kernel, and a function is used based on the number of channels. An adaptive convolution kernel θ is generated. This attention mechanism uses only the θ parameter, resolves spatial relationships through one-dimensional convolution, and preserves the spatial structure of high-dimensional channels. The expression for its processing steps is as follows: in, These are respectively represented as bias parameters. This is represented as the processing result. This means taking the odd number closest to X to ensure the convolution size is odd. Let θ represent a one-dimensional convolution with kernel θ, and σ(∙) represent the sigmoid activation function.

5. The heterogeneous regional flow prediction method according to claim 1, characterized in that, In step S35, the results of each module are fused through skip connections and residual connections, and then fed into a fully connected layer to obtain the final traffic prediction output. The mean absolute error is selected as the training objective for the combination of several spatiotemporal modules, and is defined as follows: Where t is a certain time step, T represents the total number of time steps, X represents a feature matrix input, and N and D are the two directional components of this feature matrix, respectively. Represented as the predicted recursive value, Represented as the true value, As a whole output, instead of being generated recursively through t. , The solution addresses the issue of the model making predictions for one step during training and testing, and attempting to make predictions for multiple steps during inference. The prediction results and real-time traffic flow information are uploaded to a visualization server via a wired network or 5G network.

6. The heterogeneous regional flow prediction method according to claim 1, characterized in that, In step S1, the traffic monitoring module integrates various sensors and devices by deploying them at road network nodes. These sensors and devices include cameras and / or lidar and / or infrared sensors and / or pressure sensors. These sensors and devices can accurately detect and analyze road traffic in different areas and acquire initial road traffic data.

7. The heterogeneous regional flow prediction method according to claim 1, characterized in that, In step S2, the feature analysis module is deployed in an edge computing center close to the traffic hub. The feature analysis module uses at least one central processing unit (CPU) and at least one image processing unit (GPU). The CPU is used to call the GPU, and the GPU is used to process the initial road traffic data and convert it into a neural network reading mode. The feature analysis module obtains the real-time initial road traffic data transmitted by each traffic monitoring module through 5G communication, obtains time data and spatial data, generates a feature matrix, and transmits it to the neural network traffic prediction module. In step S3, the computing system in the neural network traffic prediction module is deployed in an edge computing center close to the traffic hub. The neural network traffic prediction module uses at least one central processing unit (CPU) and at least four image processing units (GPUs). The CPU is used to call the GPUs, which are used to run the traffic flow prediction neural network, receive feature matrices from real-time traffic flow, and perform analysis.

8. The heterogeneous regional flow prediction method according to claim 1, characterized in that, In step S4, the traffic information visualization module retrieves real-time traffic data and prediction results from the neural network traffic prediction module, and integrates the acquired real-time data with the prediction results. The traffic information visualization module is equipped with at least one display, one central processing unit (CPU), and at least one memory. The display is used to view the final traffic prediction results and real-time traffic flow. The CPU is used to generate visualization data. The memory is used to record prediction results and traffic flow trends.

Citation Information

Patent Citations

  • Smart city-oriented traffic flow situation prediction method and sensing device thereof

    CN118135788A

  • Space-time adaptive dynamic graph convolutional network traffic flow prediction method

    CN118629226A