A point of interest recommendation method for a low-quality data scenario

By means of spatiotemporal data enhancement, the problems of data sparsity and unevenness in the point of interest recommendation system are solved, more accurate personalized recommendation effects are achieved, and the performance of the recommendation system and user satisfaction are improved.

CN119622122BActive Publication Date: 2025-10-10BEIJING UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411806912.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-10-10
Estimated Expiration
2044-12-10

AI Technical Summary

Technical Problem

Existing point of interest recommendation systems suffer from data sparsity and unevenness when faced with low-quality data scenarios, resulting in a lack of personalization and diversity in recommendation results. In particular, it is difficult to accurately understand user interests and behavior patterns in the spatiotemporal dimensions.

Method used

Through spatiotemporal data enhancement methods, including preprocessing, learning users' long-term and short-term preferences, using attention mechanisms and comparative self-supervised learning, we construct spatiotemporal uniform enhanced data, combine long-term and short-term preferences to generate recommendation results, and optimize the personalized effect of the model.

Benefits of technology

It significantly improves the accuracy and personalized recommendation effect of recommendation systems on low-quality data sets, and improves the overall performance of user behavior prediction and recommendation systems, especially in the fields of e-commerce, social media and content recommendation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622122B_ABST
    Figure CN119622122B_ABST
Patent Text Reader

Abstract

The application provides a point of interest recommendation method for a low-quality data scene. First, the user preferences are divided into long-term preferences and short-term preferences by using a neural network, and different methods are used to learn the long-term preferences and the short-term preferences respectively. Specifically, the long-term preferences of the user are captured by using an attention mechanism, and two long short-term memory (LSTM) networks that do not share parameters are used to learn the short-term preferences of the user. Second, contrast self-supervised learning is used to construct reinforced data in the time-space dimension, and a contrast loss is used to enhance the recognition ability of the LSTM, so as to improve the understanding and representation ability of the model to the data. Finally, the long-term and short-term outputs are combined together, and the importance of the long-term and short-term preferences is balanced by learning a weighting vector of each user. The comprehensive method can obtain more excellent recommendation results when applied to a low-quality data set, and provides strong support for the performance improvement of a recommendation system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of point of interest recommendation, and mainly relates to a point of interest recommendation method for low-quality data scenarios. Background Art

[0002] With the rapid development of global positioning systems and Web 2.0 technologies, research on location-based social networks (LBSNs) has gradually emerged. LBSNs provide users with a unique way to interact socially through check-in and sharing. Combined with the widespread adoption of smartphones, the number of users on these LBSN platforms has rapidly increased, reaching billions. However, this information overload poses a challenge for users, making it difficult to quickly and accurately find information that meets their interests and needs. To address this issue, point of interest recommendation has become a popular research direction.

[0003] However, POI recommendation systems face a severe data sparsity problem. Among the massive POIs provided by LBSN platforms, the number of POIs that users can actually visit is extremely limited, resulting in an exceptionally sparse dataset. Consequently, many studies have proposed using data augmentation to increase the scale and quality of training data, thereby improving the performance of recommendation systems. Currently, traditional data augmentation methods for POI check-in sequences often ignore the uniformity of data in the spatiotemporal dimensions, a problem that can impact the accuracy of POI recommendation tasks. Firstly, user check-in sequences may have missing data, large time intervals, or long intervals between check-in records. This non-uniformity can lead to models failing to fully understand user interests and behavior patterns within certain time intervals, thus impacting the personalization and accuracy of recommendation results. Secondly, the location data in user check-in sequences often exhibits a long-tail distribution, which can lead recommendation systems to favor popular locations while ignoring long-tail regions. This, in turn, results in a lack of diversity and personalization in location recommendations. Summary of the Invention

[0004] In response to the shortcomings of the above-mentioned existing technologies, the present invention proposes a POI recommendation method for low-quality data scenarios. By using spatiotemporal data enhancement, the method enhances the user POI check-in sequence from both temporal and spatial uniformity aspects, enabling the model to better extract the spatiotemporal characteristics between user check-in sequences and enhance the personalized recommendation effect.

[0005] The technical solution of the present invention is:

[0006] A method for recommending points of interest in low-quality data scenarios, the method comprising:

[0007] Step I: Preprocessing the dataset, first, the check-in data of the user is systematically preprocessed to ensure the quality and consistency of the data, and then the dataset is divided by time series, and the user check-in data is divided into long-term sequences and short-term sequences;

