The invention belongs to the technical field of urban
traffic flow prediction, and particularly relates to a
traffic flow prediction method and device based on
dynamic contrast learning and multi-scale 3D
convolution, and the method comprises the steps: obtaining a traffic
feature matrix and an environment
feature vector based on traffic track data and environment data, mapping the environment
feature vector to the spatial dimension of the traffic grid to obtain an environment
feature matrix, and splicing the traffic
feature matrix and the environment feature matrix to obtain a target space-time matrix; constructing a
traffic flow prediction model comprising a multi-scale 3D
convolution module, a
dynamic contrast learning module, an environmental feature gating fusion module and a time-space
deconvolution prediction module, taking the target space-time matrix as input, and constructing a joint
loss function based on contrast learning loss, gating fusion loss and prediction loss; therefore, the traffic flow prediction model is optimized. According to the method, the problems of a traditional prediction method in the aspects of capturing nonlinear space-time dependence, dynamic
emergency response, environment factor collaborative modeling and the like are solved.