Traffic flow is the most direct indicator of traffic conditions, and accurate prediction of traffic flow is a key challenge for scholars in the field of intelligent transportation. However, traffic flow displays significant nonlinearity, dynamic changes, spatiotemporal dependencies, and most existing methods overlook the influence of road topology on the spatiotemporal properties of traffic flow, creating substantial challenges for traffic flow prediction. This paper proposes a graph convolutional traffic flow prediction model based on adaptive spatiotemporal attention. Initially, the model adaptively adjusts spatiotemporal weight distribution using a meticulously designed spatiotemporal attention mechanism, effectively capturing dynamic spatiotemporal correlations in traffic data. Subsequently, it integrates graph convolutional neural networks (GCNs) with long short-term memory (LSTM) networks to capture the spatiotemporal characteristics of traffic data. Additionally, a GCN is designed to capture the spatial topological relationships of the road network. Finally, a novel fusion mechanism is introduced to integrate the spatiotemporal features of traffic data with the spatial topological relationships of roads, aiming to achieve accurate predictions. Experimental results demonstrate that the model proposed in this paper outperforms six selected baseline methods.