A next point of interest recommendation method based on dual contrast learning

CN118364176BActive Publication Date: 2026-09-29ZHEJIANG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410553167.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-07
Publication Date
2026-09-29
Estimated Expiration
2044-05-07

AI Technical Summary

Benefits of technology

[0055]有益效果:本发明通过用户签到的数据,构造有效的用户长短期轨迹对,对用户的长短期偏好充分建模;同时基于双对比学习,充分利用长短期轨迹信息,在保证轨迹建模准确性的条件下,充分挖掘并利用长短期轨迹之间的潜在依赖关系。基于注意力自适应融合长短期轨迹偏好信息。同时使用图注意力网络,得到轨迹见的时空依赖性,能够对推荐结果进行一个全局的微调得到兴趣点推荐结果,提高了兴趣点推荐的准确性,从而提升用户体验。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118364176B_ABST
    Figure CN118364176B_ABST
Patent Text Reader

Abstract

The present application relates to a next interest point recommendation method based on double contrast learning, the present application constructs effective user long-term and short-term trajectory pairs through user check-in data, fully models the long-term and short-term preferences of the user; at the same time, based on double contrast learning, fully utilizing long-term and short-term trajectory information, under the condition of ensuring the accuracy of trajectory modeling, fully mining and utilizing the potential dependency relationship between long-term and short-term trajectories, based on attention adaptive fusion long-term and short-term trajectory preference information, using graph attention network at the same time, obtaining the spatio-temporal dependency of the trajectory, which can globally fine-tune the recommendation result to obtain the interest point recommendation result, improve the accuracy of interest point recommendation, thereby improving user experience, effectively improving the efficiency and satisfaction of user travel selection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of recommendation system technology, and in particular to a method for recommending the next point of interest based on long-short trajectory modeling using dual contrastive learning. Background Technology

[0002] With advancements in transportation and modern networks, users now have more travel options daily, but also face a deluge of information. In this context, point-of-interest (POI) recommendation becomes crucial. Based on user history, interests, and other data, it recommends suitable POIs, improving efficiency and satisfaction in travel decisions. Furthermore, POI recommendation provides valuable insights for businesses in site selection and advertising. By analyzing user browsing behavior and the attributes of POIs, it helps businesses find optimal locations and target audiences. Therefore, POI recommendation is a technology with immense value and potential, bringing greater convenience and benefits to both users and businesses.

[0003] Accuracy of point-of-interest (POI) recommendations is a crucial metric in recommendation systems. It reflects whether the system accurately recommends locations of interest to users, directly impacting user satisfaction.

[0004] User interests include stable long-term preferences and short-term, temporary interests. Considering both long-term and short-term trajectories in recommendation typically leads to better performance. Past work often failed to differentiate between long-term and short-term trajectories, resulting in entangled long-term and short-term preferences and poor recommendation accuracy and interpretability. Some works have recognized the unique information contained in trajectories across different time spans, leveraging the learning advantages of various deep learning methods to analyze users' long-term and short-term performance separately. However, these works often overlook the potential relationships between long and short-term trajectories. Currently, contrastive learning techniques are used to mine these potential relationships; however, contrastive learning can affect the embedding representation of trajectories to some extent, potentially leading to a decrease in the accuracy of short-term trajectory modeling. Furthermore, the aforementioned works often only utilize the contextual information of the user's own trajectory, ignoring the spatiotemporal dependencies between trajectories. Summary of the Invention

[0005] To overcome the aforementioned shortcomings, the present invention aims to provide a point-of-interest (POI) recommendation method based on dual-contrast learning. This invention constructs effective long- and short-term trajectory pairs using user check-in data, fully modeling users' long- and short-term preferences. Simultaneously, based on dual-contrast learning, it fully utilizes long- and short-term trajectory information, fully mining and utilizing the potential dependencies between long- and short-term trajectories while ensuring the accuracy of trajectory modeling. It adaptively fuses long- and short-term trajectory preference information based on attention, and uses a graph attention network to obtain the spatiotemporal dependencies between trajectories. This allows for a global fine-tuning of the recommendation results to obtain POI recommendations, improving the accuracy of POI recommendations and solving the problems existing in the prior art.

