Next point of interest recommendation method based on multi-relation variational contrastive learning

By adopting multi-relational variational comparison learning and the combination of Transformer encoder and GRU network in the next point of interest recommendation method, the limitations of existing methods in capturing higher-order semantic relationships and processing non-uniform graph data are solved, and more efficient and accurate user point of interest recommendation is achieved.

CN119311961BActive Publication Date: 2025-03-18SHANDONG COMP SCI CENTNAT SUPERCOMP CENT IN JINAN +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411873818.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-03-18
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

The existing next point of interest recommendation method is difficult to effectively capture the higher-order semantic relationships between POIs, and when GNN-based models process non-uniformly distributed graph data, they are limited to local structures and ignore deep interactive information, resulting in limited recommendation accuracy.

Method used

Using a multi-relational variational contrast learning method, a transposed attention-enhanced weight matrix is ​​constructed, combined with the Transformer encoder and the GRU network, the multi-level semantic relationships in the user access sequence are captured, and the learning effect of user interests and preferences is optimized through the variational autoencoder.

Benefits of technology

It improves the accuracy and efficiency of the recommendation system, can capture user behavior patterns and preferences more accurately, and provides more personalized and high-quality recommendation services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311961B_ABST
    Figure CN119311961B_ABST
Patent Text Reader

Abstract

A next point of interest recommendation method based on multi-relation variational contrastive learning, involving the field of artificial intelligence, enhances the model's ability to understand the user's visited location information by constructing a transposed attention-enhanced weight matrix. By combining the Transformer encoder and the GRU network, the multi-level semantic relations in the user's visit sequence are effectively captured and utilized, improving the accuracy of the recommendation system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a next point of interest recommendation method based on multi-relation variational contrastive learning. Background Art

[0002] Nowadays, with the popularity of location-based social networks (LBSNs) such as Gowalla and Foursquare, users share the points of interest (POIs) they have visited on these platforms, thus accumulating a large amount of check-in data. POI recommendation systems are committed to helping users more efficiently discover their preferred high-quality POIs in massive information. In practical applications, the POIs visited by users are usually temporally continuous, with specific time periods and contents, which makes the user's check-in history form a check-in sequence (trajectory). The goal of NEXT POI recommendation is to use the user's historical trajectory to predict the next POI that the user may be interested in. Therefore, how to more effectively use the user's historical trajectory information to recommend the next POI, and how to better capture the relationship between the user's check-in sequence and their potential transition preferences, becomes the key to improving the accuracy of recommendation results.

[0003] Existing next point of interest (POI) recommendation methods analyze the user's check-in sequence information through different modeling techniques to predict the user's preference. In early studies, Markov chain and matrix decomposition methods were mainly used to capture the transition relationship between POIs, hoping to better understand the user's mobility pattern through these methods. However, these traditional methods based on feature engineering usually have a high dependence on the quality of the original data, so in practical applications, it is often difficult to ensure the integrity and accuracy of the data. This leads to poor flexibility and efficiency of the method in actual operation, which brings challenges to the accuracy of the recommendation.

[0004] With the development of technology, recent studies have begun to introduce recurrent neural networks (RNNs) and their variants. These methods have achieved significant performance improvements by deeply exploring transition patterns in sequence data. RNNs can capture the dynamic characteristics of time series, thereby more effectively modeling user behavior patterns. In addition, inspired by the successful application of graph neural networks (GNNs), some emerging graph-based methods have begun to try to further model the complex transition relationship between POIs in check-in sequences. This method not only takes into account the user's check-in history, but also improves the recommendation effect through the structural advantages of the graph, and has made some progress.

[0005] However, despite the excellent performance of the above methods, there are still some key issues to be solved in existing research. First, most previous works tend to ignore the high-order semantic relationships between POIs. Many studies only conduct relationship mining from a single perspective, which makes it difficult to fully grasp the potential semantics in sequence information. Therefore, how to effectively capture and utilize multi-level semantic relationships has become a new challenge. Secondly, some existing GNN-based models are usually greatly affected by direct adjacent nodes and fail to effectively utilize the information of high-order neighbor nodes. Especially when facing non-uniformly distributed graph data, simply aggregating the features of all adjacent nodes and then evenly assigning weights may weaken the model's sensitivity to local structures, making it difficult for the model to accurately learn the user's interests and preferences, resulting in information loss and suboptimal representation effects. When dealing with complex node relationships, these models may ignore deeper interactive information because they are too limited to local structures. In addition, due to the problem of data sparsity, frequency-based relevance judgment is limited to some extent, resulting in some low-frequency nodes being mistakenly considered unimportant. However, in practical applications, these low-frequency nodes may contain key potential information, which is crucial to understanding user preferences. Summary of the invention