[0008] The dataset refers to a collection of check-in data of a user in a location-based social network, which contains user ID, point of interest ID, point of interest category ID, point of interest category, longitude coordinate of the location of the point of interest, latitude coordinate of the location of the point of interest, time zone of the location of the point of interest, and time of the user's check-in at the point of interest.

[0009] The check-in refers to the behavior of the user interacting with the point of interest at a certain time.

[0010] The check-in sequence of the user refers to the sequence obtained by sorting the historical check-in of the user according to the check-in time Wherein, u represents the user, n represents the total number of check-ins of the user u in the dataset, q represents a triple (L, C, T s ), wherein L represents the point of interest ID, C represents the point of interest category ID, and T s represents the timestamp of the user's check-in at the point of interest.

[0011] The long-term sequence refers to the complete check-in data of the user in the dataset

[0012] The short-term sequence refers to dividing Q u into a series of subsequences with length k, and each subsequence can be represented as

[0013] Step II: Learning the long-term preference of the user. First, the long-term sequence L u is input into the embedding layer to obtain the fusion feature vector of the point of interest; second, in view of the fact that the same point of interest may have different effects on different users, the application uses an attention mechanism to calculate the feature weight of the point of interest in the long-term sequence, and then captures the long-term preference of the user based on the feature weight.

[0014] Step III: Learning the short-term preference of the user. The short-term sequence S u of the user is used to learn the short-term preference of the user. Since the location and the category have different effects on the preference of the user in a certain time period, the application inputs the location and the category into two long short-term memory networks (LSTM) that do not share parameters to learn the location-level and category-level preferences, respectively.

[0015] Step IV: Enhance the model's representation ability using contrastive self-supervised learning. First, calculate the correlation between points of interest and use item correlation to alleviate the disturbance to the original sequence; second, propose a new robust sequence enhancement method to construct enhanced data from both temporal and spatial perspectives; finally, solve the problem of data sparsity and noisy interactions by unifying the contrastive self-supervised learning task and the recommendation task.

[0016] The contrastive self-supervised learning refers to generating enhanced samples from unlabeled data and enhancing the recognition ability of the encoder by using contrastive loss. The contrastive loss maximizes the consistency between positive pairs, where a positive pair is a pair of augmented views and original views of an instance.

[0017] Step V: Generate a recommendation result by combining the user's long-term and short-term preferences. In the output layer, the long-term and short-term outputs are fused, and to better learn personalized preferences, the model learns a weighting vector for each user to balance the importance of long-term preferences, location-level preferences, and category-level preferences, thereby generating the final recommendation probability of candidate points of interest.

[0018] Further, according to the point-of-interest recommendation method for low-quality data scenarios, the step I includes the following steps:

[0019] Step I-1: Re-number and sort the data set based on time interval uniformity. Part of the original data set is considered "time interval uniformity" and does not need to be enhanced, so as to minimize the disturbance to the original data set while performing spatio-temporal data enhancement. Group the original data set by UserID, calculate the standard deviation δ t of the time interval corresponding to each UserID, and sort and number the UserID according to δ t . The smaller the UserID number, the more uniform the time interval of the check-in data. The data of the top α% of UserID numbers is considered "uniform".

[0020] Step I-2: Data deduplication. First, remove completely duplicated check-in records in the data set; second, consider that the same point-of-interest ID may not belong to the same point-of-interest category, and perform category normalization on the point-of-interest category corresponding to the point-of-interest ID.

[0021] Step I-3: Divide the data set. The complete check-in data L u of a user is considered as a long-term sequence and the required data is generated to learn the user's long-term preferences. The check-in data of a user is divided into a group of S u , which is considered as a short-term sequence and other required data is generated to learn the user's short-term preferences.

[0022] Furthermore, according to the method for recommending points of interest in low-quality data scenarios, step II includes the following steps:

[0023] Step II-1: Obtain the fusion feature vector of the interest point through the embedding layer. Since the information represented by the timestamp is continuous and difficult to embed, the present invention maps the timestamp of the original data to discrete hours, and then represents each hour as a D-dimensional vector. The user ID, interest point ID, and interest point category ID are represented as one-hot vectors and embedded into D-dimensional vectors respectively. u 、D l 、D c In order to learn high-level representations of interest points in each user’s long-term sequence, the present invention utilizes nonlinear transformation to capture the latent vector of each interest point.

[0024] Step II-2: Utilize the attention mechanism to calculate the features of POIs in the long-term sequence. This method uses the user embedding vector learned by the embedding layer to measure the similarity between user preferences and the fused feature vectors of POIs. First, the importance of each POI for each user is calculated. In this method, the importance of each POI is defined as the normalized similarity between the embedding vector of user u and the fused feature vector of the POI. Then, the user's long-term preferences are learned by fusing the latent vectors of POIs with different weights. Finally, the user's long-term preferences are input into a fully connected layer to calculate the probability of the next POI.