[0006] The present invention achieves the above objective through the following technical solution: a next point of interest recommendation method based on dual contrastive learning, the method comprising the following steps:

[0007] (1) Users’ travel preferences include long-term stable travel preferences and short-term dynamic travel preferences. Long-term and short-term trajectory pairs of users are constructed by using users’ past check-in records and current check-in records, and interest point interaction graphs are constructed based on users’ check-in history sequences.

[0008] (2) The user's long and short trajectories are respectively obtained through the trajectory embedding module composed of graph convolutional network and basic embedding layer to obtain the corresponding low-dimensional embedding representation;

[0009] (3) Given that the user's long-term trajectory contains the user's long-term travel preferences, and the user's recent short-term trajectory contains the user's short-term dynamic travel preferences; use a bidirectional converter to learn the hidden representations of the long-term and short-term trajectories from the user's long-term and short-term trajectory embeddings, so as to represent the user's long-term and short-term preferences respectively.

[0010] (4) Long-term preferences influence short-term preferences, while short-term preferences constantly update long-term preferences; in order to learn the dependency relationship between long-term and short-term preferences, comparative learning is carried out between the user's long-term trajectory and short-term trajectory.

[0011] (5) User trajectories with similar short-term preferences reflect the similarity between user preferences. By using contrastive learning, the short-term trajectory of a user is compared with the short-term trajectory of other users to ensure the accuracy of short-term trajectory modeling.

[0012] (6) The spatiotemporal dependencies of trajectories are obtained from the interest point interaction graph through graph attention network. Based on the attention mechanism, long and short-term trajectory preferences are adaptively fused and fine-tuned according to the spatiotemporal dependencies of the trajectories to obtain the final interest point recommendation result.

[0013] As a preferred method, in step (1), the data is filtered based on the user's historical check-in sequence. In order to accurately model users and avoid the cold start problem, interest points with fewer than 10 interactions and trajectories with fewer than 3 check-ins are removed, and inactive users with fewer than 5 check-ins are filtered out. Based on this data, an interaction graph of long and short trajectory pairs and interest points is constructed.

[0014] As a preferred embodiment, in step (1), the construction of the user's long-term and short-term trajectory pairs is to take the user's past check-in trajectory as the user's long-term trajectory and the user's check-in trajectory of the most recent day as the user's short-term trajectory, thus obtaining the user's long-term and short-term trajectory pairs; the process of constructing the interest point interaction graph in step (1) includes: initializing a directed graph, and using the number of times two interest points are visited consecutively as the weight of the edge connecting the two interest points.

[0015] Preferably, the trajectory embedding module in step (2) introduces a graph convolutional network to learn the dependencies of interest points and obtain the embedded representation of interest points. The graph convolutional network performs feature extraction and representation learning on nodes by defining convolution operations on the graph. The definition of graph convolution propagation is as follows:

[0016]

[0017] in, It adds an adjacency matrix to the self-loop graph. This is the degree moment of the added self-loop graph, where N is the total number of interest points; W is the output feature matrix of the first layer. (l) Let σ be the weight matrix of the l-th layer, and σ be the ReLU activation function; the output of the last layer is the learned global embedding matrix. Where d p This refers to the embedding dimension of interest points. e p's i-th column e p i Representing point of interest p i Embedded.

[0018] Preferably, the trajectory embedding module in step (2) includes four basic embedding layers to learn the embedding of the remaining contextual information of the trajectory, including information related to the user, the type of check-in point, the access time, and whether it is a weekend; finally, for the user's trajectory... Each check-in point q i It can be represented as:

[0019]

