Interest point recommendation method for low-quality data scene

Through spatiotemporal data augmentation and comparative self-supervised learning, data spatiotemporal data in the point of interest recommendation system are solved, and more personalized and accurate recommendation results are achieved.

CN119622122AActive Publication Date: 2025-03-14BEIJING UNIV OF TECH

Patent Information

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

AI Technical Summary

Technical Problem

The point-of-interest recommendation system faces the problems of data sparseness and spatiotemporal data inhomogeneity, resulting in a lack of personalization and accuracy in recommendation results.

Method used

The spatial and temporal data enhancement method is used to enhance the user's interest point check-in sequence from the two aspects of time uniformity and spatial uniformity. By comparing the self-supervised learning and optimizing the model representation ability, we generate recommendation results based on the user's long-term and short-term preferences.

Benefits of technology

It significantly improves the personalization and accuracy of the recommendation system, improves the recommendation effect of low-quality data sets, and enhances the generalization ability and user experience of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622122A_ABST
    Figure CN119622122A_ABST
Patent Text Reader

Abstract

The invention provides an interest point recommendation method for a low-quality data scene. The method comprises the following steps: firstly, dividing user preferences into long-term preferences and short-term preferences by using a neural network, and respectively learning by using different methods, specifically, capturing the long-term preferences of users by using an attention mechanism, and learning the short-term preferences of the users by using two long short-term memory (LSTM) networks which do not share parameters; secondly, utilizing contrast self-supervised learning to construct enhanced data on a space-time dimension, and utilizing contrast loss to enhance the recognition capability of LSTM and improve the understanding and characterization capability of the model on the data; and finally, long-term and short-term outputs are combined together, and the importance of long-term and short-term preferences is balanced by learning a weighted vector of each user. According to the comprehensive method, a more excellent recommendation result can be obtained when the method is applied to a low-quality data set, and powerful support is provided for 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 interest point recommendation, and mainly relates to a interest point 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 of social interaction through check-in sharing between users. Combined with the widespread popularity of smartphones, the number of users on these LBSNs platforms has grown rapidly and has reached billions. However, this information overload phenomenon has brought challenges to users, making it difficult for them to quickly and accurately find information that meets their interests and needs. In order to solve this problem, point of interest recommendation has become a popular research direction.

[0003] However, the POI recommendation system faces a severe data sparsity problem. Among the massive POIs provided by the LBSN platform, the number of POIs that users can actually visit is extremely limited, resulting in an extremely sparse data set. Therefore, many studies have proposed using data augmentation to increase the scale and quality of training data, thereby improving the recommendation performance of the recommendation system. At present, traditional POI check-in sequence data augmentation methods often ignore the uniformity of data in the spatiotemporal dimension, which may affect the accuracy of the POI recommendation task. On the one hand, the user check-in sequence may have data missing or too large time intervals, or the time interval between two check-in records is too long. This unevenness may cause the model to have insufficient understanding of user interests and behavior patterns in certain time intervals, thereby affecting the personalization and accuracy of the recommendation results. On the other hand, the geographic location data in the user check-in sequence often presents a long-tail distribution, which makes the recommendation system tend to recommend popular areas and ignore the recommendation of long-tail areas, which leads to a lack of diversity and personalization in geographic location recommendations. Summary of the invention

[0004] In view of the shortcomings of the above-mentioned prior art, the present invention proposes a method for recommending points of interest for low-quality data scenarios, which uses spatiotemporal data enhancement to enhance the user's point of interest check-in sequence from the two aspects of temporal uniformity and spatial uniformity, so that the model can 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 user's check-in data is systematically preprocessed to ensure the quality and consistency of the data. Then, the dataset is divided according to the time series, and the user's check-in data is divided into long-term series and short-term series.

[0008] The dataset refers to a set of check-in data of users in a location-based social network, which includes the user ID, point of interest ID, point of interest category ID, point of interest category, longitude coordinates of the point of interest location, latitude coordinates of the point of interest location, time zone of the point of interest location, and the time when the user checked in at the point of interest.

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

[0010] The user's check-in sequence refers to the sequence obtained by sorting the user's historical check-ins in order of check-in time. 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 POI ID, C represents the POI category ID, and T s Indicates the timestamp when user u checks in at the POI.

