A point of interest recommendation method based on tree representation of trajectories and multi-granularity contrast learning

By constructing a multi-temporal granularity trajectory tree and a multi-granularity contrastive learning strategy, the problem of insufficient modeling of user personalized preferences in existing interest point recommendation methods is solved, achieving more accurate interest point recommendation and user behavior characterization, and improving the performance of the recommendation system.

CN122432409APending Publication Date: 2026-07-21CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING UNIV OF POSTS & TELECOMM
Filing Date
2026-03-18
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing interest-based recommendation methods struggle to effectively model complex personalized user preferences, neglect preferences at multiple time granularities, and fail to fully uncover users' dynamic behavioral patterns and long-term dependencies.

Method used

A tree structure is used to represent historical access trajectories, a multi-temporal granularity trajectory tree is constructed, features are initialized using a graph convolutional network, a hierarchical information transmission mechanism and a multi-granularity contrastive learning strategy are designed, information interaction is carried out through a graph convolutional network and a long short-term memory network, and the model is optimized by combining the contrastive learning strategy.

Benefits of technology

It improves the accuracy of point-of-interest recommendations and the generalization ability of the model, enabling it to better characterize user behavior patterns and changes in interests, enhance the user travel experience, and promote the digital upgrade of the cultural and tourism industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122432409A_ABST
    Figure CN122432409A_ABST
Patent Text Reader

Abstract

The present application relates to the field of recommendation system, and discloses a point of interest recommendation method based on tree representation trajectory and multi-granularity contrast learning, comprising: obtaining user historical check-in data set and preprocessing; dividing user check-in into day level, time period level and original check-in level node according to check-in time, and constructing multi-time granularity trajectory tree structure; constructing a recommendation model integrating global enhancement and contrast learning, training and testing the model using the data set, and obtaining the prediction result. In feature extraction, a global graph is introduced for the trajectory tree structure, and graph convolution network is used to initialize the features of leaf nodes, so as to strengthen the model's ability to capture global dependency; contrast learning strategy is introduced at each granularity node level, and the model is guided to learn semantic consistent trajectory representation through positive and negative sample constraints. The present application balances local spatio-temporal constraints and global transfer rules while mining user multi-time granularity preferences, and significantly improves the accuracy and personalization of point of interest recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of recommender systems, specifically relating to an interest point recommendation method based on tree representation trajectory and multi-granularity comparative learning. Background Technology

[0002] Against the backdrop of continuous evolution of internet technology and the deepening of digital lifestyles, the cultural tourism industry is undergoing a transformation from traditional sightseeing to personalized and experiential tourism. The widespread adoption of mobile internet, social media, and smart terminals has driven the formation of new tourism models such as social sharing-oriented attraction visits, in-depth tourism emphasizing local cultural experiences, and short-term, high-frequency leisure travel. Users are placing higher demands on the personalization and intelligence of travel services. Simultaneously, the rapid development of social platforms and location-aware devices has accumulated a large amount of user behavior data containing spatiotemporal information, providing a solid data foundation for research on point-of-interest (POI) recommendation. In this context, POI recommendation, as an important research direction in the field of recommendation systems, is playing an increasingly prominent role in improving user travel experiences, optimizing tourism resource allocation, and promoting the digital development of the cultural tourism industry.