[0020] in It is a chain operation; where It is the user embedding matrix. It is the embedding matrix of categories. It is an embedding matrix of access times. This is the embedding matrix of the weekend metrics; for convenience, the sum of all embedding dimensions is represented as D; therefore, the trajectory The embedding is represented as

[0021] In the embedding learning of user long-term trajectories, for the user's long-term trajectory Each trajectory in the user's long-term sequence is randomly masked with a 10% probability, resulting in... Then The input trajectory embedding module obtains the embedding of each trajectory; then, the representations of each trajectory in the long-term trajectory are concatenated to obtain the user's long-term trajectory embedding representation. Where X is the total number of check-in points in the long-term trajectory;

[0022] In learning user preferences for short-term trajectories, a random masking strategy is not used to prevent the loss of necessary data for short-term trajectories. The short-term trajectory is input into the trajectory embedding module to obtain the embedding of the short-term trajectory. Where Y represents the total number of check-in points in the short-term trajectory. Preferably, the learning of long-term stable user preferences in step (3) includes the following steps: embedding the learned long-term trajectory... The input is fed into a bidirectional transformer, `longEncoder`, used to learn the long-term trajectory, to obtain the final user long-term trajectory latent representation, as shown in the following expression:

[0023]

[0024]

[0025] Where W1 and W2 are the weights of the feedforward neural network, and b1 and b2 are the biases of the feedforward neural network. These are the learnable transformation weight matrices for the query, key, and value, respectively; h represents the number of attention heads;

[0026] The learning of user short-term dynamic preferences includes the following steps: embedding user short-term trajectories. The hidden representation of the short trajectory is obtained by feeding it into the short-term trajectory bidirectional converter, shortEncoder. The calculation process is similar to that of long-term trajectory calculation, and will not be elaborated here.

[0027] Preferably, step (4) involves comparative learning between the user's long-term and short-term trajectories, including the following steps:

[0028] Select the long-term trajectory of the same user and use its average value as a positive sample; select the long-term trajectory of m different users and use their average value as a negative sample.

[0029]

[0030]

[0031]

[0032] in, These are the embeddings of the user's short-term trajectory, long-term trajectory, and negative sample trajectory, respectively; finally, a simplified InfoNCE loss is used to evaluate the H... s u H l u and H l - Compare preferences;

[0033] L inter =-log(σ(μ) <H s u H l u >))-log(1-σ(μ <H s u H l - > <H l u H l - >))

[0034] Where σ represents the sigmoid function, and <, > represent the inner product of two embedded elements regulated by temperature t.

[0035] Preferably, step (5) involves comparing and learning the user's short-term trajectory with other short-term trajectories, including the following steps:

[0036] Select m trajectories T whose destinations differ from the target user's destination. s - The average value of these samples is used as a negative sample; n trajectories T whose destinations are consistent with the target user's destination are selected. s + The average value is for positive samples; similarly, the contrast loss is calculated as follows:

[0037]

[0038]

[0039] L intra =-log(σ(μ) <H su H s + >))-log(1-σ(μ <H s u H s - > <H s + H s - >))

[0040] in, These are the embeddings of short trajectories for positive samples and long trajectories for negative samples, respectively. Preferably, step (6) involves obtaining the spatiotemporal dependencies of trajectories from the interest point interaction graph using a graph attention network, including the following steps:

[0041] In the interest point interaction graph, the feature matrix First, a linear transformation is performed to obtain... Then multiply by the two partial matrices of the attention weight tensor to obtain W1 and W2∈R respectively. N×N ;

[0042] W1 = W z a1, W2 = W z a2

[0043] Here, a1 and a2 are two learnable vectors in the attention matrix; then, the transposes of W1 and W2 are added together, and the LeakyReLU activation function is applied to obtain the alignment score; the alignment score is then summed... Multiplying these results in the final trajectory spatiotemporal dependency attention matrix w′∈R. N×N ;

[0044]