[0025] Furthermore, according to the method for recommending points of interest in low-quality data scenarios, step IV includes the following steps:

[0026] Step IV-1: Calculate the similarity between interest points. When constructing spatiotemporal data augmentation, the similarity between interest points is required to reduce the disturbance to the original sequence. Therefore, it is necessary to design a simple and effective method to calculate the similarity between interest points. First, calculate the static similarity between interest points, then calculate the dynamic similarity between interest points, and finally add the two to obtain the final quantitative representation of the similarity between interest points.

[0027] Step IV-2: Construct spatiotemporal enhanced data, by enhancing the time and space of the original data to obtain a new sequence with uniform spatiotemporal and temporal properties;

[0028] Step IV-3: Optimize the encoder via contrastive self-supervised learning.

[0029] Furthermore, according to the method for recommending points of interest in low-quality data scenarios, step IV-1 includes the following steps:

[0030] Step IV-1-1: Calculate the static similarity between interest points:

[0031] Static similarity is a memory-based similarity that uses item-based collaborative filtering with inverse user frequency (ItemCF-IUF) to measure the similarity between POIs. That is, static similarity believes that if two POIs share a higher proportion of common users, the similarity between the two POIs is higher.

[0032] Step IV-1-2: Calculate the dynamic similarity between interest points:

[0033] Dynamic similarity is a model-based similarity that infers the similarity between interest points by calculating the similarity between their representations.

[0034] Step IV-1-3: Calculate the final similarity between interest points:

[0035] The static similarity and dynamic similarity between interest points are added together, and the result is defined as the final similarity between interest points.

[0036] Furthermore, according to the method for recommending points of interest in low-quality data scenarios, step IV-2 includes the following steps:

[0037] Step IV-2-1: Build time data augmentation:

[0038] Insert the target interest point between the two interest points with the largest time interval in the user check-in sequence, so that the maximum time interval D in the original sequence T The new time interval D in the new sequence T / 2 is replaced by the new sequence, and the distribution of time intervals in the new sequence is more uniform.

[0039] Step IV-2-2: Combine temporal data augmentation with spatial data augmentation:

[0040] The goal of this step is to maximize the uniformity of spatial spacing in the new sequence, while ensuring a more uniform time interval. Since step IV-2-1 determined the insertion position, this step aims to select the target points of interest. First, based on the similarity described in step IV-1, β candidate points of interest are selected. These β candidate points of interest are then inserted into the original sequence to generate β new sequences. The spatial uniformity of these β new sequences is calculated, and the point of interest that results in the most uniform spatial spacing in the new sequence is selected as the target point of interest. Ultimately, a new sequence with uniform temporal and spatial spacing is obtained.

[0041] Step IV-3: Optimize the encoder via contrastive self-supervised learning:

[0042] Contrastive self-supervised learning trains the encoder by maximizing the consistency between different views of an instance. First, the contrastive loss function of the model is defined and the contrastive loss function is minimized for parameter learning.

[0043] Furthermore, according to the method for recommending points of interest in low-quality data scenarios, step V includes the following steps:

[0044] Step V-1: User-based linear combination unit:

[0045] First, a user-based linear combination unit is used in the output layer to combine the user's long-term preference and short-term preference to calculate the probability of the next point of interest. Finally, the probability is normalized.

[0046] Step V-2: Using joint learning strategies to assist recommendation tasks:

[0047] The task of recommending the next point of interest is taken as the main task, and the comparative self-supervised learning task is taken as the auxiliary task to learn together, and the model parameters are updated through back propagation to train the model.

[0048] Compared with the prior art, the present invention has the following obvious advantages and beneficial effects:

[0049] Compared with conventional methods, recommendations for low-quality datasets are more accurate. This paper systematically studies the application of spatiotemporal data augmentation in recommendation models, significantly improving the model's generalization ability in practical recommendation scenarios, enabling it to better adapt to and process diverse user behavior data and scenario information. The proposed techniques and methods have broad application potential in recommendation systems, particularly in e-commerce, social media, and content recommendation. Through effective spatiotemporal data augmentation strategies, the overall performance and user satisfaction of recommendation systems can be significantly improved in multiple scenarios, such as user behavior prediction, personalized recommendations, and user experience optimization. At the same time, a combined strategy is adopted to further improve the relevance and accuracy of recommendation results while ensuring a uniform distribution of spatiotemporal features. Experiments confirm that the proposed model can achieve a mean average recognition accuracy (MAP) of 20.84% ​​on the Foursquare NYC dataset. Therefore, this comprehensive approach enables us to obtain superior recommendation results when applied to low-quality datasets, providing strong support for improving the performance of recommendation systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 Flowchart of the point of interest recommendation method for low-quality data scenarios

