In the process of obtaining information from the actual traffic network, the incomplete data set caused by missing data reduces the validity of the data and the performance of the data-driven model. A traffic flow repair model based on a k-nearest neighbor ( KNN) spatio-temporal attention ( STA) graph convolutional network ( KAGCN) was proposed in this paper. Firstly, the missing data is initially interpolated by the KNN algorithm, and then the complete index set ( CIS) is constructed by combining the adjacency matrix of the network structure. Secondly, a STA mechanism is added to the CIS to capture the spatio-temporal correlation between the data. Then, the graph neural network ( GNN) is used to reconstruct the data by spatio-temporal correlation, and the reconstructed data set is used to correct and optimize the initial interpolation data set to obtain the final repair result. Finally, the PEMSD4 data set is used to simulate the missing data in the actual road network, and experiments are carried out under the missing rate of 30% , 50% , and 70% respectively. The results show that the mean absolute error ( MAE), root mean square error ( RMSE), and mean absolute percentage error ( MAPE) of the KAGCN model increased by at least 3.83% , 2.80% , and 5.33% , respectively, compared to the other baseline models at different deletion rates. It proves that the KAGCN model is effective in repairing the missing data of traffic flow.