[0045] in, This means adding 1 to all elements of the adjacent matrix A.

[0046] Preferably, step (6) involves adaptively fusing long- and short-term trajectory preferences based on an attention mechanism and fine-tuning them according to the spatiotemporal dependence of the trajectories to obtain a list of interest points; this includes the following steps:

[0047] Deploy a Long Short-Term Memory Recurrent Neural Network (LSTM) to explicitly model the sequence of points of interest recently visited by the user, and obtain the query vector of the attention mechanism;

[0048]

[0049] in, It involves embedding the user's short-term trajectory; then it combines the user's long-term and short-term preferences. Connected in series to hk h v As key vectors and value vectors for the attention mechanism;

[0050]

[0051]

[0052] In the formula, T represents the total number of long-term trajectories and short-term trajectories; Represent each potential representation based on the user's current situation. The attention score is then calculated; subsequently, the learned user preference h′ is used to obtain the probability distribution y′∈R of N interest points through a multilayer perceptron mechanism. 1×N ;

[0053] Finally, by differentiating the probability distribution based on the spatiotemporal dependent attention weight w′, the final interest point recommendation probability distribution is obtained.

[0054]

[0055] Beneficial Effects: This invention constructs effective long- and short-term trajectory pairs for users using user check-in data, fully modeling users' long- and short-term preferences. Simultaneously, based on dual-contrast learning, it fully utilizes long- and short-term trajectory information, fully mining and leveraging the potential dependencies between long- and short-term trajectories while ensuring the accuracy of trajectory modeling. It also incorporates attention-based adaptive fusion of long- and short-term trajectory preference information. Furthermore, by using a graph attention network, it obtains the spatiotemporal dependencies between trajectories, enabling a global fine-tuning of the recommendation results to obtain interest point recommendations, thus improving the accuracy of interest point recommendations and enhancing user experience. Attached Figure Description

[0056] Figure 1 A flowchart of a next point of interest recommendation method based on bi-contrast geometry provided for an embodiment of the present invention;

[0057] Figure 2 This is a schematic diagram of the next point of interest recommendation method based on dual contrast learning provided in an embodiment of the present invention. Detailed Implementation Plan

[0058] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0059] It should be noted that, unless otherwise specified, the features in the following embodiments and implementation methods can be combined with each other.

[0060] like Figure 1 and Figure 2 As shown, this invention proposes a next point of interest recommendation method based on dual-contrast learning, the method specifically including the following steps:

[0061] Step S1: Obtain the user's historical check-in sequence, and based on the user's check-in point data, filter the data to construct long-term and short-term trajectory sequence pairs and interest point interaction graphs for the user.

[0062] Furthermore, in the process of obtaining user check-in data in step S1, the user's check-in trajectory over a period of time is taken as the user's long-term trajectory, and the user's check-in trajectory for the most recent day is taken as the user's short-term trajectory, thereby obtaining the user's long-term and short-term trajectory pair.

[0063] Furthermore, in step S1, in order to accurately model users and avoid the cold start problem, interest points with fewer than 10 interactions and trajectories with fewer than 3 check-ins were removed during the screening of user check-in data, and inactive users with fewer than 5 check-ins were filtered out. Based on this data, an interaction graph of interest points was constructed.

[0064] In this instance, the process of constructing the interest point interaction graph includes: initializing a directed graph, where the number of times two interest points are visited consecutively is used as the weight of the edge connecting the two interest points;

[0065] Step S2: Using a trajectory embedding module consisting of a graph convolutional network and a basic embedding layer, the user's long-term and short-term trajectories are respectively obtained through this module to obtain corresponding low-dimensional embedding representations.

[0066] Specifically, the trajectory embedding module introduces a graph convolutional network to learn the dependencies between interest points and obtain their embedded representations. Graph convolutional networks can extract features and learn representations for nodes by defining convolution operations on the graph. The propagation of graph convolution is defined as follows:

[0067]

[0068] in It adds an adjacency matrix to the self-loop graph. This refers to adding the degree moments of the self-loop graph, where N is the total number of interest points. W is the output feature matrix of the first layer. (l) Let σ be the weight matrix of the l-th layer, σ be the ReLU activation function, and the output of the last layer be the learned global embedding matrix. Where d p This refers to the embedding dimension of interest points, e pThe i-th column Representing point of interest p i Embedded,

[0069] Meanwhile, the trajectory embedding module uses the most basic embedding layer to learn the embeddings of the remaining context, including information such as the user, check-in point category, access time, and whether it is a weekend. Finally, for the user's trajectory... Each check-in point q i It can be represented as:

[0070]

[0071] in It is a chain operation, where It is the user embedding matrix. It is the embedding matrix of categories. It is an embedding matrix of access times. This is the embedding matrix of the weekend indicator. For convenience, the sum of all embedding dimensions is represented as D, therefore the trajectory... The embedding is represented as

[0072] Specifically, in the embedding learning of user long-term trajectories, for the user's long-term trajectory Each track in the user's long-term sequence is randomly masked with a 10% probability, resulting in... Then The input trajectory embedding layer obtains the embedding of each trajectory, and then the representations of each trajectory in the long-term trajectory are concatenated to obtain the user's long-term trajectory embedding representation. Where X is the total number of check-in points in the long-term trajectory;

[0073] Specifically, for short-term trajectories, a random masking strategy is not used to prevent the loss of necessary data. The short-term trajectory is input into the trajectory embedding module to obtain the short-term trajectory embedding. Where Y represents the total number of check-in points in the short-term trajectory;

[0074] Step S3: Learn hidden representations of long-term trajectory and short-term trajectory from the user's long-term and short-term trajectory embeddings through a bidirectional transformer.

[0075] Specifically, for learning users' long-term stable preferences, the learned long-term trajectory is embedded... The input is fed into a bidirectional transformer, `longEncoder`, used to learn the long-term trajectory, to obtain the final user long-term trajectory latent representation, as shown in the following expression:

[0076]

[0077] FFN(U i=W2(relu(W1U) i +b1))+b2

[0078]

[0079] Where W1 and W2 are the weights of the feedforward neural network in the longEncoder, and b1 and b2 are the biases of the feedforward neural network in the longEncoder. These are the learnable transformation weight matrices for the query, key, and value in the longEncoder, respectively, and h represents the number of attention heads;

[0080] Specifically, for learning users' short-term dynamic preferences, the embedding of users' short-term trajectories... The hidden representation of the short trajectory is obtained by feeding it into the short-term trajectory bidirectional converter, shortEncoder. Its calculation process is similar to that of long-term trajectory calculation, and the expression is as follows:

[0081]

[0082] FFN(U i =W2(relu(W1U) i +b1))+b2

[0083]

[0084] Where W1 and W2 are the weights of the feedforward neural network in the shortEncoder, and b1 and b2 are the biases of the feedforward neural network in the shortEncoder. These are the learnable transformation weight matrices for the query, key, and value in the shortEncoder, respectively, and h represents the number of attention heads;

[0085] Step S4 involves comparative learning between the user's long-term and short-term trajectories to uncover the dependencies between them.

[0086] Contrastive learning learns representations of real data through positive and negative sample pairs. It obtains the short-term trajectory of each user, selects the long-term trajectory of the same user, and uses the average of these trajectories as positive samples; it then selects the long-term trajectories of m different users and uses the average of these trajectories as negative samples.

[0087]

[0088]

[0089]

[0090] in, These are the embeddings of the user's short-term trajectory, long-term trajectory, and negative sample trajectory, respectively. Finally, a simplified InfoNCE loss is used to evaluate the H... s u H l u and H l - Comparison of preferences:

[0091] L inter =-log(σ(μ) <H s u H l u >))-log(1-σ(μ <H s u H l - > <H l u H l - >))

