In order to accurately assess the road traffic flow, improve the efficiency and safety of the transportation system, and provide technical support for vehicle path planning and road congestion early warning, this paper proposes a method for accurately forecast the traffic flow on the urban road network by using trajectory prediction technology. The method uses a combination model of graph convolutional neural network (GCN) and gated recurrent unit (GRU) for vehicle trajectory prediction, and uses the output of trajectory prediction to more accurately forecast the traffic flow. Firstly, transforming the checkpoint data into daily vehicle trajectories with time series characteristics, realizing the division of vehicle trajectory travel chain. Secondly, the adjacency matrix is established by using the spatial relationship of each checkpoint, and the feature matrix of the vehicle's driving trajectory over time is established, which are used as the input of GCN to learn the spatial characteristics of the vehicle during driving on the road network, and then GRU is added to further process the data after GCN training, constructing a GCN-GRU vehicle trajectory prediction model for vehicle trajectory prediction. Finally, the traffic flow of each checkpoint is calculated based on the prediction result of vehicle trajectory, and compared with the real checkpoint flow. In this paper, Qingdao city checkpoint data is used as an example for experiments, and the results show that compared with the traditional GCN model, the GCN-GRU vehicle trajectory prediction model can obtain stronger temporal and spatial correlation characteristics and higher prediction accuracy. The forecasted traffic flow is highly consistent with the real checkpoint traffic flow, which verifies the reliability of the proposed method.