[0006] In order to overcome the deficiencies of the above technologies, the present invention provides a method for more effectively capturing user behavior patterns and preferences, thereby providing more accurate recommendations.

[0007] The technical solution adopted by the present invention to overcome the technical problems is:

[0008] A next point of interest recommendation method based on multi-relation variational contrastive learning, comprising:

[0009] (a) Obtain the first Access sequence of a user , the corresponding access time series , the corresponding category information sequence , the corresponding geographic location information sequence , , For the User Checked-in visit locations, , For the The total number of visited locations that users checked in, User Checked-in places visited The access time is , , No. User Checked-in places visited The category is , , No. User Checked-in places visited The geographical location is , ;

[0010] (b) Based on Access sequence of a user Construct tensor edge_attr;

[0011] (c) Based on Access sequence of a user Construct a weight matrix of transposed time and a weight matrix of transposed categories;

[0012] (d) Based on the tensor edge_attr, the transposed time weight matrix, and the transposed category weight matrix, the feature matrix of the visit location after feature enhancement is obtained ;

[0013] (e) Feature matrix of visited locations after feature enhancement Input into the Transformer encoder and GRU network to obtain the prediction result of the user's next visit location.

[0014] Furthermore, we use the Tokyo city dataset and New York City dataset from the Foursquare dataset of the social network to Arrange each user’s access record in order of their access time and get the Access sequence of a user , the corresponding access time And the corresponding category information , .

[0015] Further, step (b) comprises the following steps:

[0016] (b-1) Use the pandas data analysis library in Python to read the geographic data file in the Foursquare dataset and obtain the first Access sequence of a user No. Checked-in places visited Pass Checked-in places visited The coordinates of

[0017] (b-2) Use the Haversine formula to calculate the Checked-in places visited The coordinates of Checked-in places visited If the spherical distance is less than or equal to 0.3 km, then Checked-in places visited With Checked-in places visited Construct an edge, add the starting point of the edge to the senders_all edge list, and add the end point of the edge to the receivers_all edge list;

[0018] (b-3) Use the pair dictionary to record Checked-in places visited With Checked-in places visited The number of occurrences of the edge is used as the weight of the edge. ;

[0019] (b-4) Traverse the senders_all edge list and the receivers_all edge list, find the corresponding weight of each edge in the pair dictionary, add the weight to the edge_weights list, and use the torch.tensor function in the PyTorch library to convert the edge_weights list into the tensor edge_attr of the edge.

[0020] Further, step (c) comprises the following steps:

[0021] (c-1) Access sequence of a user Corresponding access time series Input into the linear layer and output the time embedding vector;

[0022] (c-2) Access sequence of a user Corresponding category information sequence Input into the linear layer and output the embedding vector of the category;

[0023] (c-3) The permute operation in the PyTorch library is used on the time embedding vector to obtain the transposed time weight matrix, and the permute operation in the PyTorch library is used on the category embedding vector to obtain the transposed category weight matrix.

[0024] Further, step (d) comprises the following steps:

[0025] (d-1) Use the nn.Linear method in pytorch to convert the User Checked-in places visited Mapping it into the vector space, we get User Checked-in places visited The corresponding eigenvector ;

[0026] (d-2) According to Access sequence of a user Assign an index value to each visited location in the order of the visited locations, and store all the index values ​​in the list in sequence In, according to the list Sort the feature vectors corresponding to each visited location by the order of the index value in the , and get the visited location feature matrix , visit location feature matrix No. After sorting the behavior The feature vector corresponding to the visited locations of the check-ins;