[0003] In the development of point-of-interest (POI) recommendation technology, mainstream methods can be broadly categorized into two types: traditional recommendation methods based on collaborative filtering and recommendation methods based on deep learning. Before the widespread application of deep learning, POI recommendation primarily relied on traditional techniques such as collaborative filtering, matrix factorization, and sequence modeling based on Markov chains. However, these methods are limited by shallow feature representation and struggle to effectively model complex and dynamic user behaviors. With the rapid development of deep learning, techniques such as recurrent neural networks (RNNs), attention mechanisms, and graph neural networks (GNNs) have been introduced into the POI recommendation field, significantly improving the model's ability to represent user behavior patterns. Sequence modeling methods based on RNNs can effectively capture the temporal dependencies of user check-in behavior, but they still face gradient decay when processing long sequence trajectories, failing to effectively model long-term dependencies within the trajectory. Attention mechanism-based methods enhance the model's ability to perceive important information by dynamically focusing on key check-in behaviors in historical trajectories, but their ability to mine global dependencies and high-order interaction information remains insufficient. GNN-based methods enhance their ability to learn high-order relationships and global dependencies by constructing graph structures; however, existing methods still have limitations in graph structure construction, making it difficult to fully mine users' complex and dynamic personalized preferences. Furthermore, existing point-of-interest (POI) recommendation methods focus primarily on the migration relationships between POIs within historical visit trajectories, neglecting users' multi-temporal granular preferences and failing to fully reflect users' personalized interest characteristics. In conclusion, finding a method that can better model users' personalized preferences and improve the accuracy of POI recommendations is of great significance for optimizing user travel experiences and promoting the digital upgrade of the cultural tourism industry. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention proposes an interest point recommendation method based on tree representation trajectories and multi-granularity comparative learning. For example... Figure 1 As shown, this method includes: using a tree structure to represent historical access trajectories, dividing the data into daily, time-period, and original check-in level nodes based on access time to model user preferences at multiple time granularities; constructing a global migration graph and a global distance graph, and using a graph convolutional network to initialize leaf node features to enhance the model's ability to capture global dependencies; and designing a contrastive learning strategy based on each time granularity node to guide the model in learning semantically consistent trajectory representations. The specific technical solution is as follows:

[0005] An interest point recommendation method based on tree representation trajectory and multi-granularity contrastive learning includes the following steps:

[0006] Step 1) Obtain the user's historical check-in trajectory dataset, clean and preprocess the data, and divide it into training set, validation set and test set according to the proportion;

[0007] Step 2) Based on the user's check-in access time, divide the user's historical trajectory into daily nodes, time period nodes, and original check-in level nodes, construct a multi-time granularity trajectory tree, and extract the initial feature vector based on the attributes of the original check-in level nodes.

[0008] Step 3) Construct a global transfer graph and a global distance graph. Initialize the feature vectors of the leaf nodes of the trajectory tree using a graph convolutional network to obtain enhanced feature vectors that incorporate global information.

[0009] Step 4) Input the globally enhanced feature vector into the hierarchical information transmission module to complete the information interaction between nodes: the feature vector between nodes of the same granularity is updated through a multi-head attention mechanism, and the updated nodes continue to participate in the information interaction between cross-granularity nodes. The information interaction between cross-granularity nodes is implemented using a tree-like long short-term memory network.

[0010] Step 5) Input the node feature vectors after information interaction into the feedforward neural network to obtain the predicted probability of candidate interest points;

[0011] Step 6) Design corresponding contrastive learning strategies for each time granularity node, construct positive and negative sample pairs and calculate contrastive loss, fuse the contrastive losses of each granularity node to obtain multi-granularity contrastive learning loss, and guide the model to learn semantically consistent trajectory representation.

[0012] Step 7) Use the weighted fusion of the interest point prediction loss and the multi-granularity contrastive learning loss as the objective function to train and validate the model. Apply the trained model to the test set to obtain the final interest point prediction result.

[0013] Furthermore, step 1) above includes:

[0014] Step 1.1 Obtain user check-in datasets from Foursquare and Gowalla public datasets;

[0015] Step 1.2 Divide each dataset into a training set, a validation set, and a test set in a ratio of 8:1:1;

[0016] Step 1.3 Preprocess the divided dataset, including data cleaning, missing value handling, and trajectory segmentation, to obtain standardized user check-in trajectory data.

[0017] Furthermore, the trajectory tree construction process in step 2) is as follows: based on the check-in and access time, the daily nodes are constructed according to the check-in and access dates, and each natural day in the trajectory is a daily node; the hour span of the time period nodes is controlled by the number of time slots; the original check-in level node is the original check-in node in the trajectory.

[0018] Furthermore, in step 2), the process of obtaining feature vectors based on node attributes is as follows: for each check-in record, a feature vector is obtained by encoding various discrete attributes through an embedding layer. Simultaneously, to capture the dynamic preferences between check-in records, the model obtains time intervals from continuous check-in data. and spatial interval The feature vector is obtained by applying an embedding layer encoding and an attention mechanism is introduced to capture the user's potential preferences at spatial intervals during check-in. Finally, the above feature vectors are fused to obtain the original check-in node representation, as shown in the following formula:

[0019]

[0020]

[0021]

[0022]

