Traffic flow prediction method based on adaptive dynamic multi-scale spatio-temporal hypergraph convolution

By using an adaptive dynamic multi-scale spatiotemporal hypergraph convolution method, the problem of insufficient modeling in complex traffic flow prediction technology is solved, and high-precision and highly adaptable prediction of traffic flow is achieved.

CN120340245BActive Publication Date: 2026-02-03DONGGUAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510340197.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2026-02-03
Estimated Expiration
2045-03-20

AI Technical Summary

Technical Problem

Existing traffic flow prediction technologies suffer from insufficient modeling capabilities when dealing with complex multi-scale spatiotemporal features and dynamic traffic conditions. They are unable to adapt to the complexity and real-time changes of urban traffic networks, resulting in insufficient prediction accuracy and adaptability.

Method used

An adaptive dynamic multi-scale spatiotemporal hypergraph convolution method is adopted, which combines multi-scale adaptive causal convolution with dynamic hypergraph adaptive learning. By using a multi-scale fusion homogeneous convolution module and attention-enhanced matrix factorization, the spatiotemporal dependencies of traffic flow are extracted. The topological node features of graph convolutional networks and hypergraph convolutional networks are fused, and the feature representation is optimized through a residual feature aggregation module.

Benefits of technology

It significantly improves the accuracy and adaptability of traffic flow forecasting, enabling it to more accurately capture the dynamic spatiotemporal characteristics of traffic flow, adapt to complex traffic scenarios, and improve forecast accuracy and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120340245B_ABST
    Figure CN120340245B_ABST
Patent Text Reader

Abstract

The application discloses a traffic flow prediction method based on adaptive dynamic multi-scale space-time hypergraph convolution, which comprises the following steps: S1, collecting traffic data; S2, forming space-time enhanced data from the traffic data; S3, extracting multi-scale traffic flow change characteristics by using a multi-scale adaptive causal convolution module; S4, constructing a dynamic hypergraph structure, defining a hypergraph correlation matrix, and generating an adaptive hypergraph by using an attention enhanced matrix decomposition method; S5, fusing the time characteristics of S3 and the hypergraph structure of S4, designing a multi-scale fusion homogeneous convolution module, and realizing the fusion of multiple different scale space-time characteristics; S6, using the multi-scale space-time characteristics, extracting topological node characteristics by using a graph convolution network and a hypergraph convolution network respectively, and adaptively weighting and fusing by using a gate feature fusion unit; S7, performing multi-scale feature integration by using a residual feature aggregation module; and S8, generating a traffic flow prediction result of multiple time steps in the future.
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 traffic flow prediction method based on adaptive dynamic multi-scale spatiotemporal hypergraph convolution. Background Technology

[0002] In modern urban traffic management, accurate traffic flow forecasting plays a crucial role in alleviating traffic congestion, optimizing traffic resource allocation, and improving the overall operational efficiency of the city. It not only helps traffic management departments scientifically adjust traffic light timings and formulate effective traffic management strategies, but also provides travelers with accurate road condition information, assisting them in rationally planning their journeys and avoiding congested areas. However, with increasingly complex traffic networks and ever-changing traffic conditions, existing traffic flow forecasting technologies have gradually revealed numerous technical bottlenecks, severely limiting their practical application effectiveness.

[0003] Traditional methods, such as time series analysis, while capable of capturing the periodicity and trends of traffic flow data, fall short in modeling capabilities when faced with nonlinear characteristics and multi-factor coupling relationships. Regression models, when dealing with high-dimensional data and complex nonlinear relationships, often suffer from overfitting or underfitting, resulting in unsatisfactory prediction accuracy. Early machine learning methods, including support vector machines and decision trees, face challenges such as long training times, high computational costs, and difficulties in updating models when dealing with large-scale dynamic traffic flow data, making it difficult to adapt to real-time changes in traffic conditions. These problems need to be addressed to meet the needs of modern urban intelligent traffic management.

[0004] In recent years, the rapid development of deep learning technology has brought new opportunities to the field of traffic flow prediction. In particular, the emergence of Graph Convolutional Networks (GCNs) allows complex traffic networks to be abstracted into graph structures, treating road segments as nodes and the connections between them as edges. This fully utilizes the spatial topological information of the traffic network to effectively capture the propagation patterns of traffic flow between different road segments. This graph convolutional structure can effectively process non-Euclidean data in traffic networks, providing innovative ideas and methods for traffic flow prediction and significantly improving the accuracy and reliability of predictions.

[0005] However, standard graph convolutional networks have significant limitations when dealing with complex hypergraph structures in transportation networks, making it difficult to deeply explore the potential connections between traffic flow data across multiple scales in space and time. Urban transportation networks not only consist of direct connections between road segments but also include complex hypergraph structures composed of transportation hubs, overpasses, and other structures. These structures contain rich traffic flow interaction information, which is crucial for accurate traffic flow prediction. Furthermore, traffic flow data exhibits significant dynamic characteristics; parameters such as traffic volume and vehicle speed continuously change over time, and traffic flow patterns differ significantly across different time periods, such as morning peak hours, evening peak hours, and off-peak hours.

[0006] Therefore, given the shortcomings of existing technologies in network structure modeling and spatiotemporal relationship processing, these shortcomings limit the application of traditional traffic flow prediction methods in improving prediction accuracy and adapting to dynamic traffic conditions. Therefore, those skilled in the art urgently need to develop a traffic flow prediction method based on adaptive dynamic multi-scale spatiotemporal hypergraph convolution. Summary of the Invention

[0007] The purpose of this invention is to overcome the technical bottlenecks and deficiencies in existing technologies regarding multi-source data fusion, spatiotemporal feature modeling, dynamic correlation capture, and prediction stability. This invention provides a traffic flow prediction method based on adaptive dynamic multi-scale spatiotemporal hypergraph convolution. This method combines multi-scale adaptive causal convolution with dynamic hypergraph adaptive learning to model temporal and spatial features in parallel. The extracted features are then input into a multi-scale fusion homogeneous convolution module for deep fusion to extract the spatiotemporal dependencies of traffic flow, thereby improving prediction accuracy and generalization ability, making it more suitable for applications involving dynamic traffic conditions.

[0008] To achieve the above objectives, this invention provides a traffic flow prediction method based on adaptive dynamic multi-scale spatiotemporal hypergraph convolution, which includes the following steps:

[0009] S1: Collect raw traffic data and preprocess it;

[0010] S2: Enhance the preprocessed raw traffic data and combine it with the spatial location embedding matrix and the time period embedding matrix to form spatiotemporal enhanced data;

[0011] S3: Input the spatiotemporal augmentation data from step S2 into the multi-scale adaptive causal convolution module, adaptively adjust the convolution kernel stride and dilation factor, expand the receptive field in the time dimension, and extract multi-scale traffic flow change features.

[0012] S4: Based on the spatiotemporal augmentation data from step S3, construct a dynamic hypergraph structure, define the hypergraph association matrix, and use the attention-enhanced matrix decomposition method to generate an adaptive hypergraph to characterize the high-order spatial relationships of the transportation network.

[0013] S5: By fusing the temporal features extracted in step S3 with the hypergraph structure information obtained in step S4, a multi-scale fusion homogeneous convolution module is designed. Combining two-dimensional convolution with attention-enhanced transposed convolution, the fusion of spatiotemporal features at multiple different scales is achieved.

[0014] S6: Using the multi-scale spatiotemporal features extracted in step S5, topological node features are extracted through graph convolutional networks and hypergraph convolutional networks respectively, and adaptive weighted fusion is performed through gated feature fusion units to optimize the spatiotemporal feature representation.