[0027] (d-3) The visit location feature matrix , add the transposed time weight matrix and the transposed category weight matrix to obtain The characteristic matrix of the row , the feature matrix No. The elements of a row are ;

[0028] (d-4) by formula Calculate the weighted feature vector of the visited location , weighted feature vector of visited locations Perform normalization operation to obtain the normalized feature vector , The normalized feature vectors constitute the visit location feature matrix , the normalized eigenvector is the visit location feature matrix Middle Elements of the row;

[0029] (d-5) The feature matrix Input into the graph neural network to obtain the feature matrix of the visited locations after feature enhancement .

[0030] Further, step (d-5) comprises the following steps:

[0031] (d-51) Establish a learnable matrix , ,in For the User Checked-in places visited The corresponding eigenvector The dimension of Calculate the first User Checked-in places visited With Checked-in places visited The attention coefficient between , where is the LeakyReLU activation function, For the User Checked-in places visited The corresponding eigenvector, is transposed;

[0032] (d-52) Use the softmax function to adjust the attention coefficient Normalize and get the weight matrix , ;

[0033] (d-53) by formula Calculate the enhanced feature vector , according to the list Sort the enhanced feature vectors corresponding to each signed-in visited location in the order of the index value to obtain the visited location feature matrix after feature enhancement , the feature matrix of the visited places after feature enhancement No. After sorting the behavior The enhanced feature vector.

[0034] Further, step (e) comprises the following steps:

[0035] (e-1) Construct a Transformer encoder consisting of four Transformer encoder layers to enhance the feature matrix of the visited locations Input into the Transformer encoder and output the feature sequence ;

[0036] (e-2) Construct a GRU network consisting of two layers of bidirectional GRU, two layers of unidirectional GRU, and two layers of GRUCell to transform the feature sequence Input into the GRU network and output the feature sequence of the visited locations , the feature sequence of the visited locations Input into the first fully connected layer and output a two-dimensional vector ;

[0037] (e-3) The feature sequence Input into the variational autoencoder VAE, and output the feature sequence of the visited locations , the feature sequence of the visited locations Input into the second fully connected layer and output a two-dimensional vector ;

[0038] (e-4) Use the nn.Embedding function in pytorch to embed the list Convert to feature vector ;

[0039] (e-5) The eigenvector Sequence of characteristics of visited places Perform concatenation operation to obtain feature vector ;

[0040] (e-6) The eigenvector Input into the multi-layer perceptron MLP and output the feature , the feature Input into the softmax function and output the probability distribution , the probability distribution The checked-in visit location corresponding to the maximum value is used as the prediction result of the user's next visit location.

[0041] Furthermore, the network parameters of the GRU network and the first fully connected layer in step (e-2) are , the network parameters of the variational autoencoder VAE and the second fully connected layer in step (e-3) are Based on the evidence lower bound and mutual information regularization, a contrastive learning loss function combined with variational Bayes is constructed. Based on the evidence lower bound, a loss function is constructed. The contrastive learning loss function is used to optimize the network parameters. , using the loss function to optimize the network parameters , so that the two-dimensional vector With two-dimensional vector Minimize the distribution difference in vector space.

[0042] Furthermore, if User Checked-in places visited The visited locations that the user has signed in to consecutively The time difference between them is less than the preset time threshold ,but The positive sample pair that constitutes the contrastive learning loss function; if User Checked-in places visited Corresponding categories With User Checked-in places visited Corresponding categories Different or User Checked-in places visited Corresponding geographical location With User Checked-in places visited Corresponding geographical location The distance between them is greater than the preset distance threshold ,but The negative sample pairs that constitute the contrastive learning loss function, .

[0043] Preferably, the preset time threshold The value is 15 minutes, the preset distance threshold The value is 0.3 kilometers.

[0044] The beneficial effects of the present invention are as follows: by constructing a transposed attention-enhanced weight matrix, the model's ability to understand the user's visited location information is enhanced. By combining the Transformer encoder and the GRU network, the multi-level semantic relationships in the user's visit sequence are effectively captured and utilized, thereby improving the accuracy of the recommendation system. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0046] The following is combined with Figure 1 The present invention is further described.

[0047] A next point of interest recommendation method based on multi-relation variational contrastive learning, comprising:

[0048] (a) Obtain the first Access sequence of a user , the corresponding access time series , the corresponding category information sequence , the corresponding geographic location information sequence , , For the User Checked-in visit locations, , For the The total number of visited locations that users checked in, User Checked-in places visited The access time is , , No. User Checked-in places visited The category is , , No. User Checked-in places visited The geographical location is , .

[0049] (b) Based on Access sequence of a user Construct the tensor edge_attr.

[0050] (c) Based on Access sequence of a user Construct a transposed time weight matrix and a transposed category weight matrix.

[0051] (d) Based on the tensor edge_attr, the transposed time weight matrix, and the transposed category weight matrix, the feature matrix of the visit location after feature enhancement is obtained .

[0052] (e) Feature matrix of visited locations after feature enhancement Input into the Transformer encoder and GRU network to obtain the prediction result of the user's next visit location.

[0053] By constructing a transposed attention-enhanced weight matrix, the model's ability to understand the user's visited location information is enhanced. By combining the Transformer encoder and the GRU network, the multi-level semantic relationships in the user's visit sequence are effectively captured and utilized, improving the accuracy of the recommendation system. At the same time, this method also constructs a posterior distribution through a variational autoencoder (VAE) to approximate the prior distribution, further optimizing the learning effect of user interests and preferences. It not only improves the accuracy and efficiency of the POI recommendation system, but also provides users with more personalized and high-quality recommendation services.

[0054] Table 1 Comparison of indicators of various POI recommendation methods

[0055]

[0056] Table 1 compares the next point of interest recommendation method of the present invention with the current multiple next point of interest recommendation methods, using classic measurement indicators in current travel recommendation methods for comparison. The experimental indicators show that the method proposed in the present invention can more effectively capture user behavior patterns and preferences when processing user point of interest recommendation tasks, thereby providing more accurate recommendations.

[0057] In one embodiment of the present invention, the Tokyo city dataset and the New York City dataset in the Foursquare dataset of the social network are obtained according to Arrange each user’s access record in order of their access time and get the Access sequence of a user , the corresponding access time And the corresponding category information , .

[0058] In one embodiment of the present invention, step (b) comprises the following steps:

[0059] (b-1) Use the pandas data analysis library in Python to read the geographic data file in the Foursquare dataset and obtain the first Access sequence of a user No. Checked-in places visited Pass Checked-in places visited The coordinates of .

[0060] (b-2) Use the Haversine formula to calculate the Checked-in places visited The coordinates of Checked-in places visited If the spherical distance is less than or equal to 0.3 km, then Checked-in places visited With Checked-in places visited Construct an edge, add the start point of the edge to the senders_all edge list, and add the end point of the edge to the receivers_all edge list.

[0061] (b-3) Use the pair dictionary to record Checked-in places visited With Checked-in places visited The number of occurrences of the edge is used as the weight of the edge. .

[0062] (b-4) Traverse the senders_all edge list and the receivers_all edge list, find the corresponding weight of each edge in the pair dictionary, add the weight to the edge_weights list, and use the torch.tensor function in the PyTorch library to convert the edge_weights list into the tensor edge_attr of the edge.

[0063] In one embodiment of the present invention, step (c) comprises the following steps:

[0064] (c-1) Access sequence of a user Corresponding access time series Input into the linear layer and output the time embedding vector.

[0065] (c-2) Access sequence of a user Corresponding category information sequence Input into the linear layer and output the embedding vector of the category.

[0066] (c-3) The permute operation in the PyTorch library is used on the time embedding vector to obtain the transposed time weight matrix, and the permute operation in the PyTorch library is used on the category embedding vector to obtain the transposed category weight matrix.

[0067] In one embodiment of the present invention, step (d) comprises the following steps:

[0068] (d-1) Use the nn.Linear method in pytorch to convert the User Checked-in places visited Mapping it into the vector space, we get User Checked-in places visited The corresponding eigenvector .

[0069] (d-2) According to Access sequence of a user Assign an index value to each visited location in the order of the visited locations, and store all the index values ​​in the list in sequence In, according to the list Sort the feature vectors corresponding to each visited location by the order of the index value in the , and get the visited location feature matrix , visit location feature matrix No. After sorting the behavior The feature vector corresponding to the visited locations of each check-in.

