| With the progress and development of the current society,the increasingly serious traffic congestion problem has become a major obstacle to economic development.The direct and indirect economic losses caused by traffic congestion in Beijing alone in one year are up to hundreds of billions of RMB.Therefore,how to solve this traffic congestion problem through emerging science and technology(such as computer science,operations research,etc.)to improve the efficiency of public transportation has become increasingly important.At the same time,accurate prediction of traffic flow is a key factor in solving traffic congestion.It learns historical traffic data to predict traffic at the next moment,thereby planning and unblocking various travel tools in advance.However,there are still many shortcomings in the existing traffic flow prediction models.In practice,they usually face two major problems: 1)fail to find a proper way to mine the semantic information of spatio-temporal data,so that the time periods with the same semantic model can be connected with each other.2)The regular characteristics of the spatio-temporal data in time and space are not effectively mined,making the traffic prediction model unable to make full use of this information in the prediction process.Therefore,based on the above two problems,this thesis proposes a traffic flow prediction model based on attention mechanism,aiming at the shortcomings of the current traffic flow prediction model.In order to find the similar semantic models between different time periods accurately,this thesis first proposes a kind of k-means clustering algorithm,which is used to get the tensor representation of the potential K features in the data set.Then this thesis continues to use the Conv LSTM memory unit-based encoder-decoder network structure to specialize the characteristics of traffic data in time and space.Finally,the K latent semantic model representation tensors obtained by clustering are applied to the output of the decoding part in a manner of attention mechanism,so that the final output result can be combined with similar semantic models between different time periods to more accurately predict traffic flow at the next moment.The main contributions of this dissertation are as follows:(1)This thesis summarizes and classifies the existing traffic flow prediction models and clustering algorithms in detail and expounds the research background and development status at home and abroad.(2)A k-means framework clustering algorithm integrating within-cluster and betweencluster distance is proposed.Different from the traditional way of using cluster information by maximizing the distance between cluster center and global cluster center,the new algorithm maximizes the distance between the center of a cluster and the points that do not belong to this cluster in subspace,so that the between-cluster information is used effectively.Based on this assumption,we firstly design an optimization objective function for the new algorithm,and then the updating rules are obtained by Lagrange multiplier method.Then,this thesis analyzes the convergence and time complexity of the clustering algorithm in detail.Finally,this paper conducts relevant comparative experiments on the algorithm,and expounds its convergence speed and robustness.(3)In view of the shortcomings of the existing traffic flow prediction model,a new traffic flow prediction model based on attention mechanism is proposed.The model extracts the temporal and spatial characteristics of traffic data through the seq2 seq network architecture;then in the decode part of the model,the attention mechanism is used to integrate the similar semantic models existing in different time periods.Finally,this thesis analyzes the prediction results through detailed comparative experiments.The traffic prediction model proposed in this thesis has certain generality and can be transferred to the problem of spatio-temporal data prediction in similar scenarios,so it has certain theoretical research value.At the same time,this model can also accurately predict road traffic flow,which is also of practical significance for practical applications. |