Traffic flow prediction method based on dual dynamic space-time automatic encoder network

Through the dual dynamic spatiotemporal automatic encoder network framework, the traffic flow diagram is converted into a dual hypergraph to capture the dynamic spatiotemporal characteristics of the edges, which solves the shortcomings of the existing models in capturing the dynamic edge characteristics and spatial impacts in the traffic network, and improves traffic The accuracy and efficiency of flow prediction.

CN119091611APending Publication Date: 2024-12-06DALIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411058122.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing traffic flow prediction model has insufficient in capturing the deep features and spatial influencing factors of dynamic edges in the traffic network, resulting in insufficient prediction accuracy and failure to effectively utilize the edge features in the traffic flow map.

Method used

A framework based on dual dynamic spatiotemporal automatic encoder network (DDSTAEN) is proposed. By designing spatiotemporal automatic encoder and graph generation module, the traffic flow diagram is converted into dual hypergraphs, the dynamic spatiotemporal characteristics of edges are captured, and the dynamic hypergraph volume is used. Accumulate network and time attention mechanisms to predict traffic flow.

Benefits of technology

It improves the accuracy and efficiency of traffic flow prediction, can more effectively explore complex potential relationships in the traffic system, and improves the accuracy of prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119091611A_ABST
    Figure CN119091611A_ABST
Patent Text Reader

Abstract

The invention provides a traffic flow prediction method based on a dual dynamic space-time automatic encoder network, and relates to the technical field of traffic flow prediction. Comprising the following steps: designing an automatic encoder for learning an intrinsic mode from traffic flow data, and representing a current traffic flow information code through low dimension; modeling is carried out on the dynamic characteristics of the traffic flow graph nodes, and a dual dynamic space-time coding network (DDSTAEN) framework is established; converting the traffic flow graph into a dual hypergraph, and capturing dynamic spatio-temporal characteristics of edges; projecting the current hidden state to a future hidden state to realize traffic flow prediction; a prediction loss function is obtained by training a dual dynamic space-time automatic encoder. The invention provides a dual dynamic space-time coding network (DDSTAEN) framework. According to the framework, a dual dynamic space-time convolutional network is adopted to learn and identify an internal mode and a hidden state in existing traffic flow data, and a predicted hidden state is utilized to reconstruct a future traffic flow dynamic state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of traffic flow prediction, and in particular to a traffic flow prediction method based on a dual dynamic spatiotemporal autoencoder network. Background Art

[0002] With the rapid growth of population and vehicles in large cities, the complexity of transportation systems has also increased, bringing various challenges including traffic congestion. In this context, it is considered crucial to establish an intelligent transportation system that can meet the needs of modern cities. Traffic flow prediction is considered a key task in intelligent transportation systems, has received widespread attention, and has become a research hotspot in this field. The core issue of traffic prediction is to effectively model the dynamic spatiotemporal characteristics of large-scale traffic data. This requires collecting and analyzing data, and understanding and predicting complex traffic network behaviors.

[0003] Traffic forecasting has attracted much attention in the field of spatiotemporal data mining and multivariate time series forecasting. [1][2][3] ,speed [4][5] and demand forecasting [6][7][8] These studies use the spatiotemporal dependencies in traffic data to support infrastructure layout and traffic resource scheduling. [9] With the advancement of deep learning technology, the design of traffic prediction models has become more and more complex. The goal of these models is to accurately capture the characteristics of historical traffic states and their relationships, and integrate external knowledge to predict future traffic states. In order to simulate spatial relationships, traditional methods usually use grids to divide the study area. Liu

[10] et al.

[10] A method combining convolution and long short-term memory network (LSTM) is used to extract spatiotemporal information from traffic flow, and a bidirectional LSTM is used to learn periodic features. Yu et al.

[11] The traffic speed is converted into a static image and the spatial and temporal dependencies are learned using convolutional neural networks (CNN) and LSTM. The emergence of graph neural network (GNN) technology has prompted researchers to model traffic networks as graph structures. This method uses geographic distance and predefined features to learn spatial dependencies.

[0004] Graph Convolutional Networks (GCNs) preserve the structure of traffic network graphs, while Temporal Convolutional Networks (TCNs) capture temporal features. Together, these techniques have led to the development of efficient prediction methods, such as STGCN.

[12] , GraphWaveNet

[13] , DGCNN

[14] The core of these GCN-based methods is to construct a graph or adjacency matrix that reflects the relationship between traffic measurements and road segments. In addition to the traditional graph construction method based on road segment connectivity

[15] The researchers also considered the distance between road segments.

[16] Similarity to geographical features

[17] Given the dynamic nature of traffic flows and their relationships in time and space, recent approaches use real-time traffic data to construct dynamic graph adjacency matrices, which significantly improve performance compared to traditional static models.

[18]

[19]

[20] .

[0005] Although GCN-based dynamic graph models have made significant progress in modeling the dynamic characteristics of traffic flow, these models still mainly rely on intuitive traffic data dependencies between road nodes. However, in addition to the direction and structure of the traffic flow graph, these models do not effectively utilize the deep features of dynamic edges. On the other hand, these methods directly mine spatial influencing factors from the time series of traffic flow and use data-driven adjacency matrices to model these spatial interactions, which is believed to bring more accurate prediction results.

[13] This method uses a dynamic adjacency matrix in the spatiotemporal convolution calculation to improve the prediction accuracy by considering the spatial dependence of traffic flow over time. Although great progress has been made in spatiotemporal traffic flow prediction technology, it is still necessary to conduct further research to reveal the inherent laws of historical traffic flow time series and apply them to the prediction model to improve the prediction accuracy.

[0006] References:

[0007] [1]Song C, Lin Y, Guo S, et al.Spatial-temporal synchronous graphconvolutional networks: A new framework for spatial-temporal network dataforecasting[C] / / Proceedings of the AAAI conference on artificialintelligence.2020, 34(01):914-921.

[0008] [2]Li M,Zhu Z.Spatial-temporal fusion graph neural networks fortraffic flow forecasting[C] / / Proceedings of the AAAI conference on artificialintelligence.2021,35(5):4189-4196.

[0009] [3]Guo S,Lin Y,Feng N,et al.Attention based spatial-temporal graphconvolutional networks for traffic flow forecasting[C] / / Proceedings of theAAAI conference on artificial intelligence.2019,33(01):922-929.

[0010] [4]Zhao L,Song Y,Zhang C,et al.T-gcn:A temporal graph convolutionalnetwork for traffic prediction[J].IEEE transactions on intelligenttransportation systems,2019,21(9):3848-3858.

[0011] [5]Han L,Du B,Sun L,et al.Dynamic and multi-facetedspatio-temporaldeep learning for traffic speed forecasting[C] / / Proceedings of the27th ACMSIGKDD conference on knowledge discovery&data mining.2021:547-555.

