| Location-based Social Networks(LBSNs)enable users to interact with each other by checking in at specific locations or sharing location information.As LBSNs have developed,a large amount of check-in data containing user visit locations has been generated,opening up a new research area of spatio-temporal big data,specifically next location recommendation.However,existing methods for point-of-interest(POI)recommendation only utilize the temporal information of two consecutive LBSN check-ins.Specifically,these methods focus only on adjacent visit sequences and ignore noncontiguous visits,although such visits are essential for understanding the spatio-temporal correlation within a trajectory.To fully exploit this non-contiguous visit information,this paper proposes a multilayer Spatio-Temporal deep learning attention model,Spatio-Temporal Transformer Recommender(STTF).The main contributions of this paper are as follows:(1)User trajectory embedding: To fully utilize user information and spatio-temporal patterns in trajectories and facilitate subsequent model learning and computation,this paper represents the information in user trajectories as embeddings.The user’s trajectory is embedded into a visit vector to facilitate the retention of user visit preferences when input into subsequent models.The spatiotemporal relationship in the trajectory is extracted as a spatio-temporal interval embedding based on a spatio-temporal relationship matrix,allowing for precise representation of the trajectory’s spatiotemporal preferences and enabling subsequent models to learn the user’s spatio-temporal features.(2)Spatio-temporal attention-based location recommendation model: To explore the spatiotemporal relationship between any two visit locations,this paper utilizes a Transformer aggregation layer.To match the most plausible candidates from all locations,this paper develops an attention matcher based on the attention mechanism.Based on the user trajectory data in(1),this paper uses an attention-based aggregation method to mine user POIs and preferences,obtaining a deep representation of user POIs and preferences.This paper further optimizes the model using an advanced attention aggregation method based on Transformer,to better learn the long-term dependence relationship in the trajectory sequence.Finally,the paper applies the spatio-temporal interval embedding obtained in(1)to optimize the model with spatio-temporal attention,enhancing the model’s ability to learn sequence spatio-temporal relationships.The resulting model is the STTF,a location recommendation model based on spatio-temporal attention.(3)Experimental design and result analysis: To evaluate the effectiveness of the STTF model,this paper conducts experiments using two real-world datasets.The results show that compared with existing models,the STTF improves the average value of the recall index at different scales by at least 13% and at least 4% compared with the optimal baseline model.Additionally,this paper conducts experiments on different encoder sub-models and different dimensions of POI features to verify the model’s ablation,stability,and interpretability,further confirming the superiority of the proposed model and the effectiveness of the optimization. |