With the continuous advancement in socioeconomic development and transportation infrastructure, the daily traffic volume on highways has been steadily increasing, resulting in the growing frequency of traffic congestion incidents. Thus, the accurate prediction of highway traffic flow is of great significance for implementing traffic congestion warnings, guiding traffic diversion, and developing the concept of intelligent highways. Traffic flow exhibits intricate spatial and temporal dependencies: in the spatial dimension, the relationships between various traffic nodes are not fixed, changing dynamically over time; in the temporal dimension, multiple temporal patterns of traffic flow sequences are entangled with each other. In addition, an efficient method for fusing spatiotemporal relationships is lacking, making the accurate prediction of traffic flow a challenging endeavor. In this regard, a methodology for forecasting highway traffic flow is proposed based on dynamic graph convolutional networks and spatiotemporal feature extraction modules. Given the challenge posed by the static nature of predefined graph structures in capturing dynamic spatial relationships among traffic nodes, a dynamic graph adjustment module is introduced. Initially, the spatial features of each traffic node are extracted. Subsequently, utilizing these extracted spatial features, spatial similarity scores between traffic nodes are computed. Based on these scores, a traffic network graph structure is adapted: connections between nodes with high similarity scores, previously unlinked, are established with a certain probability, while connections between nodes with low similarity scores, previously linked, are severed with a certain probability. Furthermore, by employing the spatiotemporal feature extraction module and leveraging the updated graph structure, spatial relationships are extracted through graph convolution. This is complemented by integrating a patch concept from temporal processing methodologies. Herein, a one-dimensional traffic flow sequence is decomposed and transformed into two-dimensional data. Through convolutional operations, temporal features within and between periods are simultaneously extracted before reverting the data back to its original dimensionality. This comprehensive approach enables the modeling of spatiotemporal dependencies within the traffic flow data. To validate the effectiveness of the proposed model, experiments were conducted on four highway traffic datasets, contrasting its performance with baseline models. The proposed model achieved the mean absolute error (MAE) values of 15.6, 19.7, 16.8, and 5.21 on the PeMS03, PeMS04, PeMS08, and Fuzhou Jingtai highway datasets, respectively. These results show that the proposed method reaches an advanced level in traffic flow forecasting. Lastly, to assess the efficacy of individual model components, ablative experiments were conducted, and their results were compared. These experiments validate the effectiveness of each component, thereby affirming the efficacy of the proposed model in highway traffic flow forecasting.