[0015] S7: The residual feature aggregation module integrates the features fused in step S6 into multi-scale features;

[0016] S8: Based on the features fused in step S7, generate traffic flow prediction results for multiple future time steps. Preferably, in step S1, real-time raw road traffic data is collected from traffic sensors, including flow sensors, vehicle detectors, and environmental monitoring equipment.

[0017] Preferably, in step S1, the preprocessing steps for the original traffic data include missing value imputation, normalization, and outlier detection preprocessing.

[0018] Preferably, in step S2, a nonlinear feature transformation is performed on the preprocessed raw traffic data to generate enhanced traffic data. Where T represents the time step, i.e. the length of the time series; N represents the number of nodes, corresponding to the number of sensors in the traffic network; and D represents the embedding dimension, which represents the feature representation dimension of each node at each time step, combined with a learnable spatial location embedding matrix. With time period embedding matrix The process of generating spatiotemporally enhanced data involves: employing an adaptive fusion mechanism to integrate enhanced traffic data. With the two embedding matrices mentioned above The combined results yield the following spatiotemporal augmented data representation X:

[0019]

[0020] Among them, X raw This represents enhanced traffic data, where α, β, and γ are learnable fusion weights, initialized as uniform distributions. And it adaptively adjusts during training to optimize the weight allocation of spatial and temporal embeddings, sign... This represents the tensor outer product operation, used to capture the interaction between spatial and temporal dimensions.

[0021] Preferably, in step S3, the multi-scale adaptive causal convolution module is used to extract multi-scale traffic flow change features as follows:

[0022] Using the spatiotemporal augmentation data X processed in step S2 as input data, denoted as X seq Used for time series modeling, given an input sequence X seq With the adaptive convolutional kernel W, the multi-scale adaptive causal convolution module extracts feature information in the time dimension by adjusting the stride and dilation factor of the convolutional kernel. Its calculation formula is as follows:

[0023]

[0024] Where d is the adaptive dilation factor, which determines the interval between different time steps to dynamically adjust the receptive field of the convolution kernel, and K is the kernel size, which controls the coverage of the receptive field; A(X seq,t This is an adaptive attention mechanism used to dynamically adjust the importance weights of different time positions based on the current input state in order to optimize information extraction capabilities.

[0025] By setting different expansion factor sequences d i This multi-scale adaptive causal convolution module can simultaneously extract short-term, medium-term, and long-term temporal features. The adaptive dilation factor enables the convolution operation to expand the receptive field across multiple scales, thereby capturing the changing patterns of traffic flow at different time scales. For each adaptive dilation factor d... i The features generated by the convolution operation are represented as follows:

[0026]

[0027] Finally, a multi-scale adaptive causal convolution module is used to fuse information from different time scales to generate a comprehensive feature representation. The calculation formula for this multi-scale adaptive causal convolution module is as follows:

[0028]

[0029] Where σ represents the nonlinear activation function, w i δ represents the adaptive weight coefficients of features at each scale, used to measure the relative importance of features at different time scales and dynamically optimized during training. δ represents the cross-feature enhancement factor, which controls the nonlinear interaction between features at multiple scales, thereby enhancing the fusion ability of different time-dependent patterns. The element-wise product (∏) can capture higher-order correlations between different time scales, enabling the model to learn complex time-dependent patterns.

[0030] Preferably, in step S4, the processing procedure is as follows:

[0031] First, define a hypergraph incidence matrix. Where N represents the number of observation nodes in the traffic network, and E represents the number of hyperedges. Each hyperedge can contain multiple associated road segments. To realize the hypergraph correlation matrix... The adaptive construction of the dynamic hypergraph structure employs an attention-enhanced matrix factorization method, the calculation formula of which is as follows:

[0032] in, This is the dimensionality-reduced local feature matrix, containing traffic flow features within a specific time window. A is a learnable projection matrix used to map local features to a hypergraph representation space.attn This represents the attention enhancement matrix, used to dynamically adjust the influence of different nodes on the hyperedge. The formula for calculating the attention enhancement matrix is ​​as follows:

[0033]

[0034] Where Q, K, and V are the query, key, and value matrices, respectively, all derived from local features X. local Generated through a linear transformation, as follows:

[0035] Q = X local ·W q K = X local ·W k V = X local ·W v

[0036] Among them, W q W k and W v It is a learnable parameter matrix used to project input features into different representation spaces.

[0037] Preferably, in step S5, the designed multi-scale fusion homogeneous convolution module includes two parts: adaptive local information extraction and global information enhancement. The processing procedure of this multi-scale fusion homogeneous convolution module is as follows:

[0038] Multi-scale adaptive 2D convolution is employed to achieve adaptive downsampling and feature optimization, thereby removing redundant information, highlighting key local patterns, and optimizing input features for subsequent global information extraction. The calculation formula is as follows:

[0039] X local =DropBlock(LeakyReLU(BatchNorm(Conv2D(X seq W local ))))

[0040] Among them, DropBlock performs structured regularization to prevent overfitting; LeakyReLU enhances feature representation and improves gradient fluidity through non-linear activation; BatchNorm stabilizes the training process and improves model training stability by standardizing the input distribution of each layer; Conv2D is responsible for extracting local spatial features and capturing short-term traffic change patterns; W... local The convolutional weights are adaptive and can be dynamically adjusted according to changes in traffic patterns.

[0041] To further model global traffic flow patterns, homogeneous convolution is combined with attention-enhanced transposed convolution for global information enhancement. Furthermore, attention-enhanced transposed convolution is introduced to progressively recover the spatial topological information of the data through adaptive upsampling, thereby enhancing the model's ability to capture global features. Ultimately, the output traffic flow feature representation effectively integrates local and global information, thus improving the model's spatiotemporal prediction capabilities. The calculation formula is shown below:

[0042] X global =X local +Attention(TransConv2D(HomoConv(X local ,H),W global ))

[0043] Where X local Local spatiotemporal features contain traffic flow information within a specific time window, used to capture dynamic changes and spatial distribution features within a short time range; HomoConv represents homogeneous convolution operation, used to model global spatial dependencies; H is the hypergraph association matrix, used to capture high-order dynamic relationships between different nodes; TransConv2D is the transposed convolution operation, which recovers spatial detail information through progressive upsampling; W... global Weights are extracted for global features and can be learned and dynamically adjusted during training to optimize the fusion of local and global information; Attention, as an adaptive attention mechanism, can automatically identify and strengthen key global features to improve the model's prediction accuracy.

[0044] Preferably, in step S6, a dual topology feature fusion module is used to extract topology node features from the graph convolutional network and the hypergraph convolutional network, respectively. The graph convolutional network includes a graph structure, and the hypergraph convolutional network includes a hypergraph structure. The dual topology feature fusion module includes a graph structure node embedding dictionary Z. G And hypergraph structure node embedding dictionary Z H Among them, Z G Z represents the node features in the graph structure, used to capture local information of directly adjacent nodes. H This represents the node features in a hypergraph structure, used to model higher-order group interaction relationships.

[0045] Since graph structures primarily model local topological information, while hypergraph structures can capture more complex group interaction patterns, a gated feature fusion unit is used to perform weighted fusion with an adaptively learned optimal weight allocation method. This results in a richer spatiotemporal feature representation of the fused nodes. Finally, the spatiotemporal feature representation Z of the fused nodes is calculated using the following formula:

[0046] Z = GRU([Z G |Z H])+λ·(Z G ⊙Z H )

[0047] Z G =GCN(A,X) global Z H =HyperGCN(H,X) global A is the graph adjacency matrix, used to characterize the spatiotemporal dependencies between adjacent roads in a transportation network; H is the hypergraph incidence matrix, used to represent the relationship between nodes and hyperedges in the hypergraph, modeling complex traffic flow interaction patterns; GCN is a graph convolutional network, used to extract local features from the graph structure; HyperGCN is a hypergraph convolutional network, used to model higher-order spatiotemporal dependencies and learn interaction patterns between nodes and groups; || represents feature concatenation operation; ⊙ represents Hadamard product; GRU([Z G |Z H ]) is a gated feature fusion unit, which adaptively weights and fuses graph structure features and hypergraph structure features through a gated recurrent unit (GRU); λ·(Z G ⊙Z H ) is a feature interaction enhancement unit, where λ is a learnable dynamic balancing factor used to adjust the fusion ratio of graph features and hypergraph features to ensure optimal information interaction.

[0048] Preferably, in step S7, the residual feature aggregation module further optimizes the spatiotemporal feature representation based on the dual-topology fusion feature Z calculated in step S6, and uses adaptive two-dimensional convolution operation to integrate features at different scales to capture richer spatial dependencies and temporal dynamic information. In addition, layer normalization, gating units, and feedforward neural networks are combined to improve the stability and expressive power of the model. The final prediction output calculation formula is as follows:

[0049]

[0050] Among them, Z mid =Conv2D(Z), where Z represents the high-dimensional feature matrix obtained after the fusion step, GateUnit is used to control the flow of residual information, LayerNorm performs feature normalization, and FFN further enhances the feature representation capability. Finally, The feature matrix is ​​processed by an adaptive two-dimensional convolutional layer to generate traffic flow prediction results for multiple future time steps.

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

[0052] 1. This invention enhances the dynamic perception of urban traffic conditions by augmenting the original traffic data and combining it with spatial location embedding matrices and time period embedding matrices to form spatiotemporally enhanced data. This enables more accurate capture of the dynamic spatiotemporal characteristics of traffic flow, thereby significantly improving the accuracy and generalization ability of prediction.

[0053] 2. This invention utilizes a multi-scale adaptive causal convolution module, which dynamically adjusts the stride and dilation factor of the convolution kernel to efficiently extract multi-scale temporal features of traffic flow. Compared to traditional fixed-time-window methods, this module can simultaneously capture short-term, medium-term, and long-term traffic flow changes, thereby enhancing the ability to model complex dynamic patterns and effectively improving prediction accuracy.

[0054] 3. This invention constructs a dynamic hypergraph structure. By combining attention enhancement mechanism and matrix factorization method, the hypergraph association matrix is ​​dynamically constructed, and its structure is adjusted in an adaptive manner. This innovative approach can more accurately model complex high-order spatial dependencies, especially during morning and evening peak hours or under special events, and better capture the complex interactions between different regions, thereby improving the accuracy and robustness of traffic flow prediction.

[0055] 4. This invention extracts topological node features from graph convolutional networks and hypergraph convolutional networks, which comprehensively considers local topological information and complex group relationships, effectively improving the ability to express complex traffic patterns. Furthermore, by using a gated feature fusion unit for adaptive weighted fusion, this invention can dynamically adjust the weight allocation of different topological structures, thereby adapting to different traffic scenarios, improving the robustness and adaptability of the system. Based on this step, the features generated by this invention have stronger expressiveness and discriminative power, significantly improving the prediction effect.

[0056] 5. The residual feature aggregation module proposed in this invention combines the integration of multi-scale features with adaptive convolution optimization, which can extract deep spatiotemporal relationship features in complex traffic flow prediction tasks, effectively improving prediction accuracy and model generalization ability.

[0057] 6. Therefore, the traffic flow prediction method based on adaptive dynamic multi-scale spatiotemporal hypergraph convolution of the present invention (from an intuitive perspective, this method is equivalent to building a "nervous system" for the traffic network, capable of simultaneously monitoring and analyzing traffic conditions in different areas and at different times, and understanding the complex interrelationships between them) significantly improves the accuracy and adaptability of traffic flow prediction through the combination of the above-mentioned innovative technologies. This enables the model to accurately capture the dynamic changes in traffic flow and is more suitable for applications involving dynamic traffic conditions. Attached Figure Description

[0058] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0059] Figure 1 This is a flowchart of a traffic flow prediction method based on adaptive dynamic multi-scale spatiotemporal hypergraph convolution provided in Embodiment 1 of the present invention;

