Traffic flow is an indispensable part of intelligent transportation systems, playing a significant role in alleviating urban traffic congestion. Due to the complex spatiotemporal correlations and heterogeneity inherent in traffic flow data, most existing models exhibit insufficient performance when handling such data, leading to issues such as low accuracy and poor real-time capabilities. In this paper, a network model based on Transformer and Multi-Graph Fusion Convolution (TMGCN) is proposed. Firstly, periodic variations in the time series are extracted using the Transformer module. Subsequently, a multi-graph fusion module is employed to model spatial correlations by fusing road connectivity graph, dynamic speed graph and similarity graph. The above periodic serial feature and multi-graph feature serve as inputs to the spatiotemporal convolutional module (STGC) for extracting spatiotemporal features. Finally, a fully connected layer is applied to process the features and obtain the prediction results. The experimental results indicate that the proposed model achieves a reduction in the Mean Absolute Error (MAE) for traffic flow prediction in the next hour to 19.33 and 15.73 on the public datasets of PEMS04 and PEMS08, respectively.