[0012] [6]Yao H,Wu F,Ke J,et al.Deep multi-view spatial-temporal networkfortaxi demand prediction[C] / / Proceedings of the AAAI conference onartificialintelligence.2018,32(1).

[0013] [7]Geng X,Li Y,Wang L,et al.Spatiotemporal multi-graphconvolutionnetwork for ride-hailing demand forecasting[C] / / Proceedings of theAAAIconference on artificial intelligence.2019,33(01):3656-3663.

[0014] [8]Du B,Hu X,Sun L,et al.Traffic demand prediction based ondynamictransition convolutional neural network[J].IEEE Transactions onIntelligentTransportation Systems,2020,22(2):1237-1247.

[0015] [9]Liu X,Qu X,Ma X.Improving flex-route transit services withmodularautonomous vehicles[J].Transportation Research Part E:LogisticsandTransportation Review,2021,149:102331.

[0016]

[10] Liu Y,Zheng H,Feng X,et al.Short-term traffic flow predictionwithConv-LSTM[C] / / 2017 9th international conference on wirelesscommunications andsignal processing(WCSP).IEEE,2017:1-6.

[0017]

[11] Yu H,Wu Z,Wang S,et al.Spatiotemporal recurrentconvolutionalnetworks for traffic prediction in transportation networks[J].Sensors,2017,17(7):1501.

[0018]

[12] Yu B,Yin H,Zhu Z.Spatio-temporal graph convolutional networks:Adeep learning framework for traffic forecasting[J].arXiv preprint arXiv:1709.04875,2017.

[0019]

[13] Wu Z,Pan S,Long G,et al.Graph wavenet for deepspatial-temporalgraph modeling[J].arXiv preprint arXiv:1906.00121,2019.

[0020]

[14] Diao Z,Wang X,Zhang D,et al.Dynamic spatial-temporal graphconvolutional neural networks for traffic forecasting[C] / / Proceedings of theAAAI conference on artificial intelligence.2019,33(01):890-897.

[0021]

[15] Guo K,Hu Y,Qian Z,et al.Optimized graph convolution recurrentneural network for traffic prediction[J].IEEE Transactions on IntelligentTransportation Systems,2020,22(2):1138-1149.

[0022]

[16] Li Y,Yu R,Shahabi C,et al.Diffusion convolutional recurrentneural network:Data-driven traffic forecasting[J].arXiv preprint arXiv:1707.01926,2017.

[0023]

[17] Geng X,Li Y,Wang L,et al.Spatiotemporal multi-graph convolutionnetwork for ride-hailing demand forecasting[C] / / Proceedings of the AAAIconference on artificial intelligence.2019,33(01):3656-3663.

[0024]

[18] Guo K,Hu Y,Qian Z,et al.Dynamic graph convolution network fortraffic forecasting based on latent network of Laplace matrix estimation[J].IEEE Transactions on Intelligent Transportation Systems,2020,23(2):1009-1018.

[0025]

[19] Li J, Liu Y, Zou L.DynGCN: A dynamic graph convolutional networkbased on spatial-temporal modeling[C] / / Web Information Systems Engineering–WISE 2020: 21st International Conference,Amsterdam,The Netherlands,October 20–24,2020,Proceedings,Part I 21.Springer International Publishing,2020:83-95.

[0026]

[20] Li F, Feng J, Yan H, et al. Dynamic graph convolutional recurrent network for traffic prediction: Benchmark and solution[J]. ACM Transactions on Knowledge Discovery from Data, 2023, 17(1): 1-21. Summary of the invention

[0027] According to the above-mentioned technical problem of traffic flow prediction, a traffic flow prediction method based on a dual dynamic spatiotemporal autoencoder network is provided.

[0028] The technical means adopted by the present invention are as follows:

[0029] A traffic flow prediction method based on a dual dynamic spatiotemporal autoencoder network comprises the following steps:

[0030] S1: An autoencoder is designed to learn intrinsic patterns from traffic flow data and encode the current traffic flow information into a low-dimensional representation;

[0031] S2: Model the dynamic characteristics of traffic flow graph nodes and establish the dual dynamic spatiotemporal encoding network DDSTAEN framework;

[0032] S3: Convert the traffic flow graph into a dual hypergraph to capture the dynamic spatiotemporal characteristics of edges;

[0033] S4: Project the current hidden state to the future hidden state to achieve traffic flow prediction;

[0034] S5: Train the dual dynamic spatiotemporal autoencoder to obtain the prediction loss function; set the original traffic flow data X as input and predict the traffic flow As output, it is represented as:

[0035]

[0036] Then the prediction loss function is:

[0037]

[0038] Among them, Y :,j represents the true value, represents the predicted value of the sensor at time step j.

[0039] Furthermore, the dual dynamic spatiotemporal encoding network DDSTAEN framework is:

[0040] h=Γ enc (X);

[0041]

[0042] Among them, Γ enc (·) and Γ dec (·) denotes the encoder and decoder of the spatiotemporal autoencoder, h denotes the hidden state of the inherent pattern; X denotes the historical traffic flow data.

[0043] Furthermore, the dual dynamic spatiotemporal encoding network DDSTAEN framework includes: a spatiotemporal feature module, a graph generation module and an autoencoder module.

[0044] Furthermore, in S3, the traffic flow graph is converted into a dual hypergraph; given a graph G = (V, E, A) with N nodes and E edges, use G D =(V D ,E D ,H) represents the dual hypergraph;

[0045] In the dual hypergraph, the number of nodes is equal to the number of edges in the original graph |X D |=E, and the number of edges is equal to the number of edges in the original graph |E D |=N;correlation adjacency matrix H∈R E×N G D Providing additional structural information, the correlation adjacency matrix is ​​expressed as:

[0046]

[0047] Among them, v i ∈V D , e j ∈E D; The correlation matrix H = H s +H t Used to describe the structural information of the original graph and the dual hypergraph at the same time; i Represents a node; e j represents an edge;

[0048] Since road networks are usually directional, the traffic flow graph is regarded as a directed graph; the association matrix H is decomposed into H = H s +H t ; Among them, H s ,H t ∈R E×N Represents the matrix without zero elements, i.e., the source and target nodes of the directed edges in the original graph.

[0049] Further, the graph generation module includes two independent branches, each branch is responsible for generating the dynamic edges or adjacency matrix of the graph and the dynamic edges or adjacency matrix of the hypergraph respectively;

[0050] The dynamic edges or adjacency matrix of the graph are generated according to the features of the corresponding nodes in the hypergraph, including the following steps:

[0051] Step 311: Extract the correlation between two endpoint nodes from the traffic flow graph as the initial edge feature X D :

