A next location recommendation method based on spatiotemporal context and category preference
By combining multi-level attention mechanism and gated graph neural network, the problem of long sequence modeling and context information ignorance in LBSN is solved, and more accurate next-position recommendation is achieved, improving user life service experience.
Patent Information
- Application Number
- CN202310125978.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-17
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2043-02-17
AI Technical Summary
The existing next-position recommendation method is difficult to effectively model long sequence contexts in LBSN, and ignores rich context information, such as category information, resulting in inaccuracy of recommendations and data sparsity issues.
A long-term and short-term memory network and gated graph neural network using a multi-level attention mechanism are used, combining the user's POI and category preferences, and by constructing a category association graph and a check-in sequence, users' interest points and category preferences are generated, and the probability values of candidate interest points are calculated for sorting.
It improves the accuracy of recommendations for the next location, comprehensively considers the user's multi-dimensional preferences, enhances the ability to analyze user behavior, and improves the accuracy of recommendations.
Smart Images

Figure CN116150511B_ABST
Abstract
Description
Technical Field
[0001] The present invention designs a next location recommendation method based on spatiotemporal context and category preference, and belongs to the technical field of data processing. Background Art
[0002] With the rapid development of mobile networks in recent years, location-based social networks (LBSNs) have gained widespread adoption. Users can share their locations and lives by checking in at places, such as Foursquare, Facebook, and Yelp. Based on a user's historical check-in information, it is possible to construct a user's movement trajectory and explore their mobility patterns. Next location recommendation has become one of the most important tasks in LBSNs, with broad application prospects. Its main goal is to predict the next point of interest (POI) a user may visit within a specific timeframe based on the available information from their check-in sequence. Next location recommendation plays a crucial role in location-based services, not only improving the quality of location-related services but also enhancing the customer experience.
[0003] There is already a large amount of research on next location recommendation. Some researchers have developed a general Markov model to predict a user's next location based on the user's past trajectory sequence. For example, Rendle et al. proposed a factorized personalized Markov chain (FPMC) framework, combining matrix decomposition with Markov chains for recommendation. In addition, some researchers proposed a tensor-based unified latent pattern model to capture continuous check-in behavior to mine the latent pattern hierarchical preferences of each user. However, existing Markov chain-based first-order sequence transition pattern research can only model very short sequence contexts, but cannot model longer sequence contexts.
[0004] Deep learning models capable of modeling long sequences, such as recurrent neural networks (RNNs) and LSTMs, have been applied to next-location recommendation. They have begun to leverage various types of contextual information in LBSNs, such as check-in time and POI location, to analyze factors influencing user check-in behavior and build user preference models. Zhang et al. proposed a next-location recommendation model based on RNNs that only considers the POI IDs of users' check-ins. This model ignores rich contextual information and generates relatively simple user preferences. Zhu et al. designed a time-gated model, Time-LSTM, based on LSTMs to investigate the time intervals between check-ins. This model enhances the influence of temporal information on POI recommendations. However, this model only considers the POI dimension and fails to comprehensively examine the impact of other dimensions (such as category) on a user's next check-in. Sun et al. extended the single RNN model to integrate users' long-term and short-term preferences, proposing a recommendation model based on spatiotemporal information, the LSTPM. However, this model fails to consider POI category information, resulting in poor modeling of user mobility patterns. Furthermore, Wu et al. proposed the SR-GNN model based on GRUs (Gated Recurrent Units) and GNNs (Graph Neural Networks), which models correlations within sequences and effectively addresses the conversational recommendation problem. Liu et al. proposed the GNN-based CaSe4SR framework, which simultaneously studied the correlation between each item in the sequence and its category, greatly improving the recommendation performance and proving the necessity of studying recommendation problems at the category level and the specific item level.
[0005] To address the sparse check-in problem for next-point-of-interest (POI) recommendations in LBSNs, a common approach in the past was to model user mobility patterns using Markov chains. However, Markov chain methods struggle to capture long sequential context. In recent years, the application of deep learning to recommender systems has become a trend. However, due to the vanishing gradient problem of RNNs, they are not suitable for constructing long sequences. To effectively address this long sequence construction issue and capture users' long-term preferences, LSTMs have been applied to next-point-of-interest recommendations. Existing methods for next-point-of-interest recommendations rely solely on the location sequence of a user's visit trajectory, while ignoring the category sequence within that trajectory. These methods often fail to fully consider the diverse contextual information in LBSNs and fail to aggregate different types of contextual information (such as time series, geographic location, and category information) into the next-point-of-interest recommendation method to effectively mitigate data sparsity. Furthermore, to address the issue of inaccurate recommendations caused by using only the hidden state of the last time step as a proxy for user preferences, most studies combine LSTMs with attention mechanisms to distinguish the varying degrees of influence each time step may have on the next check-in POI. However, most researchers have not considered the weight of different contextual information in each user's check-in representation through the attention mechanism, that is, they have not considered and distinguished the importance of each attribute that affects the user's check-in, resulting in inaccurate analysis of user preferences and low accuracy of user check-in predictions.
[0006] To recommend next locations based on spatiotemporal context and category preferences, this paper leverages the rich contextual information (category, time, and geographic factors) contained in location-based social networks (LBSNs). This research addresses the key issues of next location recommendation based on spatiotemporal context and category preferences, effectively improving user satisfaction with their life service experience. The paper consists of two parts. The first part employs a long short-term memory (LSTM) network with a multi-level attention mechanism to capture user preferences for locations (also known as points of interest (POIs)). The attention mechanism is used to analyze the varying influence of various attributes on each check-in and the varying importance of each check-in for next location recommendations, thereby deriving user POI preferences. The second part generates a POI category sequence based on the user's check-in sequence, constructs a category association graph for each user, and uses a gated graph neural network (GGNN) composed of a graph neural network (GNN) and a gated recurrent unit (GRU) to determine the user's category preferences. Finally, based on the user's POI and category preferences, a weighted user preference is derived. This preference is then calculated against the selected candidate POIs and ranked according to predicted probability to produce a top-N recommendation list. Summary of the Invention
[0007] The present invention designs and develops a next location recommendation method based on spatiotemporal context and category preference. By constructing user category preference and user interest point preference to screen candidate interest points, the probability values of candidate interest points are calculated by combining category preference and interest point preference, and they are arranged in descending order. The candidate interest points are sorted and the Top-N locations are recommended to the user to improve the recommendation accuracy.
[0008] The technical solution provided by the present invention is:
[0009] A next location recommendation method based on spatiotemporal context and category preference, including:
[0010] Step 1: Obtain the category sequence of user check-ins, build a category association graph for each user, use word vectors to obtain the embedding vectors of the nodes in the graph, train a gated graph neural network to obtain the embedding vector of each category node, and generate the user's category preference through the attention mechanism;
[0011] Step 2: Obtain the user's check-in sequence, obtain the embedded vector representation and hidden state of each check-in through LSTM and contextual attention mechanism, obtain the weight of each check-in based on the temporal attention mechanism, and generate the user's point of interest preference;
[0012] Step 3: Filter candidate POIs, combine category preferences and POI preferences, calculate the probability values of candidate POIs, sort them in descending order, sort the candidate POIs, and recommend the Top-N locations to the user.
[0013] Preferably, the step 1 includes:
[0014] Step 1: Extract the check-in POI number, time, category, and geographic location from the LSBN according to the user ID and perform preprocessing operations;
[0015] Step 2: Get each user's check-in category from the extracted information and form a category sequence according to the time order of check-in
[0016] Where, Represents user u at time t k Visited the cat category v The point of interest v, t1 is the time when the user first signs in, t2 is the time when the user second signs in, t N The time of the Nth sign-in behavior;
[0017] Step 3: Convert the sequence into a category association graph based on the preceding and following relationships between categories. Each node in the graph represents a category that the user has checked in to, and an undirected edge connecting two nodes represents that the user has checked in to these two categories successively.
[0018] Step 4: Use the word vector mechanism to obtain the embedded vector representation of each node in the graph, and input the embedded vector representation obtained by the word vector mechanism as the initial vector into the gated graph neural network. After continuous iterative optimization, the connection between the user's access categories is captured and the category embedded vector representation s is generated. c ;
[0019] Step 5: Use the attention mechanism to obtain the embedding vector representation of the entire graph based on the embedding vector representation of each node in the association graph as the user's category preference.
[0020] Preferably, in step 5, outputting the user's category preference for the entire image through the attention mechanism includes:
[0021] α c =W1σ(W2q+W3s c );
[0022]
[0023] Where W1, W2, and W3 are weight matrices, q is the query parameter in the attention mechanism, and α c is the weight of each category node in the association graph, is the user's category preference, and Y is the total number of categories the user checks in to.
[0024] Preferably, the step 2 includes:
[0025] Step a: Extract each user's historical check-in behavior from the LBSN in chronological order to obtain a user check-in sequence;
[0026] Step b: extract the check-in attributes from the user trajectory sequence and convert them into embedded vector representations through the word vector mechanism;
[0027] Step c: The user at time t k Embedded vector representation of check-in With t k-1 Hidden state at the moment Enter t together k In the LSTM at time t, get k Hidden state at the moment
[0028]
[0029] Generate the weight vector μ for each sign-in through the attention mechanism k , use each The corresponding weight μ k Measure the influence of the k-th historical check-in on the next check-in, and obtain the weight vector μk Multiply by H P , get the user's POI preference.
[0030] Preferably, it is characterized in that
[0031] In step b, the historical check-in activity of user u is represented as a check-in tuple
[0032]
[0033] The above formula indicates that user u is k Points of interest visited at all times The geographical location is l v , the category is cat v , the time belongs to the first day of the week sky;
[0034] The embedding vector representation of each attribute obtained according to the word vector mechanism is generated in a weighted form based on the attention mechanism.
[0035]
[0036] Where, is the parameter to be learned corresponding to the i-th attribute, are the parameters to be learned, is at time t k Check-in embedding vector representation, x(i,t k ) represents the embedding vector representation of the i-th feature in the k-th check-in under the contextual attention mechanism, ρ(i,t k ) is the weight representation of the i-th feature in the k-th check-in, Represents the embedding vector representation of the i-th attribute in the k-th historical check-in.
[0037] Preferably, in step c, the weight vector μ for each sign-in k The calculation formula is:
[0038]
[0039] Where, is the query information of the temporal attention mechanism, is the embedding vector representation of the next check-in POI at time N+1, and then the obtained weight vector μ k Multiply by H P , get the user's POI preferences:
[0040]
[0041] Where μ k is time tk The hidden state The weight of is the POI preference of user u, k is the kth check-in, and N is the total number of check-ins.
[0042] Preferably, the step three includes:
[0043] Calculate the probability value of the candidate POI by obtaining the category preference and POI preference;
[0044]
[0045] Where M is the number of candidate POIs, v k is the embedding vector representation of the candidate POI, cat v is the embedding vector representation of the category of the candidate POI, so Indicates that under the influence of category preference and POI preference, user u finally visits POIv k the possibility of For user u at time t N+1 Visit points of interest k probability;
[0046] Sort the candidate POIs in descending order according to their probability values to obtain the Top-N recommendation list for user u.
[0047] The beneficial effects of the present invention are:
[0048] 1. This paper divides user location preferences into two dimensions: POI and category. At the POI level, we consider the temporal order of user check-in sequences, studying the influence of sequentiality and specific POIs. At the category level, we consider the correlation between categories. Combining these two preferences enables a multi-dimensional study of user preferences and improves recommendation accuracy.
[0049] 2. This paper considers contextual and temporal factors. At the POI level, this approach not only considers the varying influence of each user check-in on the last, but also the varying importance of the attributes that influence each check-in. Therefore, a multi-level attention mechanism is employed to study the influence of check-in behavior and various check-in attributes on user preferences.
[0050] 3. This invention considers the correlation between categories, which reflects the user's mobility preferences at the category level. The gated graph neural network can accurately obtain the user's category preferences. Compared with existing recommendation methods that consider category factors, this invention considers the impact of categories on specific POI recommendation results from the perspective of category relevance. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1This is a flow chart of the next location recommendation method based on spatiotemporal context and category preference according to the present invention.
[0052] Figure 2 This is an example of a category association diagram described in the present invention. DETAILED DESCRIPTION
[0053] The present invention will be described in further detail below in conjunction with the accompanying drawings so that those skilled in the art can implement the invention with reference to the description.
[0054] like Figure 1-2 As shown, the present invention provides a next location recommendation method based on spatiotemporal context and category preference, which filters candidate points of interest by constructing user category preferences and user point of interest preferences, calculates the probability values of candidate points of interest by combining category preferences and point of interest preferences, and arranges them in descending order, sorts the candidate points of interest, and recommends the Top-N locations to the user, thereby improving the recommendation accuracy.
[0055] Step 1: Obtain the category sequence of user check-ins, build a category association graph for each user, use word vectors to obtain the embedding vectors of the nodes in the graph, train a gated graph neural network to obtain the embedding vector of each category node, and generate the user's category preference through the attention mechanism;
[0056] Step 2: Obtain the user's check-in sequence, obtain the embedded vector representation and hidden state of each check-in through LSTM and contextual attention mechanism, obtain the weight of each check-in based on the temporal attention mechanism, and generate the user's point of interest preference;
[0057] Step 3: Filter candidate POIs, combine category preferences and POI preferences, calculate the probability values of candidate POIs, sort them in descending order, sort the candidate POIs, and recommend the Top-N locations to the user.
[0058] In LBSN, each user can check in at the location of interest, and the check-in trajectory of user u is organized into a check-in sequence in chronological order. The length of the sign-in sequence is N, where each element is user u at time t k A sign-in at the time, each sign-in status Is a six-tuple, specifically composed of Represents user u at time t k A point of interest POI v was visited (a POI is a location associated with geographic coordinates in LBSN, such as a restaurant or bar, and each POI is associated with longitude and latitude), and the category of v is cat v , the geographical location is l v , Indicates the check-in time t k It is the wth day of the week.
[0059] The user's check-in category sequence is composed of a set of check-in category tuples Indicated, among which Represents user u at time t k Visited the cat category v The goal of the next POI recommendation is to give a user u a historical check-in sequence A from time 1 to N. u and category sequence C u , recommends the most likely check-in locations for users at time N+1, and sorts them in descending order to form a Top-N recommendation list.
[0060] like Figure 1 As shown, the next location recommendation method based on spatiotemporal context and category preference of the present invention mainly includes the following processes:
[0061] First, the user's check-in category sequence is obtained from the location-oriented social network. Based on the order of access to the categories, a category association graph is constructed for each user. Each node in the graph represents each category in the user's check-in category sequence, and the edge between nodes indicates that there is a order relationship between the two category nodes in the sequence. Through the gated graph neural network, the vector representation and weight parameters of the nodes in each graph are optimized to obtain the vector representation of the category association graph. The user's category preference is obtained through the attention mechanism. The gated graph neural network is a graph neural network based on the gated recurrent unit (GRU). The gated graph neural network optimizes the data of the category association graph. The input of the gated graph neural network is the embedded vector representation of the category, and the output is the user's category preference.
[0062] Next, we retrieve the user's check-in sequence from a location-based social network. This contains contextual information such as point of interest (POI), time, location, distance, time difference, and day of the week. This information is converted into an embedded vector representation using a word2vec model. Using LSTM and a contextual attention mechanism, we determine the influence of different attributes on each check-in, thereby obtaining an embedded vector representation and hidden state for each check-in. Using a temporal attention mechanism, we determine the influence of each check-in on the next check-in location, thereby generating the user's point of interest preferences.
[0063] Finally, candidate POIs are obtained based on the user's visit history, the popularity of the POI, and the distance. Combined with the user's category preferences and POI preferences obtained previously, the candidate POIs are sorted to generate a Top-N recommendation list, which specifically includes:
[0064] Step 1: Extract the POI number, time, category, and geographic location of the check-in from the LBSN based on the user ID, and perform data preprocessing operations;
[0065] Time refers to the time when the user visits the POI. Category refers to the category of the POI, such as catering, office space, entertainment, sports, etc. Geographic location is a binary tuple consisting of longitude and latitude, which is used to represent the specific location of the POI.
[0066] Count the number of check-in activities for each user, delete inactive users with fewer than 5 check-in activities, and delete inactive POIs that have not been visited by any user, and then reset the user ID and POI ID to 1. Calculate the distance between POIs based on the geographic location of the user's check-in POI and store it in a distance matrix for later use.
[0067] Step 2: Get each user's check-in category from the extracted information and form a category sequence according to the time order of check-in in Represents user u at time t k Visited the cat category v Points of interest v.
[0068] Step 3: According to the relationship between the categories visited in the sequence, convert it into a category association graph. Each node in the graph represents a category that the user has checked in to. The undirected edge between two nodes represents that the user has checked in to these two categories successively. Figure 2 As shown, for example, if the user's check-in category sequence is "catering" - "leisure" - "sports", there are 3 nodes in the category association graph, representing "catering", "leisure", and "sports" respectively, where there is an edge between "catering" and "leisure", and there is an edge between "leisure" and "sports".
[0069] Step 4: Use the word vector mechanism to obtain the embedding vector representation of each node in the graph.
[0070] Step 5: The embedding vector representation obtained by the word embedding mechanism is input as the initial vector into the gated graph neural network. After continuous iterative optimization, the connection between the user's access categories is captured and the embedding vector representation of the category is accurately generated. The calculation method is as follows.
[0071]
[0072] Where, is the weight matrix in the model, is the set of real numbers, E is the dimension, is the bias vector, is the embedding vector representation of the category of the user’s visited point of interest v; is the embedding vector representation of each node in the graph; is the initial state of node (POI category) c; A c It is a vector representation of whether there is an edge between the category node c and other nodes in the category association graph. represents the hidden state of all category nodes c at time t-1, b is the bias vector, is the input vector of the current node c in GGNN at time t, σ() is the sigmoid function, is the hidden state of node c at time t-1, It is the update gate in GGNN, which controls the amount of data that the previous memory information can continue to retain until the current moment, or determines how much information from the previous time step and the current time step is to be passed to the next time step. It is the reset gate in GGNN, which controls how much past information to forget. z 、U z 、W r 、U r , W, U are weight parameters, tanh() is the hyperbolic tangent function, ⊙ is the element-wise multiplication operator, is the candidate hidden layer state at time t, is the hidden layer state at time t.
[0073] Through continuous iterative optimization of the category association graph of each user, the embedded vector representation of all categories is obtained:
[0074]
[0075] Where, is the embedding vector representation of each category node in the graph.
[0076] Step 6: Use the attention mechanism to obtain the embedding vector representation of the entire graph based on the embedding vector representation of each node in the graph, that is, the user's category preference.
[0077] Use the attention mechanism to output the user's category preference for the entire image:
[0078] α c =W1σ(W2q+W3c c );
[0079]
[0080] Where W1, W2, and W3 are weight matrices, q is the query parameter in the attention mechanism, and α c is the weight of each category node in the association graph, is the user's category preference, and Y is the total number of categories the user checks in to.
[0081] Step 7: Extract each user's historical check-in sequence from the LBSN in chronological order, which contains the check-in attributes such as POI, time, geographic location, distance, time difference, and day of the week.
[0082] Step 8: Extract the check-in attributes from the user trajectory sequence and convert them into embedded vector representations using the word embedding mechanism to prepare for input into the LSTM model.
[0083] The historical check-in activities of user u are represented as check-in tuples Indicates that user u is at t k Points of interest visited at all times The geographical location is l v , the category is cat v , the time belongs to the first day of the week The six check-in attributes of POI, time, geographic location, distance, time difference, and day of the week are embedded in the vector representation based on the word vector mechanism.
[0084] Step 9: In order to consider the influence of each attribute on the check-in behavior, the embedding vector representation of each attribute in the check-in is input into the contextual attention layer combined with LSTM; each feature in the embedding layer marks an attribute of the current check-in, and the influence of these attributes on the current check-in is different. Therefore, based on the contextual attention mechanism, the proportion of different features in the current check-in is studied, and the embedding vector representation of each check-in attribute is obtained in the form of a weighted sum.
[0085]
[0086] Where, is the parameter to be learned corresponding to the i-th attribute, are the parameters to be learned, is in t k The embedded vector representation of the input to the LSTM network at each moment, x(i,t k ) represents the i-th feature of the k-th check-in under the contextual attention mechanism, including: is the embedding vector representation of the POI number in the k-th historical check-in, is the embedding vector representation of the POI location in the k-th historical check-in, is the embedding vector representation of the check-in timestamp in the k-th historical check-in, is the embedding vector representation of the day of the week in the k-th historical check-in, is the embedding vector representation of the distance difference between the current check-in and the previous check-in, is the embedding vector representation of the time difference between the current check-in and the previous check-in.
[0087] ρ(i,t k ) is the weight representation of the i-th feature in the k-th check-in:
[0088]
[0089] Where, is the temporary weight representation of the i-th feature in the k-th check-in, is the parameter to be learned, tanh() is the hyperbolic tangent function, is the tth k-1 The cell state at any moment, is the tth k-1 The hidden state at the moment, the exp() function is an exponential function with the natural constant e as the base. and ρ(i,t k ) to obtain the embedded representation under the contextual attention mechanism. Based on the contextual attention mechanism, the embedded vector representation of each check-in attribute is obtained as a weighted sum to obtain the embedded vector representation of the check-in activity.
[0090] Step 10: As t k The input vector at time t k-1 Hidden state at the moment Enter t together k In the LSTM at time t, get k Hidden state at the moment
[0091]
[0092] Where, It is t k The input vector at time t, is the hidden state at time t-1, both of which are t k The input of the LSTM network at this moment, It is t k The hidden state of the moment.
[0093] Step 11: To consider the different effects of different historical check-ins on each user's next POI preference, we use the temporal attention mechanism to adaptively select relevant historical check-in activities and learn the weights of different time steps in the check-in sequence to distinguish the importance of each check-in in the historical check-in, so as to better achieve the next POI recommendation.
[0094] is composed of all hidden vectors The weight vector μ for each sign-in is generated through the attention mechanism. k , use each The corresponding weight μ k Measure the impact of the k-th historical check-in on the next check-in.
[0095]
[0096]
[0097] Where, is the query information of the temporal attention mechanism, is the embedding vector representation of the next check-in POI at time N+1, and then the obtained weight vector μ k Multiply by H P , get the user's POI preference.
[0098]
[0099] Where μ k is time t k The hidden state The weight of is the POI preference of user u, k is the kth check-in, and N is the total number of check-ins.
[0100] Step 12: Filter candidate points of interest for each user from all points of interest. This point of interest must meet at least one of the following conditions: (1) the point of interest is visited by the user before; (2) the point of interest is close to the point of interest that the user visited most recently; (3) it is the point of interest that is visited most by all users, that is, a popular point of interest.
[0101] Step 13: Calculate the probability value of the candidate POI based on the obtained category preference and POI preference.
[0102] Calculate the probability value of the candidate POI by obtaining the category preference and POI preference;
[0103]
[0104] Where M is the number of candidate POIs, v k is the embedding vector representation of the candidate POI, cat v is the embedding vector representation of the category of the candidate POI, so Indicates that under the influence of category preference and POI preference, user u finally visits POIv k the possibility of For user u at time t N+1 Visit points of interest k probability;
[0105] Step 14: Sort the candidate POIs in descending order according to their probability values to obtain a Top-N recommendation list for user u, thereby recommending POIs of interest to the user based on the locations obtained in the recommendation list. The recommendation algorithm of the present invention can be applied to user service platforms such as Meituan and Facebook.
[0106] Although the embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the description and implementation methods. They can be fully applied to various fields suitable for the present invention. For those familiar with the art, additional modifications can be easily implemented. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to the specific details and illustrations shown and described herein.
Claims
1. A next location recommendation method based on spatiotemporal context and category preference, characterized in that: include: Step 1: Obtain the category sequence of user check-ins, build a category association graph for each user, use word vectors to obtain the embedding vectors of the nodes in the graph, train a gated graph neural network to obtain the embedding vector of each category node, and generate the user's category preference through the attention mechanism; The step one comprises: Step 1: Extract the check-in POI number, time, category, and geographic location from the LSBN according to the user ID and perform preprocessing operations; Step 2: Get each user's check-in category from the extracted information and form a category sequence according to the time order of check-in Where, Represents user u at time t k Visited the cat category v The point of interest v, t1 is the time when the user first signs in, t2 is the time when the user second signs in, t N The time of the Nth sign-in behavior; Step 3: Convert the sequence into a category association graph based on the preceding and following relationships between categories. Each node in the graph represents a category that the user has checked in to, and an undirected edge connecting two nodes represents that the user has checked in to these two categories successively. Step 4: Use the word vector mechanism to obtain the embedded vector representation of each node in the graph, and input the embedded vector representation obtained by the word vector mechanism as the initial vector into the gated graph neural network. After continuous iterative optimization, the connection between the user's access categories is captured and the category embedded vector representation s is generated. c ; Step 5: Use the attention mechanism to obtain the embedding vector representation of the entire graph based on the embedding vector representation of each node in the association graph, which serves as the user's category preference; Step 2: Obtain the user's check-in sequence, obtain the embedded vector representation and hidden state of each check-in through LSTM and contextual attention mechanism, obtain the weight of each check-in based on the temporal attention mechanism, and generate the user's point of interest preference; The second step includes: Step a: Extract each user's historical check-in behavior from the LBSN in chronological order to obtain a user check-in sequence; Step b: extract the check-in attributes from the user trajectory sequence and convert them into embedded vector representations through the word vector mechanism; Step c: The user at time t k Embedded vector representation of check-in With t k-1 Hidden state at the moment Enter t together k In the LSTM at time t, get k Hidden state at the moment Generate the weight vector μ for each sign-in through the attention mechanism k , use each The corresponding weight μ k Measure the influence of the k-th historical check-in on the next check-in, and obtain the weight vector μ k Multiply by H P , get the user's POI preference; Step 3: Filter candidate POIs, combine category preferences and POI preferences, calculate the probability values of candidate POIs, sort them in descending order, sort the candidate POIs, and recommend the Top-N locations to the user.
2. The next location recommendation method based on spatiotemporal context and category preference according to claim 1, characterized in that In step 5, the user's category preference is output for the entire image through the attention mechanism, including: a c =W1σ(W2q+W3s c ); Where W1, W2, and W3 are weight matrices, q is the query parameter in the attention mechanism, and α c is the weight of each category node in the association graph, is the user's category preference, and Y is the total number of categories the user checks in to.
3. The next location recommendation method based on spatiotemporal context and category preference according to claim 2, characterized in that: In step b, the historical check-in activity of user u is represented as a check-in tuple The above formula indicates that user u is k Points of interest visited at all times The geographical location is l v , the category is cat v , the time belongs to the first day of the week sky; The embedding vector representation of each attribute obtained according to the word vector mechanism is generated in a weighted form based on the attention mechanism. Where, is the parameter to be learned corresponding to the i-th attribute, are the parameters to be learned, is at time t k Check-in embedding vector representation, x(i,t k ) represents the embedding vector representation of the i-th feature in the k-th check-in under the contextual attention mechanism, ρ(i,t k ) is the weight representation of the i-th feature in the k-th check-in, Represents the embedding vector representation of the i-th attribute in the k-th historical check-in.
4. The next location recommendation method based on spatiotemporal context and category preference according to claim 3, characterized in that In step c, the weight vector μ for each sign-in k The calculation formula is: Where, is the query information of the temporal attention mechanism, is the embedding vector representation of the next check-in POI at time N+1, and then the obtained weight vector μ k Multiply by H P , get the user's POI preferences: Where μ k is time t k The hidden state The weight of is the POI preference of user u, k is the kth check-in, and N is the total number of check-ins.
5. The next location recommendation method based on spatiotemporal context and category preference according to claim 4, characterized in that: The step three includes: Calculate the probability value of the candidate POI by obtaining the category preference and POI preference; Where M is the number of candidate POIs, v k is the embedding vector representation of the candidate POI, cat v is the embedding vector representation of the category of the candidate POI, so Indicates that under the influence of category preference and POI preference, user u finally visits POIv k the possibility of For user u at time t N+1 Visit points of interest k probability; Sort the candidate POIs in descending order according to their probability values to obtain the Top-N recommendation list for user u.