[0092] Where σ represents the sigmoid function, and <, > represent the inner product of two embedded elements regulated by temperature t;

[0093] Step S5: Compare and learn from the user's short-term trajectory with other short-term trajectories to ensure the accuracy of short-term trajectory modeling;

[0094] Furthermore, given that short-term trajectories with the same destination often have similar preferences, m trajectories T with destinations different from the target user's are selected. s - The average value is used as a negative sample, and n trajectories T with destinations consistent with the target user's destination are selected. s + The average value is for positive samples. Similarly, the contrast loss is calculated as follows:

[0095]

[0096]

[0097] L inter =-log(σ(μ) <H s u H s + >))-log(1-σ(μ <H s u H s - > <H s + H s - >))

[0098] in, These are the embeddings of the short trajectories of positive samples and the long trajectories of negative samples, respectively.

[0099] Step S6: Obtain the spatiotemporal dependencies of trajectories from the interest point interaction graph using a graph attention network;

[0100] Specifically, graph attention machines can capture the spatiotemporal dependencies between global trajectory points, and in the interest point interaction graph, the feature matrix... First, a linear transformation is performed to obtain...

[0101] Then multiply by the two partial matrices of the attention weight tensor to obtain W1 and W2 respectively.

[0102] W2∈R N×N ,

[0103] W1 = W z a1, W2 = W z a2

[0104] Here, a1 and a2 are two learnable vectors in the attention matrix. Next, the transposes of W1 and W2 are added together, and the LeakyReLU activation function is applied to obtain the alignment score. Then, the alignment score is summed with... Multiplying these results in the final trajectory spatiotemporal dependency attention matrix w′∈R. N×N :

[0105]

[0106] in, This means adding 1 to all elements of the adjacent matrix A, ensuring that 0 in A does not affect the calculation;

[0107] Next, based on the attention mechanism, short- and long-term trajectory preferences are adaptively fused, and then fine-tuned according to the spatiotemporal dependence of the trajectory to obtain the list of interest point recommendations;

[0108] Specifically, a separate Long Short-Term Memory (LSTM) recurrent neural network is deployed to explicitly model the sequence of recently visited points of interest by the user, obtaining the query vector for the attention mechanism:

[0109]

[0110] in, It involves embedding the user's short-term trajectory and then analyzing the user's long-term and short-term preferences. Connected in series to h k h v Key vectors and value vectors as attention mechanisms:

[0111]

[0112]

[0113] In the formula, T represents the total number of long-term trajectories and short-term trajectories; Represent each potential representation based on the user's current situation. The attention score is then calculated, and the learned user preference h′ is used to obtain the probability distribution y′∈R of N interest points through a multilayer perceptron mechanism. 1×N ;

[0114] Finally, by differentiating the probability distribution based on the spatiotemporal dependent attention weight w′, the final interest point recommendation probability distribution is obtained.

[0115]

[0116] Furthermore, the final optimal parameters learned during the training of the next interest point recommendation model are: the embedding dimensions of both interest points and users are d. p d u =64, the embedding lengths of interest category, check-in time and weekend indicator are d respectively. c d h d w =32, the graph convolutional model has two hidden layers, each with dimensions [32,64], the feedforward network size of the bidirectional converter is 1024, the multi-head attention module uses one attention head, the learning rate is 0.0001, and the number of training rounds is 25.

[0117] In summary, this invention constructs long- and short-term trajectory pairs for users by filtering user check-in sequences, fully models users' long- and short-term travel preferences in the real world, and fully explores and utilizes the dependencies between users' long- and short-term preferences. At the same time, it uses interest point interaction graphs to obtain the spatiotemporal dependencies between global trajectories, effectively improving the accuracy of recommendation results.

[0118] Other embodiments of this application will readily conceive of by those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be regarded as exemplary only.

[0119] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.

Claims

