| With the rapid development of social media,social media platforms generate a large amount of user trajectory data.Research on user trajectory prediction based on social media data has gradually become a popular research direction.Trajectory prediction research has important research value in many fields such as traffic management,resource allocation,epidemic control and so on.The existing trajectory prediction research has many shortcomings,such as low prediction accuracy,unable to effectively predict long trajectory sequence,and single prediction task of prediction model.Based on social media data,this paper researches and implements the user trajectory prediction algorithm.The specific research content includes the prediction of the user’s next arrival location and the joint prediction of the user’s location and time.Firstly,this paper studied the user’s next location prediction.Aiming at the long track sequence problem of trajectory prediction and the modeling problem of user movement law,the Multimodal Double-layer Attention Network(MDAN)model was proposed.In this model,location coding and multi-head self-attention mechanism are used to predict long trajectory sequences.The multi-head self-attention mechanism can effectively model the multi-level periodicity and personal preference of user movement.According to the feature that the user’s next moving position is in the region of the current position with a high probability,the model uses linear attention mechanism to match the most likely candidate position as the target position for output.Through a large number of simulation experiments on the public data sets of Twitter-NYC and Foursquare-NYC,the MDAN model not only realizes the prediction of long trajectory sequence,but also basically outperforms other models in the prediction accuracy index,which proves the effectiveness of the MDAN model.At the same time,the ablation results show that the regional module is helpful to improve the prediction accuracy of the model.Then,this paper proposes the Joint Location and Time Prediction model(JLTP)based on multi-task learning to solve the problem of insufficient performance of the existing joint location and time prediction.The JLTP model uses the structure of Convolutional Neural Network(CNN)and multi-head self-attention mechanism to realize the encoding of trajectory sequences.The multi-head self-attention mechanism can be used to model the user movement rules mathematically,and the convolutional neural network can help the model improve the ability of range prediction.JLTP uses the parameter hard sharing mechanism in multi-task learning to input common parameters,and other vector features as the input of each task focus training module,so as to achieve the effect of algorithm model joint training and focus training.The model adopts loss weight with the same priority to carry out parameter back propagation training.Extensive experiments were carried out on the public data set Twitter-NYC.In the comparative experiments,the experimental results show that the JLTP model is superior to other advanced models in both location prediction and time prediction,which proves the effectiveness of the model.At the same time,in the comparison of experimental results between ablation and soft sharing,the JLTP model is superior to the ablation model that only predicts time and only predicts position.With similar experimental performance to the soft sharing model,the model structure is simple and the training time is short,which proves the rationality of the model design.In the hyperparameter analysis experiment,the experimental results show that the important hyperparameters have little influence on the performance of the JLTP within a certain range,which proves that the JLTP model has a certain robustness. |