[0051] Figure 2 Schematic diagram of spatiotemporal data enhancement

[0052] Figure 3 Contrastive learning diagram DETAILED DESCRIPTION

[0053] Based on the above description, the following is a specific implementation process, but the scope of protection of this patent is not limited to this implementation process.

[0054] Step I: Preprocess the dataset:

[0055] Step I-1: Renumber and sort the dataset based on time interval uniformity:

[0056] A part of the original dataset is considered to have “uniform time intervals” and does not need to be enhanced, so as to minimize the disturbance to the original dataset while enhancing the spatiotemporal data of the dataset. The original dataset is grouped by user ID (UserID) and the standard deviation of the time interval corresponding to each UserID is calculated. t , and its calculation formula is shown in Formula 1:

[0057]

[0058] Where n is the length of the user's check-in sequence in the dataset. t Sort and number the UserIDs. The smaller the number, the more uniform the check-in intervals. In this implementation, based on experimental results, when α = 15, the loss function has the lowest loss and the model training effect is the best. Therefore, α is set to 15, that is, the first 15% of the UserID data is considered "uniform."

[0059] Step I-2: Data deduplication:

[0060] First, completely duplicate records in the dataset are removed. Second, considering that the same POI ID L may correspond to multiple POI category IDs C in the dataset, the POI category IDs in the dataset are normalized and sorted. In this implementation, the POI category IDs corresponding to the POI IDs are unified as the POI category ID corresponding to the first data entry for that POI ID in the dataset. The POI category IDs are then renumbered starting from 1, and the correspondence between POI IDs and POI category IDs is recorded in the file cat_candidate.pk.

[0061] Step I-3: Divide the data:

[0062] The user's complete sign-in data L u Treat it as a long-term sequence and generate the required data to learn the user's long-term preferences. Divide the user's check-in data into a set of S of length k u It is considered as a short-term series and generates other required data to learn the user's short-term preferences. In this implementation method, k is set to 20 based on the dataset size and model training speed.

[0063] Step II: Learning users’ long-term preferences based on the Attention mechanism:

[0064] Step II-1: Obtain the fused feature vector of the interest point through the embedding layer:

[0065] The fusion feature vector of the point of interest is obtained through the embedding layer. Since the information represented by the timestamp is continuous and difficult to embed, the present invention maps the timestamp of the original data to discrete hours, and then represents each hour as a D-dimensional vector. The user ID, point of interest ID, and point of interest category C are represented as one-hot vectors and embedded into D-dimensional vectors. u 、D l 、D c In order to learn the high-level representation of interest points in the long-term sequence of each user, the present invention uses nonlinear transformation to capture the potential vector of each interest point. In this embodiment, considering the model's demand for video memory and training speed, D is set to 24 and D is set to 1. u 、D l 、D c They are set to 50, 300, and 100 respectively. The fusion feature calculation of each interest point is shown in Formula 2:

[0066]

[0067] in Represent L, C and T in the long-term sequence of user u respectively s The embedding vector of W, i indicates that this is the i-th check-in record of user u, l , W c and W t Represents each user's pair L, C and T s The weight of , b represents the bias parameter, This embodiment uses the ReLU (rectified linear unit) as the nonlinear activation function.

[0068] Step II-2: Use the attention mechanism to calculate the features of interest points in long-term sequences:

[0069] The present invention uses the user embedding vector learned by the embedding layer to measure the similarity between user preferences and the fused feature vector of the interest point. First, the importance of each interest point of each user is calculated. In the present invention, the importance of each interest point is defined as the normalized similarity a between the embedding vector of user u and the fused feature vector of the interest point. i , which is calculated as shown in Formula 3:

[0070]

[0071] Among them, u T Embedding vector representing the user.

[0072] Then, the user’s long-term preference is learned by fusing the latent vectors of interest points with different weights. long The calculation is shown in Formula 4:

[0073]

[0074] in, Indicates L, C and T in the long-term sequence of user u s The concatenation of the embedding vectors u long is the final representation of user u’s long-term preference, and then u long Input into a fully connected layer to calculate the probability of the next point of interest.

[0075] Step III: Learning user short-term preferences based on LSTM model:

[0076] Since location and category have different effects on user decision making, the present invention inputs them into two LSTM models without weight sharing. The input sequence of this part includes user ID u, point of interest ID L, point of interest category C and timestamp T s First, their embedding vectors are obtained as described in step II-1. Second, in order to better understand the short-term preferences of different users, the present invention connects the embedding vectors of users and time as context information of position-level and category-level sequences. With context information, the embedding vectors of the same point of interest will be different and personalized for different users. The present invention combines the position-level information (u, L, T s ) input LSTM 1 to learn the user’s position-level short-term preference and combine the category-level information (u, C, T s ) Input LSTM 2 to learn the user's category-level short-term preferences. Based on the experimental results, the parameters that minimize the loss function are selected. The hidden layer dimensions of the two LSTM models are set to 128, and the number of LSTM stacking layers is set to 2. Taking the tth time step as an example, the update formula is as follows:

[0077]

[0078] Among them, x t represents the input vector, [v u ;v l ;v t ] represents user ID u, point of interest ID L and timestamp T s The concatenation of the embedding vectors, i t , f t , o t represents the input gate, forget gate and output gate, represents the new candidate state vector at time step t, ⊙ represents the element-by-element product of two vectors, c t represents the final state vector, h t represents the hidden output vector of user preference, σ represents the sigmoid function, W i , W f , W i , W o represents the weight matrix, b i , b f , b i , b o Indicates the corresponding bias.

[0079] The output vectors of the two LSTM models are then input into a fully connected layer to calculate the probability of the next point of interest.

[0080] Step IV: Enhance model representation capabilities by contrasting self-supervised learning:

[0081] Step IV-1: Calculate the similarity between interest points:

[0082] When constructing spatiotemporal data augmentation, we need to measure the similarity between interest points to reduce the disturbance to the original sequence. Therefore, it is necessary to design a simple and effective method to calculate the similarity between interest points. Next, we will introduce the calculation of static similarity and dynamic similarity.

[0083] Step IV-1-1: Calculate the static similarity between interest points:

[0084] Static similarity is a memory-based similarity that uses item-based collaborative filtering with inverse user frequency (ItemCF-IUF) to measure the similarity between points of interest. Its calculation formula is shown in Formula 6:

[0085]

[0086] Here, N(i) and N(j) represent the number of users interacting with POI i and POI j, respectively. ut represents the number of users interacting with both POI i and POI j. |N(i)|, |N(j)|, and |N(ut|] represent the number of users interacting with POI i, the number of users interacting with POI j, and the number of users interacting with both POI i and POI j, respectively. In other words, static similarity assumes that two POIs are more similar if they share a higher proportion of common users.

[0087] Step IV-1-2: Calculate the dynamic similarity between interest points:

[0088] Dynamic similarity is a model-based similarity that infers the similarity between interest points by measuring the similarity between their representations. Since the representations of interest points are learned together with the encoder, this method is model-based. This implementation uses the dot product as the similarity metric, and denotes the representations of interest points i and j as e i and e j , then the calculation of the dynamic similarity between them is shown in Formula 7:

[0089] Cor e (i, j) = e i ·e j #(7)

[0090] Step IV-1-3: Calculate the final similarity between interest points:

[0091] The present invention combines memory-based similarity and model-based similarity into a hybrid similarity, which is defined as the sum of the two:

[0092] Cor h (i, j) = Cor o (i, j)+Cor e (i, j)#(8)

[0093] Step IV-2: Construct spatiotemporal augmentation data:

[0094] Step IV-2-1: Build time data augmentation:

[0095] like Figure 2 As shown in the figure, the target interest point v is inserted between the two interest points v4 and v5 with the largest time interval in the user check-in sequence, so that the largest time interval 2T in the original sequence (v4, v5) is replaced by the new time interval T in the new sequence (v4, v, v5), and the distribution of the time intervals in the new sequence is more uniform.

[0096] Step IV-2-2: Combine temporal data augmentation with spatial data augmentation:

[0097] The goal of this step is to make the spatial interval of the new sequence more uniform while making the time interval of the new sequence more uniform. To this end, we first introduce the sequence spatial interval uniformity index δ d Calculation:

[0098]

[0099] Among them, x i and y i Denote the longitude and latitude of the point of interest respectively. In this implementation method, the distance between two points of interest is approximated as the straight-line distance between them. According to formula 10, the δ of the sequence d The smaller it is, the more evenly spaced it is.