[0052] X D =[(W 1 ′X)[d s ,:];(W 2 ′)[d t ,:]]∈R E×2F′ ;

[0053] Among them, W 1 ′,W 2 ′∈R T×F×F′ represents learnable parameters, [·;·] represents concatenation operations, (·)[d s ,:] represents the selected tensor slice, including the source node d in the flow graph s and destination node d t That is, it represents the directed edge in the graph; the initial edge feature X D Contains node information related to directed edges in the traffic flow graph;

[0054] Step 312: Fusion of node-related information through convolution:

[0055]

[0056] Among them, Conv1D(·) means using 1×1 convolution kernel to perform convolution operation to achieve feature fusion and obtain updated edge features;

[0057] Step 313: To study the characteristics of the supernodes in the hypergraph, update the edges The features of the hypergraph are integrated and processed through the diffusion hypergraph convolutional network HGCN;

[0058] Step 314: Capture and represent the dynamic characteristics of edge features in the hypergraph:

[0059] W a =diag(E adp )∈R N×N ;

[0060]

[0061] Where θ=[θ 0 ,…,θ N-1 ]∈R N×F″×1 represents the set of parameters to be learned, E adp ∈R N Represents the weight vector of the hyperedge in the adaptive learning process; output It will be used as the input of the flow graph in the subsequent dynamic graph convolution network;

[0062] The dynamic edge or adjacency matrix of the hypergraph includes the following steps based on the dual relationship between the traffic flow graph and its hypergraph:

[0063] Step 321: Use graph convolution to update node features on the traffic flow graph;

[0064] Step 322: Generate dynamic hyperedges for the hypergraph; first, average pooling is performed on the node features X of the traffic flow graph along the time dimension to ensure the efficiency of information transmission and update. The formula is:

[0065] X d =AvgPool(X)∈R M×F ;

[0066]

[0067] Among them A f =A / rowsum(A), A b =A T / rowsum(A T ), Respectively represent A f and A b The n-order power matrix of θ f =[θ 0,f ,…,θ N-1,f ]∈R N×F×1 and θ b =[θ 0,b ,…,θN-1,b ]∈R N×F×1 Represents learnable parameters; output GCN d (X d )∈R N It will serve as the dynamic hyperedge of the subsequent dynamic hypergraph convolutional network DHGCN in the hypergraph.

[0068] Furthermore, the spatiotemporal feature module includes: gated temporal convolution, dynamic graph / hypergraph convolution and temporal attention mechanism; the temporal gated convolution uses dilated convolution on the temporal dimension; the dynamic graph / hypergraph convolution provides a comprehensive view of traffic flow dynamics by analyzing the interaction between spatial and temporal dimensions; the temporal attention mechanism is used to represent global temporal relationships in traffic data.

[0069] Furthermore, the gated time convolution includes: an encoder and a decoder;

[0070] In the encoder, information is embedded in each time step through 1×1 convolution; in order to process the entire traffic flow sequence, multiple layers of 1D dilated convolution are used; the time series X∈R N×F×T The expansion and convolution are performed by a filter f, the kernel size of the filter is 1×k, and the expansion factor is d; the encoder is represented as:

[0071]

[0072] Where C(s) represents the time step s of the compressed sequence C; the encoder effectively converts the original traffic flow data sequence with an initial length of T into a hidden state of 1-step compression through multiple one-dimensional dilated convolutions, and then outputs it, and then outputs the hidden state h of the eigenmode through 1×1 convolution;

[0073] The decoder takes the output hidden state of the encoder as input; the decoder expands the information of a single time step to a length matching the original input by applying consecutive transposed unfolded convolutional layers;

[0074] When the expansion factor and the number of decoder layers are consistent with the encoder, the decoder can fully reconstruct the data of all time steps; for the hidden state C, a transposed expansion convolution is performed using a filter f with a kernel size of 1×k and an expansion factor of d; the decoder is represented as:

[0075]

[0076] On the basis of implementing the convolution and transposed convolution operations, the activation functions used are the tangent hyperbolic function and the sigmoid function; the element-by-element product operation is performed on the activated output;

[0077] The gating mechanism is set up exactly the same in both encoder and decoder and can be defined as:

[0078]

[0079] Among them, θ enc and θ dec denote the parameters of unfolded convolution and transposed unfolded convolution respectively; tanh(·) and σ(·) denote the tangent hyperbolic function and the sine and cosine functions respectively, and the symbol ⊙ denotes element-wise multiplication; and Represents the hidden state output of the previous layer in the network; and Represents the output obtained by the current layer, which is affected by time dependency.

[0080] Furthermore, the dynamic graph convolutional network is expressed as:

[0081]

[0082] in, represents an adaptive correlation adjacency matrix, E 1 ,E 2 ∈R N×t represents learnable parameters; and θ′ M =[θ′ 0, M,…,θ′ N-1,M ]∈R N×F×1 All represent learnable parameters; the Reshape(v) operation represents the process of reshaping the vector v into a sparse matrix P. The elements P[d s ,d t ] is equal to the corresponding element of vector v;

[0083] A dynamic hypergraph convolutional network is introduced to capture the spatial and temporal features of the hypergraph, expressed as:

[0084] P w =diag(GCN d (X d ))∈R N×N ;

[0085]

[0086] Where θ′=[θ′ 0 ,…,θ′ N-1 ]∈R N×F″×1 Represents a learnable parameter; through GCN d (X d )Extract the dynamic characteristics of traffic flow graph nodes.

[0087] Furthermore, the time attention mechanism is expressed as:

[0088] M=C e σ(((X) T W 1 )W 2 ((X)W 3 ) T +b e );

[0089]

[0090] Tatt(X) = M′X;

[0091] in, W 1 ∈R N×1 , Both represent learnable weight parameters.

[0092] Furthermore, in S4, the hidden state of the intrinsic pattern extracted from the current traffic flow X is represented as h∈R N′×T′ ; where N′ and T′ represent the spatial dimension and time dimension of the hidden state respectively; the hidden state includes: the hidden features of the time dimension T′ and the hidden features of the spatial dimension N′; the information flow between the current and future hidden states is controlled by the gating mechanism, that is, by the time attention function and spatial attention function To map the hidden state from now to the future; the projection function of the hidden state is:

[0093]

[0094] Among them, W 1 ,W 2 ,B 1 ,B 2 represents weight and bias parameters; and represents a multi-head attention operation; σ(·) sigmoid represents an activation function; φ represents a gating unit.

[0095] Compared with the prior art, the present invention has the following advantages:

[0096] This paper proposes a Dual Dynamic Spatiotemporal Encoding Network (DDSTAEN) framework, which uses a dual dynamic spatiotemporal convolutional network to learn and identify intrinsic patterns and hidden states in existing traffic flow data, and uses the predicted hidden states to reconstruct future traffic flow dynamics.

