The invention discloses a Transform-based
traffic flow prediction method and device capable of sensing a local-
global time-space relationship, and the method comprises the steps: firstly obtaining the historical traffic data of all to-be-predicted road sections, the historical data comprising the
traffic flow feature data of the predicted road sections, the static adjacent matrix data between road network nodes, and the sampling
timestamp data of the historical data; secondly, a spatio-
temporal information embedding layer is constructed to provide multiple types of embedding input for a model
trunk, the learning ability of the model is enhanced, and three different types of embedding are respectively historical
data information embedding,
time information embedding and space node self-adaptive embedding; then, constructing a local-
global time dependence extraction module, respectively learning short-time and long-time time dependence relationships in the data by using a multi-scale TCN and a self-attention mechanism in a time dimension, and meanwhile, introducing a double-path self-adaptive information gating fusion technology to realize effective fusion of time features of different hierarchies; then constructing a local-global
spatial dependency extraction module, respectively learning local and global
spatial dependency relationships in the data by using a dynamic-static graph convolutional network and a self-attention mechanism in spatial dimension, and realizing effective fusion of spatial features of different levels based on a two-way adaptive information gating fusion technology; and finally, mapping the potential spatial-temporal feature representation into a prediction result through a full connection layer network.