[0100] As described in step IV-1, when selecting the target interest point v, it is necessary to consider the similarity between v and the context interest points. This implementation method considers the similarity between the target interest point v and the previous interest point (e.g., v4) at the insertion position. Sort the mixed similarities between other interest points and interest point v4 from high to low, and take the first β interest points as candidate interest points. Substitute these β interest points into formula 10 to calculate the δ of the new sequence. d , take the value that can make δ d The smallest interest point is used as the target interest point v and inserted into the original sequence. Thus, we obtain a new sequence that is uniform in time and space. In this implementation method, β = 10 is selected based on comprehensive experience and training efficiency.

[0101] Step IV-3: Optimize the encoder via contrastive self-supervised learning:

[0102] Contrastive self-supervision maximizes the consistency between pairs, which in this implementation are the augmented and original views of an instance, and the encoders are the two LSTMs described in step III. Figure 3 As shown, given the original sequence S u , for S u Use spatiotemporal data enhancement to obtain an enhanced sequence S with a more uniform spatiotemporal distribution au , S u and S au is considered as a positive pair, and the views of other users are considered as negative samples of this pair of data. u and S au After passing through the shared encoder (LSTM), their representation X is obtained u and X au , and then X u and X au Through a fully connected layer (projection head) to get h u and h au The present invention uses NT-Xent loss to optimize the encoder, and the calculation of the contrast loss is shown in Formula 11:

[0103]

[0104] Step V: Combine the user's long-term and short-term preferences to obtain recommendation results:

[0105] Step V-1: User-based linear combination unit:

[0106] In order to learn the different dependencies of different users on long-term and short-term preferences, the present invention learns personalized weights of long-term and short-term modules for different users. In the output layer, a user-based linear combination unit is used to combine the user's long-term and short-term preferences to calculate the probability of the next point of interest. The calculation formula is as follows:

[0107]

[0108] in, represents the output probability of the next point of interest obtained through long-term preference learning, and Represent the outputs of position-based LSTM and category-based LSTM respectively. u , β u and γ u The personalized weights of users learned by the model of the present invention are initialized to 0.5, 0.25, and 0.25 respectively. Since different users have different long-term and short-term preferences, the α of different users is u , β u and γ u This is also a reflection of the personalization of different users. But no matter what, the α of the same user u , β u and γ u The values ​​of are all between 0 and 1, and the sum of the three is equal to 1. Finally, the probability is normalized, and N represents the total number of interest points.

[0109] Step V-2: Using joint learning strategies to assist recommendation tasks:

[0110] Using the joint learning strategy, the task of recommending the next point of interest is taken as the main task, and the self-supervised learning task is taken as the auxiliary task to learn together, and the model parameters are updated through back propagation to train the model. First, the loss function L for the task of recommending the next point of interest is constructed. rec , as shown in Formula 14:

[0111]

[0112] Among them, R represents the total number of users, N represents the number of candidate interest points, and yi j is an indicator variable, when user i actually visits point of interest j, y ij =1, otherwise y ij =0. ij represents the probability calculated by the model that user i will visit point of interest j next, ||Θ||2 is the regularization term to avoid overfitting, and λ is the regularization coefficient.

[0113] Finally, the loss function L of the model is defined as follows:

[0114] L=L rec +γL ssl #(15)

[0115] Here, γ is a hyperparameter that controls the strength of contrastive learning. In this implementation, the contrastive learning task is an auxiliary task. Therefore, based on the experience of contrastive learning auxiliary tasks, the initial value of γ is between 0.05 and 0.2, and then based on the experimental results, γ = 0.1 is selected.

