Abstract:To address the shortcomings of the current traffic flow prediction model in extracting data features that easily ignore the differences in traffic flow trends between weekdays and rest days, a feature selection-based spatio-temporal fusion traffic flow prediction model STTF-XGB is proposed. The model improves the extraction of data features by the model from both data and model levels. First, Pearson correlation coefficient is used to calculate the correlation between data, and the data set is reclassified into weekday and rest day data sets according to the magnitude of the correlation. Secondly, the global spatial features of the road network data are extracted by using the adjacency matrix which can reflect the global relationship and the self-attention mechanism to build a graph self-attention mechanism, and the spatio-temporal feature extraction module with a "sandwich" structure is built based on the Transformer model to build a spatio-temporal fusion model STTF. Then, at the end of the STTF model, the XGBoost model is used to filter the features extracted by the multi-head attention mechanism to build the STTF-XGB model. Finally, the model was experimented on the UK freeway traffic flow dataset, and the results show that STTF-XGB can be effectively used for traffic flow prediction with about 5%~10% improvement in prediction accuracy over the GCN-BiLSTM and GAT-BiLSTM model in the short and medium term, and the prediction error fluctuation range is minimal.