Search

CN-122024493-A - Traffic flow prediction method and system integrating periodic characteristics and dynamic changes of nodes

CN122024493ACN 122024493 ACN122024493 ACN 122024493ACN-122024493-A

Abstract

The invention relates to the technical field of time sequence prediction and deep learning, in particular to a traffic flow prediction method and system integrating periodic characteristics and dynamic changes of nodes. The traffic flow prediction model comprises a time feature embedding module, a node period modeling module, a time dependence modeling module, a spatial relation modeling module, a graph convolution space propagation module, a space-time feature fusion module and an output module which are sequentially connected, wherein the outputs of the time feature embedding module and the node period modeling module are connected with the input of the time dependence modeling module, the output of the time dependence modeling module is also respectively connected with the input of the graph convolution space propagation module and the input of the space-time feature fusion module, and the method introduces a node daily period and weekly period feature modeling mechanism, a time attention mechanism and a dynamic graph convolution network to realize dynamic space-time joint modeling of traffic flow, and improves model training stability through structural constraint.

Inventors

  • SUN RENHAO
  • FENG JUN
  • WANG YUJIAN

Assignees

  • 数据空间研究院

Dates

Publication Date
20260512
Application Date
20260414

Claims (10)

  1. 1. A traffic flow prediction method integrating node periodic characteristics and dynamic changes is characterized by firstly constructing a traffic flow prediction model which predicts a traffic flow sequence in a future period based on a traffic flow sequence in a current period; The traffic flow prediction model comprises a time feature embedding module, a node period modeling module, a time dependence modeling module, a spatial relation modeling module, a graph convolution space propagation module, a space-time feature fusion module and an output module which are sequentially connected, wherein the outputs of the time feature embedding module and the node period modeling module are connected with the input of the time dependence modeling module, and the output of the time dependence modeling module is also connected with the input of the graph convolution space propagation module and the input of the space-time feature fusion module respectively; The node period modeling module is used for describing node period characteristics on a daily period and a weekly period based on a traffic period mode of an area where the node is located, and obtaining node period characteristic representation; the space relation modeling module firstly adopts two mapping matrixes to linearly map the time enhancement features, then calculates the similarity of the two mapping results and normalizes the similarity to obtain a dynamic adjacency matrix; The graph convolution space propagation module fuses the dynamic adjacent matrix and the time enhancement feature by adopting graph convolution to obtain space feature representation, the time enhancement feature and the space feature representation are fused by the time feature fusion module to obtain final node feature representation, and the output module maps the final node feature representation into a predicted traffic flow sequence.
  2. 2. The method for predicting traffic flow by merging periodic characteristics and dynamic changes of nodes as recited in claim 1, wherein the node period modeling module causes the node indexes to respectively correspond to the daily period step sizes And Zhou Zhouqi steps Taking the module to obtain the daily line number and Zhou Hanghao, and taking the line vector corresponding to the daily line number as the daily embedding of the node in the daily period embedding matrix Taking a row vector corresponding to a cycle number as a cycle embedding of a node in a cycle embedding matrix Adding the daily embedding dimension and the weekly embedding dimension to obtain the periodic characteristic representation of the node 。
  3. 3. The traffic flow prediction method based on the node periodic characteristics and the dynamic change according to claim 1, wherein the output characteristics of the time characteristic embedding module and the periodic characteristic representation are subjected to dimension superposition to obtain enhanced characteristics, and the time dependent modeling module processes the enhanced characteristics by adopting a multi-head self-attention mechanism to obtain time enhanced characteristics.
  4. 4. The traffic flow prediction method for merging periodic characteristics and dynamic changes of nodes according to claim 1, wherein the spatial relationship modeling module normalizes the similarity in the following manner: wherein S is the similarity matrix of two mapping features, d is the set feature dimension, As a temperature parameter, softmax is an activation function; Is a dynamic adjacency matrix.
  5. 5. The traffic flow prediction method based on the fusion node periodic characteristics and the dynamic change according to claim 1, wherein a space-time characteristic fusion module firstly carries out residual processing on the time enhancement characteristic and the normalized space characteristic representation to obtain a space-time fusion characteristic, then carries out characteristic extraction on the space-time fusion characteristic through a feedforward network, carries out dimension superposition on the obtained characteristic and the space-time fusion characteristic, and then carries out normalization processing to obtain a final node characteristic representation.
  6. 6. The method for predicting traffic flow with converged node periodicity characteristics and dynamics as claimed in claim 5 where the feed forward network is implemented with two layers of linear mapping.
  7. 7. The method for predicting traffic flow by combining periodic characteristics and dynamic changes of nodes according to claim 1, wherein the training method of the traffic flow prediction model comprises the steps of firstly processing historical traffic flow data to obtain historical time step as follows Traffic flow sequence of (a) And a training set is constructed, and the training set, And For historical traffic sequence segments that are connected in tandem in the time dimension, Is a time step of T, Is of the time step length of Training traffic flow prediction model on training set, based on the following steps And calculating a loss function corresponding to the predicted sequence output by the model over the time period.
  8. 8. The method of traffic flow prediction incorporating periodic features and dynamics according to claim 7, wherein the loss function uses a summation of one or more of contrast loss, cross entropy loss, and mean square error loss.
  9. 9. A traffic flow prediction system integrating node periodic characteristics and dynamic changes, comprising a memory and a processor, wherein the memory is stored with a computer program, and the processor is connected with the memory, and is used for executing the computer program to realize the traffic flow prediction method integrating node periodic characteristics and dynamic changes according to any one of claims 1-8.
  10. 10. A storage medium storing a computer program which when executed is adapted to implement the fusion node periodic characteristics and dynamically changing traffic flow prediction method according to any one of claims 1-8.