[0023] in, This indicates an embedded mapping operation. For point of interest identification, For user identification, For location identification, For category identification, For weekdays, For location-encoded attributes, For time intervals, For spatial intervals, The resulting attribute feature vector, For feature dimension, It is a fully connected layer. For connection operations, To fuse user feature vectors with spatiotemporal preferences, It is a parameter that controls the impact of access time. Representing the original check-in node

[0024] Furthermore, in step 3), constructing the global migration graph and the global distance graph specifically involves defining the global migration graph as a weighted directed graph. , For a set of points of interest, Let be the set of edges. As edge weight, each edge Representing points of interest in the trajectory and Weight Indicating all trajectories and The number of consecutive visits; a global distance graph is defined as a weighted undirected graph. , For a set of points of interest, Let be the set of edges. As the edge weight, there exists an edge between any two points of interest. ,satisfy and edge weight The distance between two points is calculated using the following formula:

[0025]

[0026]

[0027] in, The formula for the semi-versus is given. This is the distance threshold.

[0028] Furthermore, in step 3), the leaf node feature vector is initialized using a graph convolutional network. Specifically, the original check-in node feature vector is used as input, and a graph convolutional network is applied to the global migration graph and the global distance graph respectively to obtain two globally enhanced feature vectors. These are then fused to obtain the initial feature vector of the leaf node. The specific formula is as follows:

[0029]

[0030]

[0031]

[0032]

[0033]

[0034] in, For activation function, For graph convolutional networks, For layer normalization operation, For graph convolution operations on the global transfer graph, For graph convolution operations on the global distance graph, For node feature vectors, Node feature vectors for global migration graph enhancement For enhancing the node feature vectors of the global distance graph, Initialize the leaf node vector for global enhancement.

[0035] Furthermore, the hierarchical information transmission module in step 4) specifically involves: using the obtained leaf node feature vector as input, employing a multi-head attention mechanism for information exchange between nodes of the same granularity. The mathematical formula is as follows:

[0036]

[0037]

[0038]

[0039] in, For the first One point of attention; For the first The learnable weight matrix for each attention head; To output the weight matrix; Input features for multi-head attention; A set of feature vectors of nodes with the same granularity; For splicing operations; For layer normalization operation; This is the updated node representation. The updated node representation serves as input for cross-granularity node information exchange, and its mathematical formula is:

[0040]

[0041]

[0042]

[0043]

[0044]

[0045]

[0046] in, The node representation after information aggregation; For input gates; Forgotten Gate; For output gate; Candidate memories; For memory units; The child node is hidden. This represents the number of child nodes. and It is an activation function; For Hadamah accumulation; , , , , , , , It is a learnable weight matrix; , , , This corresponds to the bias term.

[0047] Furthermore, in step 6), corresponding contrastive learning strategies are designed for each time granularity node, specifically as follows: Leaf node level: Positive and negative sample pairs are constructed based on the physical spatiotemporal distance between leaf nodes, introducing the model with the ability to perceive spatiotemporal distance in the physical world; Time period node level: In order to capture the user's behavioral patterns within a specific time interval, the node feature vectors of the same user within the same time period are enhanced by Dropout and constructed as positive sample pairs; At the same time, in order to enhance the model's sensitivity to the evolution of time context, nodes of the same user in different time periods are used as hard negative samples, and nodes of different users or different time periods are used as ordinary negative samples; Daily node level: Focusing on extracting the user's long-term stable preferences, the daily node feature vectors of the same user are enhanced by Dropout and used as positive sample pairs, while the daily nodes of different users are used as negative samples, thereby strengthening the model's ability to model the user's general preferences.

[0048] Furthermore, the contrastive loss at each granularity node is calculated based on the designed contrastive learning strategy. The specific calculation formula is as follows:

[0049]

[0050] in, For time granularity nodes; for Loss at the time granularity node; is the cosine similarity function, used to measure the semantic consistency between vectors; Indicates the first Negative sample space at the temporal granularity; Anchor node; Positive samples are constructed by enhancing spatiotemporal constraints or Dropout; These are the feature vectors of the negative sample space; Temperature is a hyperparameter used to adjust the smoothness of the similarity distribution. The final multi-granularity contrastive learning loss is a weighted sum of the contrastive learning losses at each time granularity, and its calculation formula is as follows:

[0051]

