The invention discloses a traffic flow prediction method based on feature embedding and a space-time multi-head self-attention mechanism, and relates to the technical field of intelligent traffic and flow prediction, and the method comprises the steps: obtaining historical traffic flow sequences of N sensors at the first T moments in a traffic network; taking historical traffic flow sequences of N sensors in a traffic network at the first T moments as input, and generating features including time and space through a feature embedding layer; the generated features including time and space are input into a stacked space-time coding layer, calculation is carried out through a decoupled time multi-head self-attention mechanism and a space multi-head self-attention mechanism, new time features and space features are obtained, the time features and the space features are fused, and space-time features are obtained; inputting the spatial-temporal features into an MLP module, and further extracting high-level features through multi-layer MLP; and outputting the high-level features through a regression layer to obtain a prediction result. According to the method, the problem that the traditional prediction model is difficult to process the time-space complexity at the same time is effectively solved by utilizing a decoupling type time and space multi-head self-attention mechanism, and the accuracy of traffic flow prediction is improved.
本发明公开了基于特征嵌入和时空多头自注意力机制的交通流量预测方法,涉及智能交通和流量预测技术领域,获取交通路网中N个传感器在前T个时刻的历史交通流量序列;将交通路网中N个传感器在前T个时刻的历史交通流量序列作为输入,通过特征嵌入层,生成包含时间和空间的特征;将生成的包含时间和空间的特征输入到堆叠的时空编码层,分别通过解耦的时间多头自注意力机制和空间多头自注意力机制进行计算,分别获得新的时间特征和空间特征,再将时间特征和空间特征融合,得到时空特征;将时空特征输入到MLP模块,通过多层MLP进一步提取高层次特征;将高层次特征经过回归层进行输出,得到预测结果。本发明利用解耦式时间和空间多头自注意力机制有效地解决了传统预测模型难以同时处理时空复杂性的难题,提高了交通流预测的准确性。
Traffic flow prediction method based on feature embedding and space-time multi-head self-attention mechanism
基于特征嵌入和时空多头自注意力机制的交通流量预测方法
2025-02-07
Patent
Electronic Resource
Chinese
Traffic flow prediction method based on multi-head attention mechanism
European Patent Office | 2023
|Traffic flow prediction method based on space-time attention mechanism
European Patent Office | 2024
|Traffic flow prediction method based on cyclic space-time attention mechanism
European Patent Office | 2024
|Traffic flow prediction method based on space-time bidirectional attention mechanism
European Patent Office | 2024
|European Patent Office | 2024
|