[0060] Figure 2 This is an adaptive dynamic multi-scale spatiotemporal hypergraph convolutional network model diagram in a traffic flow prediction method based on adaptive dynamic multi-scale spatiotemporal hypergraph convolution provided in Embodiment 1 of the present invention. 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] Example 1:

[0063] Please see Figures 1 to 2 The present invention provides a traffic flow prediction method based on adaptive dynamic multi-scale spatiotemporal hypergraph convolution, which includes the following steps:

[0064] S1: Collect raw traffic data and preprocess it;

[0065] In step S1, real-time raw road traffic data is collected from traffic sensors, including flow sensors, vehicle detectors, and environmental monitoring equipment, to obtain multi-source spatiotemporal data information related to traffic flow.

[0066] Furthermore, the preprocessing steps for the raw traffic data include missing value imputation, normalization, and outlier detection preprocessing.

[0067] S2: Enhance the preprocessed raw traffic data and combine it with the spatial location embedding matrix and the time period embedding matrix to form spatiotemporal enhanced data;

[0068] In step S2, to enhance the feature representation capability of the original traffic data, a nonlinear feature transformation is performed on the preprocessed original traffic data to uncover deeper spatiotemporal patterns, thereby generating enhanced traffic data. Where T represents the time step, i.e. the length of the time series; N represents the number of nodes, corresponding to the number of sensors in the traffic network; and D represents the embedding dimension, which is the feature representation dimension of each node at each time step.

[0069] However, raw traffic data mainly contains basic traffic information (such as flow rate and speed), making it difficult to fully characterize the spatial topology and temporal periodicity of traffic networks. For example, in terms of spatial structure, the geographical location of nodes and their interrelationships may affect traffic flow distribution patterns; in terms of temporal characteristics, traffic flow typically exhibits periodic variations, for example, weekday and weekend flow patterns may differ significantly.

[0070] Therefore, the spatial location embedding matrix is ​​introduced as follows: It is used to represent the spatial distribution characteristics of nodes, and introduces a time-period embedding matrix. It is used to represent the temporal evolution of nodes; this enhanced traffic data Needs to embed with spatial location matrix and time period embedding matrix Further integration is needed to enhance the spatiotemporal expressive power of the data.

[0071] Enhanced traffic data With learnable spatial location embedding matrix With time period embedding matrix The process for generating spatiotemporally augmented data is as follows:

[0072] To further enhance spatiotemporal representation capabilities, an adaptive fusion mechanism was also adopted to integrate enhanced traffic data. With the two embedding matrices mentioned above By combining these elements, the feature representation of each node at each time step is enriched, thereby effectively modeling the multidimensional spatial and multi-period temporal dependencies of traffic flow. Specifically, this adaptive fusion mechanism combines the geographic attributes (such as commercial or residential areas) and temporal attributes (such as peak hours on Friday afternoons) of nodes, and integrates them with actual enhanced traffic data (such as current traffic flow) to enhance the spatiotemporal expressiveness of the data. Therefore, the final fused spatiotemporally enhanced data representation X is as follows:

[0073]