[0052] in, The integrated multi-granularity contrastive learning loss; The corresponding time granularity weight coefficient is used to balance the contribution ratio of losses at different time granularities in the global optimization. In this invention, it is uniformly set to 1.

[0053] Furthermore, in step 7), the interest point prediction result is obtained by combining the interest point prediction loss and multi-granularity contrastive learning to obtain the overall loss function, which is mathematically expressed as:

[0054]

[0055] in, For learnable weights, For loss of interest, For interest point category loss, The loss is the region to which the point of interest belongs. For The base is an exponential function. After training on the training set, the model is applied to the training set to obtain the final node representation of the trajectory tree. This representation is then input into the feedforward neural network to obtain the prediction result. The calculation formula is:

[0056]

[0057]

[0058]

[0059] in, , , The weight matrix is ​​a learnable matrix; , and For the corresponding bias term; , and These represent the model's predicted probability distributions for candidate points of interest, point of interest categories, and their respective geographical regions. Number of points of interest; Number of interest point categories; This represents the number of geographical regions to which a point of interest belongs.

[0060] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention proposes an interest point recommendation method based on tree-represented trajectory and multi-granularity contrastive learning. By constructing a multi-temporal granularity trajectory tree containing daily, time-segment, and original check-in nodes, it hierarchically models the user's check-in trajectory, thereby more comprehensively depicting the user's behavioral patterns and interest changes at different time scales. Simultaneously, by constructing a global migration graph and a global distance graph, and using a graph convolutional network to initialize the leaf node features of the trajectory tree, the interest point representation can simultaneously integrate access migration relationships and geospatial distance information between interest points, enhancing the model's ability to express user movement behavior. Based on this, this invention designs a hierarchical information transmission mechanism, using a multi-head attention mechanism for information interaction between nodes of the same granularity, and a tree-like long short-term memory network for feature transmission between nodes of different granularities, thereby achieving effective fusion of information at different temporal granularities. Furthermore, this invention introduces a multi-granularity contrastive learning strategy, constructing positive and negative sample pairs at the leaf node, time-segment, and daily node levels, and jointly optimizing the multi-granularity contrastive learning loss and the interest point prediction loss, enabling the model to learn a more consistent and discriminative trajectory representation. The above methods can more accurately characterize user interests and preferences, improve the prediction accuracy and generalization ability of interest point recommendation tasks, and have good application value in enhancing user travel experience and promoting the digital upgrade of the cultural and tourism industry. Attached Figure Description

[0062] Figure 1 An architecture diagram of an interest point recommendation method based on tree representation trajectory and multi-granularity contrastive learning;

[0063] Figure 2 This is a flowchart of an interest point recommendation method based on tree representation trajectory and multi-granularity contrast learning. Detailed Implementation

[0065] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments:

[0066] An interest point recommendation method based on tree representation trajectory and multi-granularity contrastive learning, such as Figure 2 As shown, it includes the following steps:

[0067] Step 1) Obtain the public location service datasets Foursquare and Gowalla, and extract user check-in records from them. Each check-in record includes information such as user identifier, point of interest identifier, check-in time, and geographic coordinates of the point of interest. Divide the dataset into training, validation, and test sets in an 8:1:1 ratio, and perform preprocessing operations on the data, including data cleaning, missing value handling, and trajectory segmentation, to obtain standardized user check-in trajectory data.

[0068] Step 2) Divide the user's historical check-in trajectory access time into three levels: daily nodes, time-segment nodes, and original check-in nodes. Daily nodes are constructed using natural days as the unit. Time-segment nodes control the time span of nodes through time slots. Taking the New York dataset in Foursquare as an example, setting the time slot to 4 results in a node time span of 6 hours. Original check-in nodes correspond to the user's actual check-in records. Then, based on the interest point identifier, user identifier, interest point category, access time, location attributes, and time and spatial interval information between check-in records, the node feature vector is obtained through an embedding layer. The specific calculation formula is as follows:

[0069]

[0070] in, This indicates an embedded mapping operation. For point of interest identification, For user identification, For location identification, For category identification, For weekdays, For location-encoded attributes, For time intervals, For spatial intervals, This is the obtained attribute feature vector. As for feature dimensions, the dimensions for point of interest (POI) identifiers and user identifiers are 128; the dimensions for POI category, spatial interval, and weekday attribute are 32; the dimensions for location identifiers and time intervals are 64; and the dimension for location encoding is 384. Furthermore, an attention mechanism is introduced to mine users' potential preferences regarding spatial intervals during check-in, calculated using the following formula:

[0071]

[0072]

[0073] in, It is a fully connected layer. For connection operations, This is a user feature vector that incorporates spatiotemporal preferences. By fusing the above feature vectors, the original sign-in node representation is obtained. The specific mathematical formula is as follows:

[0074]

[0075] in, It is a parameter that controls the impact of access time. This represents the original sign-in node.

[0076] Step 3) Construct a global migration graph based on the continuous check-in behavior in the user's historical trajectory. The global migration graph is defined as a weighted directed graph. , For a set of points of interest, Let be the set of edges. As edge weight, each edge Representing points of interest in the trajectory and Weight Indicating all trajectories and The number of consecutive visits. Simultaneously, spatial distances are calculated based on the geographic coordinates between points of interest, and a global distance map is constructed. , For a set of points of interest, Let be the set of edges. As the edge weight, there exists an edge between any two points of interest. ,satisfy and edge weight The distance between two points is calculated using the following formula:

[0077]

[0078]

[0079] in, The formula for the semi-versus is given. The distance threshold is used. Based on this, the original check-in node feature vector is taken as input, and graph convolutional networks are applied to the global transfer graph and global distance graph for feature propagation. Finally, layer normalization is used to obtain the globally enhanced feature vector. The calculation formula is:

[0080]

[0081]

[0082]

[0083]

[0084]

[0085] in, For activation function, For graph convolutional networks, For layer normalization operation, For graph convolution operations on the global transfer graph, For graph convolution operations on the global distance graph, For node feature vectors, Node feature vectors for global migration graph enhancement For enhancing the node feature vectors of the global distance graph, Initialize the leaf node vector for global enhancement.

[0086] Step 4) Construct a hierarchical information transmission module to realize information interaction between nodes of different granularities in the trajectory tree. Specifically, for nodes at the same time granularity, a multi-head attention mechanism is used for feature updating. Multiple attention heads learn the correlation between nodes, and the outputs of each attention head are concatenated to obtain the updated node representation. The mathematical formula is as follows:

[0087]

[0088]

[0089]

[0090] in, For the first One point of attention; For the first The learnable weight matrix for each attention head; To output the weight matrix; Input features for multi-head attention; A set of feature vectors of nodes with the same granularity; For splicing operations; For layer normalization operation; This is the updated node representation. Subsequently, the updated node representation is used as input for cross-granularity node information interaction. A tree-structured long short-term memory network is used to aggregate information between parent and child nodes, thereby achieving hierarchical information propagation from the original check-in node to the time period node and then to the day node. The calculation formula is as follows:

[0091]

[0092]

[0093]

[0094]

[0095]

[0096]

[0097] in, The node representation after information aggregation; For input gates; Forgotten Gate; For output gate; Candidate memories; For memory units; The child node is hidden. This represents the number of child nodes. and It is an activation function; For Hadamah accumulation; , , , , , , , It is a learnable weight matrix; , , , This corresponds to the bias term.

[0098] Step 5) Input the node feature vectors after information interaction into the feedforward neural network for prediction calculation. Specifically, the node representations are mapped through a multi-layer fully connected network to obtain the predicted probability distribution of candidate points of interest, point of interest categories, and the geographical regions to which the points of interest belong. The calculation formula is as follows:

[0099]

[0100]

[0101]

[0102] in, , , The weight matrix is ​​a learnable matrix; , and For the corresponding bias term; , and These represent the model's predicted probability distributions for candidate points of interest, point of interest categories, and their respective geographical regions. Number of points of interest; Number of interest point categories; This represents the number of geographic regions to which a point of interest belongs. An auxiliary prediction task is introduced, which includes the category of points of interest and the geographic region to which they belong. This aims to provide the model with richer semantic supervision signals through multi-task learning.