1. A method for recommending the next point of interest based on bi-contrast learning, characterized in that, The method includes the following steps: (1) Users’ travel preferences include long-term stable travel preferences and short-term dynamic travel preferences. Long-term and short-term trajectory pairs of users are constructed by using users’ past check-in records and current check-in records, and interest point interaction graphs are constructed based on users’ check-in history sequences. (2) The user's long and short trajectories are respectively obtained through the trajectory embedding module composed of graph convolutional network and basic embedding layer to obtain the corresponding low-dimensional embedding representation; (3) Given that a user’s long-term trajectory contains the user’s long-term travel preferences, and a user’s recent short-term trajectory contains the user’s short-term dynamic travel preferences; Hidden representations of long-term and short-term trajectories are learned from the user's long-term and short-term trajectory embeddings using a bidirectional transformer to represent the user's long-term and short-term preferences, respectively. (4) Long-term preferences influence short-term preferences, while short-term preferences continuously update long-term preferences; in order to learn the dependency relationship between long-term and short-term preferences, comparative learning is performed between the user's long-term trajectory and short-term trajectory, specifically including the following steps: Select the long-term trajectory of the same user, and use its average value as the positive sample; select The long-term trajectories of different users are used as the average value as a negative sample; the expression is as follows: , , , in, , , These are the embeddings of the user's short-term trajectory, long-term trajectory, and negative sample trajectory, respectively; finally, a simplified InfoNCE loss is used to... , and Compare preferences; , Where σ represents the sigmoid function, L represents the inner product of two embedded parts regulated by temperature t. inter Used to calculate the contrast loss within the trajectory, the parameter µ represents the magnitude of the gradient of the loss function; (5) User trajectories with similar short-term preferences reflect the similarity between user preferences. By using contrastive learning, the short-term trajectories of users are compared with those of other users to ensure the accuracy of short-term trajectory modeling. Specifically, this includes the following steps: Select m trajectories whose destinations differ from the target user's destination. The average value of these samples is used as a negative sample; n trajectories whose destinations are consistent with the target user's destination are selected. The average value represents the positive samples; similarly, the contrast loss is calculated as follows: , , , in, These are the embeddings of the short trajectories of positive samples and the long trajectories of negative samples, respectively. (6) The spatiotemporal dependencies of trajectories are obtained from the interest point interaction graph through graph attention network. Based on the attention mechanism, long and short-term trajectory preferences are adaptively fused and fine-tuned according to the spatiotemporal dependencies of the trajectories to obtain the final interest point recommendation results. The spatiotemporal dependencies of trajectories are obtained from the interaction graph of interest points using a graph attention network, specifically including the following steps: In the interest point interaction graph, the feature matrix First, a linear transformation is performed to obtain... Then multiply it by the two partial matrices of the attention weight tensor to obtain... and ; , in, These are two learnable vectors in the attention matrix; then... and The transposes of the given values ​​are added together, and the LeakyReLU activation function is applied to obtain the alignment score; the alignment scores are then summed. Multiplying these together yields the final trajectory spatiotemporal dependency attention matrix. ; , in, This means adding 1 to all elements of the adjacent matrix A; Secondly, based on the attention mechanism, short- and long-term trajectory preferences are adaptively fused and fine-tuned according to the spatiotemporal dependence of the trajectories to obtain the interest point recommendation list, which includes the following steps: Deploy a Long Short-Term Memory Recurrent Neural Network (LSTM) to explicitly model the sequence of points of interest recently visited by the user, and obtain the query vector of the attention mechanism; , in, It is the embedding of users' short-term trajectories; Connecting them in series, the result of the series connection is expressed as Then, these are used as the key vector and value vector of the attention mechanism, respectively: , , In the formula, T represents the total number of long-term and short-term trajectories; Each hidden representation represents the user's current situation. The attention score is then calculated; subsequently, the learned user preference h′ is processed through a multilayer perceptron mechanism to obtain the probability distribution of N interest points. ; Finally, the final interest point recommendation probability distribution is obtained based on the spatiotemporal dependent attention weight w′ and the probabilities y′ of the N interest points. .