[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some or all of the technical features therein can be replaced by equivalents. Therefore, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the claims of the present invention.

Claims

1. A method for recommending points of interest in low-quality data scenarios, characterized by: First, the dataset is preprocessed to remove duplicates and each user's check-in data is divided into long-term and short-term data. Second, a recommendation model is built based on the Attention mechanism and LSTM to learn users' long-term and short-term preferences. Contrastive self-supervised learning is then used to enhance the model's representational capabilities. Enhanced views of samples are generated through spatiotemporal data augmentation and contrastive loss is calculated. Finally, the user's long-term and short-term preferences are combined to generate personalized recommendations. Step IV: Enhance model representation capabilities by contrasting self-supervised learning: Step IV-1: Calculate the similarity between interest points: The similarity between interest points is divided into static similarity and dynamic similarity; Step IV-1-1: Calculate the static similarity between interest points: ItemCF-IUF is used to measure the similarity between points of interest. The calculation formula is shown in Formula 6: Where N(i) and N(j) represent the users who interact with point of interest i and point of interest j, respectively. ut represents the users who interact with point of interest i and point of interest j at the same time. |N(i)|, |N(j)|, and |N(ut| represent the number of users who interact with point of interest i, the number of users who interact with point of interest j, and the number of users who interact with point of interest i and point of interest j at the same time, respectively. Step IV-1-2: Calculate the dynamic similarity between interest points: Using dot product as the similarity metric, the representations of interest points i and j are recorded as e i and e j , then the calculation of the dynamic similarity between them is shown in Formula 7: Cor e (i,j)=e i ·And j (7) Step IV-1-3: Calculate the final similarity between interest points: The memory-based similarity and model-based similarity are fused into a hybrid similarity, which is defined as the sum of the two: Cor h (i,j)=Cor o (i,j)+Cor e (i,j)(8) Step IV-2: Construct spatiotemporal augmentation data: Step IV-2-1: Build time data augmentation: Insert the target POI between the two POIs with the largest time interval in the user check-in sequence, so that the largest time interval in the original sequence is replaced by the new time interval in the new sequence; Step IV-2-2: Combine temporal data augmentation with spatial data augmentation: First, we introduce the sequence space interval uniformity index δ d Calculation: Among them, x i and y i Represent the longitude and latitude of the interest point respectively, and the distance between two interest points is approximated as the straight-line distance between them; According to formula 10, the δ of the sequence d The smaller it is, the more evenly spaced it is; Sort the mixed similarity between other interest points and the previous interest point at the insertion position from high to low, and take the first β interest points as candidate interest points; bring these β interest points into formula 10 to calculate the δ of the new sequence d , take the value that can make δ d The smallest interest point is taken as the target interest point v and inserted into the original sequence; β = 10; Step IV-3: Optimize the encoder via contrastive self-supervised learning: Given the original sequence S u , for S u Use spatiotemporal data enhancement to obtain an enhanced sequence S with a more uniform spatiotemporal distribution au , S u and S au is regarded as a positive pair, and the views of other users are regarded as negative samples of this pair of data; u and S au After passing through the shared encoder (LSTM), their representation X is obtained u and X au , and then X u and X au Through a fully connected layer, we get h u and h au ; Use NT-Xent loss to optimize the encoder, and the calculation of contrast loss is shown in Formula 11: ; Step V: Combine the user's long-term and short-term preferences to obtain recommendation results: Step V-1: User-based linear combination unit: In the output layer, a user-based linear combination unit is used to combine the user's long-term preference and short-term preference to calculate the probability of the next point of interest. The calculation formula is as follows: in, represents the output probability of the next point of interest obtained through long-term preference learning, and Represent the outputs of position-based LSTM and category-based LSTM respectively; α u , β u and γ u The personalized weights of users learned by the model are initialized to 0.5, 0.25, and 0.25 respectively; since different users have different long-term and short-term preferences, the α of different users is u , β u and γ u This is also a reflection of the personalization of different users; but no matter what, the α of the same user u , β u and γ u The values ​​of are all between 0 and 1, and the sum of the three is equal to 1; finally, the probability is normalized, and N represents the total number of interest points; Step V-2: Using joint learning strategies to assist recommendation tasks: Using the joint learning strategy, the task of recommending the next point of interest is taken as the main task, and the self-supervised learning task is taken as the auxiliary task to learn together, and the model parameters are updated through back propagation to train the model; first, the loss function L for the task of recommending the next point of interest is constructed. re , as shown in Formula 14: Among them, R represents the total number of users, N represents the number of candidate interest points, and y ij is an indicator variable, when user i actually visits point of interest j, y ij =1, otherwise y ij =0;O ij represents the probability calculated by the model that user i will visit point of interest j next, ||Θ||2 is the regularization term to avoid overfitting, and λ is the regularization coefficient; Finally, the loss function L of the model is defined as follows: L=L rec +γL ssl (15) Among them, γ is a hyperparameter that controls the strength of contrastive learning; the initialization value of γ is between 0.05 and 0.

2.

2. The recommendation method according to claim 1, wherein: Step I: Preprocess the dataset: Sort the user's historical check-in by check-in time to get a sequence Among them, u represents the user, n represents the total number of check-ins of user u in the dataset, and q represents the triple (L, C, T s ), where L represents the ID of the point of interest, C represents the category ID of the point of interest, and T s Represents the timestamp of user u checking in at the point of interest; maps the timestamp of the original data to discrete hours, and then represents each hour as a D-dimensional vector; represents the user ID, point of interest ID, and point of interest category ID as a one-hot vector, and embeds them into D-dimensional vectors respectively. u 、D l 、D c The vector of the complete check-in data of the users in the dataset As a long-term series L u , Q u Divide into a series of subsequences of length k, each subsequence is represented as a short-term sequence Step I-1: Renumber and sort the dataset based on time interval uniformity: Consider a part of the original data set as "uniformly spaced" and no enhancement is needed; group the original data set by user ID (UserID) and calculate the standard deviation of the time interval corresponding to each UserID δ t , and its calculation formula is shown in formula (1): Among them, n is the length of the user's check-in sequence in the dataset; for UserID, according to its corresponding δ t Sort and number the UserIDs. The smaller the number, the more uniform the check-in intervals. α is set to 15, meaning the first 15% of the UserIDs are considered uniform. Step I-2: Data deduplication: First, completely duplicate records in the dataset are removed. Second, the POI category IDs corresponding to the POI IDs are unified into the POI category IDs corresponding to the first record of the POI ID in the dataset. The POI category IDs are renumbered starting from 1, and the correspondence between the POI IDs and POI category IDs is recorded in the file cat_candidate.pk. Step I-3: Divide the data: The user's complete sign-in data L u Treat it as a long-term sequence and generate the required data to learn the user's long-term preferences; divide the user's check-in data into a set of S with a length of k u Considered as a short-term series; k is set to 20.

3. The recommendation method according to claim 1, wherein: Step II: Learning users’ long-term preferences based on the Attention mechanism: Step II-1: Obtain the fused feature vector of the interest point through the embedding layer: Map the timestamp of the original data to discrete hours, and then represent each hour as a D-dimensional vector; represent the user ID, point of interest ID, and point of interest category C as a one-hot vector and embed them into D-dimensional vectors respectively. u 、D l 、D c vector; use nonlinear transformation to capture the potential vector of each point of interest, set D to 24 according to the model's demand for video memory and training speed, and set D u 、D l 、D c Set them to 50, 300, and 100 respectively; the fusion feature calculation of each interest point is shown in Formula 2: in Represent L, C and T in the long-term sequence of user u respectively s The embedding vector of W, i indicates that this is the i-th check-in record of user u, l , W c and W t Represents each user's pair L, C and T s The weight of , b represents the bias parameter, It is a nonlinear activation function; the linear rectification unit ReLU is used as the nonlinear activation function; Step II-2: Use the attention mechanism to calculate the features of interest points in long-term sequences: The user embedding vector learned by the embedding layer is used to measure the similarity between the user preference and the fusion feature vector of the interest point; first, the importance of each interest point of each user is calculated. The importance of each interest point is defined as the normalized similarity a between the embedding vector of user u and the fusion feature vector of the interest point i , which is calculated as shown in Formula 3: Among them, u T Embedding vector representing the user; Then, the user’s long-term preference is learned by fusing the latent vectors of interest points with different weights; the user’s long-term preference u long The calculation is shown in Formula 4: in, Indicates L, C and T in the long-term sequence of user u s The concatenation of the embedding vectors of u long is the final representation of user u’s long-term preference, and then u long Input into a fully connected layer to calculate the probability of the next point of interest.

4. The recommendation method according to claim 1, wherein: Step III: Learning user short-term preferences based on LSTM model: Since location and category have different effects on user decisions, they are input into two LSTM models without weight sharing. The input sequence of this part includes user ID u, point of interest ID L, point of interest category C and timestamp T. s ;First, obtain their embedding vectors as in step II-1; Secondly, the embedding vectors of user and time are concatenated as the context information of position-level and category-level sequences, and the position-level information is combined (u, L, T s ) input LSTM 1 to learn the user’s position-level short-term preference and combine the category-level information (u, C, T s ) Input LSTM 2 to learn the user's category-level short-term preferences. Based on the experimental results, take the parameters that minimize the loss function, set the hidden layer dimensions of the two LSTM models to 128, and set the number of LSTM stacking layers to 2. Taking the tth time step as an example, the update formula is as follows: Among them, x t represents the input vector, [v u ;v l ;v t ] represents user ID u, point of interest ID L and timestamp T s The concatenation of the embedding vectors, i t , f t , o t represents the input gate, forget gate and output gate, represents the new candidate state vector at time step t, ⊙ represents the element-by-element product of two vectors, c t represents the final state vector, h t represents the hidden output vector of user preference, σ represents the sigmoid function, W i , W f ,,W o represents the weight matrix, b i , b f ,,b o represents the corresponding bias; The output vectors of the two LSTM models are then input into a fully connected layer to calculate the probability of the next point of interest.

Citation Information

Patent Citations

  • Sequence recommendation method of graph enhanced gated mixer

    CN117893272A

  • Comparative learning enhanced two-stream model recommendation system and algorithm

    WO2023108324A1