[0074] Among them, X raw This represents enhanced traffic data, where α, β, and γ are learnable fusion weights, initialized as uniform distributions. And it adaptively adjusts during training to optimize the weight allocation of spatial and temporal embeddings, sign... The tensor outer product operation is used to capture the interaction between spatial and temporal dimensions. The above adaptive fusion mechanism can not only more accurately characterize the spatiotemporal dynamics of traffic flow, but also improve the ability to express complex traffic patterns, providing more discriminative feature representations for subsequent traffic flow prediction tasks.

[0075] S3: Input the spatiotemporal augmentation data from step S2 into the multi-scale adaptive causal convolution module, adaptively adjust the convolution kernel stride and dilation factor, expand the receptive field in the time dimension, and extract multi-scale traffic flow change features.

[0076] In step S3, the advantage of the multi-scale adaptive causal convolution module lies in the fact that it not only preserves the causal relationship of the time series (i.e., prediction relies solely on historical information), but also dynamically expands the receptive field (i.e., the range of data that can be seen) by adaptively adjusting the stride and dilation factor of the convolution kernel to capture information at different time scales. Through this method, the module can effectively model the temporal dependencies of traffic flow over a longer period, thus adapting to various dynamic change patterns in traffic flow. For example, the module can focus on local fluctuations in a short period (such as short-term traffic congestion) and also identify trend changes over a long period (such as periodic patterns during peak hours). Specifically, the processing procedure for extracting multi-scale traffic flow change features using the multi-scale adaptive causal convolution module is as follows:

[0077] Using the spatiotemporal augmentation data X processed in step S2 as input data, denoted as X seq Used for time series modeling, given an input sequence X seq With the adaptive convolutional kernel W, the multi-scale adaptive causal convolution module extracts feature information in the time dimension by adjusting the stride and dilation factor of the convolutional kernel. Its calculation formula is as follows:

[0078]