[0103] Step 6) During model training, a multi-granularity contrastive learning strategy is introduced to improve the discriminative ability of trajectory representation. Specifically, at the leaf node level, positive and negative sample pairs are constructed based on the physical spatiotemporal distance between nodes; at the time period node level, to capture user behavior patterns within a specific time interval, the feature vectors of nodes belonging to the same user within the same time period are enhanced using Dropout to construct positive sample pairs. Simultaneously, to enhance the model's sensitivity to temporal context evolution, nodes belonging to the same user at different time periods are treated as hard negative samples, while nodes belonging to different users or at different time periods are treated as ordinary negative samples; at the daily node level, the focus is on extracting users' long-term stable preferences. The feature vectors of daily nodes belonging to the same user are enhanced using Dropout to create positive sample pairs, while daily nodes belonging to different users are treated as negative samples, thereby strengthening the model's ability to model general user preferences. The contrastive loss for each time granularity is calculated based on the above strategy, using the following formula:

[0104]

[0105] in, For time granularity nodes; for Loss at the time granularity node; is the cosine similarity function, used to measure the semantic consistency between vectors; Indicates the first Negative sample space at the temporal granularity; Anchor node; Positive samples are constructed by enhancing spatiotemporal constraints or Dropout; These are the feature vectors of the negative sample space; Temperature is a hyperparameter used to adjust the smoothness of the similarity distribution. The final multi-granularity contrastive learning loss is obtained through weighted integration, and its mathematical expression is:

[0106]

[0107] in, The integrated multi-granularity contrastive learning loss; The corresponding time granularity weight coefficient is used to balance the contribution ratio of losses at different time granularities in the global optimization. In this invention, it is uniformly set to 1.

[0108] Step 7) The interest point prediction loss and the multi-granularity contrastive learning loss are weighted and fused to construct the overall objective function, the mathematical expression of which is as follows:

[0109]

[0110] in, For learnable weights, For loss of interest, For interest point category loss, The loss is the region to which the point of interest belongs. For The model is trained using an exponential function with base 0.05. The parameters are then fine-tuned using a validation set to obtain the trained interest point recommendation model. Finally, the trained model is applied to a test set, and a feedforward neural network outputs the predicted probabilities of candidate interest points, thus yielding the final interest point recommendation results.

[0111] The present invention has provided a detailed description of the technical solution through the above embodiments, but the scope of protection of the present invention is not limited thereto. For those skilled in the art, various modifications, substitutions, or equivalent improvements can be made to the technical solution of the present invention without departing from the spirit and essence of the invention. All equivalent changes or simple modifications made based on the concept of the present invention should be included within the scope of protection defined by the claims of the present invention.

Claims

1. An interest point recommendation method based on tree representation trajectory and multi-granularity contrastive learning, characterized in that, The method includes the following steps: Step 1) Obtain the user's historical check-in trajectory dataset, clean and preprocess the data, and divide it into training set, validation set and test set according to the proportion; Step 2) Based on the user's check-in access time, divide the user's historical trajectory into daily nodes, time period nodes, and original check-in level nodes, construct a multi-time granularity trajectory tree, and extract the initial feature vector based on the attributes of the original check-in level nodes. Step 3) Construct a global transfer graph and a global distance graph. Initialize the feature vectors of the leaf nodes of the trajectory tree using a graph convolutional network to obtain enhanced feature vectors that incorporate global information. Step 4) Input the globally enhanced feature vector into the hierarchical information transmission module to complete the information interaction between nodes: the feature vector between nodes of the same granularity is updated through a multi-head attention mechanism, and the updated nodes continue to participate in the information interaction between cross-granularity nodes. The information interaction between cross-granularity nodes is implemented using a tree-like long short-term memory network. Step 5) Input the node feature vectors after information interaction into the feedforward neural network to obtain the predicted probability of candidate interest points; Step 6) Design corresponding contrastive learning strategies for each time granularity node, construct positive and negative sample pairs and calculate contrastive loss, fuse the contrastive losses of each granularity node to obtain multi-granularity contrastive learning loss, and guide the model to learn semantically consistent trajectory representation. Step 7) Use the weighted fusion of the interest point prediction loss and the multi-granularity contrastive learning loss as the objective function to train and validate the model. Apply the trained model to the test set to obtain the final interest point prediction result.

2. The interest point recommendation method based on tree representation trajectory and multi-granularity contrastive learning according to claim 1, characterized in that: Step 1) further includes: Step 1.1 Obtain user check-in datasets from Foursquare and Gowalla public datasets; Step 1.2 Divide each dataset into a training set, a validation set, and a test set in a ratio of 8:1:1; Step 1.3 Preprocess the divided dataset, including data cleaning, missing value handling, and trajectory segmentation, to obtain standardized user check-in trajectory data.

3. The interest point recommendation method based on tree representation trajectory and multi-granularity contrast learning according to claim 1, characterized in that: Step 2) further includes: daily nodes are constructed based on the check-in access date, with each natural day in the trajectory being a daily node; time period nodes control the time span of time period nodes through the number of time slots; the original check-in node is the original check-in node in the trajectory.

4. The interest point recommendation method based on tree representation trajectory and multi-granularity contrast learning according to claim 1, characterized in that: The formula for initializing the node feature vectors of the convolutional network in step 3) is as follows: in, is the activation function; GCN is the graph convolutional network; LayerNorm is the layer normalization operation; For graph convolution operations on the global transfer graph; For graph convolution operations on the global distance graph; For node feature vectors; Enhanced node feature vectors for the global migration graph; Node feature vectors for global distance graph enhancement.

5. The interest point recommendation method based on tree representation trajectory and multi-granularity contrast learning according to claim 4, characterized in that: The global migration graph is defined as a weighted directed graph. Each edge express Points of interest in the trajectory and Weight Indicating all trajectories and The number of consecutive visits; a global distance graph is defined as a weighted undirected graph. There exists an edge between any two points of interest, i.e. ,satisfy and The edge weight is .

6. The interest point recommendation method based on tree representation trajectory and multi-granularity contrastive learning according to claim 4, characterized in that, The formula for calculating the edge weights of a global distance graph is: in, This represents the formula for the semi-sine.

7. The interest point recommendation method based on tree representation trajectory and multi-granularity contrastive learning according to claim 1, characterized in that: The formula for information exchange between nodes of the same granularity in step 4) is: in, For the first One point of attention; For the first The learnable weight matrix for each attention head; To output the weight matrix; Input features for multi-head attention; A set of feature vectors of nodes with the same granularity; For splicing operations; This is a layer normalization operation.

8. The interest point recommendation method based on tree representation trajectory and multi-granularity contrastive learning according to claim 1, characterized in that: The formula for information exchange between granularity nodes in step 4) is: in, The node representation after information aggregation; For input gates; Forgotten Gate; For output gate; Candidate memories; For memory units; The child node is hidden. This represents the number of child nodes. and It is an activation function; For Hadamah accumulation; It is a learnable weight matrix; This is the corresponding bias term.

9. The interest point recommendation method based on tree representation trajectory and multi-granularity contrastive learning according to claim 1, characterized in that, The comparative learning strategies for each time granularity node in step 6) include: Leaf node level: constructing positive and negative sample pairs based on the physical spatiotemporal distance between leaf nodes to introduce the model with the ability to perceive spatiotemporal distance in the physical world; Time period node level: in order to capture the user's behavior patterns within a specific time interval, the node feature vectors of the same user within the same time period are enhanced by Dropout to construct positive sample pairs; at the same time, in order to enhance the model's sensitivity to the evolution of temporal context, nodes of the same user in different time periods are used as hard negative samples, and nodes of different users or different time periods are used as ordinary negative samples; Daily node level: focusing on extracting users' long-term stable preferences, the daily node feature vectors of the same user are enhanced by Dropout to be used as positive sample pairs, while the daily nodes of different users are used as negative samples, thereby strengthening the model's ability to model general user preferences.

10. The interest point recommendation method based on tree representation trajectory and multi-granularity contrastive learning according to claim 9, characterized in that, The formula for calculating the comparative loss at each particle size node is as follows: in, For time granularity nodes; for Loss at the time granularity node; is the cosine similarity function, used to measure the semantic consistency between vectors; Indicates the first Negative sample space at the temporal granularity; Anchor node; Positive samples are constructed by enhancing spatiotemporal constraints or Dropout; These are the feature vectors of the negative sample space; This is a temperature hyperparameter used to adjust the smoothness of the similarity distribution.

11. The interest point recommendation method based on tree representation trajectory and multi-granularity contrastive learning according to claim 9, characterized in that, The multi-granularity contrastive learning loss is: in, The integrated multi-granularity contrastive learning loss; This is the weighting coefficient for the corresponding time granularity, used to balance the contribution ratio of losses at different time granularities in the global optimization.