Traffic flow prediction system based on deep learning and dynamic network analysis and application method thereof
The traffic flow prediction system through deep learning and dynamic network analysis, combined with multi-source data and dynamic graph models, solves the problem that traditional systems are difficult to cope with changes in traffic flow, achieves accurate prediction and real-time traffic control, and improves the efficiency and effectiveness of traffic management. Responsiveness.
Patent Information
- Application Number
- CN202410728568.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2024-09-20
AI Technical Summary
Traditional traffic management systems are difficult to effectively cope with the dynamic changes and complexity of traffic flow, especially during peak periods, special events or extreme weather conditions, resulting in unpredictable traffic conditions and affecting travel efficiency and economic activities.
Design a traffic flow prediction system based on deep learning and dynamic network analysis. It obtains multi-source traffic data through sensors, uses graph attention mechanism and graph convolution operation to generate node embeddings, and combines long short-term memory network and convolutional neural network to perform sequence to sequence prediction, and dynamically adjust the traffic signal control strategy through a multi-objective optimization algorithm.
It achieves accurate prediction and real-time monitoring of traffic flow, quickly identifies traffic changes and abnormal situations, dynamically adjusts prediction models and traffic control strategies, improves response speed and adaptability, avoids peak period congestion, and optimizes signal light timing and road traffic capacity. .
Smart Images