[0070] (d-3) The visit location feature matrix , add the transposed time weight matrix and the transposed category weight matrix to obtain The characteristic matrix of the row , the feature matrix No. The elements of a row are .

[0071] (d-4) by formula Calculate the weighted feature vector of the visited location , weighted feature vector of visited locations Perform normalization operation to obtain the normalized feature vector , The normalized feature vectors constitute the visit location feature matrix , the normalized eigenvector is the visit location feature matrix Middle Elements of a row.

[0072] (d-5) The feature matrix Input into the graph neural network to obtain the feature matrix of the visited locations after feature enhancement .

[0073] In this embodiment, step (d-5) comprises the following steps:

[0074] (d-51) Establish a learnable matrix , ,in For the User Checked-in places visited The corresponding eigenvector The dimension of Calculate the first User Checked-in places visited With Checked-in places visited The attention coefficient between , where is the LeakyReLU activation function, For the User Checked-in places visited The corresponding eigenvector, is transposed;

[0075] (d-52) Use the softmax function to adjust the attention coefficient Normalize and get the weight matrix , ;

[0076] (d-53) by formula Calculate the enhanced feature vector , according to the list Sort the enhanced feature vectors corresponding to each signed-in visited location in the order of the index value to obtain the visited location feature matrix after feature enhancement , the feature matrix of the visited places after feature enhancement No. After sorting the behavior The enhanced feature vector.

[0077] In one embodiment of the present invention, step (e) comprises the following steps:

[0078] (e-1) Construct a Transformer encoder consisting of four Transformer encoder layers to enhance the feature matrix of the visited locations Input into the Transformer encoder and output the feature sequence ;

[0079] (e-2) Construct a GRU network consisting of two layers of bidirectional GRU, two layers of unidirectional GRU, and two layers of GRUCell to transform the feature sequence Input into the GRU network and output the feature sequence of the visited locations , the feature sequence of the visited locations Input into the first fully connected layer and output a two-dimensional vector ;

[0080] (e-3) The feature sequence Input into the variational autoencoder VAE, and output the feature sequence of the visited locations , the feature sequence of the visited locations Input into the second fully connected layer and output a two-dimensional vector ;

[0081] (e-4) Use the nn.Embedding function in pytorch to embed the list Convert to feature vector ;

[0082] (e-5) The eigenvector Sequence of characteristics of visited places Perform concatenation operation to obtain feature vector ;

[0083] (e-6) The eigenvector Input into the multi-layer perceptron MLP and output the feature , the feature Input into the softmax function and output the probability distribution , the probability distribution The checked-in visit location corresponding to the maximum value is used as the prediction result of the user's next visit location.

[0084] In this embodiment, the network parameters of the GRU network and the first fully connected layer in step (e-2) are , the network parameters of the variational autoencoder VAE and the second fully connected layer in step (e-3) are Based on the evidence lower bound and mutual information regularization, a contrastive learning loss function combined with variational Bayes is constructed. Based on the evidence lower bound, a loss function is constructed. The contrastive learning loss function is used to optimize the network parameters. , using the loss function to optimize the network parameters , so that the two-dimensional vector With two-dimensional vector Minimize the distribution difference in vector space.

[0085] If User Checked-in places visited The visited locations that the user has signed in to consecutively The time difference between them is less than the preset time threshold ,but The positive sample pair that constitutes the contrastive learning loss function; if User Checked-in places visited Corresponding categories With User Checked-in places visited Corresponding categories Different or User Checked-in places visited Corresponding geographical location With User Checked-in places visited Corresponding geographical location The distance between them is greater than the preset distance threshold ,but The negative sample pairs that constitute the contrastive learning loss function, Preferably, the preset time threshold The value is 15 minutes, the preset distance threshold The value of is 0.3 km. This method of constructing positive and negative samples enables the recommendation system to more accurately capture the user's points of interest when dealing with complex node relationships and data sparsity problems, thereby optimizing the utilization efficiency of computing resources while ensuring the quality of recommendations.