[0097] This paper proposes a framework that combines spatiotemporal convolutional networks, graph convolutional networks, and spatiotemporal attention mechanisms to design an autoencoder. The autoencoder uses dilated convolutions and transposed dilated convolutions to extract current traffic flow information based on correlation and temporal correlation. In addition, the framework also incorporates a dual hypergraph to handle the dynamic correlation of edges in the traffic flow graph, thereby enabling the exploration of complex latent relationships in dynamic traffic systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0098] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0099] Figure 1 It is a schematic diagram of the overall process of the present invention.

[0100] Figure 2 This is the overall framework of the DDSTAEN model of the present invention. Among them, (a) is the ablation experiment of the mean absolute error; (b) is the ablation experiment of the root mean square error.

[0101] Figure 3 The schematic diagram of the spatiotemporal autoencoder structure of the present invention is shown in Figure 1. (a) is the parameter setting of Top-K; (b) is the number of batch sizes; and (c) is the number of intermediate filters.

[0102] Figure 4 Schematic diagram of the ablation experiment.

[0103] Figure 5 The results of parameter sensitivity experiments.

[0104] Figure 6 Comparison of the predicted value and the actual value of the model of the present invention on PEMS08 within 1 hour, where (a) is 15 minutes, (b) is 30 minutes, and (c) is 60 minutes. DETAILED DESCRIPTION

[0105] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0106] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0107] like Figure 1 As shown, the present invention provides a traffic flow prediction method based on a dual dynamic spatiotemporal autoencoder network, comprising the following steps:

[0108] S1: An autoencoder is designed to learn the intrinsic pattern from traffic flow data and encode the current traffic flow information through a low-dimensional representation; traffic prediction can be modeled as a function that maps the observed road network traffic data to the future traffic state. The traffic network is defined as a weighted directed graph G = (V, E, A), and its corresponding relationship is as follows Figure 1 As shown in Figure 1, V represents a set of N non-repeating traffic nodes, each of which represents a location in traffic, such as an intersection, a highway entrance, etc. E represents a high-order relationship between traffic nodes, where each hyperedge e∈E can be regarded as a traffic flow convergence area, such as a city center area or a highway section. A∈R N×N is an adjacency matrix whose elements represent the weights of the edges, which can be obtained through the links in the road network or the distances between road segments. Traffic data (such as vehicle speed) at time t can be expressed as in represents the measured value of the i-th node at time t, and F is the feature dimension. In the past [1,…,P] time period, the traffic time series can be expressed as X t-P+1:t ={X t-P+1 ,X t-P+2 ,…,X t}∈R N ×P×F Therefore, the traffic prediction problem can be interpreted as transforming the past traffic flow X t-P+1:t Mapping future traffic flows Then, based on the given traffic flow graph G and the historical traffic flow data of P periods before time t, it can be defined as follows:

[0109]

[0110] Where Q is the future time step. Traditional traffic forecasting research focuses on immediate traffic forecasting, the so-called P=0 scenario. The research of the present invention expands this field by predicting traffic flow in the near future time step, providing a broader perspective on traffic dynamics.

[0111] Graph convolutional networks (GCNs) are convolutional networks on graphs that update node features by aggregating and transforming the features of neighboring nodes. These networks update node features by aggregating and transforming the features of neighboring nodes. Kipf et al. introduced a variant of GCN that uses a first-order Chebyshev polynomial approximation and can be expressed as follows:

[0112]

[0113] in is the normalized adjacency matrix, is the input feature matrix, is a learnable parameter.

[0114] Hypergraph Graph Convolution Network (HGCN) can be seen as an extension and expansion of GCN in the field of hypergraphs. In this field, Feng et al. proposed a hypergraph convolution technology with the following formula:

[0115]

[0116] Where D 1 ∈R N×N and D 2 ∈R E×E Represents the diagonal matrices of hyperedge degree and hypernode degree respectively. For the sake of distinction, the present invention refers to the nodes in the hypergraph as supernodes. E×N is the incidence matrix, W∈R N×N is a hyperedge weighted diagonal matrix. represents the input feature matrix, Represents the learnable parameter matrix.

[0117] Current traffic prediction techniques mainly rely on analyzing spatiotemporal dependencies and historical information. These techniques can be divided into two modules: s Responsible for learning spatial dependencies, achieved through technologies such as CNN or GNN; F t Learn temporal dependencies through recurrent neural networks (RNNs), TCNs, or attention-based methods. Let represents the N node features in the past P time steps, where is the embedding function, and d is the feature dimension. The framework of these methods is normalized as follows:

[0118]

[0119] Where W is a learnable weight parameter, AGGREGATE(·) represents the function of aggregation in the time dimension, σ(·) is the activation function, Represents the combination of functions, F o Represents the output function.

[0120] S2: Model the dynamic characteristics of the traffic flow graph nodes and establish a dual dynamic spatiotemporal coding network DDSTAEN framework; the dual dynamic spatiotemporal coding network DDSTAEN framework is:

[0121] h=Γ eNC (X);

[0122]

[0123] Among them, Γ Enc (·) and Γ dec (·) respectively represent the encoder and decoder of the spatiotemporal autoencoder, and h represents the hidden state of the intrinsic mode. The dual dynamic spatiotemporal encoding network DDSTAEN framework includes: a spatiotemporal feature module, a graph generation module and an autoencoder module.

[0124] S3: Convert the traffic flow graph into a dual hypergraph to capture the dynamic spatiotemporal characteristics of the edges; the supernode characteristics of the dual hypergraph correspond to the edge characteristics of the traffic flow graph, which are usually defined by the connection or distance between the road segment nodes. The edge characteristics include not only the dynamic traffic data of the road nodes, but also the correlation between these data and the static information of the road network. The present invention needs to redefine the characteristics of the supernode. To this end, the present invention defines the characteristics X of the supernode in the hypergraph according to the edge and node characteristics of the traffic flow graph. D , as follows:

[0125] X D =[(W 1 ⊙H s )X;(W 2 ⊙H t )X;x dis ];

[0126] Where X D ∈R E×(2F+1)×T , [·;·;·] is the concatenation operation, X∈R N×F×T is the node feature, x dis ∈R E is the road network distance matrix, W 1 ,W 2 ∈R E×Nis the learned weight matrix. The first two sections describe the dynamic properties of directed edges, while the last section focuses on the static properties of these edges.

[0127] The process of converting a hypergraph into a graph involves converting the features of the hypergraph into the features of the traffic flow graph. This conversion is achieved by accurately mapping the features of the supernodes in the hypergraph to the node features of the traffic flow graph using the following formula:

[0128] X′=(W 3 ⊙H) T X D ′;