[0079] Where d is the adaptive dilation factor, which determines the interval between different time steps to dynamically adjust the receptive field of the convolution kernel, K is the kernel size, which controls the coverage of the receptive field, and A(X seq,t This is an adaptive attention mechanism used to dynamically adjust the importance weights of different time positions based on the current input state, in order to optimize information extraction capabilities.

[0080] By setting different expansion factor sequences d iThe calculation formula for this multi-scale adaptive causal convolution module is (e.g., d1=1, d2=2, d3=4, d4=8). It can simultaneously extract short-term, medium-term, and long-term temporal features. For example, when d=1, the model can capture changes at adjacent time points (e.g., traffic fluctuations within 5 minutes), while when d=8, it can capture trends over a longer time range (e.g., traffic patterns over several hours). The adaptive dilation factor allows the convolution operation to expand the receptive field across multiple scales, thereby capturing the changing patterns of traffic flow at different time scales. For each adaptive dilation factor d... i The features generated by the convolution operation are represented as follows:

[0081]

[0082] Finally, a multi-scale adaptive causal convolution module is used to fuse information from different time scales to generate a comprehensive feature representation. The calculation formula for this multi-scale adaptive causal convolution module is as follows:

[0083]

[0084] Where σ represents the nonlinear activation function, w i The adaptive weight coefficients for features at each scale are used to measure the relative importance of features at different time scales and are dynamically optimized during training. δ represents the cross-feature enhancement factor, which controls the nonlinear interaction between multi-scale features, thereby enhancing the fusion ability of different time-dependent patterns. The element-wise product (∏) can capture higher-order correlations between different time scales, enabling the model to learn complex time-dependent patterns.

[0085] Through the above design, the present invention can simultaneously model multiple time dependencies, such as "whether the current congestion is related to the traffic flow 10 minutes ago" and "whether it is similar to the pattern of the same time period yesterday", thereby improving the accuracy of traffic flow prediction.

[0086] S4: In real-world traffic networks, the relationships between road segments are often not simply pairwise connections, but rather more complex group associations. For example, in a commercial area, multiple roads may form a highly correlated traffic group, with the traffic conditions of the internal roads influencing each other. Traditional graph structures struggle to accurately model these high-order relationships. Therefore, to accurately model the dynamic high-order spatial relationships in traffic flow, this invention employs an adaptive learning module based on a dynamic hypergraph. This module includes methods for constructing the hypergraph structure to capture the high-order dynamic dependencies between different road segments.

[0087] Based on the spatiotemporal augmentation data from step S3, a dynamic hypergraph structure based on an adaptive learning module is constructed. A hypergraph association matrix is ​​defined, and an attention-enhanced matrix factorization method is used to generate an adaptive hypergraph to characterize the high-order spatial relationships of the transportation network.

[0088] In step S4, the processing procedure of the dynamic hypergraph adaptive learning module is as follows:

[0089] First, define a hypergraph incidence matrix. Where N represents the number of observation nodes (such as sensors or road segments) in the traffic network, and E represents the number of hyperedges. Each hyperedge can contain multiple associated road segments. Through this structure, the hypergraph can effectively model complex high-order relationships between different nodes, and is particularly suitable for describing spatial dependency patterns that change over time. For example, during morning and evening rush hours, traffic association patterns in different areas may be significantly different, and this dynamic hypergraph structure can adaptively identify these changes and dynamically adjust the modeling strategy.

[0090] To realize the hypergraph incidence matrix The adaptive construction of the dynamic hypergraph structure employs an attention-enhanced matrix factorization method, the calculation formula of which is as follows:

[0091]

[0092] in, This is the dimensionality-reduced local feature matrix, containing traffic flow features (such as traffic volume change rate and speed fluctuation) within a specific time window. A is a learnable projection matrix used to map local features to a hypergraph representation space. attn This represents the attention enhancement matrix, used to dynamically adjust the influence of different nodes on the hyperedge. The formula for calculating the attention enhancement matrix is ​​as follows:

[0093]

[0094] Where Q, K, and V are the query, key, and value matrices, respectively, all derived from local features X. local Generated through a linear transformation, as follows:

[0095] Q = X local ·W q K = X local ·W k V = X local ·W v

[0096] Among them, W q W k and W v This is a learnable parameter matrix used to project input features into different representation spaces.

[0097] By introducing an adaptive attention enhancement mechanism, this dynamic hypergraph adaptive learning module enables the present invention to automatically identify and strengthen important spatial association patterns. For example, when a highway experiences congestion, the traffic control system can automatically enhance the weights of hyperedges connected to that road segment to predict the congestion spread range and speed. The present invention can utilize this dynamic hypergraph structure to adaptively adjust the weights of different roads to optimize signal control and scheduling strategies. This significantly improves the present invention's ability to model complex spatiotemporal patterns, enhances the accuracy and robustness of traffic flow prediction, and thus provides more accurate data support for intelligent traffic management.

[0098] S5: By fusing the temporal features extracted in step S3 with the hypergraph structure information obtained in step S4, a multi-scale fusion homogeneous convolution module is designed. Combining two-dimensional convolution with attention-enhanced transposed convolution, the fusion of multiple different scales of spatiotemporal features in traffic flow data is achieved.

[0099] In step S5, the designed multi-scale fusion homogeneous convolution module comprises two parts: adaptive local information extraction and global information enhancement. In actual traffic networks, traffic flow information simultaneously possesses microscopic local features (such as congestion at a single intersection) and macroscopic global features (such as the overall traffic flow distribution of the city). Therefore, accurately capturing features at different scales is crucial for improving prediction accuracy.

[0100] The processing procedure of this multi-scale fusion homogeneous convolution module is as follows:

[0101] Multi-scale adaptive 2D convolution is employed to achieve adaptive downsampling and feature optimization, thereby removing redundant information, highlighting key local patterns, and optimizing input features for subsequent global information extraction. The calculation formula is as follows:

[0102] X local =DropBlock(LeakyReLU(BatchNorm(Conv2D(X seq W local ))))

[0103] Among them, DropBlock performs structured regularization to prevent overfitting; LeakyReLU enhances feature representation and improves gradient fluidity through non-linear activation; BatchNorm stabilizes the training process and improves model training stability by standardizing the input distribution of each layer; Conv2D is responsible for extracting local spatial features and capturing short-term traffic change patterns; W... local The convolutional weights are adaptive and can be dynamically adjusted according to changes in traffic patterns.

[0104] To further model global traffic flow patterns, homogeneous convolution is combined with attention-enhanced transposed convolution to enhance global information. In real-world traffic flow networks, traffic conditions in one area can influence traffic flow in areas far away. For example, traffic conditions in a city's central business district may affect travel patterns in suburban residential areas. Traditional methods struggle to effectively capture such long-distance spatiotemporal dependencies. Therefore, attention-enhanced transposed convolution is introduced to progressively recover the spatial topology information of the data through adaptive upsampling, thereby enhancing the model's ability to capture global features. Ultimately, the output traffic flow feature representation effectively integrates local and global information, thus improving the model's spatiotemporal prediction capabilities. The calculation formula is shown below:

[0105] X global =X local +Attention(TransConv2D(HomoConv(X local ,H),W global ))

[0106] Where X local For local spatiotemporal features, it contains traffic flow information (such as traffic volume and speed) within a specific time window, used to capture dynamic changes and spatial distribution features within a short time range. HomoConv represents homogeneous convolution operation, used to model global spatial dependencies. H is the hypergraph correlation matrix, used to capture high-order dynamic relationships between different nodes. TransConv2D is the transposed convolution operation, which recovers spatial detail information through progressive upsampling. W global Weights are extracted for global features and can be learned and dynamically adjusted during training to optimize the fusion of local and global information. Attention, as an adaptive attention mechanism, can automatically identify and enhance key global features, thereby improving the model's prediction accuracy.

[0107] S6: In order to fully integrate the hybrid topological feature representation of graph structure and hypergraph structure, a dual topological feature fusion module is adopted. The multi-scale spatiotemporal features extracted in step S5 are used to extract topological node features through graph convolutional network and hypergraph convolutional network respectively, and adaptive weighted fusion is performed through gated feature fusion unit to optimize spatiotemporal feature representation.

[0108] In step S6, a dual topology feature fusion module is used to extract topology node features from the graph convolutional network and the hypergraph convolutional network, respectively. The graph convolutional network includes a graph structure, and the hypergraph convolutional network includes a hypergraph structure. The dual topology feature fusion module includes a graph structure node embedding dictionary Z. G And hypergraph structure node embedding dictionary Z H Among them, Z G Z represents the node features in the graph structure, used to capture local information of directly adjacent nodes. HThese two embedding dictionaries represent the node features in the hypergraph structure and are used to model higher-order group interaction relationships. By constructing these two embedding dictionaries, complementary features of nodes in different topologies can be effectively extracted, thus providing a more comprehensive description of the complex spatial dependencies of the transportation network.

[0109] Since graph structures primarily model local topological information, while hypergraph structures can capture more complex group interaction patterns, a gated feature fusion unit is used to perform weighted fusion with an adaptively learned optimal weight allocation method. This results in a richer spatiotemporal feature representation of the fused nodes. Finally, the spatiotemporal feature representation Z of the fused nodes is calculated using the following formula:

[0110] Z = GRU([Z G |Z H ])+λ·(Z G ⊙Z H )

[0111] Z G =GCN(A,X) global Z H =HyperGCN(H,X) global A is the graph adjacency matrix, used to characterize the spatiotemporal dependencies between adjacent roads in a transportation network; H is the hypergraph incidence matrix, used to represent the relationship between nodes and hyperedges in the hypergraph, modeling complex traffic flow interaction patterns; GCN is a graph convolutional network, used to extract local features from the graph structure; HyperGCN is a hypergraph convolutional network, used to model higher-order spatiotemporal dependencies and learn interaction patterns between nodes and groups; || represents feature concatenation operation; ⊙ represents Hadamard product (element-wise multiplication); GRU([Z G |Z H ]) is a gated feature fusion unit, which adaptively weights and fuses graph structure features and hypergraph structure features through a gated recurrent unit (GRU); λ·(Z G ⊙Z H ) is a feature interaction enhancement unit, where λ is a learnable dynamic balancing factor used to adjust the fusion ratio of graph features and hypergraph features to ensure optimal information interaction.

[0112] By using the dual topological feature fusion module proposed in this invention, this invention can not only comprehensively model spatiotemporal dependencies at different levels, but also has the following advantages:

[0113] A. Combination of short-term local dynamics and long-term global patterns: effectively captures local dynamic changes within a short time scale, while extracting global traffic patterns over a long time scale.

[0114] B. Adaptive Feature Fusion: It can dynamically adjust the weight ratio of graph structure and hypergraph structure to adapt to the needs of different traffic scenarios and improve the robustness of prediction.

[0115] C. Enhanced Contextual Information: By deeply integrating topological features, it improves the adaptability to complex traffic patterns and optimizes the modeling capabilities for emergencies and periodic traffic flows.

[0116] D. Through the above-mentioned fusion mechanism, this invention significantly improves the feature expression capability of the traffic flow prediction model, enabling it to maintain high prediction accuracy under different time periods and different road network structures, and providing more accurate data support for intelligent traffic management.

[0117] S7: The residual feature aggregation module integrates the features fused in step S6 into multi-scale features;

[0118] In step S7, the residual feature aggregation module further optimizes the spatiotemporal feature representation based on the dual-topology fusion feature Z calculated in step S6, improving prediction accuracy. It also employs adaptive two-dimensional convolution operations to integrate features at different scales, capturing richer spatial dependencies and temporal dynamic information. Furthermore, to further optimize feature representation capabilities, layer normalization, gate units, and feedforward neural networks (FFN) are combined to enhance the stability and expressive power of the model. The final prediction output calculation formula is as follows:

[0119]

[0120] Among them, Z mid =Conv2D(Z), where Z represents the high-dimensional feature matrix obtained after the fusion step, GateUnit is used to control the flow of residual information, LayerNorm performs feature normalization, and FFN further enhances the feature representation capability. Finally, The feature matrix is ​​processed by an adaptive two-dimensional convolutional layer to generate traffic flow prediction results for multiple future time steps.

[0121] By combining adaptive convolution with residual aggregation, the model can extract deeper spatiotemporal relationship features, while effectively compressing and optimizing information, significantly improving its performance in complex traffic flow prediction tasks.

[0122] S8: Based on the features fused in step S7, generate traffic flow prediction results for multiple future time steps.

[0123] By combining adaptive convolution with residual aggregation, this invention can extract deeper spatiotemporal relationship features, optimize information representation, and improve traffic flow prediction accuracy. Furthermore, this invention utilizes the hypergraph H constructed in S4 and the HomoConv representation calculated in S5. Based on the fusion feature Z calculated in S6, it employs a residual feature aggregation module to integrate multi-scale features and optimizes the final spatiotemporal prediction representation through adaptive two-dimensional convolution.

[0124] An embodiment of the present invention provides a traffic flow prediction method based on adaptive dynamic multi-scale spatiotemporal hypergraph convolution, the advantages of which are:

[0125] 1. This invention proposes an adaptive dynamic multi-scale spatiotemporal hypergraph convolutional network that integrates multi-source heterogeneous data (including data from fixed sensors, floating vehicles, video surveillance, and user feedback), thereby enhancing the dynamic perception capability of urban traffic conditions. Compared with traditional methods relying on a single data source, this invention can more comprehensively capture changes in traffic patterns, improving prediction accuracy and adaptability.

[0126] 2. In the feature embedding stage (i.e., enhancing the preprocessed raw traffic data and combining it with the spatial location embedding matrix and the temporal period embedding matrix to form spatiotemporally enhanced data), this invention introduces adaptive spatial location embedding matrices and temporal period embedding matrices, and models the cross-coupling relationship between space and time through tensor outer product. Compared with traditional shallow static methods, this invention can more accurately capture the dynamic spatiotemporal characteristics of traffic flow, significantly improving the accuracy and generalization ability of prediction.

[0127] 3. The multi-scale adaptive causal convolution module of this invention can efficiently extract multi-scale temporal features of traffic flow by dynamically adjusting the stride and dilation factor of the convolution kernel. Compared with the traditional fixed time window method, this module can simultaneously capture short-term, medium-term and long-term traffic flow changes, thereby improving the ability to model complex dynamic patterns and effectively improving the accuracy of prediction.

[0128] 4. This invention proposes a dynamic hypergraph adaptive learning module, which dynamically constructs a hypergraph correlation matrix by combining an attention enhancement mechanism and a matrix factorization method, and adaptively adjusts its structure. This innovative approach can more accurately model complex high-order spatial dependencies, especially during morning and evening rush hours or under special events, better capturing the complex interactions between different regions, thereby improving the accuracy and robustness of traffic flow prediction.

[0129] 5. This invention introduces a dual-topological feature fusion module based on graph and hypergraph structures, comprehensively considering local topological information and complex group relationships, effectively improving the expressive power of complex traffic patterns. Through adaptive feature fusion, the model can dynamically adjust the weight allocation of different topological structures, thereby adapting to different traffic scenarios and improving the robustness and adaptability of the system. Furthermore, the features generated by this invention have stronger expressive power and discriminative power, significantly improving prediction performance.

[0130] 6. The residual feature aggregation module proposed in this invention combines the integration of multi-scale features with adaptive convolution optimization, which can extract deep spatiotemporal relationship features in complex traffic flow prediction tasks, effectively improving prediction accuracy and model generalization ability.

[0131] Example 2:

[0132] Embodiment 2 of the present invention provides a traffic flow prediction system for urban arterial roads. This system employs a traffic flow prediction method based on adaptive dynamic multi-scale spatiotemporal hypergraph convolution, as described in Embodiment 1.

[0133] Please refer to Example 1. Figure 1 The adaptive dynamic multi-scale spatiotemporal hypergraph convolutional network architecture of the present invention mainly includes six key modules: data preprocessing and feature embedding module, multi-scale adaptive causal convolution module, dynamic hypergraph adaptive learning module, multi-scale fusion homogeneous convolution module, dual topology feature fusion module, and residual feature aggregation module.

[0134] The feature embedding module first preprocesses the raw traffic flow data of urban arterial roads, including outlier detection, missing value imputation, and data normalization. In a specific application, taking the traffic network of Beijing's Fifth Ring Road as an example, 150 traffic sensors were deployed to collect traffic flow data from January 2022 to December 2022, with a sampling interval of 5 minutes. The raw data dimensions are [365 days × 288 time points / day × 150 nodes × 3 features (flow, speed, occupancy)].

[0135] After preprocessing, an enhanced traffic data matrix is ​​generated using a nonlinear feature transformation mechanism, and spatial location embedding matrices and temporal period embedding matrices are introduced. The spatial location embedding matrix encodes the sensor's geographic location information, road level, and connectivity; the temporal period embedding matrix contains the time period within a day (such as morning and evening rush hours), weekly variation patterns, and holiday features. In the specific implementation, the embedding dimension D is set to 64, and the fusion weight parameters α = 0.4, β = 0.3, and γ = 0.3, achieving effective fusion of temporal and spatial features.

[0136] The multi-scale adaptive causal convolution module employs four different adaptive dilation factors (d1=1, d2=2, d3=4, d4=8), with a kernel size K set to 3, enabling the model to simultaneously capture traffic flow variation features at different time scales: 5 minutes (short-term), 20 minutes (medium-term), 1 hour (medium-to-long-term), and 2 hours (long-term). An adaptive attention mechanism A(X) based on the input state is also included. seq,t By calculating the importance scores of different time locations, the sensitivity to sudden events (such as traffic accidents and severe weather) is effectively improved. Experiments verify that the weight coefficients w1=0.15, w2=0.25, w3=0.3, w4=0.3 and the cross feature enhancement factor δ=0.2 in the multi-scale adaptive causal convolution module can achieve the best multi-scale feature fusion effect.

[0137] The dynamic hypergraph adaptive learning module constructs a hypergraph with 80 hyperedges (E=80), and dynamically generates the hypergraph association matrix using an attention-enhanced matrix factorization method. In the attention calculation, the dimensions of the query Q, key K, and value V matrices are set to 32, with a scaling factor... This design enables the model to accurately capture traffic correlations between different regions, especially for geographically non-adjacent road segments with highly correlated traffic conditions (such as parallel roads or different segments of ring roads), where the hypergraph structure shows significant advantages.

[0138] In the multi-scale fusion homogeneous convolution module, the local information extraction part uses a 3×3 convolution kernel, with a DropBlock regularization rate of 0.1 and a LeakyReLU slope of 0.2. The global information enhancement part uses second-order neighbor aggregation for homogeneous convolution operations, and the transposed convolution uses a 2×2 kernel with a stride of 2, effectively restoring the spatial topological information of the data and enhancing the model's ability to perceive the road network topology.

[0139] In the multi-scale fusion homogeneous convolution module, the local information extraction part uses a 3×3 convolution kernel, with a DropBlock regularization rate of 0.1 and a LeakyReLU slope of 0.2. The global information enhancement part uses second-order neighbor aggregation for homogeneous convolution operations, and the transposed convolution uses a 2×2 kernel with a stride of 2, effectively restoring the spatial topological information of the data and enhancing the model's ability to perceive the road network topology.

[0140] In the dual topological feature fusion module, the graph convolutional layer adopts a two-layer structure with a hidden layer dimension of 128; the hypergraph convolution also adopts a two-layer structure with a hidden layer dimension of 128. The hidden state dimension of the GRU unit is set to 128, and the dynamic balancing factor λ is initialized to 0.5 and adaptively adjusted during training. This design enables the model to intelligently weigh and fuse complementary information from the graph structure and the hypergraph structure, improving its ability to represent complex traffic networks.

[0141] The residual feature aggregation module uses a 1×1 convolutional kernel for feature compression, and the parameter ε in the layer normalization is set to 1×e-6. The feedforward neural network contains two hidden layers with dimensions of 256 and 128, respectively. The final output layer uses a linear activation function to predict traffic flow over the next 12 time steps (i.e., 1 hour).

[0142] During training, the Adam optimizer was used with an initial learning rate of 0.0001, and cosine annealing was used to dynamically adjust the learning rate. The batch size was set to 64, and the number of training epochs was 100. The loss function was a weighted combination of root mean square error (RMSE) and mean absolute error (MAE) with a weight ratio of 7:3.

[0143] Example 3:

[0144] Embodiment 3 of the present invention provides a regional traffic flow prediction system. This regional traffic flow prediction system of Embodiment 3 is implemented using a traffic flow prediction method based on adaptive dynamic multi-scale spatiotemporal hypergraph convolution, as described in Embodiment 1.

[0145] In the third embodiment, the method of the present invention is applied to traffic flow prediction in Pudong New Area, Shanghai. 200 traffic sensors are deployed in this area, covering main roads, secondary roads, and branch roads, forming a more complex traffic network. The raw data includes traffic flow records from January 2023 to June 2023, with a sampling interval of 3 minutes.

[0146] In this more complex application scenario, the model proposed in this invention has been specifically adjusted as follows:

[0147] In the feature embedding module, in addition to the basic features of traffic, speed and occupancy, the embedding dimension D is extended to 96, and the weight parameters are dynamically calculated and adaptively adjusted according to the characteristics of different time periods and regions.

[0148] In the multi-scale adaptive causal convolution module, to adapt to finer-grained data sampling intervals and more complex traffic patterns, an additional dilation factor d5 = 16 is added, enabling the model to capture long-term traffic patterns up to 48 minutes. Simultaneously, the adaptive attention mechanism A(X)... t The introduction of seasonal analysis of historical data enhances the ability to perceive cyclical changes.

[0149] The number of hyperedges in the dynamic hypergraph adaptive learning module has been increased to 120 (E=120), and adaptive hyperedge importance weights have been introduced, enabling the hypergraph to more accurately represent the traffic association strength between different areas. In addition, a vertical traffic association modeling mechanism was designed for the unique elevated and ground-level road dual-layer structure of Pudong New Area, further enhancing the hypergraph structure's ability to represent complex traffic networks.

[0150] In the multi-scale fusion homogeneous convolution module, the local information extraction part employs multi-resolution convolution, using three different sizes of convolution kernels (3×3, 5×5, and 7×7) in parallel to capture spatial dependencies at different ranges. The global information enhancement part introduces a graph attention network (GAT) mechanism to enhance the perception of key nodes.

[0151] The dual topological feature fusion module adopts a three-channel architecture, adding a temporal convolution channel in addition to graph convolution and hypergraph convolution, forming a three-dimensional fusion framework of temporal-graph-hypergraph. The GRU unit is replaced with a more powerful self-attention layer to better capture long-term dependencies in the sequence.

[0152] In this embodiment, a distributed training strategy was employed, using four GPUs for parallel computation. The batch size was increased to 128, the learning rate was adjusted to 0.0005, and the number of training epochs was 150. A Huber Loss component was added to the loss function to enhance robustness to outliers.

[0153] Example 4:

[0154] Embodiment 4 of the present invention provides a city-wide traffic flow prediction system. This city-wide traffic flow prediction system of Embodiment 4 is implemented using a traffic flow prediction method based on adaptive dynamic multi-scale spatiotemporal hypergraph convolution, as described in Embodiment 1.

[0155] In the fourth embodiment, the method of the present invention is applied to traffic flow prediction across the entire city of Dongguan. The system integrates data from 500 fixed traffic sensors, 3000 floating car data points, and video stream data from 100 traffic cameras, forming a large-scale, multi-source, heterogeneous urban traffic sensing network. The data covers the entire year of 2023, with a sampling interval of 10 minutes.

[0156] For such ultra-large-scale scenarios, the model proposed in this invention incorporates scalability enhancement design:

[0157] The feature embedding module employs a hierarchical regional division strategy, dividing the city's transportation network into 50 regional sub-maps. Independent embedding processing is applied within each sub-map, followed by cross-regional feature fusion through a joint embedding mechanism. (Node D within the region...) local =64, region representation D region=128, with weights dynamically optimized.

[0158] The multi-scale adaptive causal convolution module employs a grouped convolution design, grouping sensors according to road class (highway, arterial road, secondary arterial road, and local road), and applying different combinations of dilation factors to different groups to adapt to the traffic characteristics of different road types. The highway group uses larger dilation factors (e.g., d = 2, 8, 16, 32), while the local road group uses smaller dilation factors (e.g., d = 1, 2, 4, 8).

[0159] The dynamic hypergraph adaptive learning module employs a hierarchical hypergraph design, constructing a two-level structure of intra-regional hypergraphs and inter-regional hypergraphs. Intra-regional hypergraphs capture local traffic relationships, with the number of hyperedges dynamically allocated based on regional complexity. Inter-regional hypergraphs model city-level traffic flow patterns, with a total of 200 hyperedges. Simultaneously, multi-variable relation modeling is introduced, constructing three types of hypergraphs based on distance, flow correlation, and functional similarity, respectively. The model's expressive power is enhanced by fusing multiple relation representations.

[0160] The multi-scale fusion homogeneous convolution module employs a memory-optimized design, significantly reducing the GPU memory requirements for large-scale graph computations. Simultaneously, it automatically adjusts the kernel size and weight distribution based on node connectivity and importance to improve the model's adaptability and computational efficiency in different scenarios.

[0161] The dual topology feature fusion module first performs graph-hypergraph feature fusion in different regions, and then exchanges information on only boundary nodes and key nodes through cross-regional communication. This ensures both prediction accuracy and optimizes computational efficiency.

[0162] The residual feature aggregation module simultaneously predicts three targets: traffic flow, speed, and occupancy, improving overall prediction performance through knowledge sharing between tasks. The output layer is configured to predict multi-period traffic indicators for the next 6 time steps (i.e., 1 hour), 12 time steps (i.e., 2 hours), and 24 time steps (i.e., 4 hours).

[0163] In this fourth embodiment, the base model is first pre-trained on a small-scale dataset, and then gradually expanded to a city-wide scale. Distributed training is performed on eight GPUs using mixed-precision training and model parallelism techniques. The batch size is set to 32, the initial learning rate is 0.0002, and the number of training epochs is 200. The loss function employs a multi-objective weighted combination, including RMSE, MAE, and Quantized Regression Loss (QRL).

[0164] Balance prediction errors of different scales and types.

[0165] 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 traffic flow prediction method based on adaptive dynamic multi-scale spatiotemporal hypergraph convolution, characterized in that, It includes the following steps: S1: Collect raw traffic data and preprocess it; S2: Enhance the preprocessed raw traffic data and combine it with the spatial location embedding matrix and the time period embedding matrix to form spatiotemporal enhanced data; S3: Input the spatiotemporal augmentation data from step S2 into the multi-scale adaptive causal convolution module, adaptively adjust the convolution kernel stride and dilation factor, expand the receptive field in the time dimension, and extract multi-scale traffic flow change features. S4: Based on the spatiotemporal augmentation data from step S3, construct a dynamic hypergraph structure, define the hypergraph association matrix, and use the attention-enhanced matrix decomposition method to generate an adaptive hypergraph to characterize the high-order spatial relationships of the transportation network. S5: By fusing the temporal features extracted in step S3 with the hypergraph structure information obtained in step S4, a multi-scale fusion homogeneous convolution module is designed. Combining two-dimensional convolution with attention-enhanced transposed convolution, the fusion of spatiotemporal features at multiple different scales is achieved. S6: Using the multi-scale spatiotemporal features extracted in step S5, topological node features are extracted through graph convolutional networks and hypergraph convolutional networks respectively, and adaptive weighted fusion is performed through gated feature fusion units to optimize the spatiotemporal feature representation. S7: The residual feature aggregation module integrates the features fused in step S6 into multi-scale features; S8: Based on the features fused in step S7, generate traffic flow prediction results for multiple future time steps; In step S5, the designed multi-scale fusion homogeneous convolution module comprises two parts: adaptive local information extraction and global information enhancement. The processing procedure of this multi-scale fusion homogeneous convolution module is as follows: Multi-scale adaptive 2D convolution is employed to achieve adaptive downsampling and feature optimization, thereby removing redundant information, highlighting key local patterns, and optimizing input features for subsequent global information extraction. The calculation formula is as follows: , in, Perform structured regularization to prevent overfitting. Enhance feature representation capabilities and improve gradient fluidity through nonlinear activation. By standardizing the input distribution of each layer, the training process is stabilized, thus improving the stability of model training. Responsible for extracting local spatial features and capturing short-term traffic change patterns. The convolutional weights are adaptive and can be dynamically adjusted according to changes in traffic patterns. To further model global traffic flow patterns, homogeneous convolution is combined with attention-enhanced transposed convolution for global information enhancement. Furthermore, attention-enhanced transposed convolution is introduced to progressively recover the spatial topological information of the data through adaptive upsampling, thereby enhancing the model's ability to capture global features. Ultimately, the output traffic flow feature representation effectively integrates local and global information, thus improving the model's spatiotemporal prediction capabilities. The calculation formula is shown below: , in It is a local spatiotemporal feature, which contains traffic flow information within a specific time window and is used to capture dynamic changes and spatial distribution characteristics within a short time range; This represents a homogeneous convolution operation, used to model global spatial dependencies. This is a hypergraph incidence matrix, used to capture high-order dynamic relationships between different nodes. For transpose convolution operations, spatial detail information is recovered through progressive upsampling. Weights are extracted for global features, which can be learned and dynamically adjusted during training to optimize the fusion of local and global information; As an adaptive attention mechanism, it can automatically identify and enhance key global features, thereby improving the model's prediction accuracy.

2. The traffic flow prediction method based on adaptive dynamic multi-scale spatiotemporal hypergraph convolution according to claim 1, characterized in that, In step S1, real-time raw road traffic data is collected from traffic sensors, including flow sensors, vehicle detectors, and environmental monitoring equipment.

3. The traffic flow prediction method based on adaptive dynamic multi-scale spatiotemporal hypergraph convolution according to claim 2, characterized in that, In step S1, the preprocessing steps for the original traffic data include missing value imputation, normalization, and outlier detection preprocessing.

4. The traffic flow prediction method based on adaptive dynamic multi-scale spatiotemporal hypergraph convolution according to claim 3, characterized in that, In step S3, the multi-scale adaptive causal convolution module is used to extract multi-scale traffic flow change features as follows: The spatiotemporal augmentation data processed in step S2 As input data, denoted as Used for time series modeling, given an input sequence and adaptive convolution kernel The multi-scale adaptive causal convolution module extracts feature information in the time dimension by adjusting the stride and dilation factor of the convolution kernel. Its calculation formula is as follows: , in, The adaptive dilation factor determines the interval between different time steps, thereby dynamically adjusting the receptive field of the convolutional kernel. The kernel size controls the coverage of the receptive field. An adaptive attention mechanism is used to dynamically adjust the importance weights of different time positions based on the current input state in order to optimize information extraction capabilities; By setting different expansion factor sequences This multi-scale adaptive causal convolution module can simultaneously extract short-term, medium-term, and long-term temporal features. The adaptive dilation factor enables the convolution operation to expand the receptive field across multiple scales, thereby capturing the changing patterns of traffic flow at different time scales. For each adaptive dilation factor... The features generated by the convolution operation are represented as follows: , Finally, a multi-scale adaptive causal convolution module is used to fuse information from different time scales to generate a comprehensive feature representation. The calculation formula for this multi-scale adaptive causal convolution module is as follows: , in, Represents a non-linear activation function. These are adaptive weighting coefficients for features at different scales, used to measure the relative importance of features at different time scales, and dynamically optimized during training. The cross-feature enhancement factor controls the nonlinear interaction between multi-scale features, thereby enhancing the fusion ability of different time-dependent patterns. The element-wise product (∏) can capture higher-order correlations between different time scales, enabling the model to learn complex time-dependent patterns.

5. The traffic flow prediction method based on adaptive dynamic multi-scale spatiotemporal hypergraph convolution according to claim 4, characterized in that, In step S4, the processing procedure is as follows: First, define a hypergraph incidence matrix. ,in This represents the number of observation nodes in the transportation network. This represents the number of hyperedges. Each hyperedge can contain multiple associated road segments, which is used to implement the hypergraph association matrix. The adaptive construction of the dynamic hypergraph structure employs an attention-enhanced matrix factorization method, the calculation formula of which is as follows: , in, This is the dimensionality-reduced local feature matrix, containing traffic flow features within a specific time window. is a learnable projection matrix used to map local features to a hypergraph representation space. This represents the attention enhancement matrix, used to dynamically adjust the influence of different nodes on the hyperedge. The formula for calculating the attention enhancement matrix is ​​as follows: , in, These are the query, key, and value matrices, each composed of local features. Generated through a linear transformation, as follows: , in, It is a learnable parameter matrix used to project input features into different representation spaces.

6. The traffic flow prediction method based on adaptive dynamic multi-scale spatiotemporal hypergraph convolution according to claim 5, characterized in that, In step S6, a dual topology feature fusion module is used to extract topology node features from the graph convolutional network and the hypergraph convolutional network, respectively. The graph convolutional network includes a graph structure, and the hypergraph convolutional network includes a hypergraph structure. The dual topology feature fusion module includes a graph structure node embedding dictionary. And hypergraph structure node embedding dictionary ,in, This represents the node characteristics in the graph structure, used to capture local information about directly adjacent nodes, while This represents the node features in a hypergraph structure, used to model higher-order group interaction relationships. Since graph structures primarily model local topological information, while hypergraph structures can capture more complex group interaction patterns, a gated feature fusion unit is used to perform weighted fusion with an adaptively learned optimal weight allocation method. This results in a richer spatiotemporal feature representation of the fused nodes. Ultimately, the spatiotemporal feature representation of the fused nodes... The calculation formula is as follows: , in , , This is a graph-structured adjacency matrix used to characterize the spatiotemporal dependencies between adjacent roads in a transportation network. The hypergraph incidence matrix represents the relationship between nodes and hyperedges in the hypergraph, and is used to model complex traffic flow interaction patterns. This is a graph convolutional network used to extract local features from graph structures. This is a hypergraph convolutional network used to model higher-order spatiotemporal dependencies and learn interaction patterns between nodes and groups. This indicates a feature concatenation operation. Representing Hadamaji, As a gated feature fusion unit, it adaptively weights and fuses graph structure features and hypergraph structure features through a gated recurrent unit (GRU); For feature interaction enhancement units, where It is a learnable dynamic balancing factor used to adjust the fusion ratio of graph features and hypergraph features to ensure optimal information interaction.

7. The traffic flow prediction method based on adaptive dynamic multi-scale spatiotemporal hypergraph convolution according to claim 6, characterized in that, In step S7, the residual feature aggregation module performs a dual-topology fusion feature calculation based on the feature calculated in step S6. To further optimize the spatiotemporal feature representation, adaptive two-dimensional convolution operations are employed to integrate features at different scales, capturing richer spatial dependencies and temporal dynamic information. Furthermore, layer normalization, gating units, and feedforward neural networks are combined to enhance the model's stability and expressive power. The final prediction output calculation formula is as follows: , in, , This is represented as the high-dimensional feature matrix obtained after the fusion step. Used to control the flow of residual information. Perform feature normalization. To further enhance feature representation capabilities, ultimately, The feature matrix is ​​processed by an adaptive two-dimensional convolutional layer to generate traffic flow prediction results for multiple future time steps.

Citation Information

Patent Citations

  • Traffic prediction method based on multi-scale space-time fusion graph network

    CN115240425A

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

    CN118629226A