[0086] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A next point of interest recommendation method based on multi-relation variational contrastive learning, characterized in that: include: (a) Obtain the access sequence S of the uth user from the social network dataset u , the corresponding access time series T u , the corresponding category information sequence C u , the corresponding geographic location information sequence G u , is the visited location of the i-th check-in of the u-th user, i∈{1,...,n}, n is the total number of visited locations checked in by the u-th user, and the visited location of the i-th check-in of the u-th user The access time is The visited location of the i-th check-in of the u-th user The category is The visited location of the i-th check-in of the u-th user The geographical location is (b) Based on the access sequence S of the uth user u Construct tensor edge_attr; (c) Based on the access sequence S of the uth user u Construct a weight matrix of transposed time and a weight matrix of transposed categories; (d) Based on the tensor edge_attr, the transposed time weight matrix, and the transposed category weight matrix, the feature-enhanced visit location feature matrix X″′ is obtained; (e) Input the feature matrix X″′ of the visited locations after feature enhancement into the Transformer encoder and GRU network to obtain the prediction result of the user’s next visited location; Step d) comprises the following steps: (d-1) Use the nn.Linear method in pytorch to calculate the visited locations of the i-th check-in of the u-th user Mapped into the vector space, we get the visited location of the u-th user at the i-th check-in The corresponding eigenvector x i ; (d-2) According to the access sequence S of the uth user u Assign an index value to each visited location according to the order of the visited locations in , store all the index values ​​in the list L in sequence, sort the feature vectors corresponding to each visited location according to the order of the index values ​​in the list L, and obtain the visited location feature matrix X, where the i-th row of the visited location feature matrix X is the feature vector corresponding to the i-th visited location after sorting; (d-3) Add the visited location feature matrix X, the transposed time weight matrix, and the transposed category weight matrix to obtain an n-row feature matrix X′, where the i-th row of the feature matrix X′ is x i1 ; (d-4) through the formula x i2 =w i u ·x i1 Calculate the weighted feature vector x of the visited location i2 , weighted feature vector x of the visited locations i2 Perform normalization operation to obtain the normalized feature vector x i ″2, n normalized feature vectors constitute the visit location feature matrix X″, the normalized feature vector x i ″2″ is the element of the i-th row in the visited location feature matrix X″; (d-5) Input the feature matrix X″ into the graph neural network to obtain the feature matrix X″′ of the visited locations after feature enhancement.

2. The next point of interest recommendation method based on multi-relation variational contrastive learning according to claim 1, characterized in that: Arrange the access records of each user in the Tokyo city dataset and the New York City dataset in the Foursquare dataset of the social network according to the access time order of M users, and obtain the access sequence S of the uth user u , the corresponding access time T u And the corresponding category information C u , u∈{1,...,M}.

3. The next point of interest recommendation method based on multi-relation variational contrastive learning according to claim 2, characterized in that: Step (b) comprises the following steps: (b-1) Use the pandas data analysis library in Python to read the geographic data file in the Foursquare dataset and obtain the visit sequence S of the u-th user through the geographic data file. u The i-th check-in visit location and the jth check-in visit location The coordinates of (b-2) Use the Haversine formula to calculate the visited locations of the i-th check-in The coordinates of the jth check-in visit location If the spherical distance is less than or equal to 0.3 km, the i-th check-in visit location The visited location with the jth check-in Construct an edge, add the starting point of the edge to the senders_all edge list, and add the end point of the edge to the receivers_all edge list; (b-3) Use the pair dictionary to record the visited location of the i-th check-in The visited location with the jth check-in The number of occurrences of the edge is used as the weight of the edge. (b-4) Traverse the senders_all edge list and the receivers_all edge list, find the corresponding weight of each edge in the pair dictionary, add the weight to the edge_weights list, and use the torch.tensor function in the PyTorch library to convert the edge_weights list into the tensor edge_attr of the edge.

4. The next point of interest recommendation method based on multi-relation variational contrastive learning according to claim 1, characterized in that: Step (c) comprises the following steps: (c-1) The access sequence S of the uth user u The corresponding access time series T u Input into the linear layer and output the time embedding vector; (c-2) The access sequence S of the uth user u The corresponding category information sequence C u Input into the linear layer and output the embedding vector of the category; (c-3) The permute operation in the PyTorch library is used on the time embedding vector to obtain the transposed time weight matrix, and the permute operation in the PyTorch library is used on the category embedding vector to obtain the transposed category weight matrix.

