The invention discloses a traffic flow prediction method based on an improved space-time Transform, which is a framework based on a coder and a decoder. An encoder encodes historical traffic features, and a decoder predicts a future sequence. The encoder is composed of a space-time embedding layer, a space-time feature extraction module and a feedforward neural network, the decoder is similar to the encoder in structure, but one additional double cross attention for connecting the encoder and the decoder is provided compared with the encoder. Wherein the space-time embedding layer comprises LINE graph embedding, position embedding and time embedding; the spatial-temporal feature extraction module comprises spatial sparse self-attention, time level diffusion convolution and time self-attention. The method comprises the steps that firstly, an encoder combines space sparse self-attention and time level diffusion convolution, dynamic space correlation and local space features of traffic flow are captured, and then time self-attention is used for modeling nonlinear time correlation; the decoder then digs out spatio-temporal features of the input sequence similarly to the encoder. And finally, based on the spatial-temporal characteristics extracted by the codec, simulating the influence of historical traffic observation on future prediction by adopting double cross attention, modeling the direct relationship between each historical time step and each future time step and the influence on the whole future time period, and outputting the final representation of the future traffic flow.
本发明公开了一种改进的时空Transformer的交通流量预测方法,是一种基于编解码器的架构。编码器对历史流量特征进行编码,解码器预测未来序列。编码器由时空嵌入层、时空特征提取模块、前馈神经网络三个部分组成,解码器与编码器结构类似,但比编码器多出一个连接编码器和解码器的双重交叉注意力。其中,时空嵌入层是包括LINE图嵌入、位置嵌入、时间嵌入;时空特征提取模块包括空间稀疏自注意力、时间层次扩散卷积以及时间自注意力。首先,编码器将空间稀疏自注意力和时间层次扩散卷积相结合,捕捉交通流量的动态空间相关性和局部空间特征,再利用时间自注意力建模非线性时间相关性;接着,解码器与编码器类似地挖掘出输入序列的时空特征。最后,基于编解码器提取的时空特征,采用双重交叉注意力模拟历史交通观测对未来预测的影响,建模每个历史时间步和每个未来时间步的直接关系以及对整个未来时间段的影响,并输出未来交通流量的最终表示。
Traffic flow prediction method based on improved space-time Transform
一种基于改进的时空Transformer的交通流量预测方法
2022-11-01
Patent
Electronic Resource
Chinese
Traffic flow long-time prediction method and system based on improved Transform model
European Patent Office | 2023
|Time-space traffic state prediction method based on Transform network
European Patent Office | 2021
|Improved space-time network traffic flow prediction method based on impedance matrix
European Patent Office | 2023
|Traffic flow prediction method based on graph space-time Transform model considering human mobility
European Patent Office | 2022
|European Patent Office | 2024
|