Interest point recommendation method based on trajectory semantic learning
By constructing a multi-dimensional decoupled representation and dual-channel self-supervised alignment mechanism, the problem of insufficient semantic correlation and multi-dimensional factor utilization in the existing point-of-interest recommendation method is solved, and the accuracy of point-of-interest prediction and the performance of the model under sparse data is improved.
Patent Information
- Application Number
- CN202510521752.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-08-01
AI Technical Summary
Existing point-of-interest recommendation methods are difficult to capture the semantic correlation of user trajectory in the absence of high-quality text data, and fail to fully utilize multidimensional factors to affect user interaction with point-of-interest, resulting in low prediction accuracy.
The interest point recommendation method based on trajectory semantic learning is adopted, and a semantic perceived hypergraph is constructed by constructing a multi-dimensional decoupled representation and a dual-channel self-supervised alignment mechanism at the point of interest level, combined with trajectory and point of interest level representation learning, a semantic perceived hypergraph is constructed to achieve alignment and fusion.
It improves the prediction accuracy of the user's next point of interest, can accurately characterize user behavior patterns under sparse data conditions, and enhances the recognition and reasoning capabilities of the model.
Smart Images

Figure CN120409688A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of natural language processing, and particularly to a method for recommending points of interest based on trajectory semantic learning. Background Art
[0002] With the wide popularity of location-based social networks, users record and share their daily lives through applications such as Facebook. In this context, a point-of-interest recommendation system has emerged to help users identify interesting locations from a vast amount of information. Compared with traditional recommendation methods, point-of-interest recommendation requires a more in-depth exploration of users' historical trajectories to generate accurate predictions.
[0003] When solving the point-of-interest recommendation task, current research mainly focuses on capturing the information embedded in users' trajectories through representation learning. Among various representation learning methods, decoupled representation learning has become an important method because it can effectively model the complexity and multi-dimensional features of users' behaviors. Specifically, this method decouples and explicitly models different potential influencing factors, thus enabling a more detailed understanding of the various aspects that affect the user decision-making process. For example, the DRAN method uses an attention mechanism to capture and represent multi-dimensional influencing factors respectively, improving the interpretability and expressiveness of the learned trajectory representations. At the same time, semantic factors have also been proven crucial in various artificial intelligence applications, such as electronic product recommendations and news recommendations. In the point-of-interest recommendation task, some studies have also demonstrated the importance of semantics. For example, DSDRec uses semantic information to construct users' short-term and long-term preferences, thereby obtaining richer semantic representations.
[0004] Although the above methods have achieved relatively advanced performance, the present invention believes that the current research methods still have limitations that restrict the effectiveness of point-of-interest recommendation. On the one hand, in the point-of-interest recommendation task, due to the lack of high-quality text data in the check-in dataset, it is difficult to obtain high-quality trajectory semantic representations. Current research mainly focuses on semantic modeling of users' trajectory data to obtain semantic representations for prediction. For example, DSMR designed multiple text templates to convert check-in sequences into natural language sentences, thereby extracting semantic representations. However, this method can still only generate limited semantic representations, making it difficult to fully explore the potential semantic associations between trajectories, and thus hindering the accurate characterization of users' behaviors in various semantic contexts.
[0005] On the other hand, the interaction between users and points of interest is usually affected by various factors, including time distribution, regional characteristics, and user preferences. However, most existing graph- or hypergraph-based methods only focus on the simple interaction relationship between users and points of interest, while ignoring these important factors. For example, HyperSE only considers the global interaction hypergraph, resulting in a more entangled representation. Although some recent studies (such as DCHL) have achieved good results through decoupled representation learning, these methods mainly focus on transfer relationships and rely on simple geographical distance thresholds. Therefore, they fail to capture multi-scale user behaviors, spatial clustering phenomena, and the importance changes of points of interest simultaneously, resulting in an incomplete modeling of user behavior patterns. Summary of the Invention
[0006] In view of the above problems existing in the prior art, the technical problem to be solved by the present invention is: how to improve the prediction accuracy of the user's next point of interest.
[0007] The present invention proposes a point of interest recommendation method based on trajectory semantic learning to effectively capture semantic information from trajectory data, thereby constructing a hypergraph with semantic awareness; the present invention combines semantic representation and structural modeling, proposes a multi-dimensional decoupled representation method at the point of interest level, and then introduces a dual-channel self-supervised alignment mechanism to effectively align the representations at the trajectory level and the point of interest level.
[0008] To solve the above technical problems, the present invention adopts the following technical solutions:
[0009] A point of interest recommendation method based on trajectory semantic learning, comprising the following steps:
[0010] S100: Construct a point of interest recommendation model TSLMPR, where TSLMPR includes a trajectory-level representation learning module, a point of interest-level representation learning module, and a dual-channel self-supervised alignment module;
[0011] S200: Select a publicly available user check-in dataset D, and each check-in information in D is used as a sample, and each sample includes three types of information: time distribution, geographical features, and user sequence;
[0012] Take all samples in D as the input of the trajectory-level representation learning module, and output a trajectory fusion semantic representation M tra ;
[0013] Take all samples in D as the input of the point of interest-level representation learning module, and output a point of interest fusion representation M poi ;
[0014] S300: Construct a loss function of TSLMPR for training TSLMPR;
[0015] Set the number of training iterations, and set M tra and M poi as the input of the dual-channel self-supervised alignment module, and use the Adam optimizer to train TSLMPR. Stop training when no longer changes or the number of training iterations reaches the maximum value. At this time, the trained interest point recommendation model TSLMPR’ is obtained;
[0016] S400: Input the historical trajectory U of the user to be predicted into TSLMPR’, and output the prediction list U’ of the next interest point of the user to be predicted.
[0017] Preferably, in S200, the calculation process of obtaining M tra is as follows:
[0018] S210: Convert all trajectory samples in D into text prompt statements;
[0019] S211: Use the pre-trained language model PLM to represent all text prompt statements as deep semantic features S tra , and the calculation formula is as follows:
[0020]
[0021] where, P tra represents the text prompt statement, represents the PLM operation with hyperparameter φ;
[0022] S212: Use the K-means clustering algorithm to perform clustering operations on all S tra , and construct a semantic-aware hypergraph through the clustering results The expression is as follows:
[0023]
[0024] where, K represents K clustering results, V (c) represents the set of nodes in, E (c) represents the set of hyperedges in;
[0025] S213: Process G (c) through the globally normalized hypergraph convolutional network GN-HGCN to obtain the multi-dimensional hypergraph representation X tra , and the calculation expression is as follows:
[0026]
[0027] where, represents the node embedding updated by the k-th layer of GN-HGCN, Dtrav and D trae represent the node degree matrix and the hyper - edge degree matrix respectively; H tra represents the incidence matrix of G (c) ; W tra represents the diagonal weight matrix; k represents the number of layers of GN - HGCN;
[0028] S214: Obtain the user representation from the trajectory samples Fuse X user with S tra to obtain the user trajectory semantic representation E tra , and the calculation formula is as follows:
[0029] E tra =ω u [X user ||σ(Drop(ω sem S tra ))]
[0030] where, represents the dimension transformation matrix, || represents the vector concatenation operation, σ represents the LeakyReLU activation function, Drop represents the Dropout operation, represents the dimension transformation matrix, |d s | and |d τ | represent the dimension of the deep semantic features obtained through the PLM and the embedding dimension of the deep semantic features after dimension transformation;
[0031] S215: Adopt an adaptive fusion mechanism to fuse E tra and X tra to obtain M tra , and the calculation formula is as follows:
[0032] M tra =(1 - λ - k )·E tra +λ k ·X tra
[0033] where, λ k represents the dynamic weight coefficient calculated through the Sigmoid function.
[0034] Preferably, in the S200, the calculation process of obtaining M poi is as follows:
[0035] S220: Construct a multi - scale time - perspective hypergraph based on the time distribution, a regional - perspective hypergraph based on the geographical features, and a user - perspective hypergraph based on the user sequence;
[0036] Constructing a multi-scale time perspective hypergraph: The multi-scale time perspective hypergraph includes a time period perspective hypergraph and a day perspective hypergraph: The time period perspective hypergraph G seg The calculation expression is as follows:
[0037] G seg =(V seg , E seg )
[0038] Among them, the size of the time period in the time period perspective hypergraph is Seg, V seg represents the node set in the time period perspective hypergraph, and E seg represents the hyperedge set in the time period perspective hypergraph;
[0039] The calculation expression of the day perspective hypergraph G day is as follows:
[0040] G day =(V day , E day )
[0041] Among them, V day represents the node set in the day perspective hypergraph, and E day represents the hyperedge set in the day perspective hypergraph;
[0042] Constructing a regional perspective hypergraph: The calculation expression of the regional perspective hypergraph G region is as follows:
[0043] G region =(V region , E region )
[0044] Among them, V region represents the node set in the regional perspective hypergraph, and E region represents the hyperedge set in the regional perspective hypergraph; Constructing a user perspective hypergraph: The calculation expression of the user perspective hypergraph G user is as follows:
[0045] G user =(V user , E user )
[0046] Among them, V user represents the node set in the user perspective hypergraph, and E user represents the hyperedge set in the user perspective hypergraph;
[0047] S221: Using G seg and G day to calculate the multi-scale time perspective hypergraph feature I t ; Using G region to calculate the regional perspective hypergraph feature Ir ; Using G user to calculate the perspective hypergraph representation I of the computational region u ; The calculation process is as follows:
[0048] First, aggregate the information msg from nodes to hyperedges, and the calculation expression is as follows:
[0049]
[0050] where D e represents the diagonal matrix of hyperedge degrees, H T represents the transposed matrix of the incidence matrix of the perspective hypergraph, and N represents the node embedding;
[0051] Second, propagate the updated hyperedge feature Tran n→e back to the nodes to get Tran e→n , and the calculation expression is as follows:
[0052]
[0053] where I k represents the embedding vector of the k-th layer, and D v is the diagonal matrix of node degrees;
[0054] Finally, average the embedding vectors obtained for each layer of the perspective hypergraph to generate the final node representation, and the calculation expression is as follows:
[0055]
[0056] where K represents the total number of layers of the perspective hypergraph convolution layer;
[0057] When N takes the embedded nodes in G seg and G day , I final = I t ; When N takes the embedded nodes in G region , I final = I r ; When N takes the embedded nodes in G user , I final = I u ;
[0058] S222: Fuse I t , I r and I u to obtain M poi , and the calculation expression is as follows:
[0059]
[0060] where Denotes the vector concatenation operation, ω poi Denotes the learnable weight matrix.
[0061] Preferably, in S300, the loss function of TSLMPR is constructed The content steps are as follows:
[0062] S310: Construct the trajectory-level representation loss using the InfoNCE loss and the corresponding point-of-interest-level representation loss The calculation expressions are as follows:
[0063]
[0064] Among them, and denote the trajectory fusion semantic representation and the point-of-interest fusion representation of the trajectories of the same user, and denote the trajectory fusion semantic representation and the point-of-interest fusion representation of the trajectories of different users; s j denotes the current user's trajectory, s k denotes other trajectories, S u denotes the set of user trajectories;
[0065] S320: and Synthesize the self-supervised loss The calculation expressions are as follows:
[0066]
[0067] S330: Aggregate all M 兴趣点 and M tra to obtain M fin The calculation expression is as follows:
[0068]
[0069] Among them, W1 and W2 denote learnable matrices, M cat denotes the class embedding of the point of interest, M time denotes the time embedding of the point of interest;
[0070] S340: Calculate Q, K, V of M fin through the multi-head self-attention mechanism. The calculation expressions are as follows:
[0071] Q = M fin W Q , K = M fin W K , V = M fin W V
[0072] Among them, W Q , W K , W V all represent learnable parameters, and Q, K, V represent the query vector, key vector, and value vector in the multi-head self-attention mechanism;
[0073] S350: Use the multi-head self-attention mechanism to process Q to obtain MultiHead(Q, K, V), and apply a fully connected neural network to process MultiHead(Q, K, V) to obtain the final trajectory sequence representation M all , and the calculation expression is as follows:
[0074] M all = FNN(MultiHead(Q, K, V))
[0075] MultiHead(Q, K, V) = Concat(head1,..., head i ,..., head h )W O
[0076]
[0077] Among them, head i represents the output of the i-th attention head in the multi-head self-attention mechanism, and W O represents the linear transformation matrix, represents the query weight matrix of the i-th attention head, represents the key weight matrix of the i-th attention head, represents the value weight matrix of the i-th attention head, d represents the dimension of each vector in the multi-head self-attention mechanism, and FNN(*) represents the fully connected neural network;
[0078] S360: Adopt a multi-task learning strategy and apply M all to calculate and The calculation expression is as follows:
[0079]
[0080] Among them, represents the output prediction value of the point of interest, represents the output prediction value of the time of the point of interest, represents the output prediction value of the category of the point of interest; W poi , W time , W cat represent learnable parameters, b p , b t , bc respectively represent and the biases of the respective learnable parameters;
[0081] S370: Use and the cross-entropy loss function to calculate the loss function of the predicted point of interest Use and the cross-entropy loss function to calculate the loss function of the predicted point-of-interest category Use and the root mean square loss function to calculate the loss function of the predicted point-of-interest time The calculation expression is as follows:
[0082]
[0083] where, F ce represents the cross-entropy loss function, F m represents the root mean square loss function, y poi is the actual point-of-interest value, y cat represents the actual point-of-interest category, y time represents the actual point-of-interest time;
[0084] S380: Use to calculate the loss function of the recommendation The calculation expression is as follows:
[0085]
[0086] where, N represents the estimated parameter;
[0087] S390: Integrate and to obtain the total loss function of TSLMPR The calculation expression is as follows:
[0088]
[0089] where, μ represents the hyperparameter used to balance the optimization objective.
[0090] Compared with the prior art, the present invention has at least the following advantages:
[0091] 1. Aiming at the problem that the semantic information captured by many existing methods is limited and it is difficult to mine the potential semantic associations between trajectories, the present invention better understands the semantic associations between trajectories and identifies potential patterns through trajectory-level representation learning. To this end, semantic clustering and a semantic-aware hypergraph structure are introduced to organize trajectory information into a structured representation. Specifically, first, user trajectories are constructed into corresponding prompts, and then a pre-trained language model is used to obtain the semantic representation of each trajectory; subsequently, these representations are semantically clustered, and a semantic-aware hypergraph is constructed based on the clustering results. This method generates a structured representation, which helps to better understand the semantic associations between trajectories.
[0092] 2. Aiming at the problem that most methods only model simple user-interest point interactions or fail to fully utilize multi-dimensional latent factors, resulting in inaccurate extraction of behavior patterns, the present invention performs decoupled representation at the interest point level to more accurately capture patterns in different dimensions, including temporal regularity, spatial clustering effect, and user preferences. Specifically, in the dimension of time distribution, there are multiple time patterns at different scales, so the present invention constructs a multi-scale time view hypergraph: the small-scale time period view hypergraph reflects local change patterns, while the large-scale daily view hypergraph captures global change patterns. For regional features, the present invention constructs a regional view hypergraph through cluster analysis of geographical locations to reveal the spatial clustering effect. In terms of user preferences, since different users have different access tendencies to interest points, the present invention constructs a frequency-aware user view hypergraph based on the interaction frequency between users and interest points.
[0093] 3. Given the potential differences between different-level representations, the present invention further adopts a two-channel self-supervised alignment mechanism to achieve the matching and alignment between trajectory-level representation and interest point-level representation. This method not only ensures the co-expression ability of multi-dimensional representations but also effectively improves the model's ability to capture potential patterns inside trajectories.
[0094] 4. The TSLMPR model of the present invention can alleviate the data sparsity problem. At the trajectory level, the present invention performs semantic clustering of trajectories and constructs a semantic-aware hypergraph to capture the semantic associations in trajectories, so that short trajectories can use these associations for more accurate prediction. At the same time, at the interest point level, the present invention constructs hypergraphs from three different dimensions, and the generated fine-grained interest point features can accurately depict the potential preferences of users for specific locations, which enables the model of the present invention to have strong recognition and reasoning capabilities even under sparse data conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0095] Figure 1 Schematic diagram of the model framework of the present invention;
[0096] Figure 2Schematic diagram of the check-in sequence conversion script of the present invention;
[0097] Figure 3 Results of the ablation experiment of the present invention;
[0098] Figure 4 Performance comparison of the trajectory cold start of the present invention on NYC;
[0099] Figure 5 Performance comparison of the hyperparameters K and μ in NYC. Detailed implementation manners
[0100] The present invention will be further described in detail below.
[0101] The present invention proposes a next POI recommendation method framework that combines trajectory semantic learning and multi-dimensional POI representation. First, the present invention uses semantic learning at the trajectory level to deeply understand the semantic relationships between trajectories and reveal potential patterns; next, multi-dimensional representation decoupling at the POI level is performed to more accurately capture the patterns within each dimension; finally, the present invention uses a two-channel self-supervised alignment mechanism to synchronize the trajectory-level representation and the POI-level representation.
[0102] See Figures 1 - 5 , a POI recommendation method based on trajectory semantic learning, comprising the following steps:
[0103] S100: Construct a POI recommendation model TSLMPR, where TSLMPR includes a trajectory-level representation learning module, a POI-level representation learning module, and a two-channel self-supervised alignment module;
[0104] S200: Select a publicly available user check-in dataset D. Each check-in information in D is used as a sample, and each sample includes three types of information: time distribution, geographical features, and user sequence;
[0105] All samples in D are used as the input of the trajectory-level representation learning module, and the output is the trajectory fusion semantic representation M tra ; The check-in sequence conversion script generally converts the trajectory samples into the text prompt information required by the model according to actual needs, and the trajectory is converted into the text information prompt(traj) according to the Figure 2 template shown;
[0106] All samples in D are used as the input of the POI-level representation learning module, and the output is the POI fusion representation M poiThe interaction between users and points of interest is affected by various factors, including the distribution of access time, geographical features, as well as information such as user sequences and user point - of - interest categories. Traditional point - of - interest embedding methods usually mix these factors together, resulting in a low representation quality. The method of the present invention decouples the point - of - interest representation into multiple dimensions, so as to better capture the pattern information and characteristics in each dimension;
[0107] In S200, obtain M tra The calculation process is as follows:
[0108] S210: Convert all trajectory samples in D into text prompt statements;
[0109] S211: Use the pre - trained language model PLM to represent all text prompt statements as deep semantic features S tra , and the calculation formula is as follows:
[0110]
[0111] Among them, P tra represents the text prompt statement, represents the PLM operation with hyperparameter φ;
[0112] S212: Use the K - means clustering algorithm to perform clustering operations on all S tra and construct a semantic - aware hypergraph through the clustering results The expression is as follows:
[0113]
[0114] Among them, K represents K clustering results, V (c) represents the set of nodes in, E (c) represents the set of hyper - edges in;
[0115] S213: Process G (c) through the globally normalized hypergraph convolutional network GN - HGCN to obtain a multi - dimensional hypergraph representation X tra , and the calculation expression is as follows:
[0116]
[0117] Among them, represents the node embedding updated by the k - th layer of GN - HGCN, D trav and D trae represent the node degree matrix and the hyper - edge degree matrix respectively; H tra represents G (c) 's incidence matrix; W tradenotes the diagonal weight matrix; k denotes the number of layers of GN-HGCN;
[0118] S214: Obtain the user representation from the trajectory samples Let X user be fused with S tra to obtain the user trajectory semantic representation E tra , and the calculation expression is as follows:
[0119] E tra = ω u [X user ||σ(Drop(ω sem S tra ))]
[0120] where, denotes the dimension transformation matrix, || denotes the vector concatenation operation, σ denotes the LeakyReLU activation function, and Drop denotes the Dropout operation, denotes the dimension transformation matrix, |d s | and |d τ | represent the dimension of the deep semantic features obtained by the PLM and the embedding dimension of the deep semantic features after dimension transformation;
[0121] S215: Adopt an adaptive fusion mechanism to fuse E tra and X tra to obtain M tra , and the calculation expression is as follows:
[0122] M tra = (1 - λ k )·E tra + λ k ·X tra
[0123] where, λ k denotes the dynamic weight coefficient calculated by the Sigmoid function.
[0124] This part of the function is mainly used to identify trajectories with similar semantic patterns to further explore and understand the potential semantic association patterns in user trajectories. The K-means clustering algorithm, the Sigmoid function, the pre-trained language model PLM, and the adaptive fusion mechanism are all existing technologies.
[0125] In the above S200, the calculation process of obtaining M poi is as follows:
[0126] S220: Construct a multi-scale time perspective hypergraph based on the time distribution, a regional perspective hypergraph based on the geographical features, and a user perspective hypergraph based on the user sequence;
[0127] Constructing a multi-scale time perspective hypergraph: The multi-scale time perspective hypergraph includes a time period perspective hypergraph and a daily perspective hypergraph: The time period perspective hypergraph G seg The calculation expression is as follows:
[0128] G seg =(V seg , E seg )
[0129] wherein, the size of the time period in the time period perspective hypergraph is Seg, V seg represents the node set in the time period perspective hypergraph, and E seg represents the hyperedge set in the time period perspective hypergraph; each point of interest in the time period perspective hypergraph is regarded as a node, and each hyperedge contains points of interest within the same time period; its incidence matrix is used to depict the relationship between points of interest at the time period level;
[0130] The calculation expression of the daily perspective hypergraph G day is as follows:
[0131] G day =(V day , E day )
[0132] wherein, V day represents the node set in the daily perspective hypergraph, and E day represents the hyperedge set in the daily perspective hypergraph;
[0133] The daily perspective hypergraph is set to capture a broader time scale, and its meaning is used to represent the daily-level time relationship between points of interest that appear on the same day. Its incidence matrix is then used to represent the time relationship between points of interest at the daily level.
[0134] Constructing a regional perspective hypergraph: The calculation expression of the regional perspective hypergraph G region is as follows:
[0135] G region =(V region , E region )
[0136] wherein, V region represents the node set in the regional perspective hypergraph, and E region represents the hyperedge set in the regional perspective hypergraph;
[0137] Using the K-means clustering algorithm, the overall region is divided into R sub-regions based on geographical features. Each sub-region contains a group of POls (points of interest), representing an independent region of interest; formally, see G regionThe calculation expression, where the node is Pol; in G region Each hyperedge contains Pols located in the same sub-region, and the incidence matrix
[0138] characterizes the geographical relationships of points of interest at the regional level.
[0139] Construct a user-perspective hypergraph: The calculation expression of the user-perspective hypergraph G user is as follows:
[0140] G user =(V user , E user )
[0141] where V user represents the set of nodes in the user-perspective hypergraph, and E user represents the set of hyperedges in the user-perspective hypergraph;
[0142] A weighted user-view hypergraph proposed here, where the nodes are points of interest, is used to systematically model user-point of interest interactions. In G user , each hyperedge consists of all the points of interest visited by a single user, and its incidence matrix is used to describe the relationships of these points of interest at the user level.
[0143] S221: Calculate the multi-scale time-perspective hypergraph representation I seg using G day and G t ; calculate the regional-perspective hypergraph representation I region using G r ; calculate the regional-perspective hypergraph representation I user using G u ; The calculation process is as follows:
[0144] First, aggregate the information msg from nodes to hyperedges, and the calculation expression is as follows:
[0145]
[0146] where D e represents the diagonal matrix of hyperedge degrees, H T represents the transpose matrix of the incidence matrix of the perspective hypergraph, and N represents node embeddings; through this transfer process, the features of each hyperedge are updated and reconstructed, thus realizing information feature transfer and fusion based on the perspective hypergraph structure;
[0147] Second, propagate the updated hyperedge features Tran n→e back to the nodes again to get Tran e→n , and the calculation expression is as follows:
[0148]
[0149] Among them, I k represents the embedding vector of the k-th layer, and D v is the diagonal matrix of node degrees; through this step, the further fusion and enhancement of node representations are completed, and the feature representations of each node are updated again, incorporating the information propagated back by the associated hyperedges, thereby realizing the feature propagation and fusion based on the hypergraph structure.
[0150] Finally, the embedding vectors obtained from each layer of the perspective hypergraph are averaged to generate the final node representation, and the calculation expression is as follows:
[0151]
[0152] Among them, K represents the total number of layers of the perspective hypergraph convolutional layer;
[0153] Through the two calculation steps of msg and I k DPH-HGNN can capture the collaborative signals, thus helping to discover the interaction relationships; by adding a multi-layer structure to the perspective hypergraph, higher-order correlations can be explored, and the information can be transmitted from the embedding vector of the nodes in the (k - 1)-th layer to the embedding vector of the nodes in the k-th layer; at the same time, a residual connection is introduced here to alleviate the problem of gradient disappearance during the propagation process; finally, the average value of the embedding vectors obtained from each layer is calculated to generate the final node representation.
[0154] When N takes the embedded nodes in G seg and G day , I final = I t ; when N takes the embedded nodes in G region , I final = I r ; when N takes the embedded nodes in G user , I final = I u ;
[0155] For the multi-scale time perspective hypergraph: for the time period hypergraph G seg , use I final , I k , and the three calculation expressions of msg to iteratively propagate and fuse the node and hyperedge features, thereby mining the short-term behavior patterns and obtaining the fine-grained time period perspective hypergraph representations; subsequently, aggregate these fine-grained features at a larger time scale, and also use I day and I final , I k, The three calculation expressions of msg reveal the long-term behavior trend to obtain a fine-grained day-perspective hypergraph representation; by combining the time-period perspective hypergraph representation and the day-perspective hypergraph representation, the multi-scale time-perspective hypergraph representation I is finally obtained t ;
[0156] For the region-perspective hypergraph G region : Use I final 、I k 、msg three calculation expressions, transfer the region-based behavior features from nodes to hyperedges and then back to nodes, continuously update the node representations, and finally obtain the region-view hypergraph representation I r ;
[0157] For the user-perspective hypergraph G user : Use I final 、I k 、msg three calculation expressions, iteratively transfer and fuse the user-level features between nodes and hyperedges, and finally obtain the user-view hypergraph representation I u .
[0158] S222: Fuse I t 、I r and I u to obtain M poi , and the calculation expression is as follows:
[0159]
[0160] Among them, represents the vector concatenation operation, and ω poi represents the learnable weight matrix.
[0161] The present invention adopts a two-stage hierarchical hypergraph neural network (DPH-HGNN) to iteratively capture the high-order associations between interest points.
[0162] S300: Construct the loss function of TSLMPR for training TSLMPR;
[0163] Set the number of training iterations, use M tra and M poi as the input of the dual-channel self-supervised alignment module, and use the Adam optimizer to train TSLMPR. When no longer changes or the number of training iterations reaches the maximum value, stop training. At this time, the trained interest point recommendation model TSLMPR’ is obtained; the learning rate of the Adam optimizer is set to 10 -3 , and the weight decay coefficient is set to 8*10 -3 ;
[0164] Construct the loss function of TSLMPR in S300 The content steps are as follows:
[0165] S310: Construct the trajectory-level representation loss using the InfoNCE loss and the corresponding point-of-interest-level representation loss The calculation expression is as follows:
[0166]
[0167] where and represent the trajectory fusion semantic representation and the point-of-interest fusion representation of the trajectories of the same user, and represent the trajectory fusion semantic representation and the point-of-interest fusion representation of the trajectories of different users; s j represents the current user's trajectory, s k represents other trajectories, S u represents the set of user trajectories;
[0168] S320: and synthesize the self-supervised loss The calculation expression is as follows:
[0169]
[0170] In practical applications, there may still be a certain difference between these two representations. Therefore, the present invention proposes a self-supervised learning objective to align these two representations. The core idea is to ensure that for the trajectories of the same user, the similarity between its trajectory-level representation M tra and its corresponding point-of-interest-level representation M 兴趣点 is higher than the similarity between this trajectory-level representation and the trajectory-level representations of other users. Therefore, the present invention uses the InfoNCE loss to achieve the above objective.
[0171] S330: Aggregate all M 兴趣点 and M tra to obtain M fin The calculation expression is as follows:
[0172]
[0173] where W1 and W2 represent learnable matrices, M cat represents the class embedding of the point of interest, M time represents the temporal embedding of the point of interest;
[0174] S340: Calculate M through the multi-head self-attention mechanism finThe calculation expressions for Q, K, and V are as follows:
[0175] Q = M fin W Q , K = M fin W K , V = MfinWV
[0176] Among them, W Q , W K , W V all represent learnable parameters. Q, K, and V represent the query vector, key vector, and value vector in the multi-head self-attention mechanism. The multi-head self-attention mechanism is a prior art;
[0177] S350: Use the multi-head self-attention mechanism to process Q to obtain MultiHead(Q, K, V), and apply a fully connected neural network to process MultiHead(Q, K, V) to obtain the final trajectory sequence representation M all , and the calculation expression is as follows:
[0178] M all = FNN(MultiHead(Q, K, V))
[0179] MultiHead(Q, K, V) = Concat(head1,..., head i ,..., head h )W O
[0180]
[0181] Among them, head i represents the output of the i-th attention head in the multi-head self-attention mechanism, and W O represents the linear transformation matrix,<??>represents the query weight matrix of the i-th attention head,<??>represents the key weight matrix of the i-th attention head,<??>represents the value weight matrix of the i-th attention head, d represents the dimension of each vector in the multi-head self-attention mechanism, and FNN(*) represents the fully connected neural network;
[0182] S360: Adopt a multi-task learning strategy and apply M all to calculate and The calculation expressions are as follows:
[0183]
[0184] Among them, represents the output prediction value of the point of interest, It should be noted that there are some tags like , , in the original text where the content seems to be incomplete or incorrect in the given form. I have translated as accurately as possible based on the available information. If there are specific corrections or clarifications for those tags, the translation can be adjusted accordingly.The output predicted value representing the point of interest time The output predicted value representing the point of interest category; W poi , W time , W cat Represents the learnable parameter, b p , b t , b c Respectively represent and The biases of the respective corresponding learnable parameters;
[0185] S370: Calculate the loss function of the predicted point of interest using and the cross-entropy loss function Using and the cross-entropy loss function to calculate the loss function of the predicted point of interest category Using and the root mean square loss function to calculate the loss function of the predicted point of interest time Both the cross-entropy loss function and the root mean square loss function are existing technologies.
[0186]
[0187] Among them, F ce Represents the cross-entropy loss function, F m Represents the root mean square loss function, y poi The actual point of interest value, y cat Represents the actual point of interest category, y time Represents the actual point of interest time;
[0188] S380: Calculate the loss function of the recommendation using The calculation expression is as follows: The calculation expression is as follows:
[0189]
[0190] Among them, N represents the estimated parameter; to prevent the time loss from being ignored, a coefficient N will be multiplied by the time loss function of the point of interest, and the specific value of N is set according to the prediction range of the specific model. Here, N = 10 is set;
[0191] S390: Integrate and to obtain the total loss function of TSLMPR The calculation expression is as follows:
[0192]
[0193] Among them, μ represents the hyperparameter used to balance the optimization objective.
[0194] S400: Input the historical trajectory U of the user to be predicted into TSLMPR', and output the prediction list U' of the next point of interest of the user to be predicted.
[0195] Experimental Content and Results
[0196] The present invention designs and conducts a large number of experiments from the following multiple perspectives to verify the effectiveness of the proposed TSLMPR model.
[0197] 1. Dataset Selection
[0198] The present invention selects two real-world datasets for experiments: Foursquare-NYC and Foursquare-TKY. The Foursquare-NYC dataset is collected in New York City, and the Foursquare-TKY dataset is collected in Tokyo City, with a time span of 11 months. These datasets contain user check-in records, including user ID, location ID, check-in timestamp, and geographical information such as latitude, longitude, and location category.
[0199] In terms of data preprocessing, we first filter out locations with less than 10 check-ins and users with less than 5 check-ins. Subsequently, the user check-in records are sorted in chronological order and segmented in units of 24 hours. Finally, we divide the processed data into a training set (80%), a validation set (10%), and a test set (10%). The detailed statistical information of these datasets is given in Table 1.
[0200] Table 1 Detailed Information of Datasets
[0201]
[0202] 2. Experimental Details
[0203] The present invention conducts experiments using PyTorch on the hardware platform (NVIDIA RTX3060 GPU). During the model training process, the Adam optimizer is adopted, and the learning rate is set to 10 -3 , and the weight decay coefficient is also set to 10 -3 ; the number of convolutional layers of the hypergraph neural network is 3, and the embedding dimension d t is set to 128; the embedding dimensions of time and category are both set to 32, and the user embedding dimension is also d t ; the final sequence recommendation representation dimension d s is 320, and the embedding dimension d of the pre-trained language model (PLM) pIt is 768; other hyperparameters include K = 25, R = 100, Seg = 5, and μ = 0.1, the batch size is 20, and the number of training epochs is 100; for the comparative baseline method, the present invention tries to follow its original parameter settings and uses the same dataset for training and evaluation.
[0204] 3. Evaluation Metrics
[0205] The present invention uses two common evaluation metrics, namely Accuracy@K (Acc@K) and Mean Reciprocal Rank (MRR), to measure the effectiveness of the recommendation model. Let n denote the total number of samples to be predicted, which is the number of trajectories in the dataset in this task. Then Acc@K and MRR can be defined as follows:
[0206]
[0207] where Γ(·) represents the indicator function, l true represents the true value, and E pred represents the top-k predicted values of the model. If the true value appears among these top-k predicted values, the indicator function returns 1, otherwise it returns 0. The value range of Accuracy@K (denoted as Acc@K) is from 0 to 1, and the larger the value, the more accurate the model prediction.
[0208] 4. Comparative Baseline Models
[0209] The following baselines are used to evaluate the performance of the model of the present invention:
[0210] SASRec: A powerful sequential recommendation baseline model based on the attention mechanism.
[0211] STGN: Based on the long short-term memory network, using a spatio-temporal gating mechanism to capture the long-term and short-term interests of users during position transitions.
[0212] STAN: Based on the self-attention mechanism, using a spatio-temporal matrix and a novel bidirectional flow attention mechanism for modeling.
[0213] DRAN: A model that learns to disentangle position representations by taking distance and transition as key factors, integrating spatio-temporal information through a soft attention mechanism.
[0214] GETNext: A Transformer-based model that uses a user-agnostic global trajectory flow graph to improve the prediction of the next point of interest and introduces a graph convolutional network to propagate user preferences.
[0215] DSMR: Generate prompts from the textual categories of users' short-term context trajectories, summarize users' trajectories using a pre-trained model, and then train a Transformer encoder for point-of-interest prediction.
[0216] CrossDR: Perform next point-of-interest recommendation through spatio-temporal diagram decoupling and frequency-domain embedding.
[0217] DCHL: Capture dynamic user preferences and complex point-of-interest transitions through decoupled hypergraph learning and cross-view contrastive learning.
[0218] HyperSE: A method that extracts collaborative signals using global and local hypergraphs while integrating deep semantic features to enhance trajectory modeling.
[0219] 5. Performance Comparison
[0220] Table 2 Performance Comparison on NYC and TKY Datasets
[0221]
[0222] Table 2 shows the performance comparison between the baseline models and the models proposed in the present invention. Bold indicates the best performance under the same metrics, and underlined indicates the second-best performance. The TSLMPR model of the present invention outperforms all baseline models in each metric on all real-world datasets, which clearly demonstrates the effectiveness of the algorithm proposed in the present invention.
[0223] In the comparative experiment, it can be observed that compared with traditional methods (such as SASRec, STGN, and STAN), graph-based algorithms (such as DRAN and GETNext) achieve better performance by introducing graph structure information. For semantic-based methods, DSMR enhances the semantic information of user representations but ignores the topological structure, thus affecting its performance. For decoupled representation learning methods, CrossDR separates spatio-temporal relationships through thresholding, but its simple graph structure limits better performance. At the same time, DCHL designs three different hypergraphs but only focuses on transition relationships, relies on simple geographical distance thresholds, and is limited to basic interactions, thus hindering the fine-grained analysis of potential factors. For methods that fuse hypergraphs and semantics, HyperSE combines limited semantic representations with global-local hypergraphs to introduce higher-order collaborative signals. However, its semantic extraction method is limited, and its hypergraph construction ignores various factors.
[0224] In contrast, the model TSLMPR of the present invention achieves the best performance on all datasets. The main reason lies in its trajectory-level representation learning, which better captures the semantic relationships between trajectories. In addition, it adopts multi-dimensional representation decoupling at the point-of-interest level, enabling more accurate modeling of patterns in individual dimensions. Finally, the dual-channel self-supervised alignment mechanism aligns the representations at two levels.
[0225] 6. Ablation Experiments
[0226] Ablation experiments were conducted on the key modules of the model TSLMPR of the present invention on the NYC dataset to evaluate the impact of different modules on the overall performance. The experimental results are shown in Figure 3 where "w / o" means the corresponding module is removed. In this part, the present invention mainly focuses on the contributions brought by the following components: (1) Trajectory-level Representation Learning Module (TLM); (2) User-view Hypergraph (UV); (3) Region-view Hypergraph (RV); (4) Multi-scale Temporal-view Hypergraph (MTV); (5) Dual-channel Self-supervised Alignment Module (DSA).
[0227] First of all, removing TLM will prevent the extraction of structured semantic representations from the trajectory sequence, thus hindering the understanding of the semantic relationships between trajectories and ultimately leading to a decline in overall performance. At the same time, removing UV will lose the ability to capture user-level relationships between points of interest, which will hinder the model from identifying changes in user access frequency or preference intensity and ultimately reduce the overall performance.
[0228] In addition, removing RV will be unable to capture the spatial distribution and associations of points of interest within sub-regions, thus impeding effective region-level behavior modeling and ultimately leading to a decline in overall performance. Removing MTV will hinder multi-scale temporal analysis, making it difficult to interpret local and global patterns from a temporal perspective, thus affecting the final performance. Finally, removing DSA, that is, removing the dual-channel self-supervised alignment module, will result in misalignment between the representations at two levels, thus having a negative impact on the model performance. Therefore, removing any module will reduce the model performance to varying degrees, which fully verifies the effectiveness of the proposed modules.
[0229] 7. Trajectory Cold-start Performance Analysis
[0230] This problem further verifies whether the TSLMPR model of the present invention can alleviate the data sparsity problem. The present invention sorts the trajectories in the test set by length, marks the top 20% as long trajectories, and the bottom 20% as short trajectories. The present invention uses HyperSE as the baseline model. Figure 4Shows the results of TSLMPR and HyperSE on the NYC dataset. The method of the present invention outperforms the baseline model in all groups. Notably, in the short trajectory group, the performance gap is more significant, indicating that the method of the present invention is more robust to data sparsity. This improvement can be attributed to the effective capture of potential trajectory information by the present invention at the trajectory level and the point of interest level. Especially for short trajectories, limited access records usually cannot reflect the overall behavior pattern. At the trajectory level, the present invention performs semantic clustering of trajectories and constructs a semantic-aware hypergraph to capture the semantic associations between trajectories, enabling short trajectories to utilize these associations for more accurate prediction. At the same time, at the point of interest level, the present invention constructs hypergraphs from three different dimensions, and the generated fine-grained point of interest features can accurately characterize the potential preferences of users for specific locations, which enables the model of the present invention to have strong recognition and reasoning capabilities even under sparse data conditions.
[0231] 8. Hyperparameter Analysis
[0232] This section will focus on studying the impacts caused by hyperparameters. Specifically, the purpose of the present invention is to analyze (1) the impact of the segment size Seg; (2) the impact of the number of regions R; (3) the impact of the number of semantic clusters K; and (4) the impact of the self-supervised coefficient μ.
[0233] Considering that the multi-scale time perspective hypergraph and the region perspective hypergraph play a key role in the model performance, the settings of the hyperparameters Seg and R are crucial. First, the size of the time period directly affects the model's ability to capture information at different time scales from trajectory data. A smaller time period can capture short-term changes and subtle time patterns, helping to identify rapidly changing behaviors, but may introduce noise due to data sparsity. On the contrary, a larger time period can capture long-term trends and stable behavior patterns, but may ignore short-term dynamics. To study the impact of the segment size Seg, the present invention conducted experiments with Seg set to {1, 2, 3, 4, 6, 8, 12, 24}. The experimental results in Table 3 show that when Seg is set to 3, corresponding to an 8-hour time period, TSLMPR performs best, successfully balancing the capture of fine-grained information and coarse-grained information.
[0234] In the regional perspective hypergraph, the number of regions R determines the level of spatial division and affects the model's understanding and utilization of spatial information. A larger number of regions provides a more detailed geographical segmentation, enabling the capture of more localized behavior patterns and subtle regional differences, thereby enhancing spatial recognition capabilities. However, if the number of regions is excessive, it may lead to insufficient data within each region, affecting the effectiveness of in-region modeling. Conversely, a smaller number of regions simplifies the geographical division and may overlook important regional differences, thus having a negative impact on user behavior modeling. To evaluate the impact of the number of regions R, the present invention conducted experiments with R set to {20, 50, 80, 100, 120, 150, 200, 250}. The experimental results in Table 3 show that when R is set to 100, the model performs best in most tasks. This setting can effectively capture the behavioral differences between regions while maintaining sufficient data volume within each region. Table 3 is as follows:
[0235] Table 3 Performance comparison of Seg and R on NYC
[0236]
[0237] In semantic clustering, the selection of the number of clusters is crucial. If the number of clusters is too small, it may not be able to capture the diversity of trajectory data, resulting in different semantic intents being grouped into the same class, thereby reducing the model's ability to identify deep semantic relationships. Conversely, if the number of clusters is too large, it will overly fragment the semantic space and weaken the model's ability to effectively capture and represent trajectory semantics. To study the impact of the number of clusters on semantic clustering, the present invention conducted experiments with K set to {5, 10, 20, 25, 30, 40, 50, 100}. As Figure 5 shown, when K = 25, the model performance is optimal, capable of accurately capturing the diversity of trajectory semantics while maintaining reasonable computational complexity and stability.
[0238] The self-supervised coefficient μ is used to balance the loss weights of self-supervised tasks to ensure effective alignment between trajectory-level and point-of-interest-level representations. If the coefficient μ is set too low, it will result in insufficient alignment and the inability to fully integrate information at different levels. If the coefficient μ is set too high, it will lead to overemphasis on alignment, possibly causing feature loss and thus having a negative impact on model performance. To evaluate the impact of the self-supervised coefficient μ, the present invention conducted experiments with μ set to {0.01, 0.05, 0.1, 0.2, 0.3, 0.5, 1, 5}. As Figure 5 shown, when the coefficient μ is set to 0.1, the model exhibits the best robustness and adaptability, capable of maintaining alignment between trajectory semantics and point-of-interest features without significantly losing feature information.
[0239] The method of the present invention proposes a trajectory-level representation learning framework using a semantic clustering mechanism to effectively capture semantic information from trajectory data, thereby constructing a semantic-aware hypergraph. The research of this method combines semantic representation and structural modeling, providing a promising direction for future research; next, this method proposes a multi-dimensional decoupled representation method at the point-of-interest level, which provides valuable insights and references for future research related to decoupling; finally, this method introduces a two-channel self-supervised alignment mechanism to effectively align the representations at the trajectory level and the point-of-interest level. The method of the present invention uses self-supervised learning for bidirectional alignment, providing valuable insights for the application of self-supervised methods in the point-of-interest recommendation task. In practical applications, extensive experiments based on two real-world datasets clearly show that the proposed TSLMPR always performs superiorly among various benchmark methods.
[0240] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.
Claims
1. A method for recommending points of interest based on trajectory semantic learning, characterized in that: It includes the following steps: S100: Construct an interest point recommendation model TSLMPR, where TSLMPR includes a trajectory-level representation learning module, an interest point-level representation learning module, and a dual-channel self-supervised alignment module; S200: Select a publicly available user check-in dataset D, and each check-in message in D is used as a sample. Each sample includes three types of information: time distribution, geographical features, and user sequence; Use all samples in D as the input of the trajectory-level representation learning module, and output the trajectory fusion semantic representation M tra ; Use all the samples in D as the input of the interest point-level representation learning module, and output the interest point fusion representation M poi ; S300: Construct the loss function of TSLMPR For training TSLMPR; Set the number of training iterations, and set M tra and M poi as the inputs of the dual-channel self-supervised alignment module. Use the Adam optimizer to train TSLMPR. Stop training when no longer changes or the number of training iterations reaches the maximum value. At this time, the trained interest point recommendation model TSLMPR’ is obtained; S400: Input the historical trajectory U of the user to be predicted into TSLMPR’, and output a prediction list U’ of the next interest point of the user to be predicted.
2. The method for recommending points of interest based on trajectory semantic learning according to claim 1, wherein: In the S200, obtain M tra The calculation process is as follows: S210: Convert all trajectory samples in D into text prompt statements; S211: Use a pre-trained language model PLM to represent all text prompt statements as deep semantic features S tra , and the calculation formula is as follows: Among them, P tra represents a text prompt statement, represents a PLM operation with a hyperparameter of φ; S212: Use the K-means clustering algorithm to cluster all S tra Perform clustering operations and construct a semantic-aware hypergraph H based on the clustering results Stra , and the expression is as follows: Among them, K represents K clustering results, and V (c) represents the set of nodes in (c) represents the set of hyperedges in; S213: Apply G (c) to the globally normalized hypergraph convolutional network GN-HGCN to obtain the multi-dimensional hypergraph representation X tra , and the calculation expression is as follows: Among them, represents the node embedding updated at the k-th layer of GN-HGCN, D trav and D trae represent the node degree matrix and the hyperedge degree matrix respectively; H tra represents the incidence matrix of G (c) ; W tra represents the diagonal weight matrix; k represents the number of layers of GN-HGCN; S214: Obtain user representations from the trajectory samples Let X user be fused with S tra to obtain the user trajectory semantic representation E tra , and the calculation expression is as follows: E tra = ω u [X user ||σ(Drop(ω sem S tra ))] Among them, represents a dimension transformation matrix, || represents a vector concatenation operation, σ represents a LeakyReLU activation function, and Drop represents a Dropout operation. represents a dimension transformation matrix, |d s | and |d τ | represent the dimension of the deep semantic features obtained through the PLM and the embedding dimension of the deep semantic features after dimension transformation; S215: Adopt an adaptive fusion mechanism to fuse E tra and X tra to obtain M tra , and the calculation expression is as follows: M tra = (1 - λ k )·E tra + λ k ·X tra Among them, λ k represents the dynamic weight coefficient calculated by the Sigmoid function.
3. The method for recommending points of interest based on trajectory semantic learning according to claim 2, wherein: In the above S200, M is obtained poi The calculation process is as follows: S220: Construct a multi-scale time perspective hypergraph based on the time distribution, a regional perspective hypergraph based on the geographical features, and a user perspective hypergraph based on the user sequence; Constructing a multi-scale time perspective hypergraph: The multi-scale time perspective hypergraph includes a time period perspective hypergraph and a day perspective hypergraph: The time period perspective hypergraph G seg The calculation expression is as follows: G seg = (V seg , E seg ) Among them, the size of the time period in the time period perspective hypergraph is Seg, and V seg represents the node set in the time period perspective hypergraph, and E seg represents the hyperedge set in the time period perspective hypergraph; Sky perspective supergraph G day The calculation expression is as follows: G day = (V day , E day ) Among them, V day represents the set of nodes in the celestial perspective hypergraph, and E day represents the set of hyperedges in the celestial perspective hypergraph; Constructing a hypergraph from a regional perspective: The hypergraph G from a regional perspective region The calculation expression is as follows: G region = (V region , E region ) Among them, V region represents the set of nodes in the region perspective hypergraph, and E region represents the set of hyperedges in the region perspective hypergraph; Constructing a hypergraph from the user perspective: The hypergraph G from the user perspective user has the following calculation expression: G user = (V user , E user ) Among them, V user represents the set of nodes in the user perspective hypergraph, and E user represents the set of hyperedges in the user perspective hypergraph; S221: Utilize G seg and G day to calculate the multi-scale time perspective hypergraph representation I t ; Utilize G region to calculate the regional perspective hypergraph representation I r ; Utilize G user to calculate the regional perspective hypergraph representation I u ; The calculation process is as follows: First, aggregate the information msg from nodes to hyperedges, and the calculation expression is as follows: Among them, D e represents the diagonal matrix of the hyper-degree, H T represents the transposed matrix of the incidence matrix of the perspective hypergraph, and N represents the node embedding; Secondly, the updated hyperedge feature Tran n→e is propagated back to the nodes to obtain Tran e→n , and the calculation expression is as follows: Among them, I k represents the embedding vector of the k-th layer, and D v is the diagonal matrix of node degrees; Finally, average the embedding vectors obtained from each layer of the perspective hypergraph to generate the final node representation, and the calculation expression is as follows: where K represents the total number of layers of the perspective hypergraph convolutional layer; When N takes the value of the embedded node in G seg and G day , I final = I t ; when N takes the value of the embedded node in G region , I final = I r ; when N takes the value of the embedded node in G user , I final = I u ; S222: Combine I t , I r and I u to obtain M poi . The calculation expression is as follows: Among them, represents a vector concatenation operation, and ω poi represents a learnable weight matrix.
4. The method for recommending points of interest based on trajectory semantic learning according to claim 3, characterized in that: Construct the loss function of TSLMPR in S300 The content steps are as follows: S310: Construct the trajectory-level representation loss using the InfoNCE loss and the corresponding point-of-interest-level representation loss The calculation expression is as follows: Among them, and represent the trajectory fusion semantic representation and the point of interest fusion representation of the trajectories of the same user, and represent the trajectory fusion semantic representation and the point of interest fusion representation of the trajectories of different users; s j represents the current user's trajectory, s k represents other trajectories, S u represents the set of user trajectories; S320: and synthesize the self-supervised loss The calculation expression is as follows: S330: Aggregate all M 兴趣点 and M tra to obtain M fin , and the calculation expression is as follows: Among them, W1 and W2 represent learnable matrices, M cat represents the category embedding of the point of interest, M time represents the temporal embedding of the point of interest; S340: Calculate M through the multi-head self-attention mechanism fin for Q, K, and V, and the calculation expressions are as follows: Q = M fin W Q , K = M fin W K , V = M fin W V Among them, W Q , W K , W V all represent learnable parameters, and Q, K, and V represent the query vector, key vector, and value vector in the multi-head self-attention mechanism; S350: Process Q using the multi-head self-attention mechanism to obtain MultiHead(Q, K, V), and apply a fully connected neural network to process MultiHead(Q, K, V) to obtain the final trajectory sequence representation M all , and the calculation expression is as follows: M all = FNN(MultiHead(Q, K, V)) MultiHead(Q,K,V)=Concat(head1,...,head i ,...,head i )W O head i = Attention(QW i Q , QW i K , QW i V ) Among them, head i represents the output of the i-th attention head in the multi-head self-attention mechanism, W o represents the linear transformation matrix, W i Q represents the query weight matrix of the i-th attention head, W i K represents the key weight matrix of the i-th attention head, W i V represents the value weight matrix of the i-th attention head, d represents the dimension of each vector in the multi-head self-attention mechanism, and FNN(*) represents the fully connected neural network; S360: Adopt a multi-task learning strategy and apply M all computation and The calculation expression is as follows: Among them, represents the output prediction value of the point of interest, represents the output prediction value of the point of interest time, represents the output prediction value of the point of interest category; W poi , W time , W cat represents the learnable parameter, b p , b t , b c respectively represent and the biases of the respective corresponding learnable parameters; S370: Use and the cross-entropy loss function to calculate the loss function of the predicted point of interest Use and the cross-entropy loss function to calculate the loss function of the predicted point of interest category Use and the root mean square loss function to calculate the loss function of the predicted point of interest time Among them, F ce represents the cross-entropy loss function, and F m represents the root mean square loss function, y poi is the actual point of interest value, and y cat represents the actual point of interest category, and y time represents the actual point of interest time; S380: Use to calculate the loss function for recommendation The calculation expression is as follows: where N represents the estimated parameter; S390: Integration and obtain the total loss function of TSLMPR The calculation expression is as follows: where μ represents the hyperparameter used to balance the optimization objective.