5. The next point of interest recommendation method based on multi-relation variational contrastive learning according to claim 1, characterized in that: Step (d-5) comprises the following steps: (d-51) Establish a learnable matrix Where D is the visit location of the i-th check-in of the u-th user The corresponding eigenvector x i The dimension of Calculate the visit location of the u-th user's i-th check-in The visited location with the jth check-in The attention coefficient α ij , where LeakyReLU(·) is the LeakyReLU activation function, x j The location visited by the jth check-in of the uth user The corresponding eigenvector, T is the transpose; (d-52) Use the softmax function to adjust the attention coefficient α ij Normalize and get the weight matrix W ij , (d-53) by formula Calculate the enhanced feature vector h i , sort the enhanced feature vectors corresponding to each checked-in visited location according to the order of the index values ​​in the list L, and obtain the feature matrix X″′ of the visited location after feature enhancement. The i-th row of the feature matrix X″′ of the visited location after feature enhancement is the i-th enhanced feature vector after sorting.

6. The next point of interest recommendation method based on multi-relation variational contrastive learning according to claim 1, characterized in that: Step (e) comprises the following steps: (e-1) Construct a Transformer encoder consisting of four Transformer encoder layers, input the feature-enhanced visit location feature matrix X″′ into the Transformer encoder, and output the feature sequence (e-2) Construct a GRU network consisting of two layers of bidirectional GRU, two layers of unidirectional GRU, and two layers of GRUCell to transform the feature sequence Input into the GRU network and output the feature sequence of the visited locations The sequence of visit location features Input into the first fully connected layer, and output a two-dimensional vector ot1; (e-3) The feature sequence Input into the variational autoencoder VAE, and output the feature sequence of the visited locations The sequence of visit location features Input into the second fully connected layer, and output the two-dimensional vector ot2; (e-4) Use the nn.Embedding function in pytorch to convert the list L into a feature vector h position ; (e-5) The feature vector h position Sequence of characteristics of visited places Perform concatenation operation to obtain feature vector in1; (e-6) Input the feature vector in1 into the multi-layer perceptron MLP, and output the feature oh1. Input the feature oh1 into the softmax function, and output the probability distribution oh2. The checked-in visit location corresponding to the maximum value in the probability distribution oh2 is used as the prediction result of the user's next visit location.

7. The next point of interest recommendation method based on multi-relation variational contrastive learning according to claim 6, characterized in that: The network parameters of the GRU network and the first fully connected layer in step (e-2) are φ, and the network parameters of the variational autoencoder VAE and the second fully connected layer in step (e-3) are θ. A contrastive learning loss function combined with variational Bayes is constructed based on the evidence lower bound and mutual information regularization. The loss function is constructed based on the evidence lower bound. The contrastive learning loss function is used to optimize the network parameter φ. The loss function is used to optimize the network parameter θ to minimize the distribution difference between the two-dimensional vector ot1 and the two-dimensional vector ot2 in the vector space.

8. The next point of interest recommendation method based on multi-relation variational contrastive learning according to claim 7, characterized in that: If the uth user's i-th check-in visit location The visited locations that the user has signed in to consecutively If the time difference between them is less than the preset time threshold Δt, then The positive sample pairs when forming the contrastive learning loss function; if the u-th user visits the i-th check-in location Corresponding categories The location visited by the kth check-in of the uth user Corresponding categories Different or the visited places of the i-th check-in of the u-th user Corresponding geographical location The location visited by the kth check-in of the uth user Corresponding geographical location If the distance between is greater than the preset distance threshold d, then The negative sample pairs that constitute the contrastive learning loss function, k∈{1,...,n},k≠i.

9. The next point of interest recommendation method based on multi-relation variational contrastive learning according to claim 8, characterized in that: The preset time threshold Δt is 15 minutes, and the preset distance threshold d is 0.3 kilometers.

Citation Information

Patent Citations

  • POI recommendation method based on multi-modal time information fusion

    CN118779531A

  • Method for recommending next interest point based on graph structure and sequence mode

    CN118861446A