The invention discloses a traffic flow prediction method based on a self-attention mechanism and deep learning, and belongs to the technical field of traffic monitoring. The method comprises the following steps: S1, collecting six-dimensional traffic flow features including X1-X6 by using a TCN to obtain important features; s2, processing the important features by BiGRU to obtain an output vector; s3, inputting the output vector into a self-attention mechanism layer to obtain a self-attention mechanism weight; and fusing the self-attention mechanism weight and the output vector and carrying out linear transformation to finally obtain a TCN-BiGRU-self-attention mechanism traffic flow prediction model. And S4, predicting the traffic flow at a certain moment based on the model, and comparing the real traffic flow data of the time period. According to the method, output of the TCN, output of the BiGRU and output of the self-attention mechanism are fused, the relation and importance among different positions are captured, the method better adapts to complex traffic mobility changes and modes, information in a sequence is captured more comprehensively, and prediction accuracy is improved.
本发明公开了一种基于自注意机制和深度学习的交通流预测方法,属于交通监测技术领域。它包括以下步骤:S1、利用TCN收集包含X1‑X6的六维交通流特征得重要特征;S2、BiGRU处理重要特征,得输出向量;S3、将输出向量输入至自注意机制层,获取自注意力机制权重;融合自注意力机制权重和输出向量并经线性变换,最终得TCN‑BiGRU‑自注意力机制交通流预测模型;S4、基于模型预测某一时刻的交通流量,并对比该时段的真实交通流数据。本发明将TCN、BiGRU和自注意机制的输出三者融合,捕捉不同位置之间的关系和重要性,更好地适应复杂的交通流动性变化和模式,更全面地捕捉序列中的信息,提高预测的准确性。
Traffic flow prediction method based on self-attention mechanism and deep learning
一种基于自注意机制和深度学习的交通流预测方法
2024-07-16
Patent
Electronic Resource
Chinese
Traffic flow prediction method and system based on self-attention mechanism
European Patent Office | 2025
|Traffic flow prediction method based on attention mechanism
European Patent Office | 2022
|Personalized federated learning traffic flow prediction method based on prior attention mechanism
European Patent Office | 2024
|Traffic flow prediction method based on space-time attention mechanism
European Patent Office | 2024
|