[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 the Q u Divided into a series of subsequences of length k, each subsequence can be expressed as

[0013] Step II: Learn the user’s long-term preferences. First, the user’s long-term sequence L u Input the embedding layer to obtain the fused feature vector of the interest point; secondly, considering that the same interest point may have different effects on different users, the present invention uses the attention mechanism (Attention) to calculate the feature weights of the interest point in the long-term sequence, and then capture the user's long-term hobbies based on the feature weights.

[0014] Step III: Learning user short-term preferences. The present invention uses the user's short-term sequence S u To learn the user's short-term preferences. Since the position and category have different effects on the user's preferences in a specific time period, the present invention inputs the position and category into two long short-term memory networks (LSTM) that do not share parameters to learn the position-level and category-level preferences respectively.

[0015] Step IV: Enhance the model representation ability using contrastive self-supervised learning. First, calculate the correlation between interest points 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 data sparsity and noise interaction problems by unifying contrastive self-supervised learning tasks and recommendation tasks.

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

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

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

[0019] Step I-1: Renumber and sort the dataset based on the uniformity of time intervals. Consider a part of the original dataset as "uniformly spaced" and do not need to build enhancements, so as to minimize the disturbance to the original dataset while performing spatiotemporal data enhancement on the dataset. Group the original dataset by user ID (UserID) and calculate the standard deviation of the time interval corresponding to each UserID δ t , for UserID according to its corresponding δ t Sort and number the UserIDs. The smaller the UserID number, the more uniform the time intervals of their check-in data. The data in the first α% of the UserID number is considered "uniform".

[0020] Step I-2: Data deduplication. First, completely duplicated check-in records in the data set are removed; second, considering that the POI categories of the same POI ID may not be the same, the POI categories corresponding to the POI ID are normalized.

[0021] Step I-3: Divide the data set. 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 It regards it as a short-term series and generates other required data to learn the user's short-term preferences.

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

[0023] Step II-1: Obtain the fused feature vector of the POI 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, POI ID, and POI category ID are represented as unique hot vectors and embedded into D-dimensional vectors. 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: Use the attention mechanism to calculate the features of the points of interest in the long-term sequence. The present invention uses the user embedding vector learned by the embedding layer to measure the similarity between the user preference and the fused feature vector of the point of interest. First, the importance of each point of interest of each user is calculated. In the present invention, the importance of each point of interest is defined as the normalized similarity between the embedding vector of user u and the fused feature vector of the point of interest. Then, the user's long-term preference is learned by fusing the latent vectors of the points of interest with different weights. Finally, the user's long-term preference is input into a fully connected layer to calculate the probability of the next point of interest.

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

[0026] Step IV-1: Calculate the similarity between interest points. When constructing spatiotemporal data enhancement, 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: Constructing spatiotemporal enhanced data, by enhancing the time and space of the original data to obtain a new sequence that is uniform in time and space;

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

[0029] Further, according to the method for recommending points of interest for 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] Further, according to the method for recommending points of interest for 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 largest time interval D in the original sequence T The new time interval D in the new sequence T / 2, 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 make the spatial interval of the new sequence as uniform as possible, under the premise that the time interval of the new sequence is more uniform. Since step IV-2-1 determines the insertion position, the purpose of this step is to select the target interest point. First, select β candidate interest points according to the similarity described in step IV-1, and then insert these β candidate interest points into the original sequence to obtain β spare new sequences, calculate the spatial interval uniformity of these β spare new sequences, and select the interest point that can make the spatial interval of the new sequence most uniform as the target interest point. Finally, a new sequence with uniform time and space interval distribution 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] Further, according to the method for recommending points of interest for 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: Use joint learning strategy to assist recommendation task:

[0047] The task of recommending the next point of interest is taken as the main task, and the contrastive 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, the recommendation effect for low-quality data sets is more accurate. The present invention systematically studies the application of spatiotemporal data enhancement in recommendation models, significantly improves the generalization ability of the model in actual recommendation scenarios, and enables it to better adapt to and process diverse user behavior data and scenario information. The proposed technology and method have broad application potential in recommendation systems, especially in e-commerce, social media, and content recommendation. Through effective spatiotemporal data enhancement strategies, the overall performance and user satisfaction of the recommendation system can be significantly improved in multiple scenarios such as user behavior prediction, personalized recommendation, and user experience optimization. At the same time, the joint strategy is adopted to further improve the relevance and accuracy of the recommendation results on the basis of ensuring the uniform distribution of spatiotemporal features. Experiments have confirmed that the model proposed in the present invention can achieve an average recognition accuracy of 20.84% ​​MAP@20 (Mean Average Precision, MAP) on the Foursquare NYC dataset. Therefore, this comprehensive method enables us to obtain better recommendation results when applied to low-quality data sets, providing strong support for the performance improvement of the recommendation system. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 Flowchart of the POI 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] According to 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: Reorder the dataset based on time interval uniformity:

[0056] A part of the original data set is considered as "uniformly spaced" and does not need to be enhanced, so as to minimize the disturbance to the original data set while enhancing the spatiotemporal data of the data set. The original data set 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 data set. t Sorting and numbering, the smaller the UserID number, the more uniform the time interval of its check-in data. In this embodiment, according to the experimental results, when α=15, the loss function loss is the smallest and the model training effect is the best, so α is set to 15, that is, the first 15% of the UserID number data is considered "uniform".

[0059] Step I-2: Data deduplication:

[0060] First, completely duplicate records in the data set are removed. Secondly, considering that the same POI ID L in the data set may correspond to multiple POI category IDs C, the POI category IDs of the data set are normalized and sorted. In this implementation method, the POI category ID corresponding to the POI ID is unified as the POI category ID corresponding to the first data of the POI ID in the data set, and the POI category ID is renumbered from 1, and the correspondence between the POI ID and the POI category ID 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 with a length of k u It is regarded 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 size of the data set and the speed of model training.

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

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

[0065] The fused 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 unique 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 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 is, i means 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 a rectified linear unit (ReLU) as a 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 the user preference 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 of is shown in Formula 4:

[0073]

[0074] in, represents 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.

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

[0076] Since the 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 the context information of the position-level and category-level sequences. With the 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 ) is input into 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. According to the experimental results, take the parameters when the loss function is the smallest, 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:

[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, and 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 enhancement, 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. Next, the calculation of static similarity and dynamic similarity is introduced.

[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 interest points. Its calculation formula is shown in Formula 6:

[0085]

[0086] Among them, N(i) and N(j) represent users who interact with interest point i and interest point j respectively, ut represents users who interact with interest point i and interest point j at the same time, |N(i)|, |N(j)| and |N(ut)| represent the number of users who interact with interest point i, the number of users who interact with interest point j, and the number of users who interact with interest point i and interest point j at the same time. That is, static similarity believes that if two interest points share a higher proportion of common users, the similarity between the two interest points is higher.

[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 the memory-based similarity and the 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 as uniform as possible, under the premise that the time interval of the new sequence is more uniform. To this end, we first introduce the sequence spatial interval uniformity index δ d Calculation:

[0098]

[0099] Among them, x i and i denote the longitude and latitude of the interest point respectively. In this implementation method, 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 they are.

[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 point. 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 makes δ d The smallest interest point is used as the target interest point v and inserted into the original sequence, thereby obtaining a new sequence that is uniform in time and space. In this implementation method, β=10 is taken into consideration based on comprehensive experience and training efficiency.

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

[0102] The contrastive self-supervision maximizes the consistency between the positive pairs, which in this embodiment are the augmented view and the original view of an instance, and the encoder is 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 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 (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 get the 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, and uses a user-based linear combination unit 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. 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 the position-based LSTM and the category-based LSTM respectively. u , β u and γ u represents the personalized weights of users learned by the model of the present invention, which 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. u , β u and γ u The values ​​of are all between 0 and 1, and the sum of the three equals 1. Finally, the probability is normalized, and N represents the total number of interest points.

[0109] Step V-2: Use joint learning strategy to assist recommendation task:

[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 does visit 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] Among them, γ is a hyperparameter that controls the strength of contrastive learning. In this implementation method, the contrastive learning task is an auxiliary task, so according to the experience of contrastive learning auxiliary tasks, the initialization value of γ is between 0.05-0.2, and then combined with the experimental results, γ=0.1 is taken.

[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, it should be understood by those skilled in the art 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 and deduplicated, and each user's check-in data is divided into long-term data and short-term data. Secondly, a recommendation model is built based on the Attention mechanism and LSTM to learn the user's long-term and short-term preferences respectively. Then, the contrastive self-supervised learning method is used to enhance the model's representation ability. The enhanced view of the sample is generated through spatiotemporal data enhancement and the contrast loss is calculated. Finally, the user's long-term and short-term preferences are combined to generate a personalized final recommendation result.

2. The recommendation method according to claim 1, characterized in that: Step I: Preprocess the dataset: Sort the user's historical check-ins 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 POI ID, C represents the POI category ID, and T s Represents the timestamp of user u's check-in at the POI; maps the timestamp of the original data to discrete hours, and then represents each hour as a D-dimensional vector; represents the user ID, POI ID, and POI category ID as one-hot vectors, and embeds them into D-dimensional vectors respectively. u , D l , D c vector; the complete check-in data of the user 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: Reorder 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): Where n is the length of the user's check-in sequence in the data set; for UserID, according to its corresponding δ t Sort and number them. The smaller the UserID number, the more uniform the time interval of its check-in data. α is set to 15, that is, the first 15% of the UserID number is considered "uniform"; Step I-2: Data deduplication: First, completely duplicate records in the data set are removed; second, the POI category ID corresponding to the POI ID is unified to the POI category ID corresponding to the first data of the POI ID in the data set, and the POI category ID is renumbered from 1, and the corresponding relationship between the POI ID and the POI category ID 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, characterized in that: Step II: Learning users’ long-term preferences based on the Attention mechanism: Step II-1: Obtain the fused feature vector of interest points 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 one-hot vectors and embed them into D-dimensional vectors respectively. u , D l , D c vector; use nonlinear transformation to capture the potential vector of each interest point, set D to 24 according to the model's demand for video memory and training speed, and set D 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: in represent L, C and T in the long-term sequence of user u respectively. s The embedding vector of W is, i means 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 rectified 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 fused 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 fused 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 of is shown in formula 4: in, represents L, C and T in the long-term sequence of user u s The concatenation of the embedding vectors of long is the final representation of user u’s long-term preference, and then u log Input into a fully connected layer to calculate the probability of the next point of interest.

4. The recommendation method according to claim 1, characterized in that: 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, POI ID L, POI category C and timestamp T. s ; First, get their embedding vectors as described in step II-1; Secondly, we concatenate the embedding vectors of user and time as the context information of position-level and category-level sequences, and combine the position-level information (u, L, T s ) is input into 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. According to the experimental results, take the parameters when the loss function is the smallest, 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, and W i , W f , W i , W o represents the weight matrix, b i , b f , b i , 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.

5. The recommendation method according to claim 1, characterized in that: 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 interest points. 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 denoted as e i and e j , then the calculation of the dynamic similarity between them is shown in formula 7: Heart e (i,j)=and i ·And j #(7) Step IV-1-3: Calculate the final similarity between interest points: The memory-based similarity and the 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 enhancement 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 i denote the longitude and latitude of the interest points 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 makes δ 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:

6. The recommendation method according to claim 1, characterized in that: Step V: Combine the user's long-term and short-term preferences to get the 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 Respectively represent the outputs of position-based LSTM and category-based LSTM; α 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 equals 1; finally, the probability is normalized, and N represents the total number of interest points; Step V-2: Use joint learning strategy to assist recommendation task: 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 of the task of recommending the next point of interest is constructed rec , 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 does visit 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.

Citation Information

Patent Citations

  • Multi-feature-fused matrix decomposition interest point recommendation method and implementation system thereof

    CN111061961A

  • Next point of interest recommendation method based on a self-attention mechanism

    CN114021011A

  • POI (Point of Interest) prediction method based on space-time perception and in combination with local and global preferences

    CN115510333A

  • Next POI recommendation method based on user preference and spatio-temporal context information

    CN117194763A

  • Interest point recommendation method based on space-time perception

    CN117271899A

Cited By

  • Location social network service recommendation method based on trajectory collaborative filtering and Mama

    CN120256746A