[0129] where X′∈R N×F′×T , X′ D ∈R E×F′×T , W 3 ∈R E×N is a learnable parameter.

[0130] When analyzing traffic flow graphs, the present invention typically finds that the number of edges far exceeds the number of nodes. This feature poses a challenge when constructing a hypergraph, as the number of nodes increases dramatically, causing the hypergraph-based graph convolution to become more complex. In addition, too many edges introduce noise or interference, affecting the accuracy and efficiency of the hypergraph. To address these issues, the present invention proposes a strategy for selecting the most representative edges from a traffic flow graph. Specifically, the present invention adopts a Top-k sampling method, which only selects the top k edges with the highest weights for dual transformation. This method ensures that the basic information in the traffic flow graph is effectively mapped into its dual hypergraph, while reducing complexity and retaining the core features of the data.

[0131] S4: Project the current hidden state to the future hidden state to achieve traffic flow prediction;

[0132] S5: Train the dual dynamic spatiotemporal autoencoder to obtain the prediction loss function; set the original traffic flow data X as input and predict the traffic flow As output, it is represented as:

[0133]

[0134] Then the prediction loss function is:

[0135]

[0136] Among them, Y :, represents the true value, represents the predicted value of the sensor at time step j.

[0137] In the present application, as a preferred embodiment, in S3, the traffic flow graph is converted into a dual hypergraph; given a graph G = (V, E, A) with N nodes and E edges, use G D =(V D ,E D ,H) represents the dual hypergraph;

[0138] In the dual hypergraph, the number of nodes is equal to the number of edges in the original graph |V D |=E, and the number of edges is equal to the number of edges in the original graph |E D |=N;correlation adjacency matrix H∈R E×N G D Providing additional structural information, the correlation adjacency matrix is ​​expressed as:

[0139]

[0140] Among them, v i ∈V D , e j ∈E D ; The correlation matrix H = H s +H t Used to simultaneously describe the structural information of the original graph and the dual hypergraph;

[0141] Since road networks are usually directional, the traffic flow graph is regarded as a directed graph; the association matrix H is decomposed into H = H s +H t ; Among them, H s ,H t ∈R E×N Represents the matrix without zero elements, i.e., the source and target nodes of the directed edges in the original graph.

[0142] In the present application, as a preferred embodiment, the graph generation module includes two independent branches, each branch is responsible for generating the dynamic edge or adjacency matrix of the graph and the dynamic edge or adjacency matrix of the hypergraph;

[0143] The dynamic edges or adjacency matrix of the graph are generated according to the features of the corresponding nodes in the hypergraph, including the following steps:

[0144] Step 311: Extract the correlation between two endpoint nodes from the traffic flow graph as the initial edge feature X D :

[0145] X D =[(W 1 ′X)[d s ,:];(W 2 ′)[d t ,:]]∈R E×2F′ ;

[0146] Among them, W 1 ′,W 2 ′∈R T×F×F′ represents learnable parameters, [·;·] represents concatenation operations, (·)[d s ,:] represents the selected tensor slice, including the source node d in the flow graph s and destination node d t That is, it represents the directed edge in the graph; the initial edge feature X D Contains node information related to directed edges in the traffic flow graph;

[0147] Step 312: Fusion of node-related information through convolution:

[0148]

[0149] Among them, Conv1D(·) means using 1×1 convolution kernel to perform convolution operation to achieve feature fusion and obtain updated edge features;

[0150] Step 313: To study the characteristics of the supernodes in the hypergraph, update the edges The features of the hypergraph are integrated and processed by diffusing HGCN;

[0151] Step 314: Capture and represent the dynamic characteristics of edge features in the hypergraph:

[0152] W a =diag(E adp )∈R N×N ;

[0153]

[0154] Where θ=[θ 0 ,…,θ N-1 ]∈R N×F″×1 represents the set of parameters to be learned, E adp ∈R N Represents the weight vector of the hyperedge in the adaptive learning process; output It will be used as the input of the flow graph in the subsequent dynamic graph convolution network;

[0155] The dynamic edge or adjacency matrix of the hypergraph includes the following steps based on the dual relationship between the traffic flow graph and its hypergraph:

[0156] Step 321: Use graph convolution to update node features on the traffic flow graph;

[0157] Step 322: Generate dynamic hyperedges for the hypergraph; first, average pooling is performed on the node features X of the traffic flow graph along the time dimension to ensure the efficiency of information transmission and update. The formula is:

[0158] X d =AvgPool(X)∈R N×F ;

[0159]

[0160] Among them A f =A / rowsum(A), A b =A T / rowsum(A t ), Respectively represent A f and A b The n-order power matrix of θ f =[θ 0,f ,…,θ N-1,f ]∈R N×F×1 and θ b =[θ 0,b ,…,θ N-1,b ]∈R N×F×1 Represents learnable parameters; output GCN d (X d )∈R N It will serve as the dynamic hyperedge of subsequent DHGCN in the hypergraph.

[0161] Preferably, in the present application, the spatiotemporal feature module includes: gated time convolution, dynamic graph / hypergraph convolution and time attention mechanism; the time gated convolution uses extended convolution on the time dimension; the dynamic graph / hypergraph convolution provides a comprehensive view of traffic flow dynamics by analyzing the interaction between spatial and temporal dimensions; the time attention mechanism is used to represent global temporal relationships in traffic data.

[0162] As a preferred implementation, the gated time convolution includes: an encoder and a decoder;

[0163] In the encoder, information is embedded in each time step through 1×1 convolution; in order to process the entire traffic flow sequence, multiple layers of 1 dilated convolution are used; the time series X∈R N×F×T The expansion and convolution are performed by a filter f, the kernel size of the filter is 1×k, and the expansion factor is d; the encoder is represented as:

[0164]

[0165] Where C(s) represents the time step s of the compressed sequence C; the encoder effectively converts the original traffic flow data sequence with an initial length of T into a hidden state of 1-step compression through multiple one-dimensional dilated convolutions, and then outputs it, and then outputs the hidden state h of the eigenmode through 1×1 convolution;

[0166] The decoder takes the output hidden state of the encoder as input; the decoder expands the information of a single time step to a length matching the original input by applying consecutive transposed unfolded convolutional layers;

[0167] When the expansion factor and the number of decoder layers are consistent with the encoder, the decoder can fully reconstruct the data of all time steps; for the hidden state C, a transposed expansion convolution is performed using a filter f with a kernel size of 1×k and an expansion factor of d; the decoder is represented as:

[0168]

[0169] On the basis of implementing the convolution and transposed convolution operations, the activation functions used are the tangent hyperbolic function and the sigmoid function; the element-by-element product operation is performed on the activated output;

[0170] The gating mechanism is set up exactly the same in both encoder and decoder and can be defined as:

[0171]

[0172] Among them, θ enc and θ dec denote the parameters of unfolded convolution and transposed unfolded convolution respectively; tanh(·) and σ(·) denote the tangent hyperbolic function and the sine and cosine functions respectively, and the symbol ⊙ denotes element-wise multiplication; and Represents the hidden state output of the previous layer in the network; and Represents the output obtained by the current layer, which is affected by time dependency.

[0173] As a preferred implementation, the dynamic graph convolutional network is expressed as:

[0174]

[0175] in, represents an adaptive correlation adjacency matrix, E 1 ,E 2 ∈R N×t represents learnable parameters; and θ′ M =[θ′ 0,M ,…,θ′ N-1,M]∈R N×F×1 All represent learnable parameters; the Reshape(v) operation represents the process of reshaping the vector v into a sparse matrix P. The elements P[d s ,d t ] is equal to the corresponding element of vector v;

[0176] A dynamic hypergraph convolutional network is introduced to capture the spatial and temporal features of the hypergraph, expressed as:

[0177] R w =diag(GCN d (X d ))∈R N×N ;

[0178]

[0179] Where θ′=[θ′ 0 ,…,θ′ N-1 ]∈R N×F″×1 Represents a learnable parameter; through GCN d (X d )Extract the dynamic characteristics of traffic flow graph nodes.

[0180] As a preferred embodiment, the time attention mechanism is expressed as:

[0181] M=C e σ(((X) T W 1 )W 2 ((X)W 3 ) T +b e );

[0182]

[0183] Tatt(X) = M′X;

[0184] in, W 1 ∈R N×1 , Both represent learnable weight parameters.

[0185] In this application, in S4, the hidden state of the intrinsic pattern extracted from the current traffic flow X is represented as h∈R N′×T′ ; where N′ and T′ represent the spatial dimension and time dimension of the hidden state respectively; the hidden state includes: the hidden features of the time dimension T′ and the hidden features of the spatial dimension N′; the information flow between the current and future hidden states is controlled by the gating mechanism, that is, by the time attention function and spatial attention function To map the hidden state from now to the future; the projection function of the hidden state is:

[0186]

[0187] Among them, W 1 ,W 2 ,B 1 ,B 2 represents weight and bias parameters; and represents a multi-head attention operation; σ(·) sigmoid represents an activation function; φ represents a gating unit.

[0188] Example 1

[0189] As an embodiment of the present application, four data sets from the California Department of Transportation Performance Measurement System are used: PEMS03, PEMS04, PEMS07 and PEMS08. These public data sets are used in this embodiment to evaluate the performance of the model proposed in the present invention. Table 1 lists the relevant information extracted from these data sets. In model training and prediction, only the traffic flow data in the data set is used in this embodiment. The sampling interval of the data set is 5 minutes, and zcore normalization is used in both training and testing stages.

[0190] Table 1 Dataset statistics

[0191] Dataset Sensors Starttime Granularity Timestep PEMS03 358 2012 / 5 / 1 5min 26208 PEMS04 307 2017 / 7 / 1 5min 16992 PEMS07 883 2017 / 5 / 1 5min 28224 PEMS08 170 2012 / 3 / 1 5min 17856

[0192] A detailed comparison is conducted between DDSTAEN and the following nine baseline methods.

[0193] XGBoost: A classic and efficient gradient boosting method based on tree structure, which has been widely used in many regression tasks and has shown excellent performance.

[0194] FC-LSTM: This method combines a long short-term memory network with a fully connected layer to effectively expand and enhance the information content in the original data.

[0195] DCRNN: Diffused Convolutional Recurrent Neural Network integrates bidirectional random walks and gated recurrent units on a distance-based graph structure, and adopts an encoder-decoder architecture to achieve deeper data analysis and processing.

[0196] STGCN: Spatio-Temporal Graph Convolutional Network effectively learns and reveals the correlation between temporal and spatial dimensions by combining graph convolution and surprise convolution techniques.

[0197] GraphWaveNet: This innovative framework combines an adaptive adjacency matrix with one-dimensional dilated convolutions, effectively improving the flexibility and efficiency of data processing.

[0198] STSGCN: Spatiotemporal Synchronous Graph Convolutional Networks enable independent modeling of local correlations by leveraging local spatiotemporal subgraph modules.

[0199] AGCRN: Adaptive Graph Convolutional Recurrent Network effectively decomposes the adjacency matrix and parameters in the graph convolution layer, enhancing the flexibility of the network structure and the adaptability of the parameters.

[0200] STGNN: Spatiotemporal fusion graph neural network builds learning graphs based on the similarities between time series to better understand the complex spatiotemporal relationships in time series data.

[0201] ST-AE: The goal is to effectively integrate the fixed spatial distribution, topological correlation and temporal periodicity in real traffic flows.

[0202] Table 2 Traffic flow prediction on PEMS dataset

[0203]

[0204]

[0205] The present invention adopts the traditional method in current traffic flow prediction research, that is, using the traffic flow data of the past hour to predict the traffic flow of the next hour. The research results show that in four data sets, the method of the present invention exceeds the baseline method in most indicators, as shown in the table.

[0206] In particular, the proposed method shows excellent performance in the PEMS08 dataset, which proves the effectiveness of the new framework of the present invention in traditional settings. Baseline methods such as XGBoost show larger errors at longer time steps, while geographic information-based models such as DCRNN and STGCN perform poorly. Adaptive graph learning techniques (such as GraphWaveNet and AGCRN) perform well, but lack in-depth analysis and have a gap in accuracy compared to the proposed method. In addition, the present invention also conducted experiments on traffic speed and flow datasets, using the same evaluation settings as previous studies, and reporting prediction results for different time intervals. The DDSTAEN method of the present invention outperforms other algorithms in all cases, especially in terms of MAE, RMSE and MAPE indicators. The results show that the model of the present invention is due to the baseline model.

[0207] In the prediction model of the present invention, the present invention uses 12 time steps as a benchmark to predict traffic flow within a time length of 60 minutes. For the four data sets studied by the present invention, the present invention uses 60% of each data set as a training data set, 20% as a validation data set, and 20% as a test data set. In the method of the present invention, the present invention carefully sets the dimension of the hidden state to N×2, which is one-sixth of the original sampled data, where N represents the number of sensors. In order to optimize performance, the present invention uses 8 layers of dilated convolutions and transposed dilated convolutions, and the dilation factor of each layer alternates between 1 and 2. In addition, the number of channels of 1×1 convolution is set to 32. The number of hops of the graph convolution is set to 2, and the dimension of the node embedding adjacency matrix is ​​10. The number of heads of the multi-head attention mechanism is 8. The value of Top-K sampling is set to 2, and the batch size is 16. The model is trained using a single NvidiaGeForce RTX4090GPU and the Adam optimizer. The initial learning rate of the autoencoder is set to 0.0001, while the initial learning rate of the projection function is set to 0.001, and both learning rates are adjusted and weakened according to the performance of the validation set. The results show that the model of the present invention is superior to the baseline model.

[0208] Example 2

[0209] A detailed ablation study was conducted on the PEMS08 dataset, such as Figure 4 As shown in the figure, the effectiveness of various methods is confirmed. In this prediction task, the present invention uses the data of the past 12 time steps to predict the next 12 time steps. The main purpose of this ablation study is to evaluate the effectiveness of specific components. The present invention assigns names and classifications to models that do not contain these components. The experimental results are shown in Figure 4 shown.

[0210] w / o projection: In this case, the present invention removes the projection function ψ(·) from the overall framework. Therefore, the hidden state output by the encoder is directly transmitted to the decoder without any projection processing.

[0211] Projects w / o GGM: After removing the dynamic graph generation module, the model can only rely on the adaptive adjacency matrix to build its network structure.

[0212] w / o skip: The model has no skip connection mechanism. The hidden state of the model is determined by the final layer output of the encoder, and the flow prediction is based on the final layer output of the decoder.

[0213] w / o res: The model does not contain a residual connection mechanism and only backpropagates information through convolutional layers.

[0214] w / o TAM: This model does not integrate the temporal attention mechanism, thus removing the learning module that captures global temporal relationships from the encoder and decoder.

[0215] Example 3

[0216] The parameter sensitivity experiments were conducted. The hyperparameters included the selection of Top-K edges in the double transform sampling graph, the batch size Batch_size, and the number of intermediate filters F. In order to evaluate the sensitivity of these hyperparameters, the flow prediction experiments were conducted on the PEMS08 dataset. The mean absolute error (MAE) and the root mean square error (RMSE) were used as evaluation indicators. The specific experimental results are shown in Figure 2. Figure 5 shown.

[0217] Sampling Top-K: The present invention selects the first k edges of the traffic flow graph sampled by double transformation, and the value of K determines the number of supernodes in the supergraph. Figure 5 As shown in (a), as the value of K increases, the dual hypergraph becomes more complex. This not only enhances the expressiveness of the hypergraph, but also improves the performance of the model. However, setting a K value too high may cause performance degradation due to excessive noise. This noise can mislead the model and increase the computational burden. Therefore, the present invention believes that setting K = 2 is the best choice for the model of the present invention.

[0218] Batch size: Batch size determines how many training samples to process before updating the network parameters. It plays a vital role in balancing memory efficiency and training speed. Smaller batches can reduce memory requirements and improve the generalization ability of the model, but may also lead to training instability. Figure 5 (b) shows the performance differences caused by different batch sizes. s =16.

[0219] The number of intermediate filters F: The number of intermediate filters F represents the dimension of the feature channels of nodes or supernodes in graphs and hypergraphs. Figure 5 As shown in (c), increasing the number of F may initially reduce performance. However, too many filters will make the model too complex, which may lead to overfitting and ultimately reduce performance. Therefore, the present invention sets the value of F=32 in the model.

[0220] Example 4

[0221] In order to show the experimental results more intuitively, the paper visualizes the average daily traffic flow prediction results of the method on the PEMS08 dataset. The horizontal axis represents the time step, each step represents 5 minutes, and the vertical axis represents the traffic flow speed. Figure 6As shown in the figure: 1) In the 15-minute, 30-minute and 60-minute prediction intervals, the prediction results of the present invention are highly consistent with the actual observation data, which confirms the robustness of the model in accurately predicting short-term traffic conditions. 2) Although the prediction accuracy for longer time periods is reduced, the model can still capture and predict the main trends of traffic flow. This shows that although the accuracy of the prediction may weaken over time, the model is still capable of reliably predicting the overall traffic pattern over a longer period of time.

[0222] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways.

[0223] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A traffic flow prediction method based on dual dynamic spatiotemporal autoencoder network, It is characterized in that The following steps are involved: S1: An autoencoder is designed to learn intrinsic patterns from traffic flow data and encode the current traffic flow information into a low-dimensional representation; S2: Model the dynamic characteristics of traffic flow graph nodes and establish the dual dynamic spatiotemporal encoding network DDSTAEN framework; S3: Convert the traffic flow graph into a dual hypergraph to capture the dynamic spatiotemporal characteristics of edges; S4: Project the current hidden state to the future hidden state to achieve traffic flow prediction; S5: Train the dual dynamic spatiotemporal autoencoder to obtain the prediction loss function; set the original traffic flow data X as input and predict the traffic flow As output, it is represented as: Then the prediction loss function is: Among them, Y :,j represents the true value, represents the predicted value of the sensor at time step j.

2. A traffic flow prediction method based on a dual dynamic spatiotemporal autoencoder network according to claim 1, It is characterized in that The dual dynamic spatiotemporal encoding network DDSTAEN framework is: h=Γ enc (X); Among them, Γ enc (·) and Γ dec (·) denotes the encoder and decoder of the spatiotemporal autoencoder, h denotes the hidden state of the inherent pattern; X denotes the historical traffic flow data.

3. A traffic flow prediction method based on a dual dynamic spatiotemporal autoencoder network according to claim 1 or 2, It is characterized in that The dual dynamic spatiotemporal encoding network DDSTAEN framework includes: a spatiotemporal feature module, a graph generation module and an autoencoder module.

4. A traffic flow prediction method based on a dual dynamic spatiotemporal autoencoder network according to claim 1, It is characterized in that In S3, the traffic flow graph is converted into a dual hypergraph; given a graph G = (V, E, A) with N nodes and E edges, use G D =(V D ,E D ,H) represents the dual hypergraph; In the dual hypergraph, the number of nodes is equal to the number of edges in the original graph |V D |=E, and the number of edges is equal to the number of edges in the original graph |E D |=N;correlation adjacency matrix H∈R E×N G D Providing additional structural information, the correlation adjacency matrix is ​​expressed as: Among them, v i ∈V D , e j ∈E D ; The correlation matrix H = H s +H t Used to describe the structural information of the original graph and the dual hypergraph at the same time; i Represents a node; e j represents an edge; Since road networks are usually directional, the traffic flow graph is regarded as a directed graph; the association matrix H is decomposed into H = H s +H t ; Among them, H s ,H t ∈R E×N Represents the matrix without zero elements, i.e., the source and target nodes of the directed edges in the original graph.

5. A traffic flow prediction method based on a dual dynamic spatiotemporal autoencoder network according to claim 3, It is characterized in that The graph generation module includes two independent branches, each branch is responsible for generating the dynamic edge or adjacency matrix of the graph and the dynamic edge or adjacency matrix of the hypergraph respectively; The dynamic edges or adjacency matrix of the graph are generated according to the features of the corresponding nodes in the hypergraph, including the following steps: Step 311: Extract the correlation between two endpoint nodes from the traffic flow graph as the initial edge feature X D : X D =[(W′ 1 X)[d s ,:];(W′ 2 )[d t ,:]]∈R E×2F′ ; Among them, W′ 1 ,W′ 2 ∈R T×F×F′ represents learnable parameters, [·;·] represents concatenation operations, (·)[d s ,:] represents the selected tensor slice, including the source node d in the flow graph s and destination node d t That is, it represents the directed edge in the graph; the initial edge feature X D Contains node information related to directed edges in the traffic flow graph; Step 312: Fusion of node-related information through convolution: Among them, Conv1D(·) means using 1×1 convolution kernel to perform convolution operation to achieve feature fusion and obtain updated edge features; Step 313: To study the characteristics of the supernodes in the hypergraph, update the edges The features of the hypergraph are integrated and processed through the diffusion hypergraph convolutional network HGCN; Step 314: Capture and represent the dynamic characteristics of edge features in the hypergraph: W a =diag(E adp )∈R N×N ; Where θ=[θ 0 ,…,θ N-1 ]∈R N×F″×1 represents the set of parameters to be learned, E adp ∈R N Represents the weight vector of the hyperedge in the adaptive learning process; output It will be used as the input of the flow graph in the subsequent dynamic graph convolution network; The dynamic edge or adjacency matrix of the hypergraph includes the following steps based on the dual relationship between the traffic flow graph and its hypergraph: Step 321: Use graph convolution to update node features on the traffic flow graph; Step 322: Generate dynamic hyperedges for the hypergraph; first, average pooling is performed on the node features X of the traffic flow graph along the time dimension to ensure the efficiency of information transmission and update. The formula is: X d =AvgPool(X)∈R N×F ; Among them A f =A / rowsum(A), A b =A T / rowsum(A T ), Respectively represent A f and A b The n-order power matrix of θ f =[θ 0,f ,…,θ N-1,f ]∈R N×F×1 and θ b =[θ 0,b ,…,θ N-1,b ]∈R N×F×1 Represents learnable parameters; output GCN d (X d )∈R N It will serve as the dynamic hyperedge of the subsequent dynamic hypergraph convolutional network DHGCN in the hypergraph.

6. A traffic flow prediction method based on a dual dynamic spatiotemporal autoencoder network according to claim 3, It is characterized in that The spatiotemporal feature module includes: gated temporal convolution, dynamic graph / hypergraph convolution and temporal attention mechanism; the temporal gated convolution uses dilated convolution on the temporal dimension; the dynamic graph / hypergraph convolution provides a comprehensive view of traffic flow dynamics by analyzing the interaction between spatial and temporal dimensions; the temporal attention mechanism is used to represent global temporal relationships in traffic data.

7. A traffic flow prediction method based on a dual dynamic spatiotemporal autoencoder network according to claim 6, It is characterized in that The gated time convolution includes: an encoder and a decoder; In the encoder, information is embedded in each time step through 1×1 convolution; in order to process the entire traffic flow sequence, multiple layers of 1D dilated convolution are used; the time series X∈R N×F×T The expansion and convolution are performed by a filter f, the kernel size of the filter is 1×k, and the expansion factor is d; the encoder is represented as: Where C(s) represents the time step s of the compressed sequence C; the encoder effectively converts the original traffic flow data sequence with an initial length of T into a hidden state of 1-step compression through multiple one-dimensional dilated convolutions, and then outputs it, and then outputs the hidden state h of the eigenmode through 1×1 convolution; The decoder takes the output hidden state of the encoder as input; the decoder expands the information of a single time step to a length matching the original input by applying consecutive transposed unfolded convolutional layers; When the expansion factor and the number of decoder layers are consistent with the encoder, the decoder can fully reconstruct the data of all time steps; for the hidden state C, a transposed expansion convolution is performed using a filter f with a kernel size of 1×k and an expansion factor of d; the decoder is represented as: On the basis of implementing the convolution and transposed convolution operations, the activation functions used are the tangent hyperbolic function and the sigmoid function; the element-by-element product operation is performed on the activated output; The gating mechanism is set up exactly the same in both encoder and decoder and can be defined as: Among them, θ enc and θ dec denote the parameters of unfolded convolution and transposed unfolded convolution respectively; tanh(·) and σ(·) denote the tangent hyperbolic function and the sine and cosine functions respectively, and the symbol ⊙ denotes element-wise multiplication; and Represents the hidden state output of the previous layer in the network; and Represents the output obtained by the current layer, which is affected by time dependency.

8. A traffic flow prediction method based on a dual dynamic spatiotemporal autoencoder network according to claim 6, It is characterized in that The dynamic graph convolutional network is expressed as: in, represents an adaptive correlation adjacency matrix, E 1 ,E 2 ∈R N×t represents learnable parameters; and θ′ M =[θ 0 ' ,M ,…,θ′ N-1,M ]∈R N×F×1 All represent learnable parameters; the Reshape(v) operation represents the process of reshaping the vector v into a sparse matrix P. The elements P[d s ,d t ] is equal to the corresponding element of vector v; A dynamic hypergraph convolutional network is introduced to capture the spatial and temporal features of the hypergraph, expressed as: P w =diag(GCN d (X d ))∈R N×N ; Where θ′=[θ′ 0 ,…,θ′ N-1 ]∈R N×F″×1 Represents a learnable parameter; through GCN d (X d )Extract the dynamic characteristics of traffic flow graph nodes.

9. The traffic flow prediction method based on dual dynamic spatiotemporal autoencoder network according to claim 6, It is characterized in that The temporal attention mechanism is expressed as: M=C e σ(((X) T W 1 )W 2 9(X)W 3 ) T +b e ); Tatt(X) = M′X; in, W 1 ∈R N×1 , Both represent learnable weight parameters.

10. The traffic flow prediction method based on dual dynamic spatiotemporal autoencoder network according to claim 1, It is characterized in that In S4, the hidden state of the intrinsic pattern extracted from the current traffic flow X is represented as h∈R N′×T′ ; where N′ and T′ represent the spatial dimension and time dimension of the hidden state respectively; the hidden state includes: the hidden features of the time dimension T′ and the hidden features of the spatial dimension N′; the information flow between the current and future hidden states is controlled by the gating mechanism, that is, by the time attention function and spatial attention function To map the hidden state from now to the future; the projection function of the hidden state is: Among them, W 1 ,W 2 ,B 1 ,B 2 represents weight and bias parameters; and represents a multi-head attention operation; σ(·) sigmoid represents an activation function; φ represents a gating unit.