Construction of Spatio-Temporal Feature Dynamic Traffic Prediction Model for Attention Mechanism Optimization in the Context of Smart Cities
摘要
With the advancement of smart city construction, traditional traffic prediction models show obvious deficiencies in coping with unexpected congestion and complex spatio-temporal relationships. The research suggests a dynamic spatio-temporal feature traffic prediction model improved based on the attention mechanism (ASTF-DTPM) to increase prediction accuracy and emergency response. This study enhances the road network topology sensing capability by constructing a dynamic spatial attention module, designing a spatio-temporal fusion framework to realize multidimensional feature synergistic coupling, and innovatively introducing an event-driven feature correction mechanism. The model uses a hierarchical fusion architecture of dynamic graph convolution and multi-scale spatio-temporal attention. This architecture is combined with a two-way gated feature correction algorithm to calibrate prediction errors online. The experimental results indicated that ASTF-DTPM performed well in both short-term and long-term prediction, and the prediction error was reduced by more than 30% compared with Transformer and attention-based spatio-temporal graphical convolutional network. The dynamic capture rate in peak period and valley period was stable at 85% ± 3%, and the fluctuation amplitude was only 1/3–1/4 of the comparison model. In the robustness test under heavy rainfall, the prediction accuracy of ASTF-DTPM remained stable and outperformed the traditional method by more than 15%. The above results demonstrate that the ASTF-DTPM model improves traffic prediction performance through its innovative attention mechanism optimization method. This method provides effective technical support for constructing an urban intelligent transportation model and can be expanded to include abnormal event response and multi-city application validation.