2. The next point of interest recommendation method based on dual contrastive learning according to claim 1, characterized in that, In step (1), the data is filtered based on the user's check-in history sequence. In order to accurately model users and avoid the cold start problem, interest points with fewer than 10 interactions and trajectories with fewer than 3 check-ins are removed, and inactive users with fewer than 5 check-ins are filtered out. Based on this data, an interaction graph of long and short trajectory pairs and interest points is constructed.

3. The next point of interest recommendation method based on dual contrast learning according to claim 1, characterized in that, The construction of the user's long-term and short-term trajectory pair in step (1) is to take the user's check-in trajectory over a period of time as the user's long-term trajectory and the user's check-in trajectory of the most recent day as the user's short-term trajectory, so as to obtain the user's long-term and short-term trajectory pair. The process of constructing the interest point interaction graph in step (1) includes: initializing the directed graph, and using the number of times two interest points are visited consecutively as the weight of the edge connecting the two interest points.

4. The next point of interest recommendation method based on dual contrastive learning according to claim 1, characterized in that, The trajectory embedding module described in step (2) introduces a graph convolutional network to learn the dependencies of interest points and obtain the embedded representation of interest points. The graph convolutional network extracts features and learns representations of nodes by defining convolution operations on the graph. The definition of graph convolution propagation is as follows: , in, It adds an adjacency matrix to the self-loop graph. This is the degree moment of the added self-loop graph, where N is the total number of interest points; The output feature matrix of the first layer, For the first The weight matrix of the layer, where σ is the ReLU activation function; the output of the last layer is the learned global embedding matrix. ,in This refers to the embedding dimension of interest points.

5. The next point of interest recommendation method based on dual contrastive learning according to claim 1, characterized in that, The trajectory embedding module described in step (2) includes four basic embedding layers to learn the embedding of the remaining contextual information of the trajectory, including information related to the user, the type of check-in point, the access time, and whether it is a weekend; finally, for the user's trajectory... Each check-in point It can be represented as: , in It is a chain operation; where , It is the user embedding matrix. It is the embedding matrix of categories. It is an embedding matrix of access times. This is the embedding matrix of the weekend metrics; for convenience, the sum of all embedding dimensions is represented as D; therefore, the trajectory The embedding is represented as ; In the embedding learning of user long-term trajectories, for the user's long-term trajectory Each trajectory in the user's long-term sequence is randomly masked with a 10% probability, resulting in... Then The input trajectory embedding module obtains the embedding of each trajectory; Then, the representations of each trajectory in the long-term trajectory are concatenated to obtain the user's long-term trajectory embedding representation. ,in This represents the total number of check-in points in the long-term trajectory. In learning user preferences for short-term trajectories, a random masking strategy is not used to prevent the loss of necessary data for short-term trajectories. The short-term trajectory is input into the trajectory embedding module to obtain the embedding of the short-term trajectory. ,in This represents the total number of check-in points in the short-term trajectory.

6. The next point of interest recommendation method based on dual contrast learning according to claim 1, characterized in that, Step (3) of learning long-term stable user preferences includes the following steps: embedding the learned long-term trajectory The input is fed into a bidirectional transformer, `longEncoder`, used to learn the long-term trajectory, to obtain the final user long-term trajectory latent representation, as shown in the following expression: , , , in and For the weights of the feedforward neural network, and This is the bias of the feedforward neural network. These are the learnable transformation weight matrices for queries, keys, and values, respectively. The number of heads indicating attention; The learning of user short-term dynamic preferences includes the following steps: embedding user short-term trajectories. The hidden representation of the short trajectory is obtained by feeding it into the short-term trajectory bidirectional converter, shortEncoder. Its calculation method is the same as that for long-term trajectories.