Description

Traffic flow prediction method and system integrating periodic characteristics and dynamic changes of nodes Technical Field The invention relates to the technical field of time sequence prediction and deep learning, in particular to a traffic flow prediction method and system integrating periodic characteristics and dynamic changes of nodes. Background Traffic flow prediction is a key issue in intelligent traffic systems, with the goal of predicting traffic conditions over a period of time in the future from historical traffic data. Traffic flow data typically has both significant time and spatial dependencies. Time dependence is manifested in that traffic flow varies with time with apparent periodicity, such as peaks in the morning and evening of the day and differences between workdays and weekends; spatial dependencies are manifested in the existence of complex propagation relationships between different road segments in a traffic network, for example, congestion of an upstream road segment may be transferred to a downstream road segment after a certain time. Existing traffic prediction methods typically describe traffic network structures using a fixed adjacency matrix, for example, building graph structures based on road physical distance or connection relationships. However, in an actual traffic system, the influence relationship between roads changes dynamically along with the traffic state, so that a fixed graph structure is difficult to accurately describe the actual traffic propagation process. In addition, in the dynamic graph learning process, the adjacent matrix and the node characteristics participate in gradient update at the same time, so that gradient oscillation is easy to occur in the training process, and the stability of the model is affected. Disclosure of Invention In order to overcome the defect that the traffic prediction method in the prior art does not consider dynamic change and unstable performance, the invention provides a traffic flow prediction method and a traffic flow prediction system which are fused with node cycle characteristics and dynamic change, a node daily cycle and cycle characteristic modeling mechanism is introduced, dynamic space-time joint modeling is realized through space-time convolution, and model training stability and traffic prediction precision are improved. The invention provides a traffic flow prediction method integrating node periodic characteristics and dynamic changes, which comprises the steps of firstly constructing a traffic flow prediction model, predicting a traffic flow sequence in a future period based on the traffic flow sequence in the current period, and then acquiring a traffic flow sequence prediction result in the future period by adopting the traffic flow prediction model; The traffic flow prediction model comprises a time feature embedding module, a node period modeling module, a time dependence modeling module, a spatial relation modeling module, a graph convolution space propagation module, a space-time feature fusion module and an output module which are sequentially connected, wherein the outputs of the time feature embedding module and the node period modeling module are connected with the input of the time dependence modeling module, and the output of the time dependence modeling module is also connected with the input of the graph convolution space propagation module and the input of the space-time feature fusion module respectively; The node period modeling module is used for describing node period characteristics on a daily period and a weekly period based on a traffic period mode of an area where the node is located, and obtaining node period characteristic representation; the space relation modeling module firstly adopts two mapping matrixes to linearly map the time enhancement features, then calculates the similarity of the two mapping results and normalizes the similarity to obtain a dynamic adjacency matrix; The graph convolution space propagation module fuses the dynamic adjacent matrix and the time enhancement feature by adopting graph convolution to obtain space feature representation, the time enhancement feature and the space feature representation are fused by the time feature fusion module to obtain final node feature representation, and the output module maps the final node feature representation into a predicted traffic flow sequence. Preferably, the node period modeling module makes the node indexes respectively correspond to the daily period step lengthAnd Zhou Zhouqi stepsTaking the module to obtain the daily line number and Zhou Hanghao, and taking the line vector corresponding to the daily line number as the daily embedding of the node in the daily period embedding matrixTaking a row vector corresponding to a cycle number as a cycle embedding of a node in a cycle embedding matrixAdding the daily embedding dimension and the weekly embedding dimension to obtain the periodic characteristic representation of