Figure CN118675324A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent transportation technology, and in particular to a traffic flow prediction system based on deep learning and dynamic network analysis and an application method thereof. Background Art
[0002] With the acceleration of urbanization and the rapid growth of motor vehicle ownership, traffic congestion has become a major problem faced by most large cities in the world. Traditional traffic management systems rely on static models and empirical rules, which often cannot effectively cope with the dynamic changes and complexity of traffic flow. Especially in peak hours, special events or extreme weather conditions, the unpredictability of traffic conditions is greatly increased, which not only affects people's daily travel efficiency, but also has a negative effect on urban economic activities. Therefore, accurate prediction of traffic flow has become the key to alleviating traffic pressure and improving road use efficiency.
[0003] In recent years, the rapid development of deep learning technology has provided new perspectives and tools for data analysis in the field of transportation. Deep learning models, especially recurrent neural networks (such as LSTM), convolutional neural networks (CNN), and graph neural networks (GNN), have shown excellent performance in processing time series data, spatial information, and complex network structures due to their powerful pattern recognition capabilities and effective processing of high-dimensional data. These technologies make it possible to extract spatiotemporal features from massive traffic data and then predict future traffic flow. However, the effective combination of deep learning and dynamic network analysis for traffic flow prediction still faces challenges. On the one hand, how to efficiently integrate multi-source heterogeneous data and deal with data imbalance, noise interference, and missing value problems is a prerequisite for achieving high-precision prediction; on the other hand, the real-time and adaptability of the model, that is, how the model can quickly learn new data and adjust the prediction strategy in real time to adapt to the changing traffic conditions, is another technical difficulty. In addition, converting the prediction results into effective traffic control strategies, such as signal light optimization and path guidance, also requires intelligent decision support. Summary of the invention
[0004] The purpose of the present invention is to solve the above problems and to design a traffic flow prediction system based on deep learning and dynamic network analysis and its application method.
[0005] The first aspect of the present invention provides a traffic flow prediction system based on deep learning and dynamic network analysis, the traffic flow prediction system based on deep learning and dynamic network analysis includes a sensor, a data acquisition module, a feature extraction and preprocessing module, a dynamic graph model, a hybrid deep learning prediction module, and an intelligent control strategy decision module, wherein:
[0006] Sensors, used to obtain information about urban traffic, wherein the sensors are deployed at key nodes of the urban traffic network;
[0007] A data acquisition module, used to collect multi-source traffic data of urban traffic in real time through the sensors using the Internet of Things technology;
[0008] A feature extraction and preprocessing module is used to preprocess the information collected by the data acquisition module, extract features from the time and space dimensions, and construct a spatiotemporal feature matrix;
[0009] A dynamic graph model for generating node embeddings by using a graph attention mechanism and a graph convolution operation combined with the spatiotemporal feature matrix output by the feature extraction and preprocessing module;
[0010] A hybrid deep learning prediction module, which is used to construct a prediction architecture using a long short-term memory network and a convolutional neural network, perform sequence-to-sequence prediction on the node embedding output by the dynamic graph model, capture the long-term dependency and spatial local features of the sequence, and output the prediction result;
[0011] The intelligent control strategy decision module is used to apply a multi-objective optimization algorithm according to the prediction results output by the hybrid deep learning prediction module to obtain the best control strategy, so as to dynamically adjust the traffic signal control strategy, publish real-time traffic information, and recommend driving routes.
[0012] Optionally, in a first implementation method of the first aspect of the present invention, the urban traffic network topology is constructed by the sensors, and the optimal layout of the sensors is determined by a spatial optimization algorithm, wherein the constraints of the spatial optimization algorithm are minimizing the coverage cost and maximizing the information gain, and the sensors include at least infrared vehicle detectors, ring sensors, video surveillance, GPS tracking equipment, geomagnetic sensors, and mobile communication base stations.
[0013] Optionally, in a second implementation of the first aspect of the present invention, the data acquisition module uses a particle filter to smooth the noise data in the multi-source traffic data, wherein the multi-source traffic data includes at least traffic flow, vehicle speed, road occupancy, and weather information.
[0014] Optionally, in a third implementation of the first aspect of the present invention, the data acquisition module adopts spatiotemporal data mining technology to analyze the spatiotemporal correlation between different sensor data, establish a spatiotemporal correlation model, measure the spatial autocorrelation by calculating the Geary's C ratio, and capture the correlation of time series through time series analysis methods.
[0015] Optionally, in a fourth implementation of the first aspect of the present invention, the feature extraction and preprocessing module separates the periodic patterns in the traffic flow collected by the data acquisition module through Fourier transform.
[0016] Optionally, in a fifth implementation of the first aspect of the present invention, the dynamic graph model defines a time-dependent attention-weighted adjacency matrix:
[0017]
[0018]
[0019] Among them, H (I-1) (t) represents the node feature matrix of the previous layer, σ represents the activation function, θ represents the learnable weight matrix, II represents the feature cascade operation, and Softmax is used to normalize the attention weight;
[0020] The graph convolution operation integrating spatiotemporal features uses the time-dependent attention weighted adjacency matrix to perform graph convolution operations to fuse local neighborhood information. The output of the graph convolution layer H (I) (t) can be calculated by the following formula:
[0021]
[0022] in, represents the degree matrix, W I represents the weight matrix of this layer, σ represents the nonlinear activation function;
[0023] Apply recurrent neural network to encode the historical traffic data of each node to obtain the time feature representation T(t) of each node at time t;
[0024] The spatial feature H (I) (t) is fused with the temporal feature T(t) to generate the final node embedding representation:
[0025] Z(t)=F([H (I-1) (t)ⅡT(t)])
[0026] Among them, F represents the fusion function multi-layer perceptron.
[0027] Optionally, in a sixth implementation of the first aspect of the present invention, the LSTM network in the hybrid deep learning prediction module combines a gating mechanism and an attention mechanism, assuming that t is the input at time step t, h t-1 and C t-1 are the hidden state and cell state of the previous time step respectively. The update of LSTM can be expressed as:
[0028] Forget Gatet Decide what information to forget from the cell state:
[0029] f t =σ(W f ·[h t-1 ,X t ]+b t )
[0030] Input Gate i t Determine the new information stored in the cell state:
[0031] i t =σ(W i ·[h t-1 ,X t ]+b i )
[0032] Cell state candidate values Compute the new memory contents:
[0033]
[0034] Cell state update C t Combining forgotten and entered information:
[0035]
[0036] Output Gate O t Determine the contents of the cell state that need to be output to the hidden state:
[0037] O t =σ(W o ·[h t-1 ,X t ]+b o )
[0038] Hide status updateh t Combine the cell state and output gate:
[0039] h t =O t ⊙tanh(C t )
[0040] Among them, σ represents the sigmoid activation function, tanh represents the hyperbolic tangent function, W and b represent the corresponding weight matrix and bias term, and ⊙ represents element multiplication;
[0041] Add the attention mechanism and assume that the hidden state sequence obtained by LSTM is H = [h1,h2,…,h n ], attention weight a t It is calculated through the attention mechanism, including a weight distribution layer and a softmax function:
[0042]
[0043] Among them, V, W h , W s represents the parameters to be learned, S t-1 Represents the context vector of the previous moment;
[0044] The context vector S is obtained by weighted summing of the hidden states according to the attention weights t :
[0045]
[0046] A hybrid deep learning model was constructed that processes time series data through LSTM and enhances the model's ability to capture important information through the attention mechanism.
[0047] Optionally, in a seventh implementation of the first aspect of the present invention, the intelligent control strategy decision module introduces a reinforcement learning algorithm to dynamically adjust the signal timing strategy, and the formula is:
[0048]
[0049] Where Y represents the discount factor, r t+k+Δt represents the immediate reward at the t+k+Δt moment, s t +Δt represents the current state.
[0050] A second aspect of the present invention provides an application method of a traffic flow prediction system based on deep learning and dynamic network analysis, and the application method of a traffic flow prediction system based on deep learning and dynamic network analysis comprises the following steps:
[0051] By deploying various sensors at key nodes of the urban traffic network, multi-source traffic data of urban traffic is collected in real time and integrated to obtain the original data set;
[0052] The original data set is preprocessed by data cleaning, missing value filling, and outlier detection to obtain the preprocessed original data set. Feature information in the preprocessed original data set is extracted from the time and space dimensions to construct a spatiotemporal feature matrix:
[0053] F ST = Preprocess(D), where F ST The element f ij represents the eigenvalue of the jth position at the i-th time;
[0054] Constructing a dynamic graph model of an urban transportation network:
[0055] G(t)=(V,E,A(t))
[0056] Where V represents the set of road network nodes, E represents the connection relationship between nodes, and A(t) represents the adjacency matrix that changes with time t;
[0057] Using graph attention mechanism and graph convolution operation, combined with the spatiotemporal feature matrix, node embedding is generated:
[0058] H(t)=GCN att (G(t),F st )
[0059] Among them, GCN att Represents a graph convolutional network combined with an attention mechanism;
[0060] The prediction architecture is constructed using long short-term memory networks and convolutional neural networks to perform sequence-to-sequence predictions on node embeddings, capture the long-term dependencies and spatial local features of the sequences, and output the prediction results:
[0061]
[0062] in, Represents the traffic flow prediction value in the future Δt time period, LSTM cnn Represents an LSTM network combined with a convolutional layer;
[0063] Based on the prediction results, a multi-objective optimization algorithm is used to obtain the best control strategy to dynamically adjust the traffic signal control strategy, publish real-time traffic information, and recommend driving routes:
[0064]
[0065] Among them, π*(t+Δt) represents the optimal control strategy, and U represents the utility function.
[0066] In the technical solution provided by the present invention, the system uses deep learning technology and dynamic network analysis capabilities, adopts the Internet of Things technology to collect multi-source traffic data, combines the spatiotemporal feature extraction algorithm to construct a spatiotemporal feature matrix that reflects the law of traffic flow changes, performs spatiotemporal dynamic graph network modeling, integrates the long short-term memory network and the convolutional neural network to construct a prediction architecture, performs sequence-to-sequence prediction on node embedding, and uses a multi-objective optimization algorithm based on the prediction results to make intelligent dynamic adjustments; the present invention combines dynamic network analysis, the system can monitor the status of the traffic network in real time, quickly identify traffic flow changes and abnormal conditions, dynamically adjust the prediction model and traffic control strategy, adapt to sudden traffic events and short-term traffic pattern changes, and improve the system's response speed and adaptability; by accurately predicting future traffic flow, the system can assist decision makers in scheduling public transportation resources in advance, reasonably arrange road maintenance and construction plans, avoid peak traffic congestion, optimize signal light timing, and improve road capacity. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the following detailed description of the preferred embodiment.The drawings are only for the purpose of illustrating the preferred embodiments and are not to be construed as limiting the invention.
[0068] Figure 1 A schematic diagram of the structure of a traffic flow prediction system based on deep learning and dynamic network analysis provided by an embodiment of the present invention;
[0069] Figure 2 A schematic diagram of a first embodiment of an application method of a traffic flow prediction system based on deep learning and dynamic network analysis provided by an embodiment of the present invention;
[0070] Figure 3 A schematic diagram of a second embodiment of an application method of a traffic flow prediction system based on deep learning and dynamic network analysis provided by an embodiment of the present invention;
[0071] Figure 4 A schematic diagram of a third embodiment of an application method of a traffic flow prediction system based on deep learning and dynamic network analysis provided by an embodiment of the present invention;
[0072] Figure 5 A schematic diagram of a fourth embodiment of an application method of a traffic flow prediction system based on deep learning and dynamic network analysis provided by an embodiment of the present invention;
[0073] Figure 6 A schematic diagram of a fifth embodiment of an application method of a traffic flow prediction system based on deep learning and dynamic network analysis provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0074] The terms "first", "second", "third", "fourth", etc. (if any) 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 described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, 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.
[0075] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 The structural diagram of the traffic flow prediction system based on deep learning and dynamic network analysis provided by the embodiment of the present invention includes a sensor, a data acquisition module, a feature extraction and preprocessing module, a dynamic graph model, a hybrid deep learning prediction module, and an intelligent control strategy decision module, wherein:
[0076] Sensors are used to obtain information about urban traffic, where sensors are deployed at key nodes of the urban traffic network;
[0077] A data acquisition module, which is used to collect multi-source traffic data of urban traffic in real time through sensors using the Internet of Things technology;
[0078] The feature extraction and preprocessing module is used to preprocess the information collected by the data acquisition module, extract features from the time and space dimensions, and construct a spatiotemporal feature matrix;
[0079] Dynamic graph model, which uses graph attention mechanism and graph convolution operation to generate node embeddings by combining the spatiotemporal feature matrix output by feature extraction and preprocessing modules;
[0080] The hybrid deep learning prediction module is used to build a prediction architecture using long short-term memory networks and convolutional neural networks, perform sequence-to-sequence prediction on the node embeddings output by the dynamic graph model, capture the long-term dependencies and spatial local features of the sequence, and output the prediction results;
[0081] The intelligent control strategy decision module is used to apply the multi-objective optimization algorithm according to the prediction results output by the hybrid deep learning prediction module to obtain the optimal control strategy, so as to dynamically adjust the traffic signal control strategy, publish real-time traffic information, and recommend driving routes.
[0082] See also Figure 2, a schematic diagram of a first embodiment of an application method of a traffic flow prediction system based on deep learning and dynamic network analysis provided by an embodiment of the present invention, the method comprising the following steps:
[0083] Step 1: Data acquisition: Various sensors deployed at key nodes of the urban traffic network are used to collect multi-source traffic data of urban traffic in real time and integrate them to obtain the original data set;
[0084] In this embodiment, the sensor layout design uses a spatial optimization algorithm to determine the optimal layout of the sensors based on the topological structure of the urban traffic network to ensure the comprehensiveness and representativeness of data collection; the real-time data transmission protocol designs a low-latency, highly reliable communication protocol to ensure the real-time and secure transmission of sensor data to the central processing center, and uses the MQTT (Message Queuing Telemetry Transport) protocol to meet the energy consumption and bandwidth requirements under large-scale deployment; heterogeneous data fusion develops a heterogeneous data fusion algorithm to integrate data of different sensor types and different formats to achieve data consistency and complementarity, and uses a particle filter to smooth the noise data; and uses spatiotemporal data mining technology to analyze the spatiotemporal correlation between different sensor data and establish a spatiotemporal correlation model.
[0085] In this embodiment, sensors include but are not limited to infrared vehicle detectors, ring sensors, video surveillance, and GPS tracking devices;
[0086] Step 2: Feature extraction and preprocessing: Preprocess the original data set by data cleaning, missing value filling, and outlier detection to obtain the preprocessed original data set. Extract feature information from the preprocessed original data set from the time and space dimensions to construct a spatiotemporal feature matrix:
[0087] F ST = Preprocess(D), where F ST The element f ij represents the eigenvalue of the jth position at the i-th time;
[0088] In this embodiment, a periodic component extraction algorithm is integrated to separate the periodic patterns in the traffic flow data through Fourier transform, so as to enhance the model's ability to capture periodic laws.
[0089] Step 3: Construction of spatiotemporal dynamic graph network: Construction of a dynamic graph model of the urban transportation network:
[0090] G(t)=(V,E,A(t))
[0091] Where V represents the set of road network nodes, E represents the connection relationship between nodes, and A(t) represents the adjacency matrix that changes with time t, reflecting the dynamic topological structure of the transportation network;
[0092] Using graph attention mechanism and graph convolution operation, combined with spatiotemporal feature matrix, node embedding is generated:
[0093] H(t)=GCN att (G(t),F st )
[0094] Among them, GCN att Represents a graph convolutional network combined with an attention mechanism;
[0095] In this embodiment, the dynamic adjacency matrix update integrated into the graph attention mechanism takes into account the changes in the connection strength between nodes in the traffic network over time and traffic conditions, and defines a time-dependent attention-weighted adjacency matrix:
[0096]
[0097] Among them, H (I-1) (t) represents the node feature matrix of the previous layer, σ is the activation function, θ is the learnable weight matrix, II represents the feature cascade operation, and Softmax is used to normalize the attention weights to ensure that the relationship between each pair of nodes can be reasonably compared and weighted;
[0098] The graph convolution operation integrating spatiotemporal features uses the updated adjacency matrix A*(t) to perform graph convolution operations to fuse local neighborhood information while considering time series features. The output H of the graph convolution layer (I) (t) can be calculated by the following formula:
[0099]
[0100] in, is the degree matrix, W I is the weight matrix of this layer, and σ is a nonlinear activation function to ensure the expressiveness of the model.
[0101] In order to capture the changing patterns of traffic flow over time, a recurrent neural network is used to encode the historical traffic data of each node to obtain the temporal feature representation T(t) of each node at time t. These features are combined with the spatial features obtained by graph convolution to further enrich the representation of the node.
[0102] Fusion of spatiotemporal features generates node embedding. Finally, the spatial feature H (I) (t) is fused with the temporal feature T(t) to generate the final node embedding representation:
[0103] Z(t)=F([H(I-1) (t)ⅡT(t)])
[0104] Where F can be a fusion function multi-layer perceptron (MLP) to learn the nonlinear relationship between spatiotemporal features.
[0105] Step 4: Hybrid deep learning prediction: Use long short-term memory network (LSTM) and convolutional neural network (CNN) to build a prediction architecture, perform sequence-to-sequence prediction on node embedding H(t), capture the long-term dependency and spatial local features of the sequence, and output the prediction results:
[0106]
[0107] in, Represents the traffic flow prediction value in the future Δt time period, LSTM cnn Represents an LSTM network combined with a convolutional layer;
[0108] In this embodiment, the LSTM network captures the long-term dependency and spatial local features of the sequence, and the LSTM network in the hybrid deep learning prediction combines the gating mechanism and the attention mechanism.
[0109] Step 5: Intelligent control strategy: Based on the prediction results, a multi-objective optimization algorithm is used to obtain the best control strategy to dynamically adjust the traffic signal control strategy, publish real-time traffic information, and recommend driving routes:
[0110]
[0111] Among them, π*(t+Δt) represents the optimal control strategy, and U represents the utility function.
[0112] In this embodiment, factors such as traffic efficiency, fairness, and environmental protection are taken into consideration to dynamically adjust the traffic signal control strategy, publish real-time traffic information, recommend driving routes, and measure the effectiveness of the control strategy. The intelligent control strategy decision module introduces a reinforcement learning algorithm to dynamically adjust the signal timing strategy.
[0113] See also Figure 3 , a schematic diagram of a second embodiment of an application method of a traffic flow prediction system based on deep learning and dynamic network analysis provided by an embodiment of the present invention, wherein data acquisition in the method includes:
[0114] Sensor layout design: Based on the topological structure of the urban traffic network, a spatial optimization algorithm is used to determine the best layout of sensors to ensure the comprehensiveness and representativeness of data collection. The layout optimization model can be expressed as an optimization problem of minimizing coverage cost and maximizing information gain, i.e., Minimize (Cost) + Maximize (InfoGain), where Cost represents the deployment cost and InfoGain represents the improvement of the amount of unknown information brought by the addition of new sensors.
[0115] Real-time data transmission protocol: Design a low-latency, highly reliable communication protocol to ensure real-time and secure transmission of sensor data to the central processing center. Use the MQTT (Message Queuing Telemetry Transport) protocol to meet the energy consumption and bandwidth requirements of large-scale deployment.
[0116] Heterogeneous data fusion: Develop heterogeneous data fusion algorithms to integrate data from different sensor types and formats to achieve data consistency and complementarity. Use particle filters to smooth noise data. The formula is:
[0117]
[0118]
[0119] in is the state estimation, F is the state transfer matrix, B is the control input matrix, U k is the control vector, K k is the Kalman gain, Z k is the measurement value, H is the observation matrix;
[0120] Spatiotemporal data mining technology: Analyze the spatiotemporal correlation between different sensor data, establish a spatiotemporal correlation model M = f (L, T, V), where f is a mapping function, measure spatial autocorrelation by calculating the Geary's C ratio, and capture the correlation of time series through time series analysis methods (autoregressive model AR (p)).
[0121] See also Figure 4 , a schematic diagram of a third embodiment of an application method of a traffic flow prediction system based on deep learning and dynamic network analysis provided by an embodiment of the present invention, wherein feature extraction and preprocessing in the method include:
[0122] Data preparation and preprocessing: Let the original traffic flow data sequence be X t , t=1,2,…,N, where N is the total number of data points;
[0123] Resampling: If the original data is unevenly sampled, it is first necessary to adjust it to a uniform time interval through resampling, recorded as Δt; Detrending: The first-order difference method is often used to remove long-term trends, and y is defined t =X t -X t-1 , and get the detrended sequence.
[0124] Fourier Transform: Apply the Discrete Fourier Transform (DFT) to the detrended series y t On the frequency domain, we get the representation y k , where k = 0, 1, ..., N-1, and DFT is defined as follows:
[0125]
[0126] Spectral analysis and identification of periodic components: Calculation of amplitude spectrum and power spectrum: Amplitude|y k | reflects the intensity of each frequency component, and the power spectrum P k =|y k | 2 Describes the energy distribution; Periodic component identification: Identify significant periodic components based on the amplitude spectrum, which can be achieved by setting the threshold θ:
[0127] Significant frequency = {k:|y k |>θ·max(|y k |),k>0}
[0128] Reconstruction of periodic signals: retain the significant periodic frequency components k, set the rest to zero or reduce the weight, and then perform an inverse Fourier transform (IDFT) to obtain the periodic component signal y' t :
[0129]
[0130] Among them, y<1 is the weight given to the non-significant frequency component;
[0131] Feature fusion and standardization: The reconstructed periodic signal y' t Fused with other features to form feature vector F t =[y' t ,f2(t),…,f m (t)] T ; Standardize the feature vector and z-score so that the mean of each feature is 0 and the standard deviation is 1:
[0132]
[0133] Among them, μ and σ are the mean and standard deviation of the eigenvector respectively.
[0134] See also Figure 5 , a schematic diagram of a fourth embodiment of an application method of a traffic flow prediction system based on deep learning and dynamic network analysis provided by an embodiment of the present invention, wherein the hybrid deep learning prediction in the method includes:
[0135] Input data preprocessing: Let the original data be X = {X1, X2, ..., X T}, where each X T It is a multidimensional feature vector at time t, including traffic flow and other environmental factors; Spatiotemporal feature fusion: For data with spatial dimensions, the local spatial features of each time step can be extracted through CNN, and then spliced with the time series features to form spatiotemporal fusion features.
[0136] Convolutional Neural Network (CNN) Module: Local Feature Extraction: Use one-dimensional convolutional layer (CNN-1D) to capture local spatial patterns in features. The formula is:
[0137] C t =f act (W c *X t +b c )
[0138] Among them, C t is the extracted feature, W c is the convolution kernel weight, b c is the bias term, f act is the activation function (ReLU).
[0139] Long Short-Term Memory (LSTM) Module: Sequence Modeling: The feature sequence extracted by CNN is input into the LSTM layer to learn the long-term dependencies in the time series. The basic unit update formula of LSTM is:
[0140] Forget Gate t Decide what information to forget from the cell state:
[0141] f t =σ(W f ·[h t-1 ,X t ]+b t )
[0142] Input Gate i t Decide what new information needs to be stored in the cell state:
[0143] i t =σ(W i ·[h t-1 ,X t ]+b i )
[0144] Cell state candidate values Compute the new memory contents:
[0145]
[0146] Cell state update C t Combining forgotten and entered information:
[0147]
[0148] Output Gate O t Determine which cell state contents need to be output to the hidden state:
[0149] O t =σ(W o ·[h t-1 ,X t ]+b o )
[0150] Hide status updateh t Combine the cell state and output gate:
[0151] h t =O t ⊙tanh(C t )
[0152] Where σ is the sigmoid activation function, tanh is the hyperbolic tangent function, W and b are the corresponding weight matrices and bias terms, and ⊙ represents element-wise multiplication;
[0153] Attention mechanism: Add the attention mechanism and assume that the hidden state sequence obtained by LSTM is H = [h1,h2,…,h n ], attention weight a t It can be calculated through the attention mechanism, including a weight distribution layer and a softmax function:
[0154]
[0155] Among them, V, W h , W s is the parameter to be learned, S t-1 is the context vector of the previous moment. Then, the hidden state is weighted and summed according to the attention weight to obtain the context vector S t :
[0156]
[0157] The above parts form a hybrid deep learning model that not only uses LSTM to process time series data, but also enhances the model's ability to capture important information through the attention mechanism.
[0158] Output layer and prediction: Future prediction: The context vector adjusted by the attention mechanism is input to the fully connected layer for prediction. The formula is:
[0159] Y pred =σ(W y S t +b y )
[0160] Among them, Y pred is the predicted traffic flow, W y and b y are the weights and biases of the output layer, and σ is the activation function sigmoid chosen according to the problem definition.
[0161] Model training and optimization: loss function and back propagation: Use mean square error (MSE) as the loss function and adjust the model parameters through the back propagation algorithm and optimizer (Adam) to minimize the prediction error.
[0162] See also Figure 6 , a schematic diagram of a fifth embodiment of an application method of a traffic flow prediction system based on deep learning and dynamic network analysis provided by an embodiment of the present invention, wherein the intelligent control strategy in the method includes:
[0163] Define the state space S, including the current traffic flow, signal status, and road network congestion information;
[0164] Determine the action space A, covering all possible control actions, signal timing adjustment, information release, and route guidance strategies.
[0165] Design reward R(s,a,s'). Based on the concept of utility function, the reward mechanism should be able to feedback the immediate improvement of the system after the implementation of the strategy;
[0166] At the beginning, the intelligent system may adopt a random or preset strategy π0;
[0167] Select action a according to the current strategy t =π(S t ), after execution, transfer to the next state S t+1 , and receive an immediate reward R t ;
[0168] The strategy π is updated through the reinforcement learning algorithm to maximize the long-term cumulative reward, that is, to solve:
[0169]
[0170] Here, Y t is a discount factor that ensures that near-term rewards have a greater impact on decisions than far-term rewards;
[0171] After the strategy is updated, the cycle of state observation, decision-making, execution, and reward acquisition is repeated to continuously iterate and optimize the strategy.
[0172] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A traffic flow prediction system based on deep learning and dynamic network analysis, characterized in that: The traffic flow prediction system based on deep learning and dynamic network analysis includes sensors, data acquisition modules, feature extraction and preprocessing modules, dynamic graph models, hybrid deep learning prediction modules, and intelligent control strategy decision modules, wherein: Sensors, used to obtain information about urban traffic, wherein the sensors are deployed at key nodes of the urban traffic network; A data acquisition module, used to collect multi-source traffic data of urban traffic in real time through the sensors using the Internet of Things technology; A feature extraction and preprocessing module is used to preprocess the information collected by the data acquisition module, extract features from the time and space dimensions, and construct a spatiotemporal feature matrix; A dynamic graph model for generating node embeddings by using a graph attention mechanism and a graph convolution operation combined with the spatiotemporal feature matrix output by the feature extraction and preprocessing module; A hybrid deep learning prediction module, which is used to construct a prediction architecture using a long short-term memory network and a convolutional neural network, perform sequence-to-sequence prediction on the node embedding output by the dynamic graph model, capture the long-term dependency and spatial local features of the sequence, and output the prediction result; The intelligent control strategy decision module is used to apply a multi-objective optimization algorithm according to the prediction results output by the hybrid deep learning prediction module to obtain the best control strategy, so as to dynamically adjust the traffic signal control strategy, publish real-time traffic information, and recommend driving routes.
2. A traffic flow prediction system based on deep learning and dynamic network analysis as claimed in claim 1, characterized in that: The urban traffic network topology is constructed by the sensors, and the optimal layout of the sensors is determined by a spatial optimization algorithm, wherein the constraints of the spatial optimization algorithm are minimizing the coverage cost and maximizing the information gain. The sensors include at least infrared vehicle detectors, ring sensors, video surveillance, GPS tracking equipment, geomagnetic sensors, and mobile communication base stations.
3. A traffic flow prediction system based on deep learning and dynamic network analysis as claimed in claim 1, characterized in that: The data acquisition module uses a particle filter to smooth the noise data in the multi-source traffic data, wherein the multi-source traffic data at least includes traffic flow, vehicle speed, road occupancy, and weather information.
4. A traffic flow prediction system based on deep learning and dynamic network analysis as claimed in claim 1, characterized in that: The data acquisition module adopts spatiotemporal data mining technology to analyze the spatiotemporal correlation between different sensor data, establishes a spatiotemporal correlation model, measures spatial autocorrelation by calculating Geary's C ratio, and captures the correlation of time series by time series analysis method.
5. A traffic flow prediction system based on deep learning and dynamic network analysis as claimed in claim 1, characterized in that: The feature extraction and preprocessing module separates the periodic patterns in the traffic flow collected by the data acquisition module through Fourier transform.
6. A traffic flow prediction system based on deep learning and dynamic network analysis as claimed in claim 1, characterized in that: The dynamic graph model defines a time-dependent attention-weighted adjacency matrix: Among them, H (I-1) (t) represents the node feature matrix of the previous layer, σ represents the activation function, θ represents the learnable weight matrix, II represents the feature cascade operation, and Softmax is used to normalize the attention weight; The graph convolution operation integrating spatiotemporal features uses the time-dependent attention weighted adjacency matrix to perform graph convolution operations to fuse local neighborhood information. The output of the graph convolution layer H (I) (t) can be calculated by the following formula: in, represents the degree matrix, W I represents the weight matrix of this layer, σ represents the nonlinear activation function; Apply recurrent neural network to encode the historical traffic data of each node to obtain the time feature representation T(t) of each node at time t; The spatial feature H (I) (t) is fused with the temporal feature T(t) to generate the final node embedding representation: Z(t)=F([H (I-1) (t)ⅡT(t)]) Among them, F represents the fusion function multi-layer perceptron.
7. The traffic flow prediction system based on deep learning and dynamic network analysis as claimed in claim 1, characterized in that: The LSTM network in the hybrid deep learning prediction module combines the gating mechanism and the attention mechanism. t is the input at time step t, h t-1 and C t-1 are the hidden state and cell state of the previous time step respectively. The update of LSTM can be expressed as: Forget Gate t Decide what information to forget from the cell state: f t =σ(W f ·[h t-1 ,X t ]+b t ) Input Gate i t Determine the new information stored in the cell state: i t =σ(W i ·[h t-1 ,X t ]+b i ) Cell state candidate values Compute the new memory contents: Cell state update C t Combining forgotten and entered information: Output Gate O t Determine the contents of the cell state that need to be output to the hidden state: The t =σ(W o ·[h t-1 ,X t ]+b o ) Hide status updateh t Combine the cell state and output gate: h t =O t ⊙tanh(C t ) Among them, σ represents the sigmoid activation function, tanh represents the hyperbolic tangent function, W and b represent the corresponding weight matrix and bias term, and ⊙ represents element multiplication; Add the attention mechanism and assume that the hidden state sequence obtained by LSTM is H = [h1,h2,…,h n ], attention weight a t It is calculated through the attention mechanism, including a weight distribution layer and a softmax function: Among them, V, W h , W s represents the parameters to be learned, S t-1 Represents the context vector of the previous moment; The context vector S is obtained by weighted summing of the hidden states according to the attention weights t : A hybrid deep learning model was constructed that processes time series data through LSTM and enhances the model's ability to capture important information through the attention mechanism.
8. The traffic flow prediction system based on deep learning and dynamic network analysis as claimed in claim 1, characterized in that: The intelligent control strategy decision module introduces a reinforcement learning algorithm to dynamically adjust the signal timing strategy. The formula is: Where Y represents the discount factor, r t+k+Δt represents the immediate reward at the t+k+Δt moment, s t +Δt represents the current state.
9. An application method of a traffic flow prediction system based on deep learning and dynamic network analysis, characterized in that: The application method of the traffic flow prediction system based on deep learning and dynamic network analysis includes the following steps: By deploying various sensors at key nodes of the urban traffic network, multi-source traffic data of urban traffic is collected in real time and integrated to obtain the original data set; The original data set is preprocessed by data cleaning, missing value filling, and outlier detection to obtain the preprocessed original data set. Feature information in the preprocessed original data set is extracted from the time and space dimensions to construct a spatiotemporal feature matrix: F ST = Preprocess(D), where F ST The element f ij represents the eigenvalue of the jth position at the i-th time; Constructing a dynamic graph model of an urban transportation network: G(t)=(V,E,A(t)) Where V represents the set of road network nodes, E represents the connection relationship between nodes, and A(t) represents the adjacency matrix that changes with time t; Using graph attention mechanism and graph convolution operation, combined with the spatiotemporal feature matrix, node embedding is generated: H(t)=GCN att (G(t),F st ) Among them, GCN att Represents a graph convolutional network combined with an attention mechanism; The prediction architecture is constructed using long short-term memory networks and convolutional neural networks to perform sequence-to-sequence predictions on node embeddings, capture the long-term dependencies and spatial local features of the sequences, and output the prediction results: in, Represents the traffic flow prediction value in the future Δt time period, LSTM cnn Represents an LSTM network combined with a convolutional layer; Based on the prediction results, a multi-objective optimization algorithm is used to obtain the best control strategy to dynamically adjust the traffic signal control strategy, publish real-time traffic information, and recommend driving routes: Among them, π*(t+Δt) represents the optimal control strategy, and U represents the utility function.
Citation Information
Cited By
Space-air-ground network flow unloading decision-making method and system based on graph neural network
CN118972900A
Community traffic flow prediction and optimization system based on artificial intelligence
CN118982927A
Energy storage battery life prediction method and device based on improved TFT
CN119024216A
Road traffic management method and system based on digital twinning
CN119049291A
Road condition forecasting and early warning method and system based